mirror of https://github.com/zachjs/sv2v.git
added test coverage for task and function bodies being one statement
This commit is contained in:
parent
b0eedfe318
commit
f76f9bb88b
|
|
@ -0,0 +1,14 @@
|
|||
module top;
|
||||
function [2:0] f;
|
||||
input [2:0] n;
|
||||
n += 1;
|
||||
return n + 3;
|
||||
endfunction
|
||||
task t;
|
||||
$display("hello");
|
||||
$display("world");
|
||||
endtask
|
||||
initial t();
|
||||
initial $display("f(0) = ", f(0));
|
||||
initial $display("f(1) = ", f(1));
|
||||
endmodule
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
module top;
|
||||
function [2:0] f;
|
||||
input [2:0] n;
|
||||
f = n + 4;
|
||||
endfunction
|
||||
task t;
|
||||
begin
|
||||
$display("hello");
|
||||
$display("world");
|
||||
end
|
||||
endtask
|
||||
initial t();
|
||||
initial $display("f(0) = ", f(0));
|
||||
initial $display("f(1) = ", f(1));
|
||||
endmodule
|
||||
|
|
@ -0,0 +1 @@
|
|||
// intentionally empty
|
||||
Loading…
Reference in New Issue