Commit bf1d9283 by Zachary Snow

interpret package parameters as localparams

parent b2291a20
...@@ -823,7 +823,7 @@ PackageItems :: { [PackageItem] } ...@@ -823,7 +823,7 @@ PackageItems :: { [PackageItem] }
| PITrace PackageItem PackageItems { $1 : $2 ++ $3 } | PITrace PackageItem PackageItems { $1 : $2 ++ $3 }
PackageItem :: { [PackageItem] } PackageItem :: { [PackageItem] }
: DeclTokens(";") { map Decl $ parseDTsAsDecls $1 } : DeclTokens(";") { map Decl $ parseDTsAsDecls $1 }
| ParameterDecl(";") { map Decl $1 } | ParameterDecl(";") { map (Decl . makeLocalparam) $1 }
| NonDeclPackageItem { $1 } | NonDeclPackageItem { $1 }
NonDeclPackageItem :: { [PackageItem] } NonDeclPackageItem :: { [PackageItem] }
: "typedef" Type Identifier ";" { [Typedef $2 $3] } : "typedef" Type Identifier ";" { [Typedef $2 $3] }
...@@ -1462,4 +1462,9 @@ validateGenCases items = ...@@ -1462,4 +1462,9 @@ validateGenCases items =
where where
(exprs, _) = unzip items (exprs, _) = unzip items
makeLocalparam :: Decl -> Decl
makeLocalparam (Param _ t x e) = Param Localparam t x e
makeLocalparam (ParamType _ x mt) = ParamType Localparam x mt
makeLocalparam other = other
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment