File: adder.v

package info (click to toggle)
tkgate 2.1%2Brepack-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 28,372 kB
  • sloc: ansic: 62,300; tcl: 20,345; xml: 2,731; yacc: 1,177; lex: 839; sh: 664; makefile: 180; perl: 39
file content (22 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

module adder #(.Dab_s(1), .Dab_co(1), .Dci_s(1), .Dci_co(1)) (A, B, S, CI, CO);
   input  CI;
   output CO;
   input  ${ABS_RANGE} A,B;
   output ${ABS_RANGE} S;
   wire   ${ABS_RANGE} _S;
   wire   _CO;

   specify
      (A,B *> S) = Dab_s;
      (A,B *> CO) = Dab_co;
      (CI *> S) = Dci_s;
      (CI *> CO) = Dci_co;
   endspecify

   assign {_CO,_S} = A + B + CI;

   assign CO = ${invCO} _CO;
   assign S = ${invS} _S;

endmodule