Enum names in r-value expressions

When enum names are used as r-values in expressions, use their
values. Treat the enum names similar to (but not exactly as)
localparams so that they fit into the rest of the elaboration
flow naturally.
This commit is contained in:
Stephen Williams
2010-10-31 11:26:09 -07:00
parent cced1e771b
commit a14fa038b4
15 changed files with 304 additions and 44 deletions
+14
View File
@@ -432,6 +432,20 @@ unsigned NetEConcat::repeat() const
return repeat_value_;
}
NetEConstEnum::NetEConstEnum(NetScope*s, perm_string n, enum_set_t eset, const verinum&v)
: NetEConst(v), scope_(s), enum_set_(eset)
{
}
NetEConstEnum::~NetEConstEnum()
{
}
const enum_set_t NetEConstEnum::enumeration() const
{
return enum_set_;
}
NetECReal::NetECReal(const verireal&val)
: value_(val)
{