parent
3b8dc81a97
commit
b455f3af5d
|
|
@ -3906,7 +3906,7 @@ Design* elaborate(list<perm_string>roots)
|
||||||
// Get the module definition for this root instance.
|
// Get the module definition for this root instance.
|
||||||
Module *rmod = (*mod).second;
|
Module *rmod = (*mod).second;
|
||||||
|
|
||||||
// Make the root scope. This makes a NetScoep object and
|
// Make the root scope. This makes a NetScope object and
|
||||||
// pushes it into the list of root scopes in the Design.
|
// pushes it into the list of root scopes in the Design.
|
||||||
NetScope*scope = des->make_root_scope(*root);
|
NetScope*scope = des->make_root_scope(*root);
|
||||||
|
|
||||||
|
|
@ -3919,7 +3919,7 @@ Design* elaborate(list<perm_string>roots)
|
||||||
des->set_precision(rmod->time_precision);
|
des->set_precision(rmod->time_precision);
|
||||||
|
|
||||||
|
|
||||||
// Save this scope, along with its defintion, in the
|
// Save this scope, along with its definition, in the
|
||||||
// "root_elems" list for later passes.
|
// "root_elems" list for later passes.
|
||||||
struct root_elem *r = new struct root_elem;
|
struct root_elem *r = new struct root_elem;
|
||||||
r->mod = rmod;
|
r->mod = rmod;
|
||||||
|
|
|
||||||
|
|
@ -245,16 +245,16 @@ bool eval_as_double(double&value, NetExpr*expr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* At the parser level, a name component it a name with a collection
|
* At the parser level, a name component is a name with a collection
|
||||||
* of expressions. For example foo[N] is the name "foo" and the index
|
* of expressions. For example foo[N] is the name "foo" and the index
|
||||||
* expression "N". This function takes as input the name component and
|
* expression "N". This function takes as input the name component and
|
||||||
* returns the path component name. It will evaulate the index
|
* returns the path component name. It will evaluate the index
|
||||||
* expression if it is present.
|
* expression if it is present.
|
||||||
*/
|
*/
|
||||||
hname_t eval_path_component(Design*des, NetScope*scope,
|
hname_t eval_path_component(Design*des, NetScope*scope,
|
||||||
const name_component_t&comp)
|
const name_component_t&comp)
|
||||||
{
|
{
|
||||||
// No index exression, so the path component is an undecorated
|
// No index expression, so the path component is an undecorated
|
||||||
// name, for example "foo".
|
// name, for example "foo".
|
||||||
if (comp.index.empty())
|
if (comp.index.empty())
|
||||||
return hname_t(comp.name);
|
return hname_t(comp.name);
|
||||||
|
|
@ -284,7 +284,7 @@ hname_t eval_path_component(Design*des, NetScope*scope,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Darn, the expression doesn't evaluate to a constant. That's
|
// Darn, the expression doesn't evaluate to a constant. That's
|
||||||
// and error to be reported. And make up a fake index value to
|
// an error to be reported. And make up a fake index value to
|
||||||
// return to the caller.
|
// return to the caller.
|
||||||
cerr << index.msb->get_fileline() << ": error: "
|
cerr << index.msb->get_fileline() << ": error: "
|
||||||
<< "Scope index expression is not constant: "
|
<< "Scope index expression is not constant: "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue