Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/nmigen
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 75d0fcd639ae
Choose a base ref
...
head repository: m-labs/nmigen
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4d6ad28f5966
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Oct 28, 2019

  1. back.verilog: remove $verilog_initial_trigger after proc_prune.

    $verilog_initial_trigger was introduced to work around Verilog
    simulation semantics issues with `always @*` statements that only
    have constants on RHS and in conditions. Unfortunately, it breaks
    Verilator. Since the combination of proc_prune and proc_clean passes
    eliminates all such statements, it can be simply removed when both
    of these passes are available, currently on Yosys master. After
    Yosys 0.10 is released, we can get rid of $verilog_initial_trigger
    entirely.
    whitequark committed Oct 28, 2019
    Copy the full SHA
    4d6ad28 View commit details
Showing with 9 additions and 0 deletions.
  1. +8 −0 nmigen/back/rtlil.py
  2. +1 −0 nmigen/back/verilog.py
8 changes: 8 additions & 0 deletions nmigen/back/rtlil.py
Original file line number Diff line number Diff line change
@@ -899,6 +899,14 @@ def _convert_fragment(builder, fragment, name_map, hierarchy):
# by looking for any signals on RHS. If there aren't any, we add some logic
# whose only purpose is to trigger Verilog simulators when it converts
# through RTLIL and to Verilog, by populating the sensitivity list.
#
# Unfortunately, while this workaround allows true (event-driven) Verilog
# simulators to work properly, and is universally ignored by synthesizers,
# Verilator rejects it.
#
# Running the Yosys proc_prune pass converts such pathological `always @*`
# blocks to `assign` statements, so this workaround can be removed completely
# once support for Yosys 0.9 is dropped.
if not stmt_compiler._has_rhs:
if verilog_trigger is None:
verilog_trigger = \
1 change: 1 addition & 0 deletions nmigen/back/verilog.py
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ def _convert_rtlil_text(rtlil_text, *, strip_internal_attrs=False, write_verilog
read_ilang <<rtlil
{}
rtlil
{prune}delete w:$verilog_initial_trigger
{prune}proc_prune
proc_init
proc_arst