mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
Merge branch 'pr_elab_sys_tasks' of https://github.com/udif/yosys into clifford/pr983
This commit is contained in:
commit
a3bbc5365b
10 changed files with 107 additions and 5 deletions
30
tests/various/elab_sys_tasks.sv
Normal file
30
tests/various/elab_sys_tasks.sv
Normal file
|
@ -0,0 +1,30 @@
|
|||
module test;
|
||||
localparam X=1;
|
||||
genvar i;
|
||||
generate
|
||||
if (X == 1)
|
||||
$info("X is 1");
|
||||
if (X == 1)
|
||||
$warning("X is 1");
|
||||
else
|
||||
$error("X is not 1");
|
||||
case (X)
|
||||
1: $info("X is 1 in a case statement");
|
||||
endcase
|
||||
//case (X-1)
|
||||
// 1: $warn("X is 2");
|
||||
// default: $warn("X might be anything in a case statement");
|
||||
//endcase
|
||||
for (i = 0; i < 3; i = i + 1)
|
||||
begin
|
||||
case(i)
|
||||
0: $info;
|
||||
1: $warning;
|
||||
default: $info("default case statemnent");
|
||||
endcase
|
||||
end
|
||||
|
||||
$info("This is a standalone $info(). Next $info has no parameters");
|
||||
$info;
|
||||
endgenerate
|
||||
endmodule
|
1
tests/various/elab_sys_tasks.ys
Normal file
1
tests/various/elab_sys_tasks.ys
Normal file
|
@ -0,0 +1 @@
|
|||
read_verilog -sv elab_sys_tasks.sv
|
Loading…
Add table
Add a link
Reference in a new issue