WEBVTT

00:00.210 --> 00:06.540
We already covered phenomenal software design flaw, so now we already know that if you have, you still

00:06.540 --> 00:09.810
could have you convert that into the big fight.

00:09.810 --> 00:12.180
Great that could be programmed on an FPGA.

00:12.600 --> 00:18.390
Now the next important concept before we actually proceed to discuss the more looks delays to understand

00:18.720 --> 00:25.590
where are the situation where signal and variable attributes look right, so we will be frequently utilizing

00:25.590 --> 00:27.000
them in and still blocks.

00:27.000 --> 00:32.490
We will try to understand now what are the uses that we have for a signal like variable rate?

00:32.880 --> 00:38.190
So first, let me just proceed with the situation right to let you know.

00:38.640 --> 00:41.550
You are building a counter right?

00:41.910 --> 00:43.920
So you are building a counter.

00:43.920 --> 00:49.050
So when we see that you are building a counter and let us assume that y use of a lever.

00:49.110 --> 00:54.060
OK, that will give us the output value of the counter right.

00:54.390 --> 01:00.330
So if our previous value acquired Zettl in the next block, it should be y equal to one.

01:00.380 --> 01:03.090
Similarly, in the next block, it should be like.

01:03.630 --> 01:03.930
Right?

01:04.350 --> 01:10.650
So if you are listening to logic, you would clearly see that to build a counter correctly, we must

01:10.650 --> 01:13.220
have an access to the previous value, right?

01:13.740 --> 01:19.670
This makes sense because once we know a previous value and the step says we have for a counter, OK,

01:20.010 --> 01:22.560
then we could predict what should be the next value, right?

01:22.570 --> 01:26.910
So in this case, if my previous value OK, so previous value is zero.

01:27.090 --> 01:33.870
And I know that the step says that I have or my count, there is way so I could see that the next two

01:33.870 --> 01:34.230
Alu.

01:34.440 --> 01:38.330
OK, next to value is zero plus one, right?

01:38.340 --> 01:39.240
So it should be what?

01:40.220 --> 01:46.520
So these are the leaders that we have for building account write letters, as you know, we declared

01:46.520 --> 01:46.790
when.

01:47.790 --> 01:52.860
Moderate, so we have to input greatly is an.

01:54.140 --> 02:01.100
So, ladies, it's you that we start building a counter, right, so why is it OK, which represent

02:01.170 --> 02:02.510
the output of account?

02:02.600 --> 02:02.870
Right?

02:03.020 --> 02:08.570
So it is having the directioners out and let us assume that our counter is off size.

02:08.780 --> 02:14.360
But so our standard and the school logic are in this corrective, OK and forward.

02:14.510 --> 02:22.940
So three down to see right now the difficulty with that out is so let's assume you want to join the

02:22.940 --> 02:23.580
logic, right?

02:23.600 --> 02:27.920
So the logic will be something like this, like let's do y plus one, right?

02:27.950 --> 02:28.550
This makes sense.

02:28.550 --> 02:33.770
So this will be odd logic depending on the algorithm that we discuss over here, right?

02:34.010 --> 02:41.390
So like lost weight +1, and this suggests that we want to use VI on in origins of our expression.

02:41.390 --> 02:47.720
But the difficulty with the output code is we could use them only on a little site, right?

02:47.720 --> 02:53.720
So they are allowed to use on an alleged site and we are not allowed to use them on an audit, just

02:53.720 --> 02:54.020
say.

02:54.050 --> 02:54.320
Right.

02:55.100 --> 03:01.280
So if you just try to implement this equation in any deal, you'll be getting an edit because output

03:01.280 --> 03:07.880
boards are not allowed to use on in order to say, OK, so this restrict us from building the counter

03:07.880 --> 03:08.660
like this, right?

03:08.870 --> 03:14.000
OK, so whenever you have a situation where you want to reuse certain value.

03:14.390 --> 03:23.840
OK, in that case, we actually the use of one of these variable type rate so you could use signal or

03:23.840 --> 03:24.680
you can use.

03:25.670 --> 03:30.040
Variable rate, so these are the new identities that we have, Rachel.

03:30.230 --> 03:36.920
The difficulty that we face with an input and output put for using the value of an output pool could

03:36.920 --> 03:39.880
be eliminated with the help of a signal of variable rate.

03:39.890 --> 03:42.470
So how are implementation of this variable?

03:42.770 --> 03:45.340
So as you when we apply, reset.

03:45.420 --> 03:51.470
OK, so when reset is high in that case, what we're going to do is that it's assumed that we declared

03:51.470 --> 03:54.140
one variable, which is of type signal.

03:54.920 --> 03:56.690
And this is the temporary variable.

