S
slxrti
Guest
I would like to make a full adder from two half adder. I use a
hierarchial
model for the the full adder.
How do I connect a output of one instance with a input of anther I
tried declaring a wirer to connect the two I received a" warning port
miss match".
//code:
//combination 2 half adder, not working
module FullAdder (sum, carry, a,b, carry_out);
input carry;
input a, b;
output carry, sum;
output carry_out;
HalfAdd low( a[a], b[sum1], sum[sum], carry_out[carry]);
HalfAdd hi ( a[1], b[1], sum[1], carry[1]);
or(carry_out, carry[0], carry[1]);
endmodule
hierarchial
model for the the full adder.
How do I connect a output of one instance with a input of anther I
tried declaring a wirer to connect the two I received a" warning port
miss match".
//code:
//combination 2 half adder, not working
module FullAdder (sum, carry, a,b, carry_out);
input carry;
input a, b;
output carry, sum;
output carry_out;
HalfAdd low( a[a], b[sum1], sum[sum], carry_out[carry]);
HalfAdd hi ( a[1], b[1], sum[1], carry[1]);
or(carry_out, carry[0], carry[1]);
endmodule