From 5e174f54ee0da44d03b22126dfc25166ab926736 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Tue, 18 Nov 2008 20:10:10 -0800 Subject: [PATCH] Elaborate signals in generated named blocks. Named blocks create scopes, and generated named blocks' scopes can have signals declared in them. So the elaborate_sig for the generate scheme needs to call the elaborate_sig for the processes as well as the obvious gates and tasks/functions. --- elab_scope.cc | 5 +++++ elab_sig.cc | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/elab_scope.cc b/elab_scope.cc index 2fcc1017b..cf617a640 100644 --- a/elab_scope.cc +++ b/elab_scope.cc @@ -1144,6 +1144,11 @@ void PBlock::elaborate_scope(Design*des, NetScope*scope) const des->errors += 1; return; } + if (debug_scopes) + cerr << get_fileline() << ": debug: " + << "Elaborate block scope " << use_name + << " within " << scope_path(scope) << endl; + my_scope = new NetScope(scope, use_name, bl_type_==BL_PAR ? NetScope::FORK_JOIN : NetScope::BEGIN_END); diff --git a/elab_sig.cc b/elab_sig.cc index b239aa1fd..167f068a7 100644 --- a/elab_sig.cc +++ b/elab_sig.cc @@ -486,6 +486,13 @@ bool PGenerate::elaborate_sig_(Design*des, NetScope*scope) const (*cur) ->elaborate_sig(des, scope); } + typedef list::const_iterator proc_it_t; + for (proc_it_t cur = behaviors.begin() + ; cur != behaviors.end() ; cur ++ ) { + (*cur) -> statement() -> elaborate_sig(des, scope); + } + + return true; }