fabianschuiki / moore

A hardware compiler based on LLHD and CIRCT
http://www.llhd.io
Apache License 2.0
246 stars 31 forks source link

Add option to treat unknown modules as external #225

Open fabianschuiki opened 3 years ago

fabianschuiki commented 3 years ago

Instantiating a module without providing a corresponding module ... definition currently triggers a compiler error. However, it is quite common in Verilog to have extern modules by simply not providing a definition. Moore should provide an option to treat some or all of the undefined modules as external, and infer the types of its ports from the connected signals (as is commonly done). This might combine well with an implementation for the extern module construct of SV. The resulting LLHD should then contain corresponding module declarations.