data/full_repos/permissive/444327372/data_mem_sel.v
1: b'%Error: data/full_repos/permissive/444327372/data_mem_sel.v:22: Cannot find include file: defines.vh\n`include "defines.vh" \n         ^~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/444327372,data/full_repos/permissive/444327372/defines.vh\n             data/full_repos/permissive/444327372,data/full_repos/permissive/444327372/defines.vh.v\n             data/full_repos/permissive/444327372,data/full_repos/permissive/444327372/defines.vh.sv\n             defines.vh\n             defines.vh.v\n             defines.vh.sv\n             obj_dir/defines.vh\n             obj_dir/defines.vh.v\n             obj_dir/defines.vh.sv\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:34: Define or directive not defined: \'`EXE_LW_OP\'\n                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4\'b0000:\n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:34: syntax error, unexpected ||, expecting TYPE-IDENTIFIER\n                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4\'b0000:\n                                    ^~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:34: Define or directive not defined: \'`EXE_LB_OP\'\n                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4\'b0000:\n                                             ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:34: Define or directive not defined: \'`EXE_LBU_OP\'\n                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4\'b0000:\n                                                                 ^~~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:34: Define or directive not defined: \'`EXE_LH_OP\'\n                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4\'b0000:\n                                                                                      ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:34: Define or directive not defined: \'`EXE_LHU_OP\'\n                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4\'b0000:\n                                                                                                          ^~~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:35: Define or directive not defined: \'`EXE_SW_OP\'\n                  (op == `EXE_SW_OP && addr == 2\'b00) ? 4\'b1111:  \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:36: Define or directive not defined: \'`EXE_SH_OP\'\n                  (op == `EXE_SH_OP && addr == 2\'b10) ? 4\'b1100:  \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:37: Define or directive not defined: \'`EXE_SH_OP\'\n                  (op == `EXE_SH_OP && addr == 2\'b00) ? 4\'b0011:  \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:39: Define or directive not defined: \'`EXE_SB_OP\'\n                  (op == `EXE_SB_OP && addr == 2\'b11) ? 4\'b1000:  \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:40: Define or directive not defined: \'`EXE_SB_OP\'\n                  (op == `EXE_SB_OP && addr == 2\'b10) ? 4\'b0100:  \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:41: Define or directive not defined: \'`EXE_SB_OP\'\n                  (op == `EXE_SB_OP && addr == 2\'b01) ? 4\'b0010:  \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:42: Define or directive not defined: \'`EXE_SB_OP\'\n                  (op == `EXE_SB_OP && addr == 2\'b00) ? 4\'b0001:  \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:46: Define or directive not defined: \'`EXE_SW_OP\'\n    assign rsel = ((op == `EXE_SW_OP || op == `EXE_SB_OP || op == `EXE_SH_OP)? 4\'b0000:\n                          ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:46: syntax error, unexpected ||, expecting TYPE-IDENTIFIER\n    assign rsel = ((op == `EXE_SW_OP || op == `EXE_SB_OP || op == `EXE_SH_OP)? 4\'b0000:\n                                     ^~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:46: Define or directive not defined: \'`EXE_SB_OP\'\n    assign rsel = ((op == `EXE_SW_OP || op == `EXE_SB_OP || op == `EXE_SH_OP)? 4\'b0000:\n                                              ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:46: Define or directive not defined: \'`EXE_SH_OP\'\n    assign rsel = ((op == `EXE_SW_OP || op == `EXE_SB_OP || op == `EXE_SH_OP)? 4\'b0000:\n                                                                  ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:47: Define or directive not defined: \'`EXE_LW_OP\'\n                (op == `EXE_LW_OP && addr == 2\'b00)? 4\'b1111:\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:48: Define or directive not defined: \'`EXE_LH_OP\'\n                (op == `EXE_LH_OP && addr == 2\'b10)? 4\'b1100:\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:49: Define or directive not defined: \'`EXE_LH_OP\'\n                (op == `EXE_LH_OP && addr == 2\'b00)? 4\'b0011:\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:51: Define or directive not defined: \'`EXE_LB_OP\'\n                (op == `EXE_LB_OP && addr == 2\'b11)? 4\'b1000:\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:52: Define or directive not defined: \'`EXE_LB_OP\'\n                (op == `EXE_LB_OP && addr == 2\'b10)? 4\'b0100:\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:53: Define or directive not defined: \'`EXE_LB_OP\'\n                (op == `EXE_LB_OP && addr == 2\'b01)? 4\'b0010:\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:54: Define or directive not defined: \'`EXE_LB_OP\'\n                (op == `EXE_LB_OP && addr == 2\'b00)? 4\'b0001:\n                       ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:57: Define or directive not defined: \'`EXE_LW_OP\'\n    assign size = (op == `EXE_LW_OP || op == `EXE_SW_OP) ? 2\'b10:                        \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:57: syntax error, unexpected ||, expecting TYPE-IDENTIFIER\n    assign size = (op == `EXE_LW_OP || op == `EXE_SW_OP) ? 2\'b10:                        \n                                    ^~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:57: Define or directive not defined: \'`EXE_SW_OP\'\n    assign size = (op == `EXE_LW_OP || op == `EXE_SW_OP) ? 2\'b10:                        \n                                             ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:58: Define or directive not defined: \'`EXE_LH_OP\'\n                  (op == `EXE_LH_OP || op == `EXE_LHU_OP || op == `EXE_SH_OP) ? 2\'b01:   \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:58: Define or directive not defined: \'`EXE_LHU_OP\'\n                  (op == `EXE_LH_OP || op == `EXE_LHU_OP || op == `EXE_SH_OP) ? 2\'b01:   \n                                             ^~~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:58: Define or directive not defined: \'`EXE_SH_OP\'\n                  (op == `EXE_LH_OP || op == `EXE_LHU_OP || op == `EXE_SH_OP) ? 2\'b01:   \n                                                                  ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:59: Define or directive not defined: \'`EXE_LB_OP\'\n                  (op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_SB_OP) ? 2\'b00:   \n                         ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:59: Define or directive not defined: \'`EXE_LBU_OP\'\n                  (op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_SB_OP) ? 2\'b00:   \n                                             ^~~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:59: Define or directive not defined: \'`EXE_SB_OP\'\n                  (op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_SB_OP) ? 2\'b00:   \n                                                                  ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:63: Define or directive not defined: \'`EXE_SW_OP\'\n                        (op == `EXE_SW_OP) ?  writedata:                                                      \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:63: syntax error, unexpected \')\', expecting TYPE-IDENTIFIER\n                        (op == `EXE_SW_OP) ?  writedata:                                                      \n                                         ^\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:64: Define or directive not defined: \'`EXE_SH_OP\'\n                        (op == `EXE_SH_OP) ? {writedata[15:0], writedata[15:0]}:                              \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:65: Define or directive not defined: \'`EXE_SB_OP\'\n                        (op == `EXE_SB_OP) ? {writedata[7:0], writedata[7:0],writedata[7:0],writedata[7:0]}:  \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:69: Define or directive not defined: \'`EXE_LW_OP\'\n                        (op == `EXE_LW_OP && addr == 2\'b00)  ? readdata:                              \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:69: syntax error, unexpected &&, expecting TYPE-IDENTIFIER\n                        (op == `EXE_LW_OP && addr == 2\'b00)  ? readdata:                              \n                                          ^~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:70: Define or directive not defined: \'`EXE_LB_OP\'\n                        (op == `EXE_LB_OP && addr == 2\'b11)  ? {{24{readdata[31]}},readdata[31:24]}:  \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:71: Define or directive not defined: \'`EXE_LB_OP\'\n                        (op == `EXE_LB_OP && addr == 2\'b10)  ? {{24{readdata[23]}},readdata[23:16]}:  \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:72: Define or directive not defined: \'`EXE_LB_OP\'\n                        (op == `EXE_LB_OP && addr == 2\'b01)  ? {{24{readdata[15]}},readdata[15:8]}:   \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:73: Define or directive not defined: \'`EXE_LB_OP\'\n                        (op == `EXE_LB_OP && addr == 2\'b00)  ? {{24{readdata[7]}},readdata[7:0]}:     \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:75: Define or directive not defined: \'`EXE_LH_OP\'\n                        (op == `EXE_LH_OP && addr == 2\'b10)  ? {{16{readdata[31]}},readdata[31:16]}:  \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:76: Define or directive not defined: \'`EXE_LH_OP\'\n                        (op == `EXE_LH_OP && addr == 2\'b00)  ? {{16{readdata[15]}},readdata[15:0]}:   \n                               ^~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:80: Define or directive not defined: \'`EXE_LBU_OP\'\n                        (op == `EXE_LBU_OP && addr == 2\'b11) ? {{24{1\'b0}},readdata[31:24]}:  \n                               ^~~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:81: Define or directive not defined: \'`EXE_LBU_OP\'\n                        (op == `EXE_LBU_OP && addr == 2\'b10) ? {{24{1\'b0}},readdata[23:16]}:  \n                               ^~~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:82: Define or directive not defined: \'`EXE_LBU_OP\'\n                        (op == `EXE_LBU_OP && addr == 2\'b01) ? {{24{1\'b0}},readdata[15:8]}:   \n                               ^~~~~~~~~~~\n%Error: data/full_repos/permissive/444327372/data_mem_sel.v:83: Define or directive not defined: \'`EXE_LBU_OP\'\n                        (op == `EXE_LBU_OP && addr == 2\'b00) ? {{24{1\'b0}},readdata[7:0]}:    \n                               ^~~~~~~~~~~\n%Error: Exiting due to too many errors encountered; --error-limit=50\n'
module data_mem_sel(
    input wire[7:0] op,
    input wire[1:0] addr,
    input wire[31:0] writedata,readdata,
    output wire[3:0] sel,rsel,
    output wire[31:0] writedata2,readdata2,
    output wire adel,ades,
    output wire[1:0] size
    );

    assign sel = (
                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4'b0000:
                  (op == `EXE_SW_OP && addr == 2'b00) ? 4'b1111:
                  (op == `EXE_SH_OP && addr == 2'b10) ? 4'b1100:
                  (op == `EXE_SH_OP && addr == 2'b00) ? 4'b0011:

                  (op == `EXE_SB_OP && addr == 2'b11) ? 4'b1000:
                  (op == `EXE_SB_OP && addr == 2'b10) ? 4'b0100:
                  (op == `EXE_SB_OP && addr == 2'b01) ? 4'b0010:
                  (op == `EXE_SB_OP && addr == 2'b00) ? 4'b0001:
                4'b0000);


    assign rsel = ((op == `EXE_SW_OP || op == `EXE_SB_OP || op == `EXE_SH_OP)? 4'b0000:
                (op == `EXE_LW_OP && addr == 2'b00)? 4'b1111:
                (op == `EXE_LH_OP && addr == 2'b10)? 4'b1100:
                (op == `EXE_LH_OP && addr == 2'b00)? 4'b0011:

                (op == `EXE_LB_OP && addr == 2'b11)? 4'b1000:
                (op == `EXE_LB_OP && addr == 2'b10)? 4'b0100:
                (op == `EXE_LB_OP && addr == 2'b01)? 4'b0010:
                (op == `EXE_LB_OP && addr == 2'b00)? 4'b0001:
                4'b0000);

    assign size = (op == `EXE_LW_OP || op == `EXE_SW_OP) ? 2'b10:
                  (op == `EXE_LH_OP || op == `EXE_LHU_OP || op == `EXE_SH_OP) ? 2'b01:
                  (op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_SB_OP) ? 2'b00:
                  2'b00;

    assign writedata2 = (
                        (op == `EXE_SW_OP) ?  writedata:
                        (op == `EXE_SH_OP) ? {writedata[15:0], writedata[15:0]}:
                        (op == `EXE_SB_OP) ? {writedata[7:0], writedata[7:0],writedata[7:0],writedata[7:0]}:
                        32'b0);

    assign readdata2 = (
                        (op == `EXE_LW_OP && addr == 2'b00)  ? readdata:
                        (op == `EXE_LB_OP && addr == 2'b11)  ? {{24{readdata[31]}},readdata[31:24]}:
                        (op == `EXE_LB_OP && addr == 2'b10)  ? {{24{readdata[23]}},readdata[23:16]}:
                        (op == `EXE_LB_OP && addr == 2'b01)  ? {{24{readdata[15]}},readdata[15:8]}:
                        (op == `EXE_LB_OP && addr == 2'b00)  ? {{24{readdata[7]}},readdata[7:0]}:
    
                        (op == `EXE_LH_OP && addr == 2'b10)  ? {{16{readdata[31]}},readdata[31:16]}:
                        (op == `EXE_LH_OP && addr == 2'b00)  ? {{16{readdata[15]}},readdata[15:0]}:
                        
                        

                        (op == `EXE_LBU_OP && addr == 2'b11) ? {{24{1'b0}},readdata[31:24]}:
                        (op == `EXE_LBU_OP && addr == 2'b10) ? {{24{1'b0}},readdata[23:16]}:
                        (op == `EXE_LBU_OP && addr == 2'b01) ? {{24{1'b0}},readdata[15:8]}:
                        (op == `EXE_LBU_OP && addr == 2'b00) ? {{24{1'b0}},readdata[7:0]}:

                        (op == `EXE_LHU_OP && addr == 2'b10) ? {{16{1'b0}},readdata[31:16]}:
                        (op == `EXE_LHU_OP && addr == 2'b00) ? {{16{1'b0}},readdata[15:0]}:
                        32'b0);

    assign adel = ((op == `EXE_LH_OP || op == `EXE_LHU_OP) && addr[0]) || (op == `EXE_LW_OP && addr != 2'b00);
    assign ades = (op == `EXE_SH_OP & addr[0]) | (op == `EXE_SW_OP & addr != 2'b00);

endmodule
module data_mem_sel(
    input wire[7:0] op,
    input wire[1:0] addr,
    input wire[31:0] writedata,readdata,
    output wire[3:0] sel,rsel,
    output wire[31:0] writedata2,readdata2,
    output wire adel,ades,
    output wire[1:0] size
    );


    assign sel = (
                  (op == `EXE_LW_OP || op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_LH_OP || op == `EXE_LHU_OP) ? 4'b0000:
                  (op == `EXE_SW_OP && addr == 2'b00) ? 4'b1111:
                  (op == `EXE_SH_OP && addr == 2'b10) ? 4'b1100:
                  (op == `EXE_SH_OP && addr == 2'b00) ? 4'b0011:

                  (op == `EXE_SB_OP && addr == 2'b11) ? 4'b1000:
                  (op == `EXE_SB_OP && addr == 2'b10) ? 4'b0100:
                  (op == `EXE_SB_OP && addr == 2'b01) ? 4'b0010:
                  (op == `EXE_SB_OP && addr == 2'b00) ? 4'b0001:
                4'b0000);


    assign rsel = ((op == `EXE_SW_OP || op == `EXE_SB_OP || op == `EXE_SH_OP)? 4'b0000:
                (op == `EXE_LW_OP && addr == 2'b00)? 4'b1111:
                (op == `EXE_LH_OP && addr == 2'b10)? 4'b1100:
                (op == `EXE_LH_OP && addr == 2'b00)? 4'b0011:

                (op == `EXE_LB_OP && addr == 2'b11)? 4'b1000:
                (op == `EXE_LB_OP && addr == 2'b10)? 4'b0100:
                (op == `EXE_LB_OP && addr == 2'b01)? 4'b0010:
                (op == `EXE_LB_OP && addr == 2'b00)? 4'b0001:
                4'b0000);

    assign size = (op == `EXE_LW_OP || op == `EXE_SW_OP) ? 2'b10:
                  (op == `EXE_LH_OP || op == `EXE_LHU_OP || op == `EXE_SH_OP) ? 2'b01:
                  (op == `EXE_LB_OP || op == `EXE_LBU_OP || op == `EXE_SB_OP) ? 2'b00:
                  2'b00;

    assign writedata2 = (
                        (op == `EXE_SW_OP) ?  writedata:
                        (op == `EXE_SH_OP) ? {writedata[15:0], writedata[15:0]}:
                        (op == `EXE_SB_OP) ? {writedata[7:0], writedata[7:0],writedata[7:0],writedata[7:0]}:
                        32'b0);

    assign readdata2 = (
                        (op == `EXE_LW_OP && addr == 2'b00)  ? readdata:
                        (op == `EXE_LB_OP && addr == 2'b11)  ? {{24{readdata[31]}},readdata[31:24]}:
                        (op == `EXE_LB_OP && addr == 2'b10)  ? {{24{readdata[23]}},readdata[23:16]}:
                        (op == `EXE_LB_OP && addr == 2'b01)  ? {{24{readdata[15]}},readdata[15:8]}:
                        (op == `EXE_LB_OP && addr == 2'b00)  ? {{24{readdata[7]}},readdata[7:0]}:
    
                        (op == `EXE_LH_OP && addr == 2'b10)  ? {{16{readdata[31]}},readdata[31:16]}:
                        (op == `EXE_LH_OP && addr == 2'b00)  ? {{16{readdata[15]}},readdata[15:0]}:
                        
                        

                        (op == `EXE_LBU_OP && addr == 2'b11) ? {{24{1'b0}},readdata[31:24]}:
                        (op == `EXE_LBU_OP && addr == 2'b10) ? {{24{1'b0}},readdata[23:16]}:
                        (op == `EXE_LBU_OP && addr == 2'b01) ? {{24{1'b0}},readdata[15:8]}:
                        (op == `EXE_LBU_OP && addr == 2'b00) ? {{24{1'b0}},readdata[7:0]}:

                        (op == `EXE_LHU_OP && addr == 2'b10) ? {{16{1'b0}},readdata[31:16]}:
                        (op == `EXE_LHU_OP && addr == 2'b00) ? {{16{1'b0}},readdata[15:0]}:
                        32'b0);

    assign adel = ((op == `EXE_LH_OP || op == `EXE_LHU_OP) && addr[0]) || (op == `EXE_LW_OP && addr != 2'b00);
    assign ades = (op == `EXE_SH_OP & addr[0]) | (op == `EXE_SW_OP & addr != 2'b00);

endmodule