interface_func.v 384 Bytes
Newer Older
1
module top;
2 3 4
    localparam MULTIPLIER_1 = 7;
    localparam MULTIPLIER_2 = 8;
    function integer bar_1;
5
        input integer x;
6
        bar_1 = x * x * MULTIPLIER_1;
7
    endfunction
8 9 10 11 12 13 14 15
    function integer bar_2;
        input integer x;
        bar_2 = x * x * MULTIPLIER_2;
    endfunction
    initial begin
        $display(bar_1(3));
        $display(bar_2(3));
    end
16
endmodule