data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v
1: b'%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:1: Cannot find include file: define.v\n`include "define.v" \n         ^~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new,data/full_repos/permissive/114896735/define.v\n             data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new,data/full_repos/permissive/114896735/define.v.v\n             data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new,data/full_repos/permissive/114896735/define.v.sv\n             define.v\n             define.v.v\n             define.v.sv\n             obj_dir/define.v\n             obj_dir/define.v.v\n             obj_dir/define.v.sv\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:4: Define or directive not defined: \'`ICODE_BUS\'\n    input wire [`ICODE_BUS] E_icode_i,\n                ^~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:4: syntax error, unexpected \']\', expecting TYPE-IDENTIFIER\n    input wire [`ICODE_BUS] E_icode_i,\n                          ^\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:5: Define or directive not defined: \'`IFUN_BUS\'\n    input wire [`IFUN_BUS] E_ifun_i,\n                ^~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:6: Define or directive not defined: \'`DATA_BUS\'\n    input wire [`DATA_BUS] E_valC_i,\n                ^~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:7: Define or directive not defined: \'`DATA_BUS\'\n    input wire [`DATA_BUS] E_valA_i,\n                ^~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:8: Define or directive not defined: \'`DATA_BUS\'\n    input wire [`DATA_BUS] E_valB_i,\n                ^~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:10: Define or directive not defined: \'`DATA_BUS\'\n    output reg [`DATA_BUS] aluA_o,\n                ^~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:11: Define or directive not defined: \'`DATA_BUS\'\n    output reg [`DATA_BUS] aluB_o,\n                ^~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:12: Define or directive not defined: \'`IFUN_BUS\'\n    output reg [`IFUN_BUS] fun_o\n                ^~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:18: Define or directive not defined: \'`CXX\'\n                `CXX:\n                ^~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:21: Define or directive not defined: \'`DATA_ZERO\'\n                        aluB_o = `DATA_ZERO;\n                                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:22: Define or directive not defined: \'`ADDQ\'\n                        fun_o = `ADDQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:24: Define or directive not defined: \'`IXX\'\n                `IXX:\n                ^~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:27: Define or directive not defined: \'`IRMOVQ\'\n                        if(E_ifun_i == `IRMOVQ)\n                                       ^~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:29: Define or directive not defined: \'`DATA_ZERO\'\n                            aluA_o = `DATA_ZERO;\n                                     ^~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:30: Define or directive not defined: \'`ADDQ\'\n                            fun_o = `ADDQ;\n                                    ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:38: Define or directive not defined: \'`OPQ\'\n                `OPQ:\n                ^~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:44: Define or directive not defined: \'`RMMOVQ\'\n                `RMMOVQ:\n                ^~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:48: Define or directive not defined: \'`ADDQ\'\n                        fun_o = `ADDQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:50: Define or directive not defined: \'`MRMOVQ\'\n                `MRMOVQ:\n                ^~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:54: Define or directive not defined: \'`ADDQ\'\n                        fun_o = `ADDQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:56: Define or directive not defined: \'`JXX\'\n                `JXX:\n                ^~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:58: Define or directive not defined: \'`DATA_ZERO\'\n                        aluA_o = `DATA_ZERO;\n                                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:59: Define or directive not defined: \'`DATA_ZERO\'\n                        aluB_o = `DATA_ZERO;\n                                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:60: Define or directive not defined: \'`NOPQ\'\n                        fun_o = `NOPQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:62: Define or directive not defined: \'`CALL\'\n                `CALL:\n                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:65: Define or directive not defined: \'`DATA_WIDTH\'\n                        aluB_o = `DATA_WIDTH\'H8;\n                                 ^~~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:66: Define or directive not defined: \'`SUBQ\'\n                        fun_o = `SUBQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:68: Define or directive not defined: \'`RET\'\n                `RET:\n                ^~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:71: Define or directive not defined: \'`DATA_WIDTH\'\n                        aluB_o = `DATA_WIDTH\'H8;\n                                 ^~~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:72: Define or directive not defined: \'`ADDQ\'\n                        fun_o = `ADDQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:74: Define or directive not defined: \'`PUSHQ\'\n                `PUSHQ:\n                ^~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:77: Define or directive not defined: \'`DATA_WIDTH\'\n                        aluB_o = `DATA_WIDTH\'H8;\n                                 ^~~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:78: Define or directive not defined: \'`SUBQ\'\n                        fun_o = `SUBQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:80: Define or directive not defined: \'`POPQ\'\n                `POPQ:\n                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:83: Define or directive not defined: \'`DATA_WIDTH\'\n                        aluB_o = `DATA_WIDTH\'H8;\n                                 ^~~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:84: Define or directive not defined: \'`ADDQ\'\n                        fun_o = `ADDQ;\n                                ^~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:88: Define or directive not defined: \'`DATA_ZERO\'\n                        aluA_o = `DATA_ZERO;\n                                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:89: Define or directive not defined: \'`DATA_ZERO\'\n                        aluB_o = `DATA_ZERO;\n                                 ^~~~~~~~~~\n%Error: data/full_repos/permissive/114896735/y86cpu.srcs/sources_1/new/alu_args.v:90: Define or directive not defined: \'`NOPQ\'\n                        fun_o = `NOPQ;\n                                ^~~~~\n%Error: Exiting due to 41 error(s)\n'
module alu_args(
    input wire [`ICODE_BUS] E_icode_i,
    input wire [`IFUN_BUS] E_ifun_i,
    input wire [`DATA_BUS] E_valC_i,
    input wire [`DATA_BUS] E_valA_i,
    input wire [`DATA_BUS] E_valB_i,
    
    output reg [`DATA_BUS] aluA_o,
    output reg [`DATA_BUS] aluB_o,
    output reg [`IFUN_BUS] fun_o
    );
    
    always @(*)
        begin
            case(E_icode_i)
                `CXX:
                    begin
                        aluA_o = E_valA_i;
                        aluB_o = `DATA_ZERO;
                        fun_o = `ADDQ;
                    end
                `IXX:
                    begin
                        aluB_o = E_valC_i;
                        if(E_ifun_i == `IRMOVQ)
                        begin
                            aluA_o = `DATA_ZERO;
                            fun_o = `ADDQ;
                        end
                        else
                        begin
                            aluA_o = E_valB_i;
                            fun_o = E_ifun_i - 1;
                        end
                    end
                `OPQ:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = E_valA_i;
                        fun_o = E_ifun_i;
                    end
                `RMMOVQ:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = E_valC_i;
                        fun_o = `ADDQ;
                    end
                `MRMOVQ:
                    begin
                        aluA_o = E_valA_i;
                        aluB_o = E_valC_i;
                        fun_o = `ADDQ;
                    end
                `JXX:
                    begin
                        aluA_o = `DATA_ZERO;
                        aluB_o = `DATA_ZERO;
                        fun_o = `NOPQ;
                    end
                `CALL:
                    begin   
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `SUBQ;
                    end
                `RET:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `ADDQ;
                    end
                `PUSHQ:
                    begin   
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `SUBQ;
                    end
                `POPQ:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `ADDQ;
                    end
                default:
                    begin
                        aluA_o = `DATA_ZERO;
                        aluB_o = `DATA_ZERO;
                        fun_o = `NOPQ;
                    end
            endcase
        end
    
endmodule
module alu_args(
    input wire [`ICODE_BUS] E_icode_i,
    input wire [`IFUN_BUS] E_ifun_i,
    input wire [`DATA_BUS] E_valC_i,
    input wire [`DATA_BUS] E_valA_i,
    input wire [`DATA_BUS] E_valB_i,
    
    output reg [`DATA_BUS] aluA_o,
    output reg [`DATA_BUS] aluB_o,
    output reg [`IFUN_BUS] fun_o
    );

    
    always @(*)
        begin
            case(E_icode_i)
                `CXX:
                    begin
                        aluA_o = E_valA_i;
                        aluB_o = `DATA_ZERO;
                        fun_o = `ADDQ;
                    end
                `IXX:
                    begin
                        aluB_o = E_valC_i;
                        if(E_ifun_i == `IRMOVQ)
                        begin
                            aluA_o = `DATA_ZERO;
                            fun_o = `ADDQ;
                        end
                        else
                        begin
                            aluA_o = E_valB_i;
                            fun_o = E_ifun_i - 1;
                        end
                    end
                `OPQ:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = E_valA_i;
                        fun_o = E_ifun_i;
                    end
                `RMMOVQ:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = E_valC_i;
                        fun_o = `ADDQ;
                    end
                `MRMOVQ:
                    begin
                        aluA_o = E_valA_i;
                        aluB_o = E_valC_i;
                        fun_o = `ADDQ;
                    end
                `JXX:
                    begin
                        aluA_o = `DATA_ZERO;
                        aluB_o = `DATA_ZERO;
                        fun_o = `NOPQ;
                    end
                `CALL:
                    begin   
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `SUBQ;
                    end
                `RET:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `ADDQ;
                    end
                `PUSHQ:
                    begin   
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `SUBQ;
                    end
                `POPQ:
                    begin
                        aluA_o = E_valB_i;
                        aluB_o = `DATA_WIDTH'H8;
                        fun_o = `ADDQ;
                    end
                default:
                    begin
                        aluA_o = `DATA_ZERO;
                        aluB_o = `DATA_ZERO;
                        fun_o = `NOPQ;
                    end
            endcase
        end
    
endmodule