3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-06 01:24:10 +00:00
yosys/tests/verilog/param_no_default_not_svmode.ys
Zachary Snow d738b2c127 sv: support for parameters without default values
- Modules with a parameter without a default value will be automatically
  deferred until the hierarchy pass
- Allows for parameters without defaults as module items, rather than
  just int the `parameter_port_list`, despite being forbidden in the LRM
- Check for parameters without defaults that haven't been overriden
- Add location info to parameter/localparam declarations
2021-03-02 10:43:53 -05:00

27 lines
384 B
Plaintext

logger -expect-no-warnings
read_verilog -sv <<EOF
module Module;
parameter X;
endmodule
EOF
design -reset
logger -expect-no-warnings
read_verilog -sv <<EOF
module Module #(
parameter X
);
endmodule
EOF
design -reset
logger -expect error "Parameter defaults can only be omitted in SystemVerilog mode!" 1
read_verilog <<EOF
module Module #(
parameter X
);
endmodule
EOF