data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v
1: b"%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:9: Can't find definition of variable: 'OPCODE_ADDIU'\n            OPCODE_ADDIU :\n            ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:10: Can't find definition of variable: 'FUNCT_ADDU'\n                fncode = FUNCT_ADDU;\n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:11: Can't find definition of variable: 'OPCODE_SW'\n            OPCODE_SW :\n            ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:13: Can't find definition of variable: 'OPCODE_LW'\n                                                                          : ... Suggested alternative: 'OPCODE_SW'\n            OPCODE_LW :\n            ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:15: Can't find definition of variable: 'OPCODE_LBU'\n                                                                          : ... Suggested alternative: 'OPCODE_LW'\n            OPCODE_LBU : \n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:17: Can't find definition of variable: 'OPCODE_LB'\n                                                                          : ... Suggested alternative: 'OPCODE_LBU'\n            OPCODE_LB : \n            ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:19: Can't find definition of variable: 'OPCODE_ANDI'\n                                                                          : ... Suggested alternative: 'OPCODE_ADDIU'\n            OPCODE_ANDI :\n            ^~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:20: Can't find definition of variable: 'FUNCT_AND'\n                                                                          : ... Suggested alternative: 'FUNCT_ADDU'\n                fncode = FUNCT_AND;\n                         ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:21: Can't find definition of variable: 'OPCODE_ORI'\n                                                                          : ... Suggested alternative: 'OPCODE_ANDI'\n            OPCODE_ORI  :\n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:22: Can't find definition of variable: 'FUNCT_OR'\n                                                                          : ... Suggested alternative: 'FUNCT_AND'\n                fncode = FUNCT_OR;\n                         ^~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:23: Can't find definition of variable: 'OPCODE_XORI'\n                                                                          : ... Suggested alternative: 'OPCODE_ORI'\n            OPCODE_XORI  :\n            ^~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:24: Can't find definition of variable: 'FUNCT_XOR'\n                                                                          : ... Suggested alternative: 'FUNCT_OR'\n                fncode = FUNCT_XOR;\n                         ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:25: Can't find definition of variable: 'OPCODE_SLTI'\n                                                                          : ... Suggested alternative: 'OPCODE_ANDI'\n            OPCODE_SLTI :\n            ^~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:26: Can't find definition of variable: 'FUNCT_SLT'\n                                                                          : ... Suggested alternative: 'FUNCT_AND'\n                fncode = FUNCT_SLT;\n                         ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:27: Can't find definition of variable: 'OPCODE_SLTIU'\n                                                                          : ... Suggested alternative: 'OPCODE_SLTI'\n            OPCODE_SLTIU :\n            ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:28: Can't find definition of variable: 'FUNCT_SLTU'\n                                                                          : ... Suggested alternative: 'FUNCT_SLT'\n                fncode = FUNCT_SLTU;\n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:29: Can't find definition of variable: 'OPCODE_RTYPE'\n            OPCODE_RTYPE:\n            ^~~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:31: Can't find definition of variable: 'OPCODE_LHU'\n                                                                          : ... Suggested alternative: 'OPCODE_LBU'\n            OPCODE_LHU : \n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:33: Can't find definition of variable: 'OPCODE_LH'\n                                                                          : ... Suggested alternative: 'OPCODE_LB'\n            OPCODE_LH : \n            ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:35: Can't find definition of variable: 'OPCODE_LWL'\n                                                                          : ... Suggested alternative: 'OPCODE_LW'\n            OPCODE_LWL : \n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:37: Can't find definition of variable: 'OPCODE_LWR'\n                                                                          : ... Suggested alternative: 'OPCODE_LW'\n            OPCODE_LWR :\n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:39: Can't find definition of variable: 'OPCODE_SB'\n                                                                          : ... Suggested alternative: 'OPCODE_LB'\n            OPCODE_SB :\n            ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:41: Can't find definition of variable: 'OPCODE_SH'\n                                                                          : ... Suggested alternative: 'OPCODE_LH'\n            OPCODE_SH :\n            ^~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:43: Can't find definition of variable: 'OPCODE_BEQ'\n                                                                          : ... Suggested alternative: 'OPCODE_LB'\n            OPCODE_BEQ : \n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:45: Can't find definition of variable: 'OPCODE_REGIMM'\n                                                                          : ... Suggested alternative: 'OPCODE_ANDI'\n            OPCODE_REGIMM : \n            ^~~~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:47: Can't find definition of variable: 'OPCODE_BGTZ'\n                                                                          : ... Suggested alternative: 'OPCODE_BEQ'\n            OPCODE_BGTZ : \n            ^~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:49: Can't find definition of variable: 'OPCODE_BLEZ'\n                                                                          : ... Suggested alternative: 'OPCODE_BEQ'\n            OPCODE_BLEZ :\n            ^~~~~~~~~~~\n%Error: data/full_repos/permissive/429782749/rtl/mips_cpu/alu_control.v:51: Can't find definition of variable: 'OPCODE_BNE'\n                                                                          : ... Suggested alternative: 'OPCODE_BEQ'\n            OPCODE_BNE :\n            ^~~~~~~~~~\n%Error: Exiting due to 28 error(s)\n"
module alu_ctrl(
    input logic[5:0] opcode,
    input logic[5:0] rtype_fncode,
    output logic[5:0] fncode   
);
    always_comb begin

        case(opcode)        
            OPCODE_ADDIU :
                fncode = FUNCT_ADDU;
            OPCODE_SW :
                fncode = FUNCT_ADDU;
            OPCODE_LW :
                fncode = FUNCT_ADDU;
            OPCODE_LBU : 
                fncode = FUNCT_ADDU;
            OPCODE_LB : 
                fncode = FUNCT_ADDU;
            OPCODE_ANDI :
                fncode = FUNCT_AND;
            OPCODE_ORI  :
                fncode = FUNCT_OR;
            OPCODE_XORI  :
                fncode = FUNCT_XOR;
            OPCODE_SLTI :
                fncode = FUNCT_SLT;
            OPCODE_SLTIU :
                fncode = FUNCT_SLTU;
            OPCODE_RTYPE:
                fncode = rtype_fncode;
            OPCODE_LHU : 
                fncode = FUNCT_ADDU;
            OPCODE_LH : 
                fncode = FUNCT_ADDU;
            OPCODE_LWL : 
                fncode = FUNCT_ADDU;
            OPCODE_LWR :
                fncode = FUNCT_ADDU;
            OPCODE_SB :
                fncode = FUNCT_ADDU;
            OPCODE_SH :
                fncode = FUNCT_ADDU;
            OPCODE_BEQ : 
                fncode = FUNCT_ADDU;
            OPCODE_REGIMM : 
                fncode = FUNCT_ADDU;
            OPCODE_BGTZ : 
                fncode = FUNCT_ADDU;
            OPCODE_BLEZ :
                fncode = FUNCT_ADDU;
            OPCODE_BNE :
                fncode = FUNCT_ADDU;
            default:
                fncode = 6'b11_1111; 
        endcase
    end
    

