From 19871efd5a1835e0d01f03682525467061214d16 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 4 Jul 2008 11:58:33 +0100 Subject: [PATCH] Fix bug where sensitivity might reference undefined signals --- tgt-vhdl/stmt.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tgt-vhdl/stmt.cc b/tgt-vhdl/stmt.cc index f60e844bb..922e2d4b2 100644 --- a/tgt-vhdl/stmt.cc +++ b/tgt-vhdl/stmt.cc @@ -335,7 +335,10 @@ static int draw_wait(vhdl_procedural *_proc, stmt_container *container, assert(proc); // Catch not process ivl_statement_t sub_stmt = ivl_stmt_sub_stmt(stmt); - + + + // TODO: This should really be merged with the + // nexus_to_XXX code int nevents = ivl_stmt_nevent(stmt); for (int i = 0; i < nevents; i++) { ivl_event_t event = ivl_stmt_events(stmt, i); @@ -354,6 +357,9 @@ static int draw_wait(vhdl_procedural *_proc, stmt_container *container, ivl_signal_t sig; if ((sig = ivl_nexus_ptr_sig(nexus_ptr))) { + if (!seen_signal_before(sig)) + continue; + std::string signame(get_renamed_signal(sig)); // Only add this signal to the sensitivity if it's part