OK, now let us create a lunch.
Well, in the last lecture we have created and that's our lunch using the dataflow method.
Now let us create a delarge of this time using behavioral methods.
I am jumping into between these styles because I want you to get used to it so that you can understand
the difference and how sometimes structural or dataflow makes stuff easier in terms of the circuit model.
So let us get started with our Lelouch.
We're going to take our libraries.
I'm going to define an entity.
They call this Delarge.
Is and we have a port, I'm sure you do remember, was that what does that the sludge contain?
That is it has to impose one of them is the dimpled and the other is the clock or enable.
So let's call it a clock.
These are my in steady.
Logic and we have one output, which is the Lache out, it is out as to the logic.
OK, now let's end this.
So this is and the large.
Cool.
Next, let's start the architecture.
Behavioral.
The Lache.
What do you think should be here, the behavioral?
Well, it's really very simple.
We could use a very simple process to do that.
We could say process, we have a clock and so we want to evaluate whenever a clock or the changes.
So begin.
They were going to say if.
Enable.
Equals one.
Then.
Kerry calls the.
Now we're going to say if.
Gloc.
Equals one.
Then cue.
Equals death, OK?
And if.
And process.
And then behavioral.
And it this should be really enough now if we save this, we call the Delarge the same as our entity
name and simply we just set it as a top level and let's go and compile.
All right, now we can go and simulate this, so let's take a VW and let me add.
All of these.
Now, let's say the data here is zero good.
Then let's say the data here is well.
Let's say the data here is also on.
And here is also on.
OK, so I want my clock here to be.
One.
I wanted to be one, I wanted to triple zero, and I wanted only to be one.
Now, let's save this.
We're going to call it Delarge.
Simulation settings restore default.
And let's delete this save and let us simulate now.
And let's see.
So at the beginning, the clock was zero and this is supposed to maintain order.
We have again, since this is the beginning of time, we don't know what does this contain.
So the simulator is in confusion, like what is in order to maintain it.
So it's correct.
Now, here is one.
So whatever the hackers will see on the Q.
OK, now here also is one clock is one and this is one.
So you will copy do you whenever a clock is one.
So you can think about it as when enable or clock is pressed, queue is going to copy.
So here it is abreast as you can see queue is copying the let's see at this moment here.
Well, the clock is not pressed, so the value will be maintained and nothing will be copied.
So Q was one.
We removed it and we continue here all the way as well.
Now here now clock is enabled.
It means copying is going to happen.
So Q is copying these and it's zero.
It is zero.
OK, now the changes to one, but the copy command is not here, which is the clock, so it will retain
zero.
Nothing to be copied because it's not enabled and it will retain zero as long as the clock is zero until
clock allows copying again.
And he will be going to copy.
And this is what's happening.
So the simulation is correct and this is the level based Delarge.