Line 17... |
Line 17... |
//// - Dinesh Annayya, dinesha@opencores.org ////
|
//// - Dinesh Annayya, dinesha@opencores.org ////
|
//// ////
|
//// ////
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// v0.0 - Dinesh A, 5th Jan 2017
|
//// v0.0 - Dinesh A, 5th Jan 2017
|
//// 1. Active edge of reset changed from High to Low
|
//// 1. Active edge of reset changed from High to Low
|
|
//// v0.1 - Dinesh A, 6th Jan 2017
|
|
//// 1. pc_next logic added
|
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
//// ////
|
//// ////
|
//// Copyright (C) 2000 Authors and OPENCORES.ORG ////
|
//// Copyright (C) 2000 Authors and OPENCORES.ORG ////
|
//// ////
|
//// ////
|
//// This source file may be used and distributed without ////
|
//// This source file may be used and distributed without ////
|
Line 1053... |
Line 1055... |
stb_i = 1'b0;
|
stb_i = 1'b0;
|
bit_addr = 1'b0;
|
bit_addr = 1'b0;
|
end
|
end
|
`OC8051_LJMP : begin
|
`OC8051_LJMP : begin
|
ram_rd_sel = `OC8051_RRS_DC;
|
ram_rd_sel = `OC8051_RRS_DC;
|
pc_wr = `OC8051_PCW_Y;
|
pc_wr = `OC8051_PCW_Y; // Write PC
|
pc_sel = `OC8051_PIS_I16;
|
pc_sel = `OC8051_PIS_I16; // 16 bit immediate
|
comp_sel = `OC8051_CSS_DC;
|
comp_sel = `OC8051_CSS_DC; // No Compare
|
rmw = `OC8051_RMW_N;
|
rmw = `OC8051_RMW_N; // Not Read Modify Command
|
stb_i = 1'b0;
|
stb_i = 1'b0;
|
bit_addr = 1'b0;
|
bit_addr = 1'b0;
|
end
|
end
|
`OC8051_MOV_D : begin
|
`OC8051_MOV_D : begin
|
ram_rd_sel = `OC8051_RRS_D;
|
ram_rd_sel = `OC8051_RRS_D;
|
Line 1364... |
Line 1366... |
alu_op <= #1 `OC8051_ALU_NOP;
|
alu_op <= #1 `OC8051_ALU_NOP;
|
wr <= #1 1'b0;
|
wr <= #1 1'b0;
|
psw_set <= #1 `OC8051_PS_NOT;
|
psw_set <= #1 `OC8051_PS_NOT;
|
wr_sfr <= #1 `OC8051_WRS_ACC1;
|
wr_sfr <= #1 `OC8051_WRS_ACC1;
|
end
|
end
|
/* `OC8051_ACALL :begin
|
|
ram_wr_sel <= #1 `OC8051_RWS_SP;
|
|
src_sel1 <= #1 `OC8051_AS1_PCH;
|
|
src_sel2 <= #1 `OC8051_AS2_DC;
|
|
alu_op <= #1 `OC8051_ALU_NOP;
|
|
wr <= #1 1'b1;
|
|
psw_set <= #1 `OC8051_PS_NOT;
|
|
wr_sfr <= #1 `OC8051_WRS_N;
|
|
end
|
|
`OC8051_AJMP : 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;
|
|
wr_sfr <= #1 `OC8051_WRS_N;
|
|
end
|
|
`OC8051_LCALL :begin
|
|
ram_wr_sel <= #1 `OC8051_RWS_SP;
|
|
src_sel1 <= #1 `OC8051_AS1_PCH;
|
|
src_sel2 <= #1 `OC8051_AS2_DC;
|
|
alu_op <= #1 `OC8051_ALU_NOP;
|
|
wr <= #1 1'b1;
|
|
psw_set <= #1 `OC8051_PS_NOT;
|
|
wr_sfr <= #1 `OC8051_WRS_N;
|
|
end*/
|
|
`OC8051_DIV : begin
|
`OC8051_DIV : begin
|
ram_wr_sel <= #1 `OC8051_RWS_B;
|
ram_wr_sel <= #1 `OC8051_RWS_B;
|
src_sel1 <= #1 `OC8051_AS1_ACC;
|
src_sel1 <= #1 `OC8051_AS1_ACC;
|
src_sel2 <= #1 `OC8051_AS2_RAM;
|
src_sel2 <= #1 `OC8051_AS2_RAM;
|
alu_op <= #1 `OC8051_ALU_DIV;
|
alu_op <= #1 `OC8051_ALU_DIV;
|