mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
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:
+14
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user