add D0=(4) and transfer on field W

This commit is contained in:
Raphael Jacquot 2019-02-10 12:47:50 +01:00
parent 23a8e32e31
commit bde3e1a027
5 changed files with 13 additions and 6 deletions

View file

@ -11,6 +11,7 @@
`define DEC_15X_FIELD 12'h151 // 15XX
`define DEC_MEMAXX 12'h152 // 1[45]x[y]
`define DEC_MEMAXX_END 12'h153
`define DEC_D0_EQ_4N 12'h1A0 // 1B
`define DEC_D0_EQ_5N 12'h1B0 // 1B
`define DEC_D0_EQ_LOOP 12'h1B1 // 1Bxxxxx (exec)
`define DEC_D1_EQ_4N 12'h1E0 // 1E

View file

@ -56,8 +56,13 @@ end
t_cnt <= P;
t_ctr <= P;
end
4'h7: begin
t_field <= `T_FIELD_W;
t_cnt <= 15;
t_ctr <= 0;
end
default: begin
$display("ERROR : DEC_15X_FIELD");
$display("ERROR : DEC_15X_FIELD %h", nb_in);
decode_error <= 1;
end
endcase

View file

@ -6,15 +6,15 @@
`include "decstates.v"
`DEC_D1_EQ_4N,
`DEC_D0_EQ_4N, `DEC_D1_EQ_4N,
`DEC_D0_EQ_5N, `DEC_D1_EQ_5N: begin
case (decstate)
`DEC_D1_EQ_4N: t_cnt <= 3;
`DEC_D0_EQ_4N, `DEC_D1_EQ_4N: t_cnt <= 3;
`DEC_D0_EQ_5N, `DEC_D1_EQ_5N: t_cnt <= 4;
endcase
t_ctr <= 1;
case (decstate)
`DEC_D0_EQ_5N: begin
`DEC_D0_EQ_4N, `DEC_D0_EQ_5N: begin
D0[3:0] <= nb_in;
decstate <= `DEC_D0_EQ_LOOP;
end

View file

@ -11,6 +11,7 @@
4'h3: decstate <= `DEC_13X;
4'h4: decstate <= `DEC_14X;
4'h5: decstate <= `DEC_15X;
4'hA: decstate <= `DEC_D0_EQ_4N;
4'hB: decstate <= `DEC_D0_EQ_5N;
4'hE: decstate <= `DEC_D1_EQ_4N;
4'hF: decstate <= `DEC_D1_EQ_5N;

View file

@ -331,7 +331,7 @@ always @(posedge ph2)
end
always @(posedge ph3) begin
if (cycle_ctr == 390)
if (cycle_ctr == 450)
debug_stop <= 1;
end
@ -395,7 +395,7 @@ always @(posedge dec_strobe) begin
`include "opcodes/1x.v"
`include "opcodes/13x_ptr_and_AC.v"
`include "opcodes/1[45]_memaccess.v"
`include "opcodes/1[BF]nnnnn_D[01]_EQ_5n.v"
`include "opcodes/1[ABEF]nnnnn_D[01]_EQ_5n.v"
`include "opcodes/2n_P_EQ_n.v"
`include "opcodes/3n[x...]_LC.v"
`include "opcodes/6xxx_GOTO.v"