OpenCores
URL https://opencores.org/ocsvn/a-z80/a-z80/trunk

Subversion Repositories a-z80

[/] [a-z80/] [trunk/] [cpu/] [control/] [timing_macros.i] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 gdevic
//=========================================================================================
2
// This file contains substitute strings for macros used in the Excel timing table and
3 6 gdevic
// is read and processed by genmatrix.py script to generate exec_matrix.vh include file.
4 3 gdevic
//
5
// Format of the file:
6
//
7
// * Each key is prefixed by ':' and corresponds to a spreadsheet column name.
8
// * A column (key) contains a number of macros, each starting at its own line.
9
// * A macro may span multiple lines, in which case use the '\' character after the name to
10
//   continue on the next line.
11
// * Multiline macros end when a line does not _start_ with a space character.
12
// //-style comments are wrapped within /* ... */ if they don't start a line.
13
//=========================================================================================
14
 
15
//-----------------------------------------------------------------------------------------
16
:Function
17
//-----------------------------------------------------------------------------------------
18
//Fetch is M1
19
fMFetch
20
fMRead          fMRead=1;
21
fMWrite         fMWrite=1;
22
fIORead         fIORead=1;
23
fIOWrite        fIOWrite=1;
24
 
25
//-----------------------------------------------------------------------------------------
26
// Basic timing control
27
//-----------------------------------------------------------------------------------------
28
:valid
29
1               validPLA=1;
30
:nextM
31
1               nextM=1;
32
mr              nextM=1; ctl_mRead=1;
33
mw              nextM=1; ctl_mWrite=1;
34
ior             nextM=1; ctl_iorw=1;
35
iow             nextM=1; ctl_iorw=1;
36
CC              nextM=!flags_cond_true;
37
INT             nextM=1; ctl_mRead=in_intr & im2;   // RST38 interrupt extension
38
:setM1
39
1               setM1=1;
40
SS              setM1=!flags_cond_true;
41
CC              setM1=!flags_cond_true;
42
ZF              setM1=flags_zf; // Used in DJNZ
43
BR              setM1=nonRep | !repeat_en;
44
BRZ             setM1=nonRep | !repeat_en | flags_zf;
45 7 gdevic
BZ              setM1=nonRep | flags_zf;
46 3 gdevic
INT             setM1=!(in_intr & im2);             // RST38 interrupt extension
47
 
