Zr and Ng Cant split internal nodes into parts

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

Zr and Ng Cant split internal nodes into parts

Ranjani
Hey All,  I've been working on the ALU and the only problem I'm facing is with the ng and zr outputs.  I understand that if I take the leftmost bit of the output that should say if its negative or not. Something like And(a = myout[15], b = myout[15], out = ng) where my out is an internal node that is a copy of the output.  The problem is that since I've used 16chips their outputs are node like my out and not the components of my out, so the program doesn't let me split it up.  With zr its a similar problem, I want to feed it through 2 8wayOrs and then another or, but how do I split up a node?
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Zr and Ng Cant split internal nodes into parts

ybakos
See the HDL appendix on how to select specific bits during output. For example:

out[#] = ng

Reply | Threaded
Open this post in threaded view
|

Re: Zr and Ng Cant split internal nodes into parts

cadet1620
Administrator
In reply to this post by Ranjani
If I understand what you are asking, you know that you can connect to the output of a chip more than once
    SomeChip (..., out=out, out=myOut);
but it fails when you try
    OtherChip (in=myOut[15], ...);
or
    AnotherChip (in=myOut[0..7], ...);

The trick here is that you need to create your internal wires and buses the correct width when you connect them to out.
    SomeChip (..., out=out, out[15]=myOut15, ...);
    OtherChip (in=myOut15, ...);
    AnotherChip (in=myOutLow, ...);

--Mark