gstekboy
Member level 5
- Joined
- Oct 18, 2013
- Messages
- 87
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Activity points
- 512
Is it possible to design Iterative fulladder in verilog?
{cout,s}=a+b+cin;
A & B are input of fulladder ,cout & s are output of fulladder, each clock edge I want to input a &b but cin must be previous value of s.
Not working above code!!
{cout,s}=a+b+cin;
A & B are input of fulladder ,cout & s are output of fulladder, each clock edge I want to input a &b but cin must be previous value of s.
Code:
module fulladder(cout,s,a,b,rst);
input a,b,rst;
output cout,s;
inout cin;
//always @(rst)
xor x1(s1,a,b);
xor x2(s,s1,cin);
and a1(c1,s1,cin);
and a2(c2,a,b);
or o1(cin,c1,c2);
assign cout=cin;
endmodule
Not working above code!!
Last edited: