HDL Syntax for multibit internal pins

classic Classic list List threaded Threaded
5 messages Options
Seb
Reply | Threaded
Open this post in threaded view
|

HDL Syntax for multibit internal pins

Seb
Hi,
Trying to make the And16 after completing the Not16.hdl, I am facing a problem:
It is written in the appendix taht you can't subscript internal pins... so that means that i cant do a:
 "Nand(a=a[x], b=[x], out=tmp[x]);"
so, that's ok but if I do a  "Nand(a=a[y], b=[y], out=tmpY);" instead , i do not see how to use the previously made Not16...
Must I use basic Not 16 times or Is there something i do not understand ?

Thx
Reply | Threaded
Open this post in threaded view
|

Re: HDL Syntax for multibit internal pins

cadet1620
Administrator
Seb wrote
Hi,
Trying to make the And16 after completing the Not16.hdl, I am facing a problem:
It is written in the appendix taht you can't subscript internal pins... so that means that i cant do a:
 "Nand(a=a[x], b=[x], out=tmp[x]);"
so, that's ok but if I do a  "Nand(a=a[y], b=[y], out=tmpY);" instead , i do not see how to use the previously made Not16...
Must I use basic Not 16 times or Is there something i do not understand ?

Thx
Have you made the And chip yet? It's much easier to replicate a single chip than a more complex structure.

I suppose you could could assign all the tempY signals to the individual inputs to your Not16, but that seems like too much typing:
    Not16(in[0]=temp0, in[1]=temp1, ... in[15]=temp15, out=out);

--Mark
Seb
Reply | Threaded
Open this post in threaded view
|

Re: HDL Syntax for multibit internal pins

Seb
hmm, thank you, that's right, i'm too stupid, as i just finish the Not16, i wanted to use it and so did not even think of using the simple And 16 times, :-D
Reply | Threaded
Open this post in threaded view
|

Re: HDL Syntax for multibit internal pins

linuxford
Hi,
I have created the Mux16 circuit and it simulates fine. I am working on the Mux4way16 and believe that on paper I have the solution utilizing three PARTS. However, I am having trouble it seems using the internal buses. I have tried a couple of approaches:

//Approach 1
XXX(.. etc .., out[16]=out1[16]);
... etc ...
XXX(a[16]=out1[16], ... etc ...);

//Approach 2
XXX(.. etc .., out[16]=x);
... etc ...
XXX(a[16]=x, ... etc ...);

Both "seem" to not be working. Could you please direct me. Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: HDL Syntax for multibit internal pins

cadet1620
Administrator
"a[16]=out1[16]" means connect wire 16 of bus a to wire 16 of bus out1. If you want to connect two buses to each other that are the same width, you simply need to write "a=out1".

Be sure to read Appendix A.5.3 for more info on buses.

--Mark