We already covered phenomenal software design flaw, so now we already know that if you have, you still
could have you convert that into the big fight.
Great that could be programmed on an FPGA.
Now the next important concept before we actually proceed to discuss the more looks delays to understand
where are the situation where signal and variable attributes look right, so we will be frequently utilizing
them in and still blocks.
We will try to understand now what are the uses that we have for a signal like variable rate?
So first, let me just proceed with the situation right to let you know.
You are building a counter right?
So you are building a counter.
So when we see that you are building a counter and let us assume that y use of a lever.
OK, that will give us the output value of the counter right.
So if our previous value acquired Zettl in the next block, it should be y equal to one.
Similarly, in the next block, it should be like.
Right?
So if you are listening to logic, you would clearly see that to build a counter correctly, we must
have an access to the previous value, right?
This makes sense because once we know a previous value and the step says we have for a counter, OK,
then we could predict what should be the next value, right?
So in this case, if my previous value OK, so previous value is zero.
And I know that the step says that I have or my count, there is way so I could see that the next two
Alu.
OK, next to value is zero plus one, right?
So it should be what?
So these are the leaders that we have for building account write letters, as you know, we declared
when.
Moderate, so we have to input greatly is an.
So, ladies, it's you that we start building a counter, right, so why is it OK, which represent
the output of account?
Right?
So it is having the directioners out and let us assume that our counter is off size.
But so our standard and the school logic are in this corrective, OK and forward.
So three down to see right now the difficulty with that out is so let's assume you want to join the
logic, right?
So the logic will be something like this, like let's do y plus one, right?
This makes sense.
So this will be odd logic depending on the algorithm that we discuss over here, right?
So like lost weight +1, and this suggests that we want to use VI on in origins of our expression.
But the difficulty with the output code is we could use them only on a little site, right?
So they are allowed to use on an alleged site and we are not allowed to use them on an audit, just
say.
Right.
So if you just try to implement this equation in any deal, you'll be getting an edit because output
boards are not allowed to use on in order to say, OK, so this restrict us from building the counter
like this, right?
OK, so whenever you have a situation where you want to reuse certain value.
OK, in that case, we actually the use of one of these variable type rate so you could use signal or
you can use.
Variable rate, so these are the new identities that we have, Rachel.
The difficulty that we face with an input and output put for using the value of an output pool could
be eliminated with the help of a signal of variable rate.
So how are implementation of this variable?
So as you when we apply, reset.
OK, so when reset is high in that case, what we're going to do is that it's assumed that we declared
one variable, which is of type signal.
And this is the temporary variable.
So we'll just be making temp equals zero.
Right now, that restriction that we have with the output code, that is we cannot place it on, then
origins of the expression OK is not.
Not a value for the signal, right, so we could use them on, and I would just say so we could just
implement an expression like this and pick words to them.
Plus what right now we could take the previous value we could incrementing.
So here we have our step sites and this replacing our previous one.
So this exactly represent the behavior of our founder.
And then at the last, when we complete our own them, we could just use the assignment operator and
then connect temporary variable to an output.
So whatever value that we have or temporary variable or a signal like that, property will be automatically
send on an output.
And this we will be able to get our counter implemented, right?
So this is the first use that we have for a signal, right?
So we are just understanding what are the different situation where we have.
A requirement for a signal and variable and then will understand how to use them.
Right?
Now, you could see that same process could also be implemented with a variable rate.
So whatever you can do with the signal can be done with the variable.
So what is the difference that we have, right?
So to understand that difference, let's consider a simple.
Sequel bait, so you have a function, OK?
They just need this as a unique.
And then you have certain logic mentioned inside this, right?
Then we have one more function.
OK.
And let me just name this as.
X y z.
OK, and then you have a logic, right?
And finally, you have mean again, then you have a logic, right?
So this is the sequel, right?
And here in the function ABC, we have one individual variable that it just named this a z.
And here we have an integer variable X.
And outside of this to function, they just it's you that you have one variable which is declared outside
of this to function.
So when?
But right now, you really see that and they have a local school that is it is visible inside this function.
Right?
Whereas if you consider any so it is not restricted to any of a function, you could utilize it in an
EBC function.
OK, you will utilize in a function next visit.
Or you could also utilize in a mean function, right?
So R and B is referred to as a global variable.
They have a global scope.
All the function can access it, right, similarly.
The mean function could also access it, but when we considered in.
So it is local to this function, so this is a local variable.
OK.
And we can see the scope of this variable is local to function EBC, right?
This makes sense.
So we have a score and we understand the local variable and global rating.
OK.
Now if you compare this with, then we still could.
Right.
So we have an entity.
OK.
And then we define all the ports which are printed in our design.
Right.
Then we have an architecture, OK, which represented an actual interconnection between the port and
the logic that we want to implement or to have inside our system.
Right.
Then in between architecture and baking.
Right, so we have our first big in between architecture and thinking we could declare full thing so
it could be a signet, right?
So signal is something that we are discussing.
We could add a component over here.
OK, so if you want to reuse any of the module, so the instance of that component should be declared
over here, then we would have memories over here.
Right?
So just remember this food thing as you progress, further, things will become much easier to understand,
right?
We have a memory over here.
And then the last thing that we could add over here is user defined.
Detainee.
OK.
So these are the four things that we could declare between architecture and begin, right?
So you see the first we in the speech that you have between architecture and begin is waiting for a
declaration of this whole thing.
Right.
Then we have a process right off to begin.
We have a process.
And then again, between processes and begin, we have a space right?
And this space is allocated for declaration of very human rights and something that we are discussing
in this video signal and variable.
So you could clearly see we have different spaces where we could declare signal.
OK, and nobody.
But so between architecture and begin the add signal.
Similarly, between process and begin, we add very right and an architecture could have a multiple
process.
So this represents, let's assume, process one.
OK.
Similarly, we could have a process to get this again.
Start with the process block and then we again have a begin.
OK.
Again, this piece is allocated for declaration of of you.
Right now, you could clearly see the variable that you declared between the process.
OK, so you have a process and then in process.
Right?
So they are visible between this process, right?
So you could not use very well.
Let's assume we declare variable V1 over here and variable v2 for the process v2.
So V1 is visible only in the process, even if it is not visible to the rest of the blocks which are
present in an architecture.
Similarly, when we going to variable V2.
So it is very it is visible only in the process, right?
We could see the variable have a local school, right?
So they are looking into a process.
Similarly, if you consider signal, a signal are declared between architecture and begin, but they
are accessible or visible to all the processes that we have in an architecture, right?
So they are visible to all the blocks that are written in an architecture so they can be considered
to have of global scope.
So this is the primary difference that we have between them, right?
So signal is visible to all the process, which you have written in an architecture whereas variable
that you declared for a specific.
Grosses will be visible to that process.
You cannot access them outside the Barossa.
So this is the fundamental difference that we have, right?
So they we already know one often use off of it, either whenever you want to re-use any of the value
the signal already will be choosing.
And now it is purely depend on your choice, whether you want to keep that quality but local to the
process or whether you want to keep that variable.
To have a global scoop says that multiple prices could access it, right, the first usage, whenever
you want to use any of the value, OK, you will be preparing to go it variable and the signal, right?
So any one of them you would choose depending on the specific requirements that you have.