mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-08-22 06:07:26 +02:00
ast: Add support for $sformatf system function
Signed-off-by: David Shah <[email protected]>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
read_verilog <<EOT
|
||||
|
||||
module top;
|
||||
localparam a = $sformatf("0x%x", 8'h5A);
|
||||
localparam b = $sformatf("%d", 4'b011);
|
||||
generate
|
||||
if (a != "0x5a") $error("a incorrect!");
|
||||
if (b != "3") $error("b incorrect!");
|
||||
endgenerate
|
||||
endmodule
|
||||
|
||||
EOT
|
||||
Reference in New Issue
Block a user