Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module carry_lookahead_adder
- (
- input logic[15:0] A,
- input logic[15:0] B,
- output logic[15:0] Sum,
- output logic CO
- );
- /* TODO
- *
- * Insert code here to implement a CLA adder.
- * Your code should be completly combinational (don't use always_ff or always_latch).
- * Feel free to create sub-modules or other files. */
- endmodule
- module four_bit_CLA
- endmodule
- endmodule
- module full_CLA(
- input x,
- input y,
- input cin,
- output logic s,
- output logic cout
- );
- assign s = x ^ y ^ cin; // output S, same as FA output
- assign G = x & y; //generated carry-out
- assign P = x ^ y; //propogated carry-out
- endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement