File: bug2920.ys

package info (click to toggle)
yosys 0.52-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 69,796 kB
  • sloc: ansic: 696,955; cpp: 239,736; python: 14,617; yacc: 3,529; sh: 2,175; makefile: 1,945; lex: 697; perl: 445; javascript: 323; tcl: 162; vhdl: 115
file content (42 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
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
38
39
40
41
42
read_rtlil <<EOT

module \mod
  wire input 1 \clk
  attribute \init 2'00
  wire width 2 $q1
  attribute \init 2'00
  wire width 2 $q2
  wire output 2 width 4 \q
  cell $dff $ff1
    parameter \CLK_POLARITY 1'1
    parameter \WIDTH 1
    connect \CLK \clk
    connect \D 1'0
    connect \Q $q1 [0]
  end
  cell $dff $ff2
    parameter \CLK_POLARITY 1'1
    parameter \WIDTH 1
    connect \CLK \clk
    connect \D 1'0
    connect \Q $q2 [0]
  end
  cell $dff $ff3
    parameter \CLK_POLARITY 1'1
    parameter \WIDTH 2
    connect \CLK \clk
    connect \D 2'00
    connect \Q { $q1 [1] $q2 [1] }
  end
  connect \q [0] $q1 [0]
  connect \q [1] $q2 [0]
  connect \q [2] $q1 [1]
  connect \q [3] $q2 [1]
end

EOT

opt_clean
opt_merge
opt_dff
opt_clean