48
//-----------------------------------------------------------------------------------------
49
// Register file, address (downstream) endpoint
50
//-----------------------------------------------------------------------------------------
51
:A:reg rd
52
// General purpose registers
53
A       ctl_reg_gp_sel=`GP_REG_AF; ctl_reg_gp_hilo=2'b10; ctl_sw_4d=1;  // Read 8-bit general purpose A register, enable SW4 downstream
54
r16     ctl_reg_gp_sel=op54; ctl_reg_gp_hilo=2'b11; ctl_sw_4d=1;        // Read 16-bit general purpose register, enable SW4 downstream
55
BC      ctl_reg_gp_sel=`GP_REG_BC; ctl_reg_gp_hilo=2'b11; ctl_sw_4d=1;  // Read 16-bit BC, enable SW4 downstream
56
DE      ctl_reg_gp_sel=`GP_REG_DE; ctl_reg_gp_hilo=2'b11; ctl_sw_4d=1;  // Read 16-bit DE, enable SW4 downstream
57
HL      ctl_reg_gp_sel=`GP_REG_HL; ctl_reg_gp_hilo=2'b11; ctl_sw_4d=1;  // Read 16-bit HL, enable SW4 downstream
58
SP      ctl_reg_use_sp=1; ctl_reg_gp_sel=`GP_REG_AF; ctl_reg_gp_hilo=2'b11; ctl_sw_4d=1;// Read 16-bit SP, enable SW4 downstream
59
 
60
// System registers
61
WZ      ctl_reg_sel_wz=1; ctl_reg_sys_hilo=2'b11; ctl_sw_4d=1;      // Select 16-bit WZ
62
IR      ctl_reg_sel_ir=1; ctl_reg_sys_hilo=2'b11;                   // Select 16-bit IR
63
I*      ctl_reg_sel_ir=1; ctl_reg_sys_hilo=2'b10; ctl_sw_4d=1;      // Select 8-bit I register
64
PC      ctl_reg_sel_pc=1; ctl_reg_sys_hilo=2'b11;                   // Select 16-bit PC
65
 
66
// Conditional assertions of WZ, HL instead of PC
67
WZ? \
68
    if (flags_cond_true) begin      // If cc is true, use WZ instead of PC (for jumps)
69
        ctl_reg_not_pc=1; ctl_reg_sel_wz=1; ctl_reg_sys_hilo=2'b11; ctl_sw_4d=1;
70
    end
71
 
72
:A:reg wr
73
// General purpose registers
74
r16     ctl_reg_gp_we=1; ctl_reg_gp_sel=op54; ctl_reg_gp_hilo=2'b11; ctl_sw_4u=1; // Write 16-bit general purpose register, enable SW4 upstream
75
BC      ctl_reg_gp_we=1; ctl_reg_gp_sel=`GP_REG_BC; ctl_reg_gp_hilo=2'b11; ctl_sw_4u=1; // Write 16-bit BC, enable SW4 upstream
76
DE      ctl_reg_gp_we=1; ctl_reg_gp_sel=`GP_REG_DE; ctl_reg_gp_hilo=2'b11; ctl_sw_4u=1; // Write 16-bit BC, enable SW4 upstream
77
HL      ctl_reg_gp_we=1; ctl_reg_gp_sel=`GP_REG_HL; ctl_reg_gp_hilo=2'b11; ctl_sw_4u=1; // Write 16-bit HL, enable SW4 upstream
78
SP      ctl_reg_gp_we=1; ctl_reg_gp_sel=`GP_REG_AF; ctl_reg_gp_hilo=2'b11; ctl_reg_use_sp=1; ctl_sw_4u=1; // Write 16-bit SP, enable SW4 upstream
79
// System registers
80
WZ      ctl_reg_sys_we=1; ctl_reg_sel_wz=1; ctl_reg_sys_hilo=2'b11; ctl_sw_4u=1; // Write 16-bit WZ, enable SW4 upstream
81
IR      ctl_reg_sys_we=1; ctl_reg_sel_ir=1; ctl_reg_sys_hilo=2'b11; // Write 16-bit IR
82
// PC will not be incremented if we are in HALT, INTR or NMI state
83
PC      ctl_reg_sys_we=1; ctl_reg_sel_pc=1; ctl_reg_sys_hilo=2'b11; pc_inc=!(in_halt | in_intr | in_nmi); // Write 16-bit PC and control incrementer
84
>       ctl_sw_4u=1;
85
 
86
//-----------------------------------------------------------------------------------------
87
// Controls the address latch incrementer, the address latch and the address pin mux
88
//-----------------------------------------------------------------------------------------
89
:inc/dec
90
+       ctl_inc_cy=pc_inc;                      // Increment
91
-       ctl_inc_cy=pc_inc; ctl_inc_dec=1;       // Decrement
92
op3     ctl_inc_cy=pc_inc; ctl_inc_dec=op3;     // Decrement if op3 is set; increment otherwise
93
 
94
:A:latch
95
W       ctl_al_we=1;                            // Write a value from the register bus to the address latch
96
R       ctl_bus_inc_oe=1;                       // Output enable incrementer to the register bus
97
P       ctl_apin_mux=1;                         // Apin sourced from incrementer
98
RL      ctl_bus_inc_oe=1; ctl_apin_mux2=1;      // Apin sourced from AL
99
 
100
//-----------------------------------------------------------------------------------------
101
// Register file, data (upstream) endpoint
102
//-----------------------------------------------------------------------------------------
103
:D:reg rd
104
//----- General purpose registers -----
105
A       ctl_reg_gp_sel=`GP_REG_AF; ctl_reg_gp_hilo=2'b10;
106
AF      ctl_reg_gp_sel=`GP_REG_AF; ctl_reg_gp_hilo=2'b11;
107
B       ctl_reg_gp_sel=`GP_REG_BC; ctl_reg_gp_hilo=2'b10;
108
H       ctl_reg_gp_sel=`GP_REG_HL; ctl_reg_gp_hilo=2'b10;
109
L       ctl_reg_gp_sel=`GP_REG_HL; ctl_reg_gp_hilo=2'b01;
110
r8 \    // r8 addressing does not allow reading F register (A and F are also indexed as swapped) (ex. in OUT (c),r)
111
    if (op4 & op5 & !op3) ctl_bus_zero_oe=1;                // Trying to read flags? Put 0 on the bus instead.
