data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v
1: b'%Warning-STMTDLY: data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v:29: Unsupported: Ignoring delay on this delayed statement.\nalways #50  clk = ~clk;\n       ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Error: data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v:32: Unsupported or unknown PLI call: $dumpfile\n  $dumpfile("dump.vcd");\n  ^~~~~~~~~\n%Error: data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v:33: Unsupported or unknown PLI call: $dumpvars\n  $dumpvars;\n  ^~~~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v:34: Unsupported: Ignoring delay on this delayed statement.\n  #10000 \n  ^\n%Error: data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v:76: syntax error, unexpected \'@\'\n        @(posedge clk)  #10;\n        ^\n%Error: data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v:78: syntax error, unexpected \'@\'\n        @(posedge clk)  #10;\n        ^\n%Error: data/full_repos/permissive/529469310/RSA/RSA_Func_tb.v:80: syntax error, unexpected \'@\'\n    while (busy==1) @(posedge clk);\n                    ^\n%Error: Exiting due to 5 error(s), 2 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
function [`Bit-1:0] rsa;
    input [`Bit-1:0] A,B,C;
    integer j;
    reg [`Bit-1:0] Temp1, Temp2;
    reg [`Bit*2-1:0] Temp3;
begin
    Temp1 = A;
    Temp2 = 1;
    for (j=0; j<10; j=j+1) begin
        if(B[0]) begin
           Temp3 = Temp1 * Temp2;
           Temp2 = Temp3 % C; 
        end
        Temp3 = Temp1 * Temp1;
        Temp1 = Temp3 % C;
        B = {1'b0, B[`Bit-1:1]};
    end
    rsa = Temp2;
end  
endfunction
function [`Bit-1:0] rsa;

    input [`Bit-1:0] A,B,C;
    integer j;
    reg [`Bit-1:0] Temp1, Temp2;
    reg [`Bit*2-1:0] Temp3;
begin
    Temp1 = A;
    Temp2 = 1;
    for (j=0; j<10; j=j+1) begin
        if(B[0]) begin
           Temp3 = Temp1 * Temp2;
           Temp2 = Temp3 % C; 
        end
        Temp3 = Temp1 * Temp1;
        Temp1 = Temp3 % C;
        B = {1'b0, B[`Bit-1:1]};
    end
    rsa = Temp2;
end  
endfunction