ad02d1.v
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module ad02d1 (s0, s1, co, a0, b0, a1, b1, ci);
input a0, b0, a1, b1, ci;
output s0, s1, co;
`ifdef SYNTH
reg co_int, s0_int,s1_int;
buf bb1(co, co_int);
buf bb2(s0, s0_int);
buf bb3(s1, s1_int);
always @(a0 or b0 or a1 or b1 or ci)
{co_int,s1_int,s0_int} = ({a1,a0} + {b1,b0} + ci);
`else
or G2(co, N3, N4);
and G3(N3, a1, b1),
G4(N4, N18, N5);
or G5(N5, a1, b1);
and G9(N9, N26, N27);
or G11(N11, N12, N13);
and G12(N12, a0, b0),
G13(N13, ci, N14);
or G14(N14, a0, b0);
and G17(N17, N32, N33);
or G18(N18, N19, N20);
and G19(N19, a0, b0),
G20(N20, ci, N22);
or G22(N22, a0, b0),
G23(N23, N9, ci);
nand G24(N24, N9, ci);
and G25(s0, N23, N24);
or G26(N26, a0, b0);
nand G27(N27, a0, b0);
or G28(N28, N17, N11);
nand G29(N29, N17, N11);
and G30(s1, N28, N29);
or G32(N32, a1, b1);
nand G33(N33, a1, b1);
`endif
endmodule