Open Chopper455 opened 4 years ago
The default behaviour of the Verilog frontend is to turn empty modules into blackboxes; so their instances would remain as cells even after flattening (this can be disabled with read_verilog -noblackbox
)
Nonetheless, the difference between mxe and Xubuntu are concerning - with Xubuntu seemingly behaving incorrectly, as is the odd port width in the EDIF.
As another data point, Arch Linux gives the same behaviour as mxe.
Steps to reproduce the issue
When I synthesized 2D fht project from opencores I encountered problem concerning module wrapper for block ram instance in win-mxe build of yosys. In linux design was synthesizing just fine, but in windows shadow instance remains in edif file. Module had synthesis translate_off directives, so they were cleaned out along with all the contents of the wrapper module. The only thing remaining is the empty module "dpsram_128x16". And this instance remains in edif file, one output port without connected wires even is declared as zero-size. shadow_inst_test.zip
I've compiled with latest commit 7ea0a59. Both in xilinx target
and in generic internal library
Expected behavior
When it is synthesized in Xubuntu 18.04, it works OK. for xilinx target
and for internal library target
Actual behavior
But when the same is synthesized in windows using MXE build, some shadow instance appears, even with flattening applied.
For xilinx target:
and for internal library target
What is bad, that resulting declaration in EDIF file of the module "dpsram_128x16" becomes inaccurate.
We can see, that port douta that was unconnected in instance suddenly becomes zero-sized as if module was deleted, instance remained and module interface was constructed anew, but renaming with original port name and msb/lsb range remains.