03:56.690 --> 03:58.970
So we'll just be making temp equals zero.

03:59.030 --> 04:04.780
Right now, that restriction that we have with the output code, that is we cannot place it on, then

04:04.790 --> 04:08.870
origins of the expression OK is not.

04:10.420 --> 04:16.240
Not a value for the signal, right, so we could use them on, and I would just say so we could just

04:16.240 --> 04:20.080
implement an expression like this and pick words to them.

04:20.380 --> 04:25.570
Plus what right now we could take the previous value we could incrementing.

04:25.780 --> 04:31.060
So here we have our step sites and this replacing our previous one.

04:31.330 --> 04:34.650
So this exactly represent the behavior of our founder.

04:34.990 --> 04:43.210
And then at the last, when we complete our own them, we could just use the assignment operator and

04:43.210 --> 04:46.300
then connect temporary variable to an output.

04:46.780 --> 04:53.080
So whatever value that we have or temporary variable or a signal like that, property will be automatically

04:53.080 --> 04:54.040
send on an output.

04:54.640 --> 04:58.180
And this we will be able to get our counter implemented, right?

04:58.510 --> 05:01.180
So this is the first use that we have for a signal, right?

05:01.180 --> 05:04.780
So we are just understanding what are the different situation where we have.

05:05.700 --> 05:10.000
A requirement for a signal and variable and then will understand how to use them.

05:10.030 --> 05:10.250
Right?

05:11.400 --> 05:16.020
Now, you could see that same process could also be implemented with a variable rate.

05:16.230 --> 05:20.120
So whatever you can do with the signal can be done with the variable.

05:20.130 --> 05:21.930
So what is the difference that we have, right?

05:21.970 --> 05:25.530
So to understand that difference, let's consider a simple.

05:26.810 --> 05:30.050
Sequel bait, so you have a function, OK?

05:30.900 --> 05:32.730
They just need this as a unique.

05:33.670 --> 05:37.540
And then you have certain logic mentioned inside this, right?

05:37.890 --> 05:39.580
Then we have one more function.

05:40.610 --> 05:40.940
OK.

05:41.310 --> 05:43.460
And let me just name this as.

05:44.510 --> 05:45.390
X y z.

05:46.460 --> 05:48.500
OK, and then you have a logic, right?

05:48.680 --> 05:54.050
And finally, you have mean again, then you have a logic, right?

05:55.080 --> 05:56.370
So this is the sequel, right?

05:56.430 --> 06:02.340
And here in the function ABC, we have one individual variable that it just named this a z.

06:03.150 --> 06:06.300
And here we have an integer variable X.

06:06.540 --> 06:13.950
And outside of this to function, they just it's you that you have one variable which is declared outside

06:13.950 --> 06:15.000
of this to function.

06:15.210 --> 06:15.780
So when?

06:16.890 --> 06:26.070
But right now, you really see that and they have a local school that is it is visible inside this function.

06:26.550 --> 06:26.880
Right?

06:27.180 --> 06:33.860
Whereas if you consider any so it is not restricted to any of a function, you could utilize it in an

06:33.870 --> 06:35.380
EBC function.

06:35.450 --> 06:37.650
OK, you will utilize in a function next visit.

06:37.650 --> 06:40.050
Or you could also utilize in a mean function, right?

06:40.320 --> 06:46.200
So R and B is referred to as a global variable.

06:47.320 --> 06:48.890
They have a global scope.

06:49.100 --> 06:52.070
All the function can access it, right, similarly.

06:52.280 --> 06:55.670
The mean function could also access it, but when we considered in.

06:56.600 --> 07:00.230
So it is local to this function, so this is a local variable.

07:01.110 --> 07:01.370
OK.

07:01.610 --> 07:05.880
And we can see the scope of this variable is local to function EBC, right?

07:05.900 --> 07:06.480
This makes sense.

07:06.480 --> 07:10.430
So we have a score and we understand the local variable and global rating.

07:10.760 --> 07:11.090
OK.

07:11.270 --> 07:15.250
Now if you compare this with, then we still could.

07:15.390 --> 07:15.680
Right.

07:16.220 --> 07:17.440
So we have an entity.

07:18.790 --> 07:19.120
OK.

07:19.630 --> 07:26.050
And then we define all the ports which are printed in our design.

07:26.950 --> 07:27.190
Right.

07:27.520 --> 07:33.880
Then we have an architecture, OK, which represented an actual interconnection between the port and

07:33.880 --> 07:38.140
the logic that we want to implement or to have inside our system.

07:38.200 --> 07:38.470
Right.

07:39.450 --> 07:42.310
Then in between architecture and baking.

07:42.340 --> 07:47.190
Right, so we have our first big in between architecture and thinking we could declare full thing so

