mirror of https://github.com/zachjs/sv2v.git
handle params with unpacked typenames
This commit is contained in:
parent
b2fe865e17
commit
dde734be26
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue