2019-02-07 22:54:06 +01:00
|
|
|
/******************************************************************************
|
|
|
|
* 0X
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-02-08 00:02:55 +01:00
|
|
|
`DEC_0X: begin
|
|
|
|
case (nibble)
|
2019-02-09 11:53:45 +01:00
|
|
|
// RTNSXM
|
|
|
|
4'h0: 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
|
2019-02-08 11:06:19 +01:00
|
|
|
4'h3:
|
|
|
|
`include "opcodes/03_RTNCC.v"
|
2019-02-08 11:55:47 +01:00
|
|
|
4'h4:
|
2019-02-08 11:06:19 +01:00
|
|
|
`include "opcodes/04_SETHEX.v"
|
2019-02-08 11:55:47 +01:00
|
|
|
4'h5:
|
|
|
|
`include "opcodes/05_SETDEC.v"
|
2019-02-08 00:02:55 +01:00
|
|
|
default: begin
|
|
|
|
$display("ERROR : DEC_0X");
|
|
|
|
decode_error <= 1;
|
|
|
|
end
|
|
|
|
endcase
|
|
|
|
end
|
|
|
|
|