112
    else begin ctl_reg_gp_sel=op54; ctl_reg_gp_hilo={!rsel3,rsel3}; end // Read 8-bit GP register
113
r8'     ctl_reg_gp_sel=op21; ctl_reg_gp_hilo={!rsel0,rsel0};// Read 8-bit GP register selected by op[2:0]
114
rh      ctl_reg_gp_sel=op54; ctl_reg_gp_hilo=2'b10;         // Read 8-bit GP register high byte
115
rl      ctl_reg_gp_sel=op54; ctl_reg_gp_hilo=2'b01;         // Read 8-bit GP register low byte
116
//----- System registers -----
117
WZ      ctl_reg_sel_wz=1; ctl_reg_sys_hilo=2'b11; ctl_sw_4u=1;
118
Z       ctl_reg_sel_wz=1; ctl_reg_sys_hilo=2'b01; ctl_sw_4u=1; // Selecting strictly Z
119
I/R     ctl_reg_sel_ir=1; ctl_reg_sys_hilo={!op3,op3}; ctl_sw_4u=1; // Read either I or R based on op3 (0 or 1)
120
PCh     ctl_reg_sel_pc=1; ctl_reg_sys_hilo=2'b10; ctl_sw_4u=1;
121
PCl     ctl_reg_sel_pc=1; ctl_reg_sys_hilo=2'b01; ctl_sw_4u=1;
122
 
