mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-12 00:52:05 +00:00
Add CONST_FLAG_UNSIZED
In order to support unsized constants being used as parameters, the `const` struct needs to know if it is unsized (so that the parameter can be used to set the size). Add unsized flag to param value serialization and rtlil back-/front-end. Add cell params to `tests/rtlil/everything.v`.
This commit is contained in:
parent
e4c5900acd
commit
7302bf9a66
5 changed files with 39 additions and 8 deletions
|
|
@ -38,3 +38,20 @@ module foo(
|
|||
assign b = bb;
|
||||
assign y = a + bb;
|
||||
endmodule
|
||||
|
||||
module set_param #(
|
||||
parameter [3:0] VALUE = 1'bx
|
||||
) (
|
||||
output logic [3:0] out
|
||||
);
|
||||
assign out = VALUE;
|
||||
endmodule
|
||||
|
||||
module use_param (
|
||||
output logic [3:0] a, b, c, d
|
||||
);
|
||||
set_param #($signed(1)) spa (a);
|
||||
set_param #('1) spb (b);
|
||||
set_param #(1.1) spc (c);
|
||||
set_param #(1'b1) spd (d);
|
||||
endmodule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue