mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-22 13:56:39 +02:00
added test coverage for task and function bodies being one statement
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user