07:47.190 --> 07:49.220
it could be a signet, right?

07:49.260 --> 07:51.150
So signal is something that we are discussing.

07:51.450 --> 07:53.430
We could add a component over here.

07:53.840 --> 08:00.060
OK, so if you want to reuse any of the module, so the instance of that component should be declared

08:00.060 --> 08:03.220
over here, then we would have memories over here.

08:03.570 --> 08:03.840
Right?

08:03.870 --> 08:09.510
So just remember this food thing as you progress, further, things will become much easier to understand,

08:09.520 --> 08:09.750
right?

08:09.990 --> 08:11.640
We have a memory over here.

08:11.640 --> 08:16.650
And then the last thing that we could add over here is user defined.

08:17.610 --> 08:18.090
Detainee.

08:19.140 --> 08:19.400
OK.

08:19.650 --> 08:24.090
So these are the four things that we could declare between architecture and begin, right?

08:24.110 --> 08:30.150
So you see the first we in the speech that you have between architecture and begin is waiting for a

08:30.150 --> 08:32.100
declaration of this whole thing.

08:32.190 --> 08:32.410
Right.

08:32.700 --> 08:36.110
Then we have a process right off to begin.

08:36.120 --> 08:37.020
We have a process.

08:37.260 --> 08:41.520
And then again, between processes and begin, we have a space right?

08:41.760 --> 08:48.240
And this space is allocated for declaration of very human rights and something that we are discussing

08:48.240 --> 08:50.500
in this video signal and variable.

08:50.520 --> 08:55.260
So you could clearly see we have different spaces where we could declare signal.

08:55.590 --> 08:56.580
OK, and nobody.

08:56.580 --> 09:00.660
But so between architecture and begin the add signal.

09:00.810 --> 09:08.130
Similarly, between process and begin, we add very right and an architecture could have a multiple

09:08.130 --> 09:08.580
process.

09:08.760 --> 09:11.670
So this represents, let's assume, process one.

09:12.180 --> 09:12.570
OK.

09:13.320 --> 09:17.520
Similarly, we could have a process to get this again.

09:17.520 --> 09:20.580
Start with the process block and then we again have a begin.

09:20.880 --> 09:21.180
OK.

09:21.240 --> 09:25.350
Again, this piece is allocated for declaration of of you.

09:25.500 --> 09:30.280
Right now, you could clearly see the variable that you declared between the process.

09:30.370 --> 09:32.940
OK, so you have a process and then in process.

09:33.010 --> 09:33.240
Right?

09:33.570 --> 09:38.160
So they are visible between this process, right?

09:38.370 --> 09:40.050
So you could not use very well.

09:40.050 --> 09:45.570
Let's assume we declare variable V1 over here and variable v2 for the process v2.

09:45.720 --> 09:52.800
So V1 is visible only in the process, even if it is not visible to the rest of the blocks which are

09:52.800 --> 09:54.050
present in an architecture.

09:54.060 --> 09:56.310
Similarly, when we going to variable V2.

09:56.550 --> 10:00.080
So it is very it is visible only in the process, right?

10:00.300 --> 10:04.440
We could see the variable have a local school, right?

10:04.710 --> 10:07.080
So they are looking into a process.

10:08.520 --> 10:14.370
Similarly, if you consider signal, a signal are declared between architecture and begin, but they

10:14.370 --> 10:19.260
are accessible or visible to all the processes that we have in an architecture, right?

10:19.470 --> 10:24.900
So they are visible to all the blocks that are written in an architecture so they can be considered

10:24.900 --> 10:27.980
to have of global scope.

10:28.240 --> 10:31.320
So this is the primary difference that we have between them, right?

10:31.620 --> 10:37.860
So signal is visible to all the process, which you have written in an architecture whereas variable

10:38.010 --> 10:39.690
that you declared for a specific.

10:40.610 --> 10:43.100
Grosses will be visible to that process.

10:43.340 --> 10:46.340
You cannot access them outside the Barossa.

10:46.580 --> 10:49.280
So this is the fundamental difference that we have, right?

10:49.700 --> 10:56.660
So they we already know one often use off of it, either whenever you want to re-use any of the value

10:57.050 --> 10:59.900
the signal already will be choosing.

11:00.050 --> 11:06.560
And now it is purely depend on your choice, whether you want to keep that quality but local to the

11:06.560 --> 11:08.960
process or whether you want to keep that variable.

11:10.230 --> 11:15.690
To have a global scoop says that multiple prices could access it, right, the first usage, whenever

11:15.690 --> 11:23.550
you want to use any of the value, OK, you will be preparing to go it variable and the signal, right?

11:23.550 --> 11:27.860
So any one of them you would choose depending on the specific requirements that you have.