endmodule
module alu_ctrl(
    input logic[5:0] opcode,
    input logic[5:0] rtype_fncode,
    output logic[5:0] fncode   
);

    always_comb begin

        case(opcode)        
            OPCODE_ADDIU :
                fncode = FUNCT_ADDU;
            OPCODE_SW :
                fncode = FUNCT_ADDU;
            OPCODE_LW :
                fncode = FUNCT_ADDU;
            OPCODE_LBU : 
                fncode = FUNCT_ADDU;
            OPCODE_LB : 
                fncode = FUNCT_ADDU;
            OPCODE_ANDI :
                fncode = FUNCT_AND;
            OPCODE_ORI  :
                fncode = FUNCT_OR;
            OPCODE_XORI  :
                fncode = FUNCT_XOR;
            OPCODE_SLTI :
                fncode = FUNCT_SLT;
            OPCODE_SLTIU :
                fncode = FUNCT_SLTU;
            OPCODE_RTYPE:
                fncode = rtype_fncode;
            OPCODE_LHU : 
                fncode = FUNCT_ADDU;
            OPCODE_LH : 
                fncode = FUNCT_ADDU;
            OPCODE_LWL : 
                fncode = FUNCT_ADDU;
            OPCODE_LWR :
                fncode = FUNCT_ADDU;
            OPCODE_SB :
                fncode = FUNCT_ADDU;
            OPCODE_SH :
                fncode = FUNCT_ADDU;
            OPCODE_BEQ : 
                fncode = FUNCT_ADDU;
            OPCODE_REGIMM : 
                fncode = FUNCT_ADDU;
            OPCODE_BGTZ : 
                fncode = FUNCT_ADDU;
            OPCODE_BLEZ :
                fncode = FUNCT_ADDU;
            OPCODE_BNE :
                fncode = FUNCT_ADDU;
            default:
                fncode = 6'b11_1111; 
        endcase
    end
    

endmodule