📄 oc8051_decoder.v
字号:
src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ZERO; alu_op <= #1 `OC8051_ALU_INC; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_1; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_DJNZ_R : begin ram_wr_sel <= #1 `OC8051_RWS_RN; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ZERO; alu_op <= #1 `OC8051_ALU_INC; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_1; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_INC_R : begin ram_wr_sel <= #1 `OC8051_RWS_RN; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ZERO; alu_op <= #1 `OC8051_ALU_INC; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_R : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_MOV_AR : begin ram_wr_sel <= #1 `OC8051_RWS_RN; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_DR : begin ram_wr_sel <= #1 `OC8051_RWS_RN; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_CR : begin ram_wr_sel <= #1 `OC8051_RWS_RN; src_sel1 <= #1 `OC8051_AS1_OP2; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_RD : begin ram_wr_sel <= #1 `OC8051_RWS_D; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_ORL_R : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_OR; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_SUBB_R : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_RAM; alu_op <= #1 `OC8051_ALU_SUB; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_AC; cy_sel <= #1 `OC8051_CY_PSW; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_XCH_R : begin ram_wr_sel <= #1 `OC8051_RWS_RN; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_XCH; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_1; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC2; end `OC8051_XRL_R : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_XOR; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end //op_code [7:1] `OC8051_ADD_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_RAM; alu_op <= #1 `OC8051_ALU_ADD; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_AC; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_ADDC_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_RAM; alu_op <= #1 `OC8051_ALU_ADD; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_AC; cy_sel <= #1 `OC8051_CY_PSW; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_ANL_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_RAM; alu_op <= #1 `OC8051_ALU_AND; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_CJNE_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_OP2; alu_op <= #1 `OC8051_ALU_SUB; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_CY; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_DEC_I : begin ram_wr_sel <= #1 `OC8051_RWS_I; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ZERO; alu_op <= #1 `OC8051_ALU_INC; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_1; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_INC_I : begin ram_wr_sel <= #1 `OC8051_RWS_I; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ZERO; alu_op <= #1 `OC8051_ALU_INC; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_MOV_ID : begin ram_wr_sel <= #1 `OC8051_RWS_D; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_AI : begin ram_wr_sel <= #1 `OC8051_RWS_I; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_DI : begin ram_wr_sel <= #1 `OC8051_RWS_I; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOV_CI : begin ram_wr_sel <= #1 `OC8051_RWS_I; src_sel1 <= #1 `OC8051_AS1_OP2; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOVX_IA : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_DC; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_MOVX_AI :begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_DC; src_sel2 <= #1 `OC8051_AS2_DC; alu_op <= #1 `OC8051_ALU_NOP; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_N; end `OC8051_ORL_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_OR; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_SUBB_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_RAM; alu_op <= #1 `OC8051_ALU_SUB; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_AC; cy_sel <= #1 `OC8051_CY_PSW; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_XCH_I : begin ram_wr_sel <= #1 `OC8051_RWS_I; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_XCH; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_1; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC2; end `OC8051_XCHD :begin ram_wr_sel <= #1 `OC8051_RWS_I; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_XCH; wr <= #1 1'b1; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC2; end `OC8051_XRL_I : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_RAM; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_XOR; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_NOT; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end //op_code [7:0] `OC8051_ADD_D : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_RAM; alu_op <= #1 `OC8051_ALU_ADD; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_AC; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_ADD_C : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_OP2; src_sel2 <= #1 `OC8051_AS2_ACC; alu_op <= #1 `OC8051_ALU_ADD; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_AC; cy_sel <= #1 `OC8051_CY_0; src_sel3 <= #1 `OC8051_AS3_DC; wr_sfr <= #1 `OC8051_WRS_ACC1; end `OC8051_ADDC_D : begin ram_wr_sel <= #1 `OC8051_RWS_DC; src_sel1 <= #1 `OC8051_AS1_ACC; src_sel2 <= #1 `OC8051_AS2_RAM; alu_op <= #1 `OC8051_ALU_ADD; wr <= #1 1'b0; psw_set <= #1 `OC8051_PS_AC; cy_sel <= #1 `OC8051_CY_PSW; src_sel3 <= #1 `OC8051_AS3_DC;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -