Sub bus of an internal node may not be used

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

Sub bus of an internal node may not be used

hemasaad
why I get this error (Sub bus of an internal node may not be used) when I write this code
Or8Way(in=lastout[0..7], out=out1);
Or8Way(in=lastout[8..15], out=out2);
Or(a=out1, b=out2, out=out3);
where already I use the all bus of the internal node. all I need to do is Oring bus of 16 bit by Or8Way.
Reply | Threaded
Open this post in threaded view
|

Re: Sub bus of an internal node may not be used

cadet1620
Administrator
You need to create internal buses the same size that they are going to be used.

In this case, you have
    Somepart(..., out=lastout);
You need to change that to
    Somepart(..., out[0..7]=lastout1, out[8..15]=lastout2);
so that you can use lastout1 and lastout2 in the Or8Ways.

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

Re: Sub bus of an internal node may not be used

hemasaad
Thank you cadet1620. I did it and The ALU chip could pass the test.