data_lifetime.sv 453 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
module top;
    function automatic logic [31:0] lcg(input logic [31:0] x);
        automatic logic [3:0] temp;
        lcg = x;
        for (temp = 0; temp < 3; temp++) begin
            lcg *= 1664525;
            lcg += 1013904223;
        end
    endfunction

    initial $display(lcg(0));
    initial $display(lcg(1));
    initial $display(lcg(2));
    initial $display(lcg(3));
    initial $display(lcg(4));
    initial $display(lcg(5));
endmodule