data/full_repos/permissive/143278/ivltests/sshortint_test.v
 line:14: before: "signed"
1: b'%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:66: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n                  ... Use "/* verilator lint_off STMTDLY */" and lint_on around source to disable this message.\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:68: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:75: Unsupported: Ignoring delay on this delayed statement.\n    # 1;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:80: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:84: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:95: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:97: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:98: Unsupported: Verilog 1995 force\n        force bu = ui;\n        ^~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:99: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:106: Unsupported: Verilog 1995 release\n    release bu;\n    ^~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:111: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:113: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:114: Unsupported: Verilog 1995 force\n        force bu = si;\n        ^~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:115: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:122: Unsupported: Verilog 1995 release\n    release bu;\n    ^~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:128: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:133: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:134: Unsupported: Verilog 1995 force\n        force bu_xz = si;\n        ^~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:135: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:142: Unsupported: Verilog 1995 release\n    release bu_xz;\n    ^~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:146: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:149: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:151: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:180: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:183: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:185: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:191: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:194: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:196: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:219: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:222: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:254: Unsupported: Ignoring delay on this delayed statement.\n    # 1;\n    ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:258: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:260: Unsupported: Verilog 1995 force\n        force bu = slice;\n        ^~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:262: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Error: data/full_repos/permissive/143278/ivltests/sshortint_test.v:269: Unsupported: Verilog 1995 release\n    release bu;\n    ^~~~~~~\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:273: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:276: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:278: Unsupported: Ignoring delay on this delayed statement.\n        #1;\n        ^\n%Warning-STMTDLY: data/full_repos/permissive/143278/ivltests/sshortint_test.v:285: Unsupported: Ignoring delay on this delayed statement.\n    #1;\n    ^\n%Error: Exiting due to 8 error(s), 32 warning(s)\n        ... See the manual and https://verilator.org for more assistance.\n'
module main;
  parameter N_REPS = 500;
  parameter XZ_REPS = 500;
  parameter UMAX = 'h7fff;
  parameter MAX8 = 256;
  parameter LEN = 16;

  reg signed [LEN-1:0] ar;
  reg signed [LEN-1:0] ar_xz;
  reg signed [LEN-1:0] ar_expected;
  integer unsigned       ui;
  integer signed         si;
  reg signed [LEN/2-1:0]       slice;


  byte     signed pt1, pt2;


  shortint signed bu;
  shortint signed bu_xz;
  shortint signed bresult;
  shortint signed mcaresult;
  shortint signed mabresult;

  integer i;





  assign bu = ar;
  assign bu_xz = ar_xz;


  ms_add duv (.a(bu), .b(bu_xz), .sc(mcaresult), .ss(mabresult) );


  initial begin

    if (bu !== 16'b0 || bu_xz != 16'b0 || mcaresult !== 16'b0 || mabresult !== 16'b0)
      begin
        $display ("FAILED - time zero initialisation incorrect: %b %b", bu, bu_xz);
        $finish;
      end

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        #1;
        if (bu !== ar)
          begin
            $display ("FAILED - incorrect assigment to shortint: %b", bu);
            $finish;
        end
      end
    # 1;


    for (i = 0; i< XZ_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        ar_xz = xz_inject (ar);
        ar_expected = xz_expected (ar_xz);
        #1;
        if (bu_xz !== ar_expected)
          begin
            $display ("FAILED - incorrect assigment to shortint (when 'x 'z): %b", bu);
            $finish;
        end
      end


    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ui = {$random} % 2*(UMAX+1);
        #1;
        force bu = ui;
        #1;
        if (bu !== ui[LEN-1:0])
          begin
            $display ("FAILED - incorrect truncation from unsigned integer to shortint: %b", bu);
            $finish;
        end
      end
    release bu;


    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        si = $random % UMAX;
        #1;
        force bu = si;
        #1;
        if (bu !== si[LEN-1:0])
          begin
            $display ("FAILED - incorrect truncation from signed integer to shortint: %b mismatchs %b", bu, si[LEN-1:0]);
            $finish;
        end
      end
    release bu;



    for (i = 0; i< XZ_REPS; i = i+1)
      begin
        #1;
        si = $random;
        ar_xz = xz_inject (si[LEN-1:0]);
        si = {si[31:LEN], ar_xz};
        ar_expected = xz_expected (ar_xz);
        #1;
        force bu_xz = si;
        #1;
        if (bu_xz !== ar_expected)
          begin
            $display ("FAILED - incorrect conversion from integer (with 'x 'z) to shortint: %b mismatchs %b", bu_xz, ar_expected);
            $finish;
        end
      end
    release bu_xz;

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        ar_xz = $random % UMAX;
        #1;
        bresult = bu + bu_xz;
        #1;
        if ( bresult !== s_sum(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect addition of signed shortints: %0d mismatchs %0d", bresult, s_sum(ar, ar_xz));
            $finish;
          end

        if ( fs_sum (bu, bu_xz) !== s_sum(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect addition of signed shortint in function");
            $finish;
          end

        ts_sum (bu, bu_xz, bresult);
        if ( bresult !== s_sum(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect addition of signed shortint in task: %0d mismatchs %0d", bresult, s_sum(ar, ar_xz));
            $finish;
          end

        if ( mcaresult !== s_sum(ar, ar_xz) || mabresult !== s_sum(ar, ar_xz))
          begin
            $display ("FAILED - incorrect addition of signed shortint from module");
            $finish;
          end
      end

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = ($random % UMAX) << LEN/2;
        ar_xz = ($random % UMAX) << (LEN/2 - 1);
        #1;
        bresult = bu * bu_xz;
        #1;
        if ( bresult !== sh_mul(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect multiplication of signed shortints (truncated)");
            $finish;
          end
        #1;
        pt1 = $random;
        pt2 = $random;
        #1;
        bresult = pt1 * pt2;
        #1;
        if ( bresult !== s_mul(pt1, pt2) )
          begin
            $display ("FAILED - incorrect multiplication of signed shortints for input bytes");
            $finish;
          end

        if ( fs_mul (pt1, pt2) !== s_mul(pt1, pt2) )
          begin
            $display ("FAILED - incorrect product of signed bytes for a function returning signed shortint");
            $finish;
          end

        ts_mul (pt1, pt2, bresult);
        if ( bresult !== s_mul(pt1, pt2) )
          begin
            $display ("FAILED - incorrect product of signed bytes in task returning signed shortint");
            $finish;
          end
      end

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        ar_xz = $random % UMAX;
        #1;
        if ( (bu < bu_xz ) !== (ar < ar_xz) )
          begin
            $display ("FAILED - incorrect 'less than' on signed shortints");
            $finish;
          end
        if ( (bu <= bu_xz ) !== (ar <= ar_xz) )
          begin
            $display ("FAILED - incorrect 'less than or equal' on signed shortints");
            $finish;
          end
        if ( (bu > bu_xz ) !== (ar > ar_xz) )
          begin
            $display ("FAILED - incorrect 'greater than' on signed shortints");
            $finish;
          end
        if ( (bu >= bu_xz ) !== (ar >= ar_xz) )
          begin
            $display ("FAILED - incorrect 'greater than or equal' than on signed shortints");
            $finish;
          end
        if ( (bu == bu_xz ) !== (ar == ar_xz) )
          begin
            $display ("FAILED - incorrect 'equal to' on signed shortints");
            $finish;
          end
        if ( (bu != bu_xz ) !== (ar != ar_xz) )
          begin
            $display ("FAILED - incorrect 'not equal to' on signed shortints");
            $finish;
          end
      end
    # 1;

    for (i = 0; i < (1<<LEN/2); i = i+1)
      begin
        #1;
        slice = $random % 'h7f;
        force bu = slice;
        ar = slice;
        #1;
        if (bu !== ar)
          begin
            $display ("FAILED - incorrect signed extend to unsigned shortint");
            $finish;
          end
      end
    release bu;

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        pt1 = $random;
        pt2 = $random;
        #1;
        bresult = {pt1, pt2};
        #1;
        if ( bresult[15:8] !== pt1 || bresult[7:0] !== pt2)
          begin
            $display ("FAILED - incorrect concatenation of signed shortints");
            $finish;
          end
      end
    #1;
    $display("PASSED");
  end


  function [LEN-1:0] xz_inject (input signed [LEN-1:0] value);
      integer i, temp;
      begin
        temp = {$random} % 2*(UMAX+1);
        for (i=0; i<LEN; i=i+1)
          begin
             if (temp[i] == 1'b1)
               begin
                 temp = $random % UMAX;
                 if (temp <= 0)
                    value[i] = 1'bx;
                 else
                    value[i] = 1'bz;
               end
          end
          xz_inject = value;
      end
  endfunction


  function [LEN-1:0] xz_expected (input signed [LEN-1:0] value_xz);
      integer i;
      begin
        for (i=0; i<LEN; i=i+1)
          begin
             if (value_xz[i] === 1'bx || value_xz[i] === 1'bz )
                 value_xz[i] = 1'b0;
          end
          xz_expected = value_xz;
      end
  endfunction


  function signed [LEN-1:0] s_sum (input signed [LEN-1:0] a, b);
      s_sum = a + b;
  endfunction


  function shortint signed fs_sum (input shortint signed a, b);
      fs_sum = a + b;
  endfunction


  task ts_sum (input shortint signed a, b, output shortint signed c);
      c = a + b;
  endtask


  function signed [LEN-1:0] sh_mul (input signed [LEN-1:0] a, b);
      sh_mul = a * b;
  endfunction


  function signed [LEN-1:0] s_mul (input signed [LEN/2-1:0] a, b);
      s_mul = a * b;
  endfunction


  function shortint signed fs_mul (input byte signed a, b);
      fs_mul = a * b;
  endfunction


  task ts_mul (input byte signed a, b, output shortint signed c);
      c = a * b;
  endtask

endmodule
module main;

  parameter N_REPS = 500;
  parameter XZ_REPS = 500;
  parameter UMAX = 'h7fff;
  parameter MAX8 = 256;
  parameter LEN = 16;

  reg signed [LEN-1:0] ar;
  reg signed [LEN-1:0] ar_xz;
  reg signed [LEN-1:0] ar_expected;
  integer unsigned       ui;
  integer signed         si;
  reg signed [LEN/2-1:0]       slice;


  byte     signed pt1, pt2;


  shortint signed bu;
  shortint signed bu_xz;
  shortint signed bresult;
  shortint signed mcaresult;
  shortint signed mabresult;

  integer i;





  assign bu = ar;
  assign bu_xz = ar_xz;


  ms_add duv (.a(bu), .b(bu_xz), .sc(mcaresult), .ss(mabresult) );


  initial begin

    if (bu !== 16'b0 || bu_xz != 16'b0 || mcaresult !== 16'b0 || mabresult !== 16'b0)
      begin
        $display ("FAILED - time zero initialisation incorrect: %b %b", bu, bu_xz);
        $finish;
      end

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        #1;
        if (bu !== ar)
          begin
            $display ("FAILED - incorrect assigment to shortint: %b", bu);
            $finish;
        end
      end
    # 1;


    for (i = 0; i< XZ_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        ar_xz = xz_inject (ar);
        ar_expected = xz_expected (ar_xz);
        #1;
        if (bu_xz !== ar_expected)
          begin
            $display ("FAILED - incorrect assigment to shortint (when 'x 'z): %b", bu);
            $finish;
        end
      end


    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ui = {$random} % 2*(UMAX+1);
        #1;
        force bu = ui;
        #1;
        if (bu !== ui[LEN-1:0])
          begin
            $display ("FAILED - incorrect truncation from unsigned integer to shortint: %b", bu);
            $finish;
        end
      end
    release bu;


    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        si = $random % UMAX;
        #1;
        force bu = si;
        #1;
        if (bu !== si[LEN-1:0])
          begin
            $display ("FAILED - incorrect truncation from signed integer to shortint: %b mismatchs %b", bu, si[LEN-1:0]);
            $finish;
        end
      end
    release bu;



    for (i = 0; i< XZ_REPS; i = i+1)
      begin
        #1;
        si = $random;
        ar_xz = xz_inject (si[LEN-1:0]);
        si = {si[31:LEN], ar_xz};
        ar_expected = xz_expected (ar_xz);
        #1;
        force bu_xz = si;
        #1;
        if (bu_xz !== ar_expected)
          begin
            $display ("FAILED - incorrect conversion from integer (with 'x 'z) to shortint: %b mismatchs %b", bu_xz, ar_expected);
            $finish;
        end
      end
    release bu_xz;

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        ar_xz = $random % UMAX;
        #1;
        bresult = bu + bu_xz;
        #1;
        if ( bresult !== s_sum(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect addition of signed shortints: %0d mismatchs %0d", bresult, s_sum(ar, ar_xz));
            $finish;
          end

        if ( fs_sum (bu, bu_xz) !== s_sum(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect addition of signed shortint in function");
            $finish;
          end

        ts_sum (bu, bu_xz, bresult);
        if ( bresult !== s_sum(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect addition of signed shortint in task: %0d mismatchs %0d", bresult, s_sum(ar, ar_xz));
            $finish;
          end

        if ( mcaresult !== s_sum(ar, ar_xz) || mabresult !== s_sum(ar, ar_xz))
          begin
            $display ("FAILED - incorrect addition of signed shortint from module");
            $finish;
          end
      end

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = ($random % UMAX) << LEN/2;
        ar_xz = ($random % UMAX) << (LEN/2 - 1);
        #1;
        bresult = bu * bu_xz;
        #1;
        if ( bresult !== sh_mul(ar, ar_xz) )
          begin
            $display ("FAILED - incorrect multiplication of signed shortints (truncated)");
            $finish;
          end
        #1;
        pt1 = $random;
        pt2 = $random;
        #1;
        bresult = pt1 * pt2;
        #1;
        if ( bresult !== s_mul(pt1, pt2) )
          begin
            $display ("FAILED - incorrect multiplication of signed shortints for input bytes");
            $finish;
          end

        if ( fs_mul (pt1, pt2) !== s_mul(pt1, pt2) )
          begin
            $display ("FAILED - incorrect product of signed bytes for a function returning signed shortint");
            $finish;
          end

        ts_mul (pt1, pt2, bresult);
        if ( bresult !== s_mul(pt1, pt2) )
          begin
            $display ("FAILED - incorrect product of signed bytes in task returning signed shortint");
            $finish;
          end
      end

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        ar = $random % UMAX;
        ar_xz = $random % UMAX;
        #1;
        if ( (bu < bu_xz ) !== (ar < ar_xz) )
          begin
            $display ("FAILED - incorrect 'less than' on signed shortints");
            $finish;
          end
        if ( (bu <= bu_xz ) !== (ar <= ar_xz) )
          begin
            $display ("FAILED - incorrect 'less than or equal' on signed shortints");
            $finish;
          end
        if ( (bu > bu_xz ) !== (ar > ar_xz) )
          begin
            $display ("FAILED - incorrect 'greater than' on signed shortints");
            $finish;
          end
        if ( (bu >= bu_xz ) !== (ar >= ar_xz) )
          begin
            $display ("FAILED - incorrect 'greater than or equal' than on signed shortints");
            $finish;
          end
        if ( (bu == bu_xz ) !== (ar == ar_xz) )
          begin
            $display ("FAILED - incorrect 'equal to' on signed shortints");
            $finish;
          end
        if ( (bu != bu_xz ) !== (ar != ar_xz) )
          begin
            $display ("FAILED - incorrect 'not equal to' on signed shortints");
            $finish;
          end
      end
    # 1;

    for (i = 0; i < (1<<LEN/2); i = i+1)
      begin
        #1;
        slice = $random % 'h7f;
        force bu = slice;
        ar = slice;
        #1;
        if (bu !== ar)
          begin
            $display ("FAILED - incorrect signed extend to unsigned shortint");
            $finish;
          end
      end
    release bu;

    for (i = 0; i< N_REPS; i = i+1)
      begin
        #1;
        pt1 = $random;
        pt2 = $random;
        #1;
        bresult = {pt1, pt2};
        #1;
        if ( bresult[15:8] !== pt1 || bresult[7:0] !== pt2)
          begin
            $display ("FAILED - incorrect concatenation of signed shortints");
            $finish;
          end
      end
    #1;
    $display("PASSED");
  end


  function [LEN-1:0] xz_inject (input signed [LEN-1:0] value);
      integer i, temp;
      begin
        temp = {$random} % 2*(UMAX+1);
        for (i=0; i<LEN; i=i+1)
          begin
             if (temp[i] == 1'b1)
               begin
                 temp = $random % UMAX;
                 if (temp <= 0)
                    value[i] = 1'bx;
                 else
                    value[i] = 1'bz;
               end
          end
          xz_inject = value;
      end
  endfunction


  function [LEN-1:0] xz_expected (input signed [LEN-1:0] value_xz);
      integer i;
      begin
        for (i=0; i<LEN; i=i+1)
          begin
             if (value_xz[i] === 1'bx || value_xz[i] === 1'bz )
                 value_xz[i] = 1'b0;
          end
          xz_expected = value_xz;
      end
  endfunction


  function signed [LEN-1:0] s_sum (input signed [LEN-1:0] a, b);
      s_sum = a + b;
  endfunction


  function shortint signed fs_sum (input shortint signed a, b);
      fs_sum = a + b;
  endfunction


  task ts_sum (input shortint signed a, b, output shortint signed c);
      c = a + b;
  endtask


  function signed [LEN-1:0] sh_mul (input signed [LEN-1:0] a, b);
      sh_mul = a * b;
  endfunction


  function signed [LEN-1:0] s_mul (input signed [LEN/2-1:0] a, b);
      s_mul = a * b;
  endfunction


  function shortint signed fs_mul (input byte signed a, b);
      fs_mul = a * b;
  endfunction


  task ts_mul (input byte signed a, b, output shortint signed c);
      c = a * b;
  endtask

endmodule