forked from polynds/dreamcatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontrol_word.txt
153 lines (126 loc) · 2.41 KB
/
control_word.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
;; total of 112 control bits.
;; about 26 of which are used inside the microcode board itself
;; so a total of ~86 lines need to be sent out only
x : 31 registers + TDR(2) + MDR(4) + INT_STATUS + INT_CODE = 39
y : TDR(2) + MDR(4) = 6
typ0
typ1
COND_SRC_0 ; programmer's flag, microcode flags, or directly from ALU ?
COND_SRC_1 ; 00 = programmers, 01 = microcode, 10 = ALU
cond_sel_0
cond_sel_1
cond_sel_2
cond_invert
OFFSET0 ; jump offset. from -64 to 63
OFFSET1
OFFSET2
OFFSET3
OFFSET4
OFFSET5
OFFSET6
U_ZF_IN_SRC_0
U_ZF_IN_SRC_1
U_CF_IN_SRC_0
U_CF_IN_SRC_1
U_SF_IN_SRC
U_OF_IN_SRC
TRAP_ACK
ZF_IN_SRC_0
ZF_IN_SRC_1
CF_IN_SRC_0
CF_IN_SRC_1
SF_IN_SRC_0
SF_IN_SRC_1
OF_IN_SRC_0
OF_IN_SRC_1
OF_IN_SRC_2
INT_ACK
ALU_op0
ALU_op1
ALU_op2
ALU_op3
ALU_mode
ALU_CF_IN_SRC0 ; carry from microcode flags or programmer's flags?
ALU_CF_IN_SRC1 ; ZERO, 1, CF, ~CF ?
ALU_CF_IN_SRC2 ;
ALU_CF_OUT_INV ; invert carry out ?
ALU_X_SRC_0
ALU_X_SRC_1
ALU_X_SRC_2
ALU_X_SRC_4
ALU_X_SRC_5
ALU_Y_SRC_0
ALU_Y_SRC_1
ALU_Y_SRC_2
ALU_Y_SRC_3
ZBUS_IN_SRC ; from ALU or shift right machine ?
SHR_MSB_SRC_0 ; 000 = 0, 001 = U_CF, 010 = CF, 011 = ALU_7, 100 = ALU_0
SHR_MSB_SRC_1 ;
SHR_MSB_SRC_2 ;
MDRL_IN_src ; data bus or Z bus?
MDRH_IN_src ; data bus or Z bus?
MDR_DATA_OUT_SRC_0
MDR_DATA_OUT_SRC_1
ADDR_SEGMENT_SRC_0
ADDR_SEGMENT_SRC_1
ADDR_OFFSET_SRC_0
ADDR_OFFSET_SRC_1
SIDI_IN_SRC ; SI/DI INPUT SRC : ZBUS OR ADDER ?
PMSC_SRC ; ZBUS OR arithmetic operation goes into PC, SP, MAR, C ?
PMSC_SRC_0 ; chooses which register is added with IMM_ADDR constant
PMSC_SRC_1 ;
a_L_wrt
a_H_wrt
b_L_wrt
b_H_wrt
c_L_wrt
c_H_wrt
d_L_wrt
d_H_wrt
CS_L_WRT
CS_H_WRT
DS_L_WRT
DS_H_WRT
SS_L_WRT
SS_H_WRT
ES_L_WRT
ES_H_WRT
SI_L_WRT
SI_H_WRT
DI_L_WRT
DI_H_WRT
spl_wrt
sph_wrt
bpl_wrt
bph_wrt
pcl_wrt
pch_wrt
IR_wrt
INT_DMA_CODE_WRT ; saves the current interrupt code to a flip flop. also saves the DMA_REQ bit to the FF to be used by DMA loop
MASK_FLAGS_WRT
AUX_FLAGS_WRT
tdr_L_wrt
tdr_H_wrt
MAR_L_wrt
MAR_H_wrt
MDRL_L_WRT
MDRL_H_WRT
MDRH_L_wrt
MDRH_H_wrt
immy_0 ; constant from microcode
immy_1
immy_2
immy_3
immy_4
immy_5
immy_6
immy_7
imm_addr_0 ; used for PC, MAR, SP, A, SI, DI
imm_addr_1
imm_addr_2
imm_addr_3
imm_addr_4 ; from -16 to 15
MDR_DATA_OUT ; inverted
RD - inverted
WR - inverted
M_IO