mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Add separate AstInitialStatic node for static initializers
Static variable initializers run before initial blocks, so use an explicitly different procedure type for them. This also enables us to now raise errors for assignments to const variables in initial blocks.
This commit is contained in:
+1
-1
@@ -275,7 +275,7 @@ private:
|
||||
if (nodep->lifetime().isAutomatic()) {
|
||||
nodep->addNextHere(new AstInitialAutomatic{newfl, assp});
|
||||
} else {
|
||||
nodep->addNextHere(new AstInitial{newfl, assp});
|
||||
nodep->addNextHere(new AstInitialStatic{newfl, assp});
|
||||
}
|
||||
} // 4. Under blocks, it's an initial value to be under an assign
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user