From c06c49c99212574ae9bb2d7a945234861b2a4bcd Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sat, 6 Dec 2008 15:52:39 +0000 Subject: [PATCH] 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). --- tgt-vhdl/scope.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tgt-vhdl/scope.cc b/tgt-vhdl/scope.cc index 715ee3424..8e2363493 100644 --- a/tgt-vhdl/scope.cc +++ b/tgt-vhdl/scope.cc @@ -751,7 +751,8 @@ static int draw_constant_drivers(ivl_scope_t scope, void *_parent) 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 vhdl_var_ref *ref = nexus_to_var_ref(arch_scope, nex);