mirror of https://github.com/zachjs/sv2v.git
support default pattern unbased unsized port bindings
This commit is contained in:
parent
2b377cef04
commit
ad18c583ab
|
|
@ -188,6 +188,8 @@ convertExpr _ (Cast te e) =
|
|||
Cast te $ convertExpr SelfDetermined e
|
||||
convertExpr _ (Concat exprs) =
|
||||
Concat $ map (convertExpr SelfDetermined) exprs
|
||||
convertExpr context (Pattern [(":default", e @ UU{})]) =
|
||||
convertExpr context e
|
||||
convertExpr _ (Pattern items) =
|
||||
Pattern $ zip
|
||||
(map fst items)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
module Example(inp);
|
||||
input [4][5] inp;
|
||||
initial #1 $display("%b", inp);
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
Example e1('{default:'0});
|
||||
Example e2('{default:'1});
|
||||
Example e3('{default:'x});
|
||||
Example e4('{default:'z});
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
module Example(inp);
|
||||
input [19:0] inp;
|
||||
initial #1 $display("%b", inp);
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
Example e1({20 {1'sb0}});
|
||||
Example e2({20 {1'sb1}});
|
||||
Example e3({20 {1'sbx}});
|
||||
Example e4({20 {1'sbz}});
|
||||
endmodule
|
||||
Loading…
Reference in New Issue