amaranth/nmigen
whitequark 07a3685da8 back.rtlil: do not squash empty modules.
In commit 9faa1d37, the RTLIL backend was changed to ignore modules
without ports completely, since Yosys would recognize empty modules
as black boxes without explicit `write_verilog -noblackbox` and break
the design. That change had many flaws:
  * It removed instances without ports, which are used in e.g. SoC
    FPGAs to instantiate a dummy CPU.
  * It removed fragments without ports, which can appear in e.g. SoC
    FPGAs in case the fabric is not connected to any I/O ports.
  * Finally, it was just conceptually unjustified.

This commit changes the logic to actually check for empty fragments,
and instead of removing them, it adds a dummy wire inside. It would
be possible to use the Yosys-specific (*noblackbox*) attribute.
However, it would be necessary to strip it for most targets right
away, and also the wire doubles as documentation.

Fixes #441.
2020-08-26 22:45:19 +00:00
..
_toolchain _yosys→_toolchain.yosys 2020-07-02 18:26:08 +00:00
back back.rtlil: do not squash empty modules. 2020-08-26 22:45:19 +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