data/full_repos/permissive/167856740/cpu/immediate_generator.v
None: at end of input
1: b'%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:4: Cannot find include file: immediate_generator.vh\n`include "immediate_generator.vh" \n         ^~~~~~~~~~~~~~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/167856740/cpu,data/full_repos/permissive/167856740/immediate_generator.vh\n             data/full_repos/permissive/167856740/cpu,data/full_repos/permissive/167856740/immediate_generator.vh.v\n             data/full_repos/permissive/167856740/cpu,data/full_repos/permissive/167856740/immediate_generator.vh.sv\n             immediate_generator.vh\n             immediate_generator.vh.v\n             immediate_generator.vh.sv\n             obj_dir/immediate_generator.vh\n             obj_dir/immediate_generator.vh.v\n             obj_dir/immediate_generator.vh.sv\n%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:14: Define or directive not defined: \'`IMM_ITYPE\'\n            `IMM_ITYPE: O_data = {{21{I_data[31]}},I_data[30:25],I_data[24:21],I_data[20]};\n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:14: syntax error, unexpected \':\', expecting endcase\n            `IMM_ITYPE: O_data = {{21{I_data[31]}},I_data[30:25],I_data[24:21],I_data[20]};\n                      ^\n%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:15: Define or directive not defined: \'`IMM_STYPE\'\n            `IMM_STYPE: O_data = {{21{I_data[31]}},I_data[30:25],I_data[11:8],I_data[7]};\n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:16: Define or directive not defined: \'`IMM_BTYPE\'\n            `IMM_BTYPE: O_data = {{20{I_data[31]}},I_data[7],I_data[30:25],I_data[11:8],1\'b0};\n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:17: Define or directive not defined: \'`IMM_UTYPE\'\n            `IMM_UTYPE: O_data = {I_data[31],I_data[30:20],I_data[19:12],12\'b000000000000};\n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:18: Define or directive not defined: \'`IMM_JTYPE\'\n            `IMM_JTYPE: O_data = {{12{I_data[31]}},I_data[19:12],I_data[20],I_data[30:25],I_data[24:21],1\'b0};\n            ^~~~~~~~~~\n%Error: data/full_repos/permissive/167856740/cpu/immediate_generator.v:19: Define or directive not defined: \'`IMM_RTYPE\'\n            `IMM_RTYPE: O_data = {27\'b000000000000000000000000000,I_data[24:20]};\n            ^~~~~~~~~~\n%Error: Cannot continue\n'
module immediate_generator(
    input wire [2:0] I_immsel,
    input wire [31:0] I_data,
    output reg [31:0] O_data
    );
    
    always @(*) begin
        casez(I_immsel)
            `IMM_ITYPE: O_data = {{21{I_data[31]}},I_data[30:25],I_data[24:21],I_data[20]};
            `IMM_STYPE: O_data = {{21{I_data[31]}},I_data[30:25],I_data[11:8],I_data[7]};
            `IMM_BTYPE: O_data = {{20{I_data[31]}},I_data[7],I_data[30:25],I_data[11:8],1'b0};
            `IMM_UTYPE: O_data = {I_data[31],I_data[30:20],I_data[19:12],12'b000000000000};
            `IMM_JTYPE: O_data = {{12{I_data[31]}},I_data[19:12],I_data[20],I_data[30:25],I_data[24:21],1'b0};
            `IMM_RTYPE: O_data = {27'b000000000000000000000000000,I_data[24:20]};
            default: O_data = {{21{I_data[31]}},I_data[30:25],I_data[24:21],I_data[20]};
        endcase
    end
    
endmodule
module immediate_generator(
    input wire [2:0] I_immsel,
    input wire [31:0] I_data,
    output reg [31:0] O_data
    );

    
    always @(*) begin
        casez(I_immsel)
            `IMM_ITYPE: O_data = {{21{I_data[31]}},I_data[30:25],I_data[24:21],I_data[20]};
            `IMM_STYPE: O_data = {{21{I_data[31]}},I_data[30:25],I_data[11:8],I_data[7]};
            `IMM_BTYPE: O_data = {{20{I_data[31]}},I_data[7],I_data[30:25],I_data[11:8],1'b0};
            `IMM_UTYPE: O_data = {I_data[31],I_data[30:20],I_data[19:12],12'b000000000000};
            `IMM_JTYPE: O_data = {{12{I_data[31]}},I_data[19:12],I_data[20],I_data[30:25],I_data[24:21],1'b0};
            `IMM_RTYPE: O_data = {27'b000000000000000000000000000,I_data[24:20]};
            default: O_data = {{21{I_data[31]}},I_data[30:25],I_data[24:21],I_data[20]};
        endcase
    end
    
endmodule