data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:3: Cannot find include file: ../../define/global_def.v\n`include "../../define/global_def.v" \n         ^~~~~~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/147520230/src/cpu/stage/EX,data/full_repos/permissive/147520230/../../define/global_def.v\n             data/full_repos/permissive/147520230/src/cpu/stage/EX,data/full_repos/permissive/147520230/../../define/global_def.v.v\n             data/full_repos/permissive/147520230/src/cpu/stage/EX,data/full_repos/permissive/147520230/../../define/global_def.v.sv\n             ../../define/global_def.v\n             ../../define/global_def.v.v\n             ../../define/global_def.v.sv\n             obj_dir/../../define/global_def.v\n             obj_dir/../../define/global_def.v.v\n             obj_dir/../../define/global_def.v.sv\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:4: Cannot find include file: ../../define/funct_def.v\n`include "../../define/funct_def.v" \n         ^~~~~~~~~~~~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:10: Define or directive not defined: \'`FUNCT_BUS\'\n    input   wire[`FUNCT_BUS]        funct,\n                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:10: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n    input   wire[`FUNCT_BUS]        funct,\n                           ^\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:11: Define or directive not defined: \'`DATA_BUS\'\n    input   wire[`DATA_BUS]         operand_1,\n                 ^~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:12: Define or directive not defined: \'`DATA_BUS\'\n    input   wire[`DATA_BUS]         operand_2,\n                 ^~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:15: Define or directive not defined: \'`DATA_BUS\'\n    input   wire[`DATA_BUS]         hi_val_mux_data,\n                 ^~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:16: Define or directive not defined: \'`DATA_BUS\'\n    input   wire[`DATA_BUS]         lo_val_mux_data,\n                 ^~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:19: Define or directive not defined: \'`DOUBLE_DATA_BUS\'\n    output  reg [`DOUBLE_DATA_BUS]  result_mult\n                 ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:22: Define or directive not defined: \'`DATA_BUS\'\n    wire[`DATA_BUS] multiplicand    = (((funct == `FUNCT2_MUL)  || (funct == `FUNCT_MULT)   ||\n         ^~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:22: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n    wire[`DATA_BUS] multiplicand    = (((funct == `FUNCT2_MUL)  || (funct == `FUNCT_MULT)   ||\n                  ^\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:22: Define or directive not defined: \'`FUNCT2_MUL\'\n    wire[`DATA_BUS] multiplicand    = (((funct == `FUNCT2_MUL)  || (funct == `FUNCT_MULT)   ||\n                                                  ^~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:22: Define or directive not defined: \'`FUNCT_MULT\'\n    wire[`DATA_BUS] multiplicand    = (((funct == `FUNCT2_MUL)  || (funct == `FUNCT_MULT)   ||\n                                                                             ^~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:23: Define or directive not defined: \'`FUNCT2_MADD\'\n                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_1[31]) ? (~operand_1 + 1) : operand_1;\n                                                  ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:23: Define or directive not defined: \'`FUNCT2_MSUB\'\n                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_1[31]) ? (~operand_1 + 1) : operand_1;\n                                                                             ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:24: Define or directive not defined: \'`DATA_BUS\'\n    wire[`DATA_BUS] multiplicator   = (((funct == `FUNCT2_MUL) || (funct == `FUNCT_MULT)    ||\n         ^~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:24: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n    wire[`DATA_BUS] multiplicator   = (((funct == `FUNCT2_MUL) || (funct == `FUNCT_MULT)    ||\n                  ^\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:24: Define or directive not defined: \'`FUNCT2_MUL\'\n    wire[`DATA_BUS] multiplicator   = (((funct == `FUNCT2_MUL) || (funct == `FUNCT_MULT)    ||\n                                                  ^~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:24: Define or directive not defined: \'`FUNCT_MULT\'\n    wire[`DATA_BUS] multiplicator   = (((funct == `FUNCT2_MUL) || (funct == `FUNCT_MULT)    ||\n                                                                            ^~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:25: Define or directive not defined: \'`FUNCT2_MADD\'\n                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_2[31]) ? (~operand_2 + 1) : operand_2;\n                                                  ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:25: Define or directive not defined: \'`FUNCT2_MSUB\'\n                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_2[31]) ? (~operand_2 + 1) : operand_2;\n                                                                             ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:27: Define or directive not defined: \'`DOUBLE_DATA_BUS\'\n    wire[`DOUBLE_DATA_BUS]  result_mult_temp = multiplicand * multiplicator;\n         ^~~~~~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:27: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n    wire[`DOUBLE_DATA_BUS]  result_mult_temp = multiplicand * multiplicator;\n                         ^\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:30: Define or directive not defined: \'`RST_ENABLE\'\n        if (rst == `RST_ENABLE) begin\n                   ^~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:31: Define or directive not defined: \'`ZERO_WORD\'\n            result_mult         <= {`ZERO_WORD, `ZERO_WORD};\n                                    ^~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:31: Define or directive not defined: \'`ZERO_WORD\'\n            result_mult         <= {`ZERO_WORD, `ZERO_WORD};\n                                                ^~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:35: Define or directive not defined: \'`FUNCT2_MUL\'\n                `FUNCT2_MUL, `FUNCT_MULT:    begin\n                ^~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:35: Define or directive not defined: \'`FUNCT_MULT\'\n                `FUNCT2_MUL, `FUNCT_MULT:    begin\n                             ^~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:41: Define or directive not defined: \'`FUNCT2_MADD\'\n                `FUNCT2_MADD: begin\n                ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:47: Define or directive not defined: \'`FUNCT2_MADDU\'\n                `FUNCT2_MADDU:  begin\n                ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:51: Define or directive not defined: \'`FUNCT2_MSUB\'\n                `FUNCT2_MSUB:    begin\n                ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/147520230/src/cpu/stage/EX/Multiplier.v:57: Define or directive not defined: \'`FUNCT2_MSUBU\'\n                `FUNCT2_MSUBU:  begin\n                ^~~~~~~~~~~~~\n%Error: Exiting due to 32 error(s)\n'
module  Multiplier(
    input   wire                    rst,


    input   wire[`FUNCT_BUS]        funct,
    input   wire[`DATA_BUS]         operand_1,
    input   wire[`DATA_BUS]         operand_2,


    input   wire[`DATA_BUS]         hi_val_mux_data,
    input   wire[`DATA_BUS]         lo_val_mux_data,


    output  reg [`DOUBLE_DATA_BUS]  result_mult
);

    wire[`DATA_BUS] multiplicand    = (((funct == `FUNCT2_MUL)  || (funct == `FUNCT_MULT)   ||
                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_1[31]) ? (~operand_1 + 1) : operand_1;
    wire[`DATA_BUS] multiplicator   = (((funct == `FUNCT2_MUL) || (funct == `FUNCT_MULT)    ||
                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_2[31]) ? (~operand_2 + 1) : operand_2;

    wire[`DOUBLE_DATA_BUS]  result_mult_temp = multiplicand * multiplicator;

    always @ (*)    begin
        if (rst == `RST_ENABLE) begin
            result_mult         <= {`ZERO_WORD, `ZERO_WORD};
        end else    begin
            case (funct)

                `FUNCT2_MUL, `FUNCT_MULT:    begin
                    if (operand_1[31] ^ operand_2[31])
                            result_mult <= ~result_mult_temp + 1;
                    else    result_mult <= result_mult_temp;
                end

                `FUNCT2_MADD: begin
                    if (operand_1[31] ^ operand_2[31])
                            result_mult <= ~result_mult_temp + 1 + {hi_val_mux_data, lo_val_mux_data};
                    else    result_mult <= result_mult_temp + {hi_val_mux_data, lo_val_mux_data};
                end

                `FUNCT2_MADDU:  begin
                    result_mult         <= result_mult_temp + {hi_val_mux_data, lo_val_mux_data};
                end

                `FUNCT2_MSUB:    begin
                    if (operand_1[31] ^ operand_2[31])
                            result_mult <= result_mult_temp + {hi_val_mux_data, lo_val_mux_data};
                    else    result_mult <= ~result_mult_temp + 1 + {hi_val_mux_data, lo_val_mux_data};
                end

                `FUNCT2_MSUBU:  begin
                    result_mult         <= ~result_mult_temp + 1 + {hi_val_mux_data, lo_val_mux_data};
                end

                default:    begin
                    result_mult         <= result_mult_temp;
                end
            
            endcase
        end
    end

endmodule
module  Multiplier(
    input   wire                    rst,


    input   wire[`FUNCT_BUS]        funct,
    input   wire[`DATA_BUS]         operand_1,
    input   wire[`DATA_BUS]         operand_2,


    input   wire[`DATA_BUS]         hi_val_mux_data,
    input   wire[`DATA_BUS]         lo_val_mux_data,


    output  reg [`DOUBLE_DATA_BUS]  result_mult
);


    wire[`DATA_BUS] multiplicand    = (((funct == `FUNCT2_MUL)  || (funct == `FUNCT_MULT)   ||
                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_1[31]) ? (~operand_1 + 1) : operand_1;
    wire[`DATA_BUS] multiplicator   = (((funct == `FUNCT2_MUL) || (funct == `FUNCT_MULT)    ||
                                        (funct == `FUNCT2_MADD) || (funct == `FUNCT2_MSUB)) && operand_2[31]) ? (~operand_2 + 1) : operand_2;

    wire[`DOUBLE_DATA_BUS]  result_mult_temp = multiplicand * multiplicator;

    always @ (*)    begin
        if (rst == `RST_ENABLE) begin
            result_mult         <= {`ZERO_WORD, `ZERO_WORD};
        end else    begin
            case (funct)

                `FUNCT2_MUL, `FUNCT_MULT:    begin
                    if (operand_1[31] ^ operand_2[31])
                            result_mult <= ~result_mult_temp + 1;
                    else    result_mult <= result_mult_temp;
                end

                `FUNCT2_MADD: begin
                    if (operand_1[31] ^ operand_2[31])
                            result_mult <= ~result_mult_temp + 1 + {hi_val_mux_data, lo_val_mux_data};
                    else    result_mult <= result_mult_temp + {hi_val_mux_data, lo_val_mux_data};
                end

                `FUNCT2_MADDU:  begin
                    result_mult         <= result_mult_temp + {hi_val_mux_data, lo_val_mux_data};
                end

                `FUNCT2_MSUB:    begin
                    if (operand_1[31] ^ operand_2[31])
                            result_mult <= result_mult_temp + {hi_val_mux_data, lo_val_mux_data};
                    else    result_mult <= ~result_mult_temp + 1 + {hi_val_mux_data, lo_val_mux_data};
                end

                `FUNCT2_MSUBU:  begin
                    result_mult         <= ~result_mult_temp + 1 + {hi_val_mux_data, lo_val_mux_data};
                end

                default:    begin
                    result_mult         <= result_mult_temp;
                end
            
            endcase
        end
    end

endmodule