Now, in this lecture, I want to teach you, how can you combine multiple signals into one bus?
So instead.
Of going to simulation and trying to set every single bit individually.
Well, that's not really practical.
I want you to just be able to combine them.
And simply be able to put a number.
Now, there is two ways, one of them is to do it in the simulation and another one is to do it actually
in the actual circuit.
Now, let me show you the quick way.
If you have such a scenario when you have multiple signals, so I'm going to mark all of these four
signals.
Right.
Click and go to grouping and just choose a group.
And I'm going to call this a.
OK, so here I'm getting one one zero zero.
But as you can see, this is not the correct sequence, what I want here was three, so it's zero zero
one one.
This is actually not three.
In order to do that right, click again.
Got to reverse the group bus bit order.
And now we have zero zero one one.
That's great.
Same thing here with me, Mark.
All of this group them I'm going to call them B, and here we have zero zero one zero meaning actually.
At two, which is not the correct situation, what I want here is zero one zero zero.
So again, reverse and this is the right order.
Something for this some.
I'm going to group them.
And this is some and I'm going to reverse.
The group right here like that, and then similarly, I'm going to save and we compile.
Now, that's a great we're getting zero one one one, and we can see that without really just counting
every single bit.
Now, it's really if you don't know the binary right in your head, what you can do is convert these
to unsign numbers.
So let us close this here as well.
Just log them right.
Click Radix, and I want you to choose unsigned decimal.
Now you have three, you have four.
And you have the summation.
That's a great no.
The second way is not in simulation, but actually combining the buffers in your circuit.
So we're going to go here and we're going to start doing this.
In this case, I won't need any of these inputs anymore, so I don't need to zero.
I don't need to be zero.
Don't need any of these because there are going to be combined.
First thing I need to do is to create two buses.
First bus is this one.
First was, is this one and the second bus is this one.
OK, next, I want you to create to inputs, so go to PIN.
Choose input and connect them.
Do the buses remember here, I'm using a bus signal, the bus tool, I'm not using the no tool, no
tool is only a single line bus.
So we can combine multiple lines together.
We'll see how we can do that.
Now, this will be my A.
This will only be.
How about we just extend them a little bit?
Now, let's extend this a little bit as well.
OK, next, I want you to right click on this bus, go to properties, and I want you to give it the
name as follows.
I wanted to say a.
Bracket.
Three dot dot, zero closed circuit, OK, this means that this a is not a single line, but it is a
multiple lines and they are indexed three down to zero.
OK, this is now an STD vector, as we have learned when we are programming and video games.
So this is how we create a vector in the block diagram schematic.
Now I want you to do the same thing for the next line, right.
Click on it properties.
But this time called this B bracket three dot dot zero close bracket.
OK, this is the Syntex No get individual lines, and they wanted to connect the A's first to the A's,
so this is my first day.
This is my second day.
This is my third A.
And this is my last day, OK?
Now, we're not done yet.
What we want to do is tell, which is this is a day, zero is a day, one is day they or is it a three?
This is also very crucial.
So we just.
Right.
Click on the line we created and we just say this is a zero.
OK, now same thing for the next line, right.
Click properties.
I want you to say that this is a one on just copy pasting the same thing.
So properties, we just need to change the index here to to.
And finally, right here, properties, and here we have a three week.
Now, let us connect the bees and just do the same thing.
So this is my bee.
One.
To.
Here and this is the last one.
OK, that's wonderful.
Now let US properties and let us rename all of those again.
So this is zero.
This is simply one.
This is my.
The two.
And now this is my big three.
OK, and by that, we have combined these signals and now we have two buses instead of individual signals.
So this is very important.
When you have life designs, sometimes you need to combine bits together.
Sometimes you need to separate bits together.
This is the way to do it.
OK.
So let us come violencia if we have any issues.
OK, we have one issue, actually.
Here, we also need to consider that this is not one signal, so this cannot be called a it should be
called a three dot dot zero.
Same thing for the bee.
We need also to specify that it is a bus, OK?
Now, we should be consistent.
Let's see if we have any other issues and we are compiling and everything is fine and we are done.
Now, let us go back to a simulation, delete all the signals.
Remember, this is the result and it's all theory only.
So if you're unable to change anything, that's fine.
This is not your VW file that you can modify and you can adjust.
This is just the is always a closet and just open the main VW.
Now let us delete all the signals and let us now try to add buses.
And as you can see now.
They're already combined as we wish.
OK, so let us change the radix.
For them now, as you can see, the summation is not really something.
So let us go back and also do this some.
OK, great, now that you are done with the buses, let us do the result as well.
So I need one line.
And I need one output.
And I'm going to call this some, and it is three to zero.
OK, now I need to delete all of these.
Some bits and what I need to do is same thing, just get a single note.
And just connected down there.
You know, what I want you to do is just name these.
As we've done previously.
No, no, no, no, that's OK.
Now, the next step is before connecting.
I need to name the spots so properties and I want you to name it some.
Three, dot, dot zero.
OK, that's really good.
Now let us just connect all the single nodes.
One.
To.
And this is the list.
OK, now let us just name every single individual node we have.
So this one is called sum zero.
We're going to go and do the same for all of these.
So this is someone.
This is some two.
And this is some three.
OK, that's great.
Now let us compile and.
And you are done with compilation.
Let's go to simulation.
I want you to delete all the symbols and create the signals from scratch one more time.
And this time we have a B and some as buses.
That's great.
Now, let's convert all of these to unsigned.
And let us simply just give values, so if you're right, click value that arbitrary value, just let's
say this is hate and let us go to wholesale.
You're right.
Click value, arbitrary value.
And let's say this is 15.
OK, actually, 15 is not a really good number because our limitation is 15 because there's only four
bits.
So let us change the value here to something less.
Let's say this is for, OK, we should be getting 12 now
and we are getting wrong, and that's really great.