amaranth/nmigen
whitequark 12beda6e5b back.verilog: omit Verilog initial trigger only if Yosys adds it.
Verilog has an edge case where an `always @*` process, which is used
to describe a combinatorial function procedurally, may not execute
at time zero because none of the signals in its implicit sensitivity
list change, i.e. when the process doesn't read any signals. This
causes the wires driven by the process to stay undefined.

The workaround to this problem (assuming SystemVerilog `always_comb`
is not available) is to introduce a dummy signal that changes only
at time zero and is optimized out during synthesis. nMigen has had
its own workaround, `$verilog_initial_trigger`, for a while. However,
`proc_prune`, while increasing readability, pulls references to this
signal out of the process. Because of this, a similar workaround was
implemented in Yosys' `write_verilog` itself.

This commit ensures we use our workaround on versions of Yosys
without the updated `write_verilog`, and Yosys' workaround on later
versions.

Fixes #418.
2020-08-26 16:51:12 +00:00
..
_toolchain _yosys→_toolchain.yosys 2020-07-02 18:26:08 +00:00
back back.verilog: omit Verilog initial trigger only if Yosys adds it. 2020-08-26 16:51:12 +00:00
build build,vendor: never carry around parts of differential signals. 2020-07-31 18:41:59 +00:00
compat nmigen.lib.scheduler: add RoundRobin. 2020-07-28 21:02:01 +00:00
hdl hdl.ast: avoid unnecessary sign padding in ArrayProxy. 2020-08-26 07:07:48 +00:00
lib lib.cdc: in AsyncFFSynchronizer(), rename domain= to o_domain=. 2020-08-26 03:19:13 +00:00
sim sim._pyrtl: optimize uses of reflexive operators. 2020-08-26 13:26:58 +00:00
test hdl.ast: avoid unnecessary sign padding in ArrayProxy. 2020-08-26 07:07:48 +00:00
vendor vendor.xilinx_{7series,ultrascale}: set BUFG* SIM_DEVICE as appropriate. 2020-08-26 15:45:58 +00:00
__init__.py Gracefully handle missing dependencies. 2020-07-01 07:00:02 +00:00
_unused.py _unused: extract must-use logic from hdl.ir. 2020-02-01 01:35:05 +00:00
_utils.py hdl.ir: allow disabling UnusedElaboratable warning in file scope. 2019-10-26 06:17:14 +00:00
asserts.py hdl.ast,back.rtlil: implement Cover. 2019-09-03 01:32:24 +00:00
cli.py cli: Improve help texts 2020-08-22 14:41:37 +00:00
rpc.py rpc: add public Records as module ports. 2019-09-30 18:28:21 +00:00
tracer.py tracer: fix get_var_name() to work on toplevel attributes. 2020-05-17 19:51:58 +00:00
utils.py {,_}tools→{,_}utils 2019-10-13 18:53:38 +00:00