2019-02-07 22:54:06 +01:00
|
|
|
|
|
|
|
/******************************************************************************
|
|
|
|
* 80
|
|
|
|
* a lot of things start with 80...
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2019-02-07 23:31:35 +01:00
|
|
|
`include "decstates.v"
|
2019-02-10 09:02:24 +01:00
|
|
|
`include "bus_commands.v"
|
2019-02-07 23:31:35 +01:00
|
|
|
|
|
|
|
`DEC_80X: begin
|
2019-02-09 19:18:58 +01:00
|
|
|
case (nb_in)
|
2019-02-10 09:02:24 +01:00
|
|
|
4'h5: begin
|
|
|
|
add_out <= C[19:0];
|
|
|
|
next_cycle <= `BUSCMD_CONFIGURE;
|
|
|
|
decstate <= `DEC_START;
|
|
|
|
`ifdef SIM
|
|
|
|
$display("%05h CONFIG", inst_start_PC);
|
|
|
|
`endif
|
|
|
|
end
|
2019-02-10 12:04:53 +01:00
|
|
|
4'h8: decstate <= `DEC_808X;
|
2019-02-10 09:02:24 +01:00
|
|
|
4'hA: begin
|
|
|
|
next_cycle <= `BUSCMD_RESET;
|
|
|
|
decstate <= `DEC_START;
|
|
|
|
`ifdef SIM
|
|
|
|
$display("%05h RESET", inst_start_PC);
|
|
|
|
`endif
|
|
|
|
end
|
|
|
|
4'hC: decstate <= `DEC_C_EQ_P_N;
|
|
|
|
4'hD: decstate <= `DEC_P_EQ_C_N;
|
2019-02-07 23:31:35 +01:00
|
|
|
default: begin
|
|
|
|
$display("ERROR : DEC_80X");
|
|
|
|
decode_error <= 1;
|
|
|
|
end
|
|
|
|
endcase
|
|
|
|
end
|