sphinx-verilog-domain
sphinx-verilog-domain

Verilog Diagrams compatibility test

module CARRY4(CO, O, CI, CYINIT, DI, S);

Source code without license:

19
20
21
22
23
24
25
module CARRY4(output [3:0] CO, O, input CI, CYINIT, input [3:0] DI, S);
  assign O = S ^ {CO[2:0], CI | CYINIT};
  assign CO[0] = S[0] ? CI | CYINIT : DI[0];
  assign CO[1] = S[1] ? CO[0] : DI[1];
  assign CO[2] = S[2] ? CO[1] : DI[2];
  assign CO[3] = S[3] ? CO[2] : DI[3];
endmodule

Diagram:

carry4-whole.v