Get generate block scope from generate case.

The generate block is a placeholder for the generate items, and it
is the items themselves that can specify the name of the generate
block that is created.
This commit is contained in:
Stephen Williams 2008-09-03 17:59:39 -07:00
parent e4411777ed
commit 60169f6353
1 changed files with 3 additions and 3 deletions

View File

@ -621,9 +621,6 @@ bool PGenerate::generate_scope_case_(Design*des, NetScope*container)
return false;
}
// The name of the scope to generate, whatever that item is.
hname_t use_name (scope_name);
if (debug_scopes)
cerr << get_fileline() << ": debug: Generate case "
<< "switch value=" << case_value_co->value() << endl;
@ -673,6 +670,9 @@ bool PGenerate::generate_scope_case_(Design*des, NetScope*container)
<< "Generate case matches item at "
<< item->get_fileline() << endl;
// The name of the scope to generate, whatever that item is.
hname_t use_name (item->scope_name);
NetScope*scope = new NetScope(container, use_name,
NetScope::GENBLOCK);
scope->set_line(get_file(), get_lineno());