data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v
None: at end of input
1: b'%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:2: Cannot find include file: constants.vh\n`include "constants.vh" \n         ^~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory,data/full_repos/permissive/180413071/constants.vh\n             data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory,data/full_repos/permissive/180413071/constants.vh.v\n             data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory,data/full_repos/permissive/180413071/constants.vh.sv\n             constants.vh\n             constants.vh.v\n             constants.vh.sv\n             obj_dir/constants.vh\n             obj_dir/constants.vh.v\n             obj_dir/constants.vh.sv\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:7: Define or directive not defined: \'`WORD\'\n    input [`WORD-1:0] write_data_in,\n           ^~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:8: Define or directive not defined: \'`WORD\'\n    output reg [`WORD-1:0] write_data_out\n                ^~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:13: Define or directive not defined: \'`STURB\'\n            `STURB:  write_data_out <= {{(`WORD-8){1\'b0}},  write_data_in[7:0]}; \n            ^~~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:13: syntax error, unexpected \':\', expecting endcase\n            `STURB:  write_data_out <= {{(`WORD-8){1\'b0}},  write_data_in[7:0]}; \n                  ^\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:13: Define or directive not defined: \'`WORD\'\n            `STURB:  write_data_out <= {{(`WORD-8){1\'b0}},  write_data_in[7:0]}; \n                                          ^~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:14: Define or directive not defined: \'`STURH\'\n            `STURH:  write_data_out <= {{(`WORD-16){1\'b0}}, write_data_in[15:0]};\n            ^~~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:14: Define or directive not defined: \'`WORD\'\n            `STURH:  write_data_out <= {{(`WORD-16){1\'b0}}, write_data_in[15:0]};\n                                          ^~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:15: Define or directive not defined: \'`STURW\'\n            `STURW:  write_data_out <= {{(`WORD-32){1\'b0}}, write_data_in[31:0]};\n            ^~~~~~\n%Error: data/full_repos/permissive/180413071/nonpipelined/sources/hardware/memory/write_data_modifier.v:15: Define or directive not defined: \'`WORD\'\n            `STURW:  write_data_out <= {{(`WORD-32){1\'b0}}, write_data_in[31:0]};\n                                          ^~~~~\n%Error: Cannot continue\n'
module write_data_modifier(
    input [10:0] opcode,
    input [`WORD-1:0] write_data_in,
    output reg [`WORD-1:0] write_data_out
);

    always @* begin
        casez(opcode)
            `STURB:  write_data_out <= {{(`WORD-8){1'b0}},  write_data_in[7:0]}; 
            `STURH:  write_data_out <= {{(`WORD-16){1'b0}}, write_data_in[15:0]};
            `STURW:  write_data_out <= {{(`WORD-32){1'b0}}, write_data_in[31:0]};
            default: write_data_out <= write_data_in;
        endcase
    end

endmodule
module write_data_modifier(
    input [10:0] opcode,
    input [`WORD-1:0] write_data_in,
    output reg [`WORD-1:0] write_data_out
);


    always @* begin
        casez(opcode)
            `STURB:  write_data_out <= {{(`WORD-8){1'b0}},  write_data_in[7:0]}; 
            `STURH:  write_data_out <= {{(`WORD-16){1'b0}}, write_data_in[15:0]};
            `STURW:  write_data_out <= {{(`WORD-32){1'b0}}, write_data_in[31:0]};
            default: write_data_out <= write_data_in;
        endcase
    end

endmodule