You do need to do something with the carry outputs from both half adders to make a correct full adder. Consider adding a=0, b=1 and c=1.
The first half adder produces sum1=1, carry1=0.
The second half adder adds sum1 and c producing sum2=0, carry2=1.
sum2 is the sum output from the full adder. carry1 and carry2 need to be combined in some fashion to produce the full adder's carry output.
It is OK to leave out the connection to an unused output in a part line. For instance the full adder for bit 15 in your Add16 won't have its carry connected so you can write: FullAdder(a=a[15], b=b[15], c=c14, sum=out[15]);
--Mark
Free forum by Nabble | Edit this page |