mirror of https://github.com/zachjs/sv2v.git
fix loop in logic indirection typing
This commit is contained in:
parent
b22cd210a4
commit
821b8bc947
|
|
@ -115,7 +115,8 @@ traverseModuleItem ports scopes =
|
|||
, AlwaysC AlwaysComb $ Asgn AsgnOpEq Nothing lhs (Ident x)
|
||||
]
|
||||
where
|
||||
t = TypeOf expr
|
||||
t = Net (NetType TWire) Unspecified
|
||||
[(DimsFn FnBits $ Right expr, RawNum 1)]
|
||||
x = "sv2v_tmp_" ++ shortHash (lhs, expr)
|
||||
-- rewrite port bindings to use temporary nets where necessary
|
||||
fixModuleItem (Instance moduleName params instanceName rs bindings) =
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
module top(inp, out);
|
||||
input wire inp;
|
||||
reg data;
|
||||
always @* data = inp;
|
||||
output logic [1:0] out;
|
||||
|
||||
parameter ON = 1;
|
||||
generate
|
||||
if (ON) begin : blk
|
||||
assign out[0] = data;
|
||||
always @* out[1] = data;
|
||||
end
|
||||
endgenerate
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
module top(inp, out);
|
||||
input wire inp;
|
||||
reg data;
|
||||
always @* data = inp;
|
||||
output reg [1:0] out;
|
||||
|
||||
parameter ON = 1;
|
||||
generate
|
||||
if (ON) begin : blk
|
||||
always @* out[0] = data;
|
||||
always @* out[1] = data;
|
||||
end
|
||||
endgenerate
|
||||
endmodule
|
||||
Loading…
Reference in New Issue