top.v 269 Bytes
Newer Older
1 2 3 4 5 6
module top
(
 input x,
 input y,
 input cin,

7 8
 output reg A,
 output reg cout
9 10
 );

11 12 13 14 15 16 17 18 19 20 21 22 23
 initial begin
    begin
        A = 0;
        cout = 0;
    end
 end

always @(posedge x) begin
    A <=  y + cin;
end
always @(negedge x) begin
        cout <=  y + A;
end
24 25

endmodule