data/full_repos/permissive/154590168/rtl_cpu/RfRead.v
[Errno 2] No such file or directory: 'preprocess.output'
1: b'%Error: data/full_repos/permissive/154590168/rtl_cpu/RfRead.v:14: Cannot find include file: OpDefine.v\n`include "OpDefine.v" \n         ^~~~~~~~~~~~\n        ... Looked in:\n             data/full_repos/permissive/154590168/rtl_cpu,data/full_repos/permissive/154590168/OpDefine.v\n             data/full_repos/permissive/154590168/rtl_cpu,data/full_repos/permissive/154590168/OpDefine.v.v\n             data/full_repos/permissive/154590168/rtl_cpu,data/full_repos/permissive/154590168/OpDefine.v.sv\n             OpDefine.v\n             OpDefine.v.v\n             OpDefine.v.sv\n             obj_dir/OpDefine.v\n             obj_dir/OpDefine.v.v\n             obj_dir/OpDefine.v.sv\n%Error: Exiting due to 1 error(s)\n'
module  RfRead (
    input       [15:0]  ir,
    input       [1:0]   cycle,
    output  reg         re_word,
    output  reg [4:0]   raddr_a,
    output  reg [4:0]   raddr_b
);

parameter   DC = 1'bx;

`include "OpDefine.v"
always @* begin
    casex (ir)



    C_ADD    ,
    C_ADC    ,
    C_SUB    ,
    C_SBC    ,
    C_AND    ,
    C_OR     ,
    C_EOR    ,
    C_MUL    :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {ir[9], ir[3:0]};
                end
    C_SUBI   ,
    C_SBCI   ,
    C_ANDI   ,
    C_ORI    :
                begin
                    re_word = 1'b0;
                    raddr_a = {1'b1, ir[7:4]};
                    raddr_b = {5{DC}};
                end
    C_ADIW   ,
    C_SBIW   :
                begin
                    re_word = 1'b1;
                    raddr_a = {2'b11, ir[5:4], 1'b0};
                    raddr_b = {5{DC}};
                end
    C_COM    ,
    C_NEG    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_INC    ,
    C_DEC    :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {5{DC}};
                end
    C_MULS   :
                begin
                    re_word = 1'b0;
                    raddr_a = {1'b1, ir[7:4]};
                    raddr_b = {1'b1, ir[3:0]};
                end
    C_MULSU  ,
    C_FMUL   ,
    C_FMULS  ,
    C_FMULSU :
                begin
                    re_word = 1'b0;
                    raddr_a = {2'b10, ir[6:4]};
                    raddr_b = {2'b10, ir[2:0]};
                end



    C_JMP    ,
    C_RJMP   ,
    C_CALL   ,
    C_RCALL  ,
    C_RET    ,
    C_RETI   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    C_IJMP   ,
    C_ICALL  :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = {5{DC}};
                end
    C_CP     ,
    C_CPC    ,
    C_CPSE   :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {ir[9], ir[3:0]};
                end
    C_CPI    :
                begin
                    re_word = 1'b0;
                    raddr_a = {1'b1, ir[7:4]};
                    raddr_b = {5{DC}};
                end
    C_SBRC   ,
    C_SBRS   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_SBIC   ,
    C_SBIS   ,
    C_BRBS   ,
    C_BRBC   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end



    C_MOV    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {ir[9], ir[3:0]};
                end
    C_MOVW   :
                begin
                    re_word = 1'b1;
                    raddr_a = {ir[3:0], 1'b0};
                    raddr_b = {5{DC}};
                end
    C_LDI    ,
    C_LDS    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    C_LDX    ,
    C_LDXI   ,
    C_LDXD   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd26;
                    raddr_b = {5{DC}};
                end
    C_LDYI   ,
    C_LDYD   ,
    C_LDDY   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd28;
                    raddr_b = {5{DC}};
                end
    C_LDZI   ,
    C_LDZD   ,
    C_LDDZ   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = {5{DC}};
                end
    C_STS    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_STX    ,
    C_STXI   ,
    C_STXD   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd26;
                    raddr_b = ir[8:4];
                end
    C_STYI   ,
    C_STYD   ,
    C_STDY   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd28;
                    raddr_b = ir[8:4];
                end
    C_STZI   ,
    C_STZD   ,
    C_STDZ   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = ir[8:4];
                end
    C_LPM    ,
    C_LPMZ   ,
    C_LPMZI  :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = {5{DC}};
                end
    C_SPM    :
                case (cycle)
                2'd0:
                    begin
                        re_word = 1'b1;
                        raddr_a = 5'd0;
                        raddr_b = {5{DC}};
                    end
                2'd1:
                    begin
                        re_word = 1'b1;
                        raddr_a = 5'd30;
                        raddr_b = {5{DC}};
                    end
                2'd2:
                    begin
                        re_word = DC;
                        raddr_a = {5{DC}};
                        raddr_b = {5{DC}};
                    end
                2'd3:
                    begin
                        re_word = DC;
                        raddr_a = {5{DC}};
                        raddr_b = {5{DC}};
                    end
                endcase
    C_IN     ,
    C_POP    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    C_OUT    ,
    C_PUSH   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end



    C_ASR    ,
    C_LSR    ,
    C_ROR    ,
    C_SWAP   :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {5{DC}};
                end
    C_BST    ,
    C_BLD    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_SBI    ,
    C_CBI    ,
    C_BSET   ,
    C_BCLR   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end



    C_NOP    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    default  :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    endcase
end

endmodule
module  RfRead (
    input       [15:0]  ir,
    input       [1:0]   cycle,
    output  reg         re_word,
    output  reg [4:0]   raddr_a,
    output  reg [4:0]   raddr_b
);


parameter   DC = 1'bx;

`include "OpDefine.v"
always @* begin
    casex (ir)



    C_ADD    ,
    C_ADC    ,
    C_SUB    ,
    C_SBC    ,
    C_AND    ,
    C_OR     ,
    C_EOR    ,
    C_MUL    :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {ir[9], ir[3:0]};
                end
    C_SUBI   ,
    C_SBCI   ,
    C_ANDI   ,
    C_ORI    :
                begin
                    re_word = 1'b0;
                    raddr_a = {1'b1, ir[7:4]};
                    raddr_b = {5{DC}};
                end
    C_ADIW   ,
    C_SBIW   :
                begin
                    re_word = 1'b1;
                    raddr_a = {2'b11, ir[5:4], 1'b0};
                    raddr_b = {5{DC}};
                end
    C_COM    ,
    C_NEG    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_INC    ,
    C_DEC    :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {5{DC}};
                end
    C_MULS   :
                begin
                    re_word = 1'b0;
                    raddr_a = {1'b1, ir[7:4]};
                    raddr_b = {1'b1, ir[3:0]};
                end
    C_MULSU  ,
    C_FMUL   ,
    C_FMULS  ,
    C_FMULSU :
                begin
                    re_word = 1'b0;
                    raddr_a = {2'b10, ir[6:4]};
                    raddr_b = {2'b10, ir[2:0]};
                end



    C_JMP    ,
    C_RJMP   ,
    C_CALL   ,
    C_RCALL  ,
    C_RET    ,
    C_RETI   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    C_IJMP   ,
    C_ICALL  :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = {5{DC}};
                end
    C_CP     ,
    C_CPC    ,
    C_CPSE   :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {ir[9], ir[3:0]};
                end
    C_CPI    :
                begin
                    re_word = 1'b0;
                    raddr_a = {1'b1, ir[7:4]};
                    raddr_b = {5{DC}};
                end
    C_SBRC   ,
    C_SBRS   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_SBIC   ,
    C_SBIS   ,
    C_BRBS   ,
    C_BRBC   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end



    C_MOV    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {ir[9], ir[3:0]};
                end
    C_MOVW   :
                begin
                    re_word = 1'b1;
                    raddr_a = {ir[3:0], 1'b0};
                    raddr_b = {5{DC}};
                end
    C_LDI    ,
    C_LDS    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    C_LDX    ,
    C_LDXI   ,
    C_LDXD   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd26;
                    raddr_b = {5{DC}};
                end
    C_LDYI   ,
    C_LDYD   ,
    C_LDDY   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd28;
                    raddr_b = {5{DC}};
                end
    C_LDZI   ,
    C_LDZD   ,
    C_LDDZ   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = {5{DC}};
                end
    C_STS    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_STX    ,
    C_STXI   ,
    C_STXD   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd26;
                    raddr_b = ir[8:4];
                end
    C_STYI   ,
    C_STYD   ,
    C_STDY   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd28;
                    raddr_b = ir[8:4];
                end
    C_STZI   ,
    C_STZD   ,
    C_STDZ   :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = ir[8:4];
                end
    C_LPM    ,
    C_LPMZ   ,
    C_LPMZI  :
                begin
                    re_word = 1'b1;
                    raddr_a = 5'd30;
                    raddr_b = {5{DC}};
                end
    C_SPM    :
                case (cycle)
                2'd0:
                    begin
                        re_word = 1'b1;
                        raddr_a = 5'd0;
                        raddr_b = {5{DC}};
                    end
                2'd1:
                    begin
                        re_word = 1'b1;
                        raddr_a = 5'd30;
                        raddr_b = {5{DC}};
                    end
                2'd2:
                    begin
                        re_word = DC;
                        raddr_a = {5{DC}};
                        raddr_b = {5{DC}};
                    end
                2'd3:
                    begin
                        re_word = DC;
                        raddr_a = {5{DC}};
                        raddr_b = {5{DC}};
                    end
                endcase
    C_IN     ,
    C_POP    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    C_OUT    ,
    C_PUSH   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end



    C_ASR    ,
    C_LSR    ,
    C_ROR    ,
    C_SWAP   :
                begin
                    re_word = 1'b0;
                    raddr_a = ir[8:4];
                    raddr_b = {5{DC}};
                end
    C_BST    ,
    C_BLD    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = ir[8:4];
                end
    C_SBI    ,
    C_CBI    ,
    C_BSET   ,
    C_BCLR   :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end



    C_NOP    :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    default  :
                begin
                    re_word = DC;
                    raddr_a = {5{DC}};
                    raddr_b = {5{DC}};
                end
    endcase
end

endmodule