Commit ad18c583 by Zachary Snow

support default pattern unbased unsized port bindings

parent 2b377cef
......@@ -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)
......
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
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
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