hp-saturn/opcodes/B[ab]x.v

38 lines
927 B
Coq
Raw Normal View History

2019-02-10 18:46:26 +01:00
/******************************************************************************
* B[ab]x
*
* lots of things there
*
*/
`include "decstates.v"
`include "fields.v"
`DEC_Bxx_EXEC: begin
2019-02-11 11:29:31 +01:00
if (!field_table[0]) begin // table a
if (!nb_in[3]) begin //
alu_reg_dest <= reg_ABCD;
alu_reg_src1 <= reg_ABCD;
2019-02-10 18:46:26 +01:00
if (!nb_in[2]) begin
2019-02-11 11:29:31 +01:00
alu_reg_src2 <= reg_BCAC;
alu_op <= `ALU_OP_SUB;
2019-02-10 18:46:26 +01:00
end else alu_op <= `ALU_OP_INC;
2019-02-11 11:29:31 +01:00
end else begin // table b
2019-02-10 18:46:26 +01:00
$display("Bxx table 'a' not handled yet");
decode_error <= 1;
end
end else begin
alu_reg_dest <= {2'b0, nb_in[1:0]};
$display("Bxx table 'b' not handled yet");
decode_error <= 1;
end
alu_debug <= 1;
next_cycle <= `BUSCMD_NOP;
decstate <= `DEC_ALU_INIT;
alu_return <= `DEC_START;
2019-02-10 23:00:06 +01:00
`ifdef SIM
`endif
2019-02-10 18:46:26 +01:00
end