Commit dde734be by Zachary Snow

handle params with unpacked typenames

parent b2fe865e
......@@ -76,6 +76,11 @@ traverseDeclM decl = do
case decl' of
Variable{} -> return decl'
Net{} -> return decl'
Param s (UnpackedType t rs1) x e -> do
insertElem x UnknownType
let (tf, rs2) = typeRanges t
let t' = tf $ rs1 ++ rs2
return $ Param s t' x e
Param _ _ x _ ->
insertElem x UnknownType >> return decl'
ParamType Localparam x t -> do
......
......@@ -9,4 +9,7 @@ module top;
end
end
end
typedef byte T [3];
localparam T X = '{ 5, 3, 2 };
initial $display("%0d %0d %0d", X[0], X[1], X[2]);
endmodule
......@@ -9,4 +9,6 @@ module top;
end
end
end
localparam [23:0] X = { 8'd5, 8'd3, 8'd2 };
initial $display("%0d %0d %0d", X[16+:8], X[8+:8], X[0+:8]);
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