实验 1 没有加automatic
module tb;
function void myfunc(input [7:0] x,
input [7:0] y,
output [15:0] z);
$display(“x = %0d”, x);
$display(“y = %0d”, y);
$display(“z = %0d”, z);
z = x + y - 1;
$display("z = %0d", z);
endfunction
function void myfunc_new(input [7:0] x,
input [7:0] y,
output [15:0] z);
int tmp = 10;
$display("x = %0d", x);
$display("y = %0d", y);
$display("z = %0d", z);
tmp = x*y;
$display("tmp = %0d", tmp);
z = tmp - 1;
endfunction
task mytask(input [7:0] xx,
input [7:0] yy,
output [15:0] zz);
int tmp = 10;
$display(“xx = %0d”,