123
:D:reg wr
124
?       // Which register to be written is decided elsewhere
125
//----- General purpose registers -----
126
A       ctl_reg_gp_we=1; ctl_reg_gp_sel=`GP_REG_AF; ctl_reg_gp_hilo=2'b10;
127
F       ctl_reg_gp_we=1; ctl_reg_gp_sel=`GP_REG_AF; ctl_reg_gp_hilo=2'b01;
128
B       ctl_reg_gp_we=1; ctl_reg_gp_sel=`GP_REG_BC; ctl_reg_gp_hilo=2'b10;
129
r8      ctl_reg_gp_we=1; ctl_reg_gp_sel=op54; ctl_reg_gp_hilo={!rsel3,rsel3}; // Write 8-bit GP register
130
r8'     ctl_reg_gp_we=1; ctl_reg_gp_sel=op21; ctl_reg_gp_hilo={!rsel0,rsel0}; // Write 8-bit GP register selected by op[2:0]
131
rh      ctl_reg_gp_we=1; ctl_reg_gp_sel=op54; ctl_reg_gp_hilo=2'b10; // Write 8-bit GP register high byte
132
rl      ctl_reg_gp_we=1; ctl_reg_gp_sel=op54; ctl_reg_gp_hilo=2'b01; // Write 8-bit GP register low byte
133
//----- System registers -----
134
I/R     ctl_reg_sys_we=1; ctl_reg_sel_ir=1; ctl_reg_sys_hilo={!op3,op3}; ctl_sw_4d=1; // Write either I or R based on op3 (0 or 1)
135
WZ      ctl_reg_sys_we=1; ctl_reg_sel_wz=1; ctl_reg_sys_hilo=2'b11;
136
W       ctl_reg_sys_we_hi=1; ctl_reg_sel_wz=1; ctl_reg_sys_hilo[1]=1; // Selecting only W
137
W?      ctl_reg_sys_we_hi=flags_cond_true; ctl_reg_sel_wz=flags_cond_true; ctl_reg_sys_hilo[1]=1; // Conditionally selecting only W
138
Z       ctl_reg_sys_we_lo=1; ctl_reg_sel_wz=1; ctl_reg_sys_hilo[0]=1; // Selecting only Z
139
 
140
//-----------------------------------------------------------------------------------------
141
// Controls the register file gate connecting it with the ALU and data bus
142
//-----------------------------------------------------------------------------------------
143
:Reg gate
144
<       ctl_reg_in_hi=1; ctl_reg_in_lo=1;       // From the ALU side into the register file
145
146
147
>       ctl_reg_out_hi=1; ctl_reg_out_lo=1;     // From the register file into the ALU
148
>l      ctl_reg_out_lo=1;                       // From the register file into the ALU low byte only
149
>h      ctl_reg_out_hi=1;                       // From the register file into the ALU high byte only
150
 
151
//-----------------------------------------------------------------------------------------
152
// Switches on the data bus for each direction (upstream, downstream)
153
//-----------------------------------------------------------------------------------------
154
:SW2
155
d       ctl_sw_2d=1;
156
u       ctl_sw_2u=1;
157
 
158
:SW1
159
<       ctl_sw_1d=1;
160
>       ctl_sw_1u=1;
161
 
162
//-----------------------------------------------------------------------------------------
163
// Data bus latches and pads control
164
//-----------------------------------------------------------------------------------------
165
:DB pads
166
R       ctl_bus_db_oe=1;                        // Read DB pads to internal data bus
167
W       ctl_bus_db_we=1;                        // Write DB pads with internal data bus value
168
00      ctl_bus_zero_oe=1;                      // Force 0x00 on the data bus
169
FF      ctl_bus_ff_oe=1;                        // Force 0xFF on the data bus
170
 
171
//-----------------------------------------------------------------------------------------
172
// ALU
173
//-----------------------------------------------------------------------------------------
174
:ALU
175
// Controls the master ALU output enable and the ALU input, only one can be active at a time
176
// >bs if set, will override >s0 which is used by bit instructions to override default M1/T3 load
177
<       ctl_alu_oe=1;                           // Enable ALU onto the data bus
178
>s0     ctl_alu_shift_oe=!ctl_alu_bs_oe;        // Shifter unit without shift-enable
179
>s1     ctl_alu_shift_oe=1; ctl_shift_en=1;     // Shifter unit AND shift enable!
180
>bs     ctl_alu_bs_oe=1;                        // Bit-selector unit
181
 
182
:ALU bus
183
// Controls the writer to the internal ALU bus
184
op1     ctl_alu_op1_oe=1;                       // OP1 latch
185
op2     ctl_alu_op2_oe=1;                       // OP2 latch
186
res     ctl_alu_res_oe=1;                       // Result latch
187
 
188
:op2 latch
189
// Controls a MUX to select the input to the OP2 latch
190
bus     ctl_alu_op2_sel_bus=1;                  // Internal bus
191
lq      ctl_alu_op2_sel_lq=1;                   // Cross-bus wire (see schematic)
192
 
193
 
194
:op1 latch
195
// Controls a MUX to select the input to the OP1 latch
196
bus     ctl_alu_op1_sel_bus=1;                  // Internal bus
197
low     ctl_alu_op1_sel_low=1;                  // Write low nibble with a high nibble
198
 
199
 
200
:operation
201
// Sets the ALU core operation
202
//--------------------------------------------------------------------------------------------------------------------------
203
CP \
204
    ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=0;                                             ctl_alu_sel_op2_neg=1;
205
    if (ctl_alu_op_low) begin
206
                                                              ctl_flags_cf_set=1;
207
    end else begin
208
        ctl_alu_core_hf=1;
209
    end
210
//--------------------------------------------------------------------------------------------------------------------------
211
SUB \
212
 
213
    ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=0;                                             ctl_alu_sel_op2_neg=1;
214
    if (ctl_alu_op_low) begin
215
                                                              ctl_flags_cf_set=1;
216
    end else begin
217
        ctl_alu_core_hf=1;
218
    end
219
//--------------------------------------------------------------------------------------------------------------------------
220
SBC \
221
    ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=0;                                             ctl_alu_sel_op2_neg=1;
222
    if (ctl_alu_op_low) begin
223
                                                                                  ctl_flags_cf_cpl=1;
224
    end else begin
225
        ctl_alu_core_hf=1;
226
    end
227
//--------------------------------------------------------------------------------------------------------------------------
228
SBCh \
229
    ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=0;                                             ctl_alu_sel_op2_neg=1;
230
    if (!ctl_alu_op_low) begin
231
        ctl_alu_core_hf=1;
232
    end
233
//--------------------------------------------------------------------------------------------------------------------------
234
ADC \
235
    ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=0;
236
    if (!ctl_alu_op_low) begin
237
        ctl_alu_core_hf=1;
238
    end
239
//--------------------------------------------------------------------------------------------------------------------------
240
ADD \
241
    ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=0;
242
    if (ctl_alu_op_low) begin
243
                                                              ctl_flags_cf_set=1; ctl_flags_cf_cpl=1;
244
    end else begin
245
        ctl_alu_core_hf=1;
246
    end
247
//--------------------------------------------------------------------------------------------------------------------------
248
AND     ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=1; ctl_flags_cf_set=1;
249
OR      ctl_alu_core_R=1; ctl_alu_core_V=1; ctl_alu_core_S=1; ctl_flags_cf_set=1; ctl_flags_cf_cpl=1;
250
XOR     ctl_alu_core_R=1; ctl_alu_core_V=0; ctl_alu_core_S=0; ctl_flags_cf_set=1; ctl_flags_cf_cpl=1;
251
 
252
NAND    ctl_alu_core_R=0; ctl_alu_core_V=0; ctl_alu_core_S=1; ctl_flags_cf_set=1;                     ctl_alu_sel_op2_neg=1;
253
NOR     ctl_alu_core_R=1; ctl_alu_core_V=1; ctl_alu_core_S=1; ctl_flags_cf_set=1; ctl_flags_cf_cpl=1; ctl_alu_sel_op2_neg=1;
254
//--------------------------------------------------------------------------------------------------------------------------
255
 
256
PLA     ctl_state_alu=1;                        // Assert the ALU PLA modifier to determine operation
257
 
258
:nibble
259
// ALU computational phase: low nibble or high nibble
260
L       ctl_alu_op_low=1;                       // Activate ALU operation on low nibble
261
H       ctl_alu_sel_op2_high=1;                 // Activate ALU operation on high nibble
262
 
263
//-----------------------------------------------------------------------------------------
264
// FLAGT
265
//-----------------------------------------------------------------------------------------
266
:FLAGT
267
<       ctl_flags_oe=1;                         // Enable FLAGT onto the data bus
268
>       ctl_flags_bus=1;                        // Load FLAGT from the data bus
269
alu     ctl_flags_alu=1;                        // Load FLAGT from the ALU
270
 
271
// Write enables for various flag bits and segments
272
:SZ
273
*       ctl_flags_sz_we=1;
274
:XY
275
*       ctl_flags_xy_we=1;
276
?
277
:HF
278
*       ctl_flags_hf_we=1;
279
W2      ctl_flags_hf2_we=1;                     // Write HF2 flag (DAA only)
280
:PF
281
*       ctl_flags_pf_we=1;
282
P       ctl_flags_pf_we=1; ctl_pf_sel=`PFSEL_P;
283
V       ctl_flags_pf_we=1; ctl_pf_sel=`PFSEL_V;
284
iff2    ctl_flags_pf_we=1; ctl_pf_sel=`PFSEL_IFF2;
285
REP     ctl_flags_pf_we=1; ctl_pf_sel=`PFSEL_REP;
286
?
287
:NF
288
*       ctl_flags_nf_we=1;                      // Previous NF, to be used when loading FLAGT
289
 
290
1       ctl_flags_nf_we=1; ctl_flags_nf_set=1;
291
S       ctl_flags_nf_we=1;                      // Sign bit, to be used with FLAGT source set to "alu"
292
?
293
:CF
294
*       ctl_flags_cf_we=1;
295
 
296
1       ctl_flags_cf_set=1;                     // Set CF going into the ALU core
297
^       ctl_flags_cf_we=1;  ctl_flags_cf_cpl=1; // CCF
298
:CF2
299
R       ctl_flags_use_cf2=1;
300
W       ctl_flags_cf2_we=1; ctl_flags_cf2_sel=0;
301
W.sh    ctl_flags_cf2_we=1; ctl_flags_cf2_sel=1;
302
W.daa   ctl_flags_cf2_we=1; ctl_flags_cf2_sel=2;
303
W.0     ctl_flags_cf2_we=1; ctl_flags_cf2_sel=3;
304
 
305
//-----------------------------------------------------------------------------------------
306
// Special sequence macros for some instructions make it simpler for all other entries
307
//-----------------------------------------------------------------------------------------
308
:Special
309
USE_SP          ctl_reg_use_sp=1;                           // For 16-bit loads: use SP instead of AF
310
 
311
// A few more specific states and instructions:
312
Ex_DE_HL        ctl_reg_ex_de_hl=1;                         // EX DE,HL
313
Ex_AF_AF'       ctl_reg_ex_af=1;                            // EX AF,AF'
314
EXX             ctl_reg_exx=1;                              // EXX
315
HALT            ctl_state_halt_set=1;                       // Enter HALT state
316
DI_EI           ctl_iffx_bit=op3; ctl_iffx_we=1;            // DI/EI
317
IM              ctl_im_we=1;                                // IM n ('n' is read by opcode[4:3])
318
 
319
WZ=IX+d         ixy_d=1;                                    // Compute WZ=IX+d
320
IX_IY           ctl_state_ixiy_we=1; ctl_state_iy_set=op5; setIXIY=1;   // IX/IY prefix
321
CLR_IX_IY       ctl_state_ixiy_we=1; ctl_state_ixiy_clr=!setIXIY;       // Clear IX/IY flag
322
 
323
CB              ctl_state_tbl_cb_set=1; setCBED=1;          // CB-table prefix
324
ED              ctl_state_tbl_ed_set=1; setCBED=1;          // ED-table prefix
325
CLR_CB_ED       ctl_state_tbl_clr=!setCBED;                 // Clear CB/ED prefix
326
 
327
// If the NF is set, complement HF and CF on the way out to the bus
328
// This is used to correctly set those flags after subtraction operations
329
?NF_HF_CF       ctl_flags_hf_cpl=flags_nf; ctl_flags_cf_cpl=flags_nf;
330
?NF_HF          ctl_flags_hf_cpl=flags_nf;
331
?~CF_HF         ctl_flags_hf_cpl=!flags_cf;  // Used for CCF
332
?SF_NEG         ctl_alu_sel_op2_neg=flags_sf;
333
NEG_OP2         ctl_alu_sel_op2_neg=1;
334
?NF_SUB         ctl_alu_sel_op2_neg=flags_nf; ctl_flags_cf_cpl=!flags_nf;
335
 
336
// M1 opcode read cycle and the refresh register increment cycle
337
// Write opcode into the instruction register through internal db0 bus:
338
OpcodeToIR      ctl_ir_we=1;
339
// At the common instruction load M1/T3, override opcode byte when servicing interrupts:
340
// 1. We are in HALT mode: push NOP (0x00) instead
341
// 2. We are in INTR mode (IM1 or IM2): push RST38 (0xFF) instead
342
// 3. We are in NMI mode: push RST38 (0xFF) instead
343
OverrideIR      ctl_bus_zero_oe=in_halt; ctl_bus_ff_oe=(in_intr & (im1 | im2)) | in_nmi;
344
 
345
// RST instruction uses opcode[5:3] to specify a vector and this control passes those 3 bits through
346
MASK_543        ctl_sw_mask543_en=!((in_intr & im2) | in_nmi);
347
// Based on the in_nmi state, several things are set:
348
// 1. Disable SW1 so the opcode will not get onto db1 bus
349
// 2. Generate 0x66 on the db1 bus which will be used as the target vector address
350
// 3. Clear IFF1 (done by the nmi logic on posedge of in_nmi)
351
RST_NMI         ctl_sw_1d=!in_nmi; ctl_66_oe=in_nmi;
352
// Based on the in_intr state, several things are set:
353
// 1. IM1 mode, force 0xFF on the db0 bus
354
// 2. Clear IFF1 and IFF2 (done by the intr logic on posedge of in_intr)
355
RST_INT         ctl_bus_ff_oe=in_intr & im1;
356
RETN            ctl_iff1_iff2=1;                // RETN copies IFF2 into IFF1
357
NO_INTS         ctl_no_ints=1;                  // Disable interrupt generation for this opcode (DI/EI/CB/ED/DD/FD)
358
 
359
EvalCond        ctl_eval_cond=1;                // Evaluate flags condition based on the opcode[5:3]
360
CondShort       ctl_cond_short=1;               // M1/T3 only: force a short flags condition (SS)
361
Limit6          ctl_inc_limit6=1;               // Limit the incrementer to 6 bits
362
DAA             ctl_daa_oe=1;                   // Write DAA correction factor to the bus
363
ZERO_16BIT      ctl_alu_zero_16bit=1;           // 16-bit arithmetic operation uses ZF calculated over 2 bytes
364
NonRep          nonRep=1;                       // Non-repeating block instruction
365
WriteBC=1       ctl_repeat_we=1;                // Update repeating flag latch with BC=1 status
366
NOT_PC!         ctl_reg_not_pc=1;               // For M1/T1 load from a register other than PC

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.