You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently output ports are converted to wire (if the original is just output) or reg (if the original is output reg) during the inlining process in the method Inliner._instantiation_to_inlined_body. This is done through a simple find and replace mechanism. However, this in Verilog it is typical, though not required, to declare and output and a reg of the same name (which hold the same values). For example:
moduleFoo;
output bar;
reg bar;
//Codeendmodule;
When this is inlined from its instantiation by the aforementioned method, it will have a declaration of a wire bar and reg bar, which is incorrect. Only the latter declaration should be present.
One solution to this could be creating a new data member within the Module object to store a list of all regs and wires within the module. Alternatively a similar check could be performed at the time an output port is converted.
The text was updated successfully, but these errors were encountered:
Currently
output
ports are converted towire
(if the original is justoutput
) or reg (if the original isoutput reg
) during the inlining process in the methodInliner._instantiation_to_inlined_body
. This is done through a simple find and replace mechanism. However, this in Verilog it is typical, though not required, to declare andoutput
and areg
of the same name (which hold the same values). For example:When this is inlined from its instantiation by the aforementioned method, it will have a declaration of a
wire bar
andreg bar
, which is incorrect. Only the latter declaration should be present.One solution to this could be creating a new data member within the
Module
object to store a list of all regs and wires within the module. Alternatively a similar check could be performed at the time an output port is converted.The text was updated successfully, but these errors were encountered: