vendor.lattice_{ice40,ecp5}: clean up $verilog_initial_trigger wires.
authorwhitequark <whitequark@whitequark.org>
Fri, 6 Nov 2020 01:31:14 +0000 (01:31 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 31 Dec 2021 15:20:13 +0000 (15:20 +0000)
These only matter in simulation and after conversion to Verilog.
During synthesis they cause Yosys to produce warnings:

  Warning: Wire $verilog_initial_trigger has an unprocessed 'init' attribute.

nmigen/vendor/lattice_ecp5.py
nmigen/vendor/lattice_ice40.py

index 3affa8f5616afbd313d9c0d789682e4a237e15ec..2a68dadc9585770a7ee32daebce7d886287182ea 100644 (file)
@@ -122,6 +122,7 @@ class LatticeECP5Platform(TemplatedPlatform):
                 read_ilang {{file}}
             {% endfor %}
             read_ilang {{name}}.il
+            delete w:$verilog_initial_trigger
             {{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
             synth_ecp5 {{get_override("synth_opts")|options}} -top {{name}}
             {{get_override("script_after_synth")|default("# (script_after_synth placeholder)")}}
index d5e4dd65e06cdc4bb6b816305d0c3cf22ccc69be..4e6b2820fe1b8e890127796095e684fb06dc9d14 100644 (file)
@@ -124,6 +124,7 @@ class LatticeICE40Platform(TemplatedPlatform):
                 read_ilang {{file}}
             {% endfor %}
             read_ilang {{name}}.il
+            delete w:$verilog_initial_trigger
             {{get_override("script_after_read")|default("# (script_after_read placeholder)")}}
             synth_ice40 {{get_override("synth_opts")|options}} -top {{name}}
             {{get_override("script_after_synth")|default("# (script_after_synth placeholder)")}}