For my ALU design I wanted to determine if a number is negative or positive by looking at its' last bit
// checks if zx is 1 then turns all bits to zeros
// negates xzero
// checks if nx is 1 then negates x
// checks if x is negative
My issue lies in the fact that I can't access xnegated as its own bit in the bus of xnegated. As a result , I keep getting "sub bus of internal node may not be used". So is there a way around this issue??
I would like to apologies for my naming convention I couldn't think of any good names at the time.
I can't figure out what it is you are trying to accomplish from a logic standpoint (in terms of the ALU implementation), but the "sub bus of internal node" error is addressed toward the end of the Hardware Construction Survival Kit, which is linked at the top of the Chapter 1 forum page.
// if (f == 1) set out = x + y // integer 2's complement addition
reading this I thought we would have to do all the operations
i.e if (zx == 1) set x = 0 , // if (nx == 1) set x = !x
then once we preform the addition operation after either setting the bits to zero or negating it or both then if the most significant bit of x is 1 x = 1 that would mean it is a negative number so we would negate all the bits and increment it by one which was why I wanted to use that bit as my select line if (x == 1) then negate it and increment it by one.Otherwise, just output x and use the add16 chip to to the addition of bits, am I overthinking this ??