top_tf.sv 334 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
task foo;
    $display("task foo() called");
endtask
function bar;
    input [2:0] n;
    bar = baz(n + 1);
endfunction
function baz;
    input [2:0] n;
    baz = n * 2;
endfunction
12
localparam PARAM = 37;
13 14 15
module top;
    initial foo();
    initial $display("bar(0) = %d", bar(0));
16
    initial $display("PARAM = %d", PARAM);
17
endmodule