Fix assignment of constant to input

If a module's input was connected to a nexus that contained
a constant driver. That constant would be incorrectly generated
as an assignment to the input *inside* the child module (instead
of an assignment inside the instantiating module).
This commit is contained in:
Nick Gasson 2008-12-06 15:52:39 +00:00 committed by Stephen Williams
parent bcaf7355ca
commit c06c49c992
1 changed files with 2 additions and 1 deletions

View File

@ -751,7 +751,8 @@ static int draw_constant_drivers(ivl_scope_t scope, void *_parent)
vhdl_scope *arch_scope = ent->get_arch()->get_scope(); vhdl_scope *arch_scope = ent->get_arch()->get_scope();
if (priv->const_driver) { if (priv->const_driver
&& ivl_signal_port(sig) != IVL_SIP_INPUT) { // Don't drive inputs
assert(j == 0); // TODO: Make work for more words assert(j == 0); // TODO: Make work for more words
vhdl_var_ref *ref = nexus_to_var_ref(arch_scope, nex); vhdl_var_ref *ref = nexus_to_var_ref(arch_scope, nex);