mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-04 08:34:09 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
14 lines
287 B
Verilog
14 lines
287 B
Verilog
function int a_func (input int id);
|
|
a_func = id;
|
|
endfunction
|
|
|
|
// This should print the following:
|
|
// This is func 2.
|
|
// This is func 1.
|
|
module top;
|
|
initial begin
|
|
$display("this is func %0d.", a_func(2));
|
|
$display("this is func %0d.", a_func(1));
|
|
end
|
|
endmodule
|