Advertisement
Kireychik

adder.sv

Jun 8th, 2020
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module adder(
  2.     input logic c,
  3.     input logic x1,
  4.     input logic x2,
  5.     input logic clr,
  6.     output logic [15:0] q = 16'd0,
  7.     output logic o = 0
  8. );
  9.  
  10. logic x;
  11.  
  12. sum1 sum(
  13.     .a(x1),
  14.     .b(x2),
  15.     .c(c),
  16.     .d(o),
  17.     .q(x),
  18.     .o(o)
  19. );
  20.  
  21. Sreg r(
  22.     .c(c),
  23.     .d(x),
  24.     .clr(clr),
  25.     .q(q)
  26. );
  27.  
  28. endmodule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement