Hello, guys, and welcome back, and this is actually we're going to start work this Late Edition.
I hope that you have installed this from the previous lecture and you know how to install the car to
Slide Edition.
This is the software that we're going to use to program a video, which is the language that is used
to accomplish a gate, that is the language that is used to prototype microprocessors, memories of
metrological units and a lot of stuff.
So we've got to learn the basics of this language.
And you're going to see how we can implement logic gates and logic circuits using this software.
Now, as we progress through this section, we're going to learn a new stuff.
So every time we take a new component, we going to see how we can program it.
And at the end, we're going to put everything together to create a small project.
So let us get started.
So to start with, you need to go to file and you need to go to a new project to assert here we can
create our project.
We need to click on next.
Let's Go project for project, what you can call it, whatever you want.
Like on.
Yes.
This is the directory that siliceous.
Now you want to look at a different directory, let's say no.
And we need an empty project like next, next no here, I hope that you have installed the library that
I've told you to install.
If so, you're going to see this family right here.
If not, please try to install the device library that we've talked about in the previous lecture.
Now, let's choose the cycle of eBay, let's say.
Doesn't really matter right now what you select, just like any device randomly.
And click on next.
Next.
So right now, we are creating in your project.
And here we go.
This is our caucus, though, there is something that you need to do, which is to set up a simulator.
Now you're going to see what is a simulator later.
But for now, I want you to follow these steps, go to options.
Tools, options.
And I want you to put this back.
This is the part where we have installed models of terror.
I want to just to put this back exactly as it is.
And I want you not to forget adding this windows 30 to 32, Illinois.
OK, make sure you've done that.
If you want, you can freeze the screen right now.
Copy the Spath and add to model sense of terror.
You know, the next step is I want you to go to assignment and go to settings now in settings.
I want you to go to simulation.
And I want you to choose models of terror.
And I want you to choose a video and I want you to click on, OK?
All right, next now by that, you have prepared the environment.
There's other settings that we need to do later, but for now, that's enough.
So now let us create a new HGL.
Click on you and I want you to choose the HDL.
Now, this is an empty file and this is where our code will go.
So our aim is to create a very simple end game so attached to inputs and one output.
And depending on what input combination we put, we just going to get an output.
So let us see how we can implement this complex.
And you remember what we're doing here?
We are programming circuits, so we are programming to assert itself.
So first, we need to add the libraries like any other programming language.
We need a library, so we need libraries in Tripoli.
This is the first library.
No from this library.
I would like to use a certain sub library.
So this is easy to S.T. the logic.
One one six four, and I want you to click on Dot Old, it means I want everything in this library.
All right.
This line is going to be in every single video phone you're going to get next.
Now, there is two sections that I need to create.
The first one is called Entity Entity.
And I'm going to call this project.
What is?
Then I'm going to write called.
And I will pop into parentheses like this, and I'm going to leave it here and this section, we're
going to add our inputs and outputs.
Now, the next one is the architecture behavior.
So we've got the right texture.
Behavioural of.
And after all, we're going to put the name of the project, which is projectable, is we've got the
right we can now see these two sections.
They're going to be also on every detail you're going to see.
Now, there is two things that I forgot to you just to end it, so you got to type and project one.
So you're ending the entity and you go to end the architecture and we have your.
Now, it's time that I explain to you what's going on, so here is the point, meaning you put your
inputs and outputs and engaged contains two inputs on output so I can define them like that.
This is input a.
This is input B and we're going to specify the type which is and meaning it's an input and you need
to specify what type of input are you talking about?
Remember, in any programming language, those booleans, those integers, there's a lot of stuff.
And we have something called standard logic and we call it SDD.
OK, we have defined two inputs.
This is the name of the input.
This is the type of input we call it.
And then the type of input, meaning I'm using integers.
Are we using the logic?
For now we are using a severe logic and steady logic is just a one because it's like pulling something
like that.
Not exactly boolean, but you can think about it like a boolean.
Next we have an output, right?
So I have one output.
And by the way, this is not letter sensitive, so you can type in capital letters or letter.
It doesn't really matter if you define this like this input and you use it right here using like something
like that.
It's the same thing.
It's not really letter sensitive.
OK, next we have output and we're going to call this out because this is an output and it's also an
estimate.
OK, so we have one two inputs, one output.
And this is my aggregate.
Now, in the architecture, we've got to define how will this input and how it would behave?
It's very, very simple.
Got to say, output is actually equal to and equal to in this case.
Looks like this a conversion letter and an equal letter.
OK, so it's legal to import.
A and and B, right, we are trying to bend the logic between input and it would be as simple as that.
By that we have created a gate that's really nice.
It's as simple as that.
Now we can compile and see if we have any error.
So click on this compilation.
You want to save this?
Yes.
And I want you to save it with the same name that you have put right here.
Otherwise, you're going to have some issues always, namely HDL, as the same as the entity you're
calling.
Right.
You don't try to name it something different.
All you're going to have errors was compile.
This is a very important note.
So let us just say this.
We are compiling to see if we have any errors and we have actually some errors.
And the reason is, well, even though we have a semicolon after every instruction.
The last instruction in the report should not have any semicolon and a semicolon should be after the
parentheses, I know this is a little bit weird, but this is how it is.
And video, the syntax is a little bit annoying.
I can tell you this.
Let's go again.
And we are done with compilation.
That's great.
So this is the first part of any deal.
Now, the next thought is to test.
I mean, you have written a code, but how can you even test that right to do this?
We're going to create something go away for.
So great that you and I want you to go all the way to.
University program.
Now, there is two way to grade this, either this or you can't create a test bench, but I'm not going
to go through test benches right now.
I'm going to go for some something simpler so that you can debug some stuff easier.
So let's click on this.
And now what I want to do is I want X equals.
Now, this is where our waveform is going to be and this is where we add a signal.
So.
Right, click here and I want you to click on insert note finder and the next list.
That's like a list you got to see and put one in would be and I want you to add all of them if you because
this you're going to add everything like, OK.
OK, again, this is your input and output.
No, there is some configuration that you need to do, right?
You got the simulation simulation settings and see this restored default.
I want you to look at.
And I want you to delete this.
No, the obesity and the desk next to it, so just remove it and save.
Otherwise, you don't get some competition next.
We need to divide this in a way so that we are testing almost every case we get test usually tests,
you cannot test everything because, well, in some cases this is like a huge burden.
But in simple cases like these, we can test everything.
I mean, in the top table, we have only four cases, zero zero.
Right.
And zero one one zero one one.
So let's say that this section here is zero zero and it is already at zero.
Now, let's take the section, let's say, from here.
I'm going to put this as one, so if you go here and click on this one, the waveform would go up.
So this is zero amputates zero and now input eight is one.
So we are testing zero zero and here one zero.
Now we need zero one.
Right.
So here, let's say from this point on, we're going to have one.
So now we are getting zero zero one zero zero one and we need to test one one as well.
So let's take this section right here and we raise it both.
So now we have one.
So by that, we are testing every combination of inputs and we're going to see there is no let us hit
on this here from functional simulation.
We need to save this.
And I want you also to save it with the same name.
So project will always save with the same name as your entity.
Now we try to compile and we have some errors.
All right.
There is one other configuration that we need to do.
And this configuration is the.
Let's go back to school and assignment settings and I want you to open more Netlist writer settings.
So right now that us click on the simulation, if it did not work.
I want you to go back to simulation settings.
And they want you to hit on restoring before and again, delete that sometime this happens, click on
Save and I want you to hit on this to completed.
Now we are in simulation and here we go.
This is our end game.
Let's see if there is this correct.
When a zero on the zero zero right on one zero we get to zero because this is an zero one also zero
on the one.
We have one one that the input will get a one left out.
So this is how we create and get.
And the next lecture, we're going to continue with more stuff.