diff --git a/elaborate.cc b/elaborate.cc index 579f2753a..c684b0de1 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -4695,6 +4695,9 @@ class top_defparams : public elaborator_work_item_t { virtual void elaborate_runrun() { + if (debug_scopes) { + cerr << "debug: top_defparams::elaborate_runrun()" << endl; + } // This method recurses through the scopes, looking for // defparam assignments to apply to the parameters in the // various scopes. This needs to be done after all the scopes @@ -4706,6 +4709,10 @@ class top_defparams : public elaborator_work_item_t { // scopes and evaluate the parameters all the way down to // constants. des->evaluate_parameters(); + + if (debug_scopes) { + cerr << "debug: top_defparams::elaborate_runrun() done" << endl; + } } }; @@ -4719,6 +4726,10 @@ class later_defparams : public elaborator_work_item_t { virtual void elaborate_runrun() { + if (debug_scopes) { + cerr << "debug: later_defparams::elaborate_runrun()" << endl; + } + listtmp_list; for (set::iterator cur = des->defparams_later.begin() ; cur != des->defparams_later.end() ; ++ cur ) @@ -4731,7 +4742,13 @@ class later_defparams : public elaborator_work_item_t { tmp_list.pop_front(); cur->run_defparams_later(des); } - des->evaluate_parameters(); + + // The overridden parameters will be evaluated later in + // a top_defparams work item. + + if (debug_scopes) { + cerr << "debuf: later_defparams::elaborate_runrun() done" << endl; + } } }; diff --git a/net_design.cc b/net_design.cc index ac5517bd4..0ea857cf4 100644 --- a/net_design.cc +++ b/net_design.cc @@ -303,11 +303,9 @@ void NetScope::run_defparams_later(Design*des) target_scopes.insert(targ_scope); } - // All the scopes that this defparam set touched should have - // their parameters re-evaluated. - for (set::iterator cur = target_scopes.begin() - ; cur != target_scopes.end() ; ++ cur ) - (*cur)->evaluate_parameters(des); + // The scopes that this defparam set touched will be + // re-evaluated later it a top_defparams work item. So do not + // do the evaluation now. // If there are some scopes that still have missing scopes, // then save them back into the defparams_later list for a