tf_block.sv 294 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 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