hp-saturn/opcodes/Fx.v

53 lines
1.2 KiB
Coq
Raw Normal View History

2019-02-09 11:53:45 +01:00
/******************************************************************************
* 8
* a lot of things start with 8...
*
*/
`include "decstates.v"
`DEC_FX: begin
field <= `T_FIELD_A;
alu_first <= 0;
alu_last <= 4;
2019-02-11 11:29:31 +01:00
alu_reg_dest <= reg_ABCD;
if (!nb_in[3]) begin
$display("F%h shifts not implemented");
2019-02-11 12:05:51 +01:00
alu_debug <= 1;
alu_halt <= 1;
end else begin
2019-02-11 11:29:31 +01:00
alu_reg_src1 <= reg_ABCD;
alu_op <= nb_in[2]?`ALU_OP_1CMPL:`ALU_OP_2CMPL;
2019-02-10 09:02:24 +01:00
end
next_cycle <= `BUSCMD_NOP;
decstate <= `DEC_ALU_INIT;
alu_return <= `DEC_START;
2019-02-10 09:02:24 +01:00
`ifdef SIM
$write("%5h ", inst_start_PC);
case ({2'b00, nb_in[1:0]})
`ALU_REG_A: $write("A");
`ALU_REG_B: $write("B");
`ALU_REG_C: $write("C");
`ALU_REG_D: $write("D");
endcase
if (!nb_in[3]) begin
$write("S");
if (!nb_in[2]) $write("L");
else $write("R");
end else begin
$write("=-");
case ({2'b00, nb_in[1:0]})
`ALU_REG_A: $write("A");
`ALU_REG_B: $write("B");
`ALU_REG_C: $write("C");
`ALU_REG_D: $write("D");
2019-02-10 09:02:24 +01:00
endcase
if (nb_in[2]) $write("-1");
2019-02-09 11:53:45 +01:00
end
$display("\tA");
`endif
2019-02-09 11:53:45 +01:00
end