implement RTNSXM, fix RTNCC

This commit is contained in:
Raphael Jacquot 2019-02-09 00:01:18 +01:00
parent ccd373243f
commit 322b176497
3 changed files with 21 additions and 2 deletions

19
opcodes/00_RTNSXM.v Normal file
View file

@ -0,0 +1,19 @@
/******************************************************************************
* 00 RTNSXM
*
*
*/
`include "decstates.v"
begin
HST[0] <= 1;
new_PC <= RSTK[rstk_ptr];
RSTK[rstk_ptr] <= 0;
rstk_ptr <= rstk_ptr - 1;
next_cycle <= `BUSCMD_LOAD_PC;
decstate <= `DEC_START;
`ifdef SIM
$display("%05h RTNSXM", inst_start_PC);
`endif
end

View file

@ -12,9 +12,7 @@ begin
new_PC <= RSTK[rstk_ptr];
RSTK[rstk_ptr] <= 0;
rstk_ptr <= rstk_ptr - 1;
bus_load_pc <= 1;
next_cycle <= `BUSCMD_LOAD_PC;
// execute_cycle <= 0;
decstate <= `DEC_START;
`ifdef SIM
$display("%05h RTNCC", inst_start_PC);

View file

@ -6,6 +6,8 @@
`DEC_0X: begin
case (nibble)
4'h0:
`include "opcodes/00_RTNSXM.v"
4'h3:
`include "opcodes/03_RTNCC.v"
4'h4: