hp-saturn/opcodes/1[678C]n_D[01]_math_n.v
Raphael Jacquot cbfbe4eb3f renumber debug opcodes
add add_cst and sub_cst alu opcodes
port pointer math to use ALU
make A[ab]x more readable
2019-02-11 15:36:51 +01:00

22 lines
No EOL
499 B
Verilog

/******************************************************************************
*1[678C] D[01]=D[01][+-] (n+1)
*
*
*/
`DEC_PTR_MATH: begin
field <= `T_FIELD_A;
alu_first <= 0;
alu_last <= 4;
alu_const <= nb_in;
next_cycle <= `BUSCMD_NOP;
decstate <= `DEC_ALU_INIT;
alu_return <= `DEC_START;
`ifdef SIM
$display("%5h D%b=D%b%s\t%2d",
inst_start_PC, alu_reg_dest[0], alu_reg_src1[0],
((alu_op==`ALU_OP_SUB_CST)?"-":"+"), nb_in+1);
`endif
end