Commit 2f712842 by Zachary Snow

fix errant untyped localparam substitution

parent 103db674
......@@ -570,7 +570,7 @@ inlineInstance global ranges modportBindings items partName
makeParameterBind (x, Left t) =
ParamType Localparam (paramTmp ++ x) t
makeParameterBind (x, Right e) =
Param Localparam (TypeOf e) (paramTmp ++ x) e
Param Localparam UnknownType (paramTmp ++ x) e
overrideParam :: Decl -> Decl
overrideParam (Param Parameter t x e) =
......
......@@ -36,8 +36,6 @@ traverseDeclM decl = do
case decl' of
Param Localparam UnknownType x e ->
insertExpr x e
Param Localparam (Implicit _ [(RawNum 31, RawNum 0)]) x e ->
insertExpr x e
Param Localparam (Implicit sg rs) x e ->
insertExpr x $ Cast (Left t) e
where t = IntegerVector TLogic sg rs
......
module top;
localparam _1B1 = 1'b1;
localparam _1SB1 = 1'sb1;
localparam [31:0] _1B1_EXT = 1'b1;
localparam [31:0] _1SB1_EXT = 1'sb1;
initial begin
$display("%d", $clog2({_1B1, 1'b0}));
$display("%d", $clog2({_1SB1, 1'b0}));
$display("%d", $clog2({_1B1_EXT, 1'b0}));
$display("%d", $clog2({_1SB1_EXT, 1'b0}));
end
endmodule
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