|
1 | 1 | (* generator = "Amaranth" *)
|
2 |
| -module top(clk, rst, en, ovf); |
3 |
| - (* src = "<amaranth-root>/amaranth/hdl/ir.py:526" *) |
4 |
| - input clk; |
5 |
| - (* src = "<amaranth-root>/amaranth/hdl/ir.py:526" *) |
6 |
| - input rst; |
7 |
| - (* src = "up_counter.py:26" *) |
8 |
| - input en; |
9 |
| - (* src = "up_counter.py:27" *) |
10 |
| - output ovf; |
11 |
| - (* src = "up_counter.py:30" *) |
12 |
| - reg [15:0] count = 16'h0000; |
13 |
| - (* src = "up_counter.py:30" *) |
14 |
| - reg [15:0] \count$next ; |
15 |
| - (* src = "up_counter.py:35" *) |
| 2 | +module top(ovf, clk, rst, en); |
| 3 | + reg \$auto$verilog_backend.cc:2255:dump_module$1 = 0; |
| 4 | + (* src = "up_counter.py:36" *) |
16 | 5 | wire \$1 ;
|
17 |
| - (* src = "up_counter.py:41" *) |
| 6 | + (* src = "up_counter.py:42" *) |
18 | 7 | wire [16:0] \$3 ;
|
19 |
| - (* src = "up_counter.py:41" *) |
| 8 | + (* src = "up_counter.py:42" *) |
20 | 9 | wire [16:0] \$4 ;
|
21 |
| - assign \$1 = count == (* src = "up_counter.py:35" *) 5'h19; |
22 |
| - assign \$4 = count + (* src = "up_counter.py:41" *) 1'h1; |
| 10 | + (* src = "<site-packages>/amaranth/hdl/ir.py:509" *) |
| 11 | + input clk; |
| 12 | + wire clk; |
| 13 | + (* src = "up_counter.py:29" *) |
| 14 | + reg [15:0] count = 16'h0000; |
| 15 | + (* src = "up_counter.py:29" *) |
| 16 | + reg [15:0] \count$next ; |
| 17 | + (* src = "<site-packages>/amaranth/lib/wiring.py:1647" *) |
| 18 | + input en; |
| 19 | + wire en; |
| 20 | + (* src = "<site-packages>/amaranth/lib/wiring.py:1647" *) |
| 21 | + output ovf; |
| 22 | + wire ovf; |
| 23 | + (* src = "<site-packages>/amaranth/hdl/ir.py:509" *) |
| 24 | + input rst; |
| 25 | + wire rst; |
| 26 | + assign \$1 = count == (* src = "up_counter.py:36" *) 5'h19; |
| 27 | + assign \$4 = count + (* src = "up_counter.py:42" *) 1'h1; |
23 | 28 | always @(posedge clk)
|
24 |
| - count <= \count$next ; |
| 29 | + count <= \count$next ; |
25 | 30 | always @* begin
|
| 31 | + if (\$auto$verilog_backend.cc:2255:dump_module$1 ) begin end |
26 | 32 | \count$next = count;
|
27 |
| - (* src = "up_counter.py:37" *) |
28 |
| - casez (en) |
29 |
| - /* src = "up_counter.py:37" */ |
30 |
| - 1'h1: |
31 |
| - (* src = "up_counter.py:38" *) |
32 |
| - casez (ovf) |
33 |
| - /* src = "up_counter.py:38" */ |
34 |
| - 1'h1: |
35 |
| - \count$next = 16'h0000; |
36 |
| - /* src = "up_counter.py:40" */ |
37 |
| - default: |
38 |
| - \count$next = \$3 [15:0]; |
39 |
| - endcase |
40 |
| - endcase |
41 |
| - (* src = "<amaranth-root>/amaranth/hdl/xfrm.py:518" *) |
42 |
| - casez (rst) |
43 |
| - 1'h1: |
44 |
| - \count$next = 16'h0000; |
45 |
| - endcase |
| 33 | + (* src = "up_counter.py:38" *) |
| 34 | + if (en) begin |
| 35 | + (* full_case = 32'd1 *) |
| 36 | + (* src = "up_counter.py:39" *) |
| 37 | + if (ovf) begin |
| 38 | + \count$next = 16'h0000; |
| 39 | + end else begin |
| 40 | + \count$next = \$4 [15:0]; |
| 41 | + end |
| 42 | + end |
| 43 | + (* src = "<site-packages>/amaranth/hdl/xfrm.py:534" *) |
| 44 | + if (rst) begin |
| 45 | + \count$next = 16'h0000; |
| 46 | + end |
46 | 47 | end
|
47 | 48 | assign \$3 = \$4 ;
|
48 | 49 | assign ovf = \$1 ;
|
|
0 commit comments