Skip to content

Commit 2371d34

Browse files
committed
cla not3+not4 are actually nand3+nand4 lol
1 parent 226b949 commit 2371d34

7 files changed

Lines changed: 26 additions & 30 deletions

File tree

149 Bytes
Loading

T84C/imgstore/regblock_modules.jpg

248 Bytes
Loading
Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
module cla ( co, ci, xo, to_idu_carry1, to_idu_carry2, idu_carry_out);
1+
// Toshiba Z80 MPU (CMOS)
2+
// Внешнее вычисление переноса (Carry Lookahead, CLA) для Increment/Decrement Unit-а (IDU).
23

3-
output wire [15:0] co;
4-
input wire [15:0] ci;
5-
input wire [15:0] xo;
6-
input wire to_idu_carry1;
7-
input wire to_idu_carry2;
8-
output wire idu_carry_out;
4+
module idu_cla ( co, ci, xo, to_idu_carry1, to_idu_carry2, idu_carry_out);
5+
6+
output wire [15:0] co; // Результат вычисления CLA для IDU_FF XNOR
7+
input wire [15:0] ci; // Выход значения входного IDU FF в CLA
8+
input wire [15:0] xo; // Выход с правого XOR в CLA; xo[15] не подключен (не используется).
9+
input wire to_idu_carry1; // Пока хз (режим работы?)
10+
input wire to_idu_carry2; // Пока хз (режим работы?)
11+
output wire idu_carry_out; // IDU Carry Out
912

1013
// Wires
1114

@@ -140,8 +143,8 @@ module cla ( co, ci, xo, to_idu_carry1, to_idu_carry2, idu_carry_out);
140143
cla_nand3 g6 (.c(w48), .b(w22), .a(w60), .x(w21) );
141144
cla_nand3 g7 (.a(w22), .b(w67), .c(w48), .x(w61) );
142145
cla_nand g8 (.b(w48), .a(w67), .x(w59) );
143-
cla_not3 g9 (.c(w47), .b(w68), .a(w37), .x(w66) );
144-
cla_not4 g10 (.a(w63), .b(w62), .c(w64), .d(w65), .x(w23) );
146+
cla_nand3 g9 (.c(w47), .b(w68), .a(w37), .x(w66) );
147+
cla_nand4 g10 (.a(w63), .b(w62), .c(w64), .d(w65), .x(w23) );
145148
cla_nand g11 (.a(w37), .b(w68), .x(w69) );
146149
cla_nor3 g12 (.a(w45), .b(w3), .c(w36), .x(w37) );
147150
cla_nand3 g13 (.a(w11), .b(w16), .c(w43), .x(w39) );
@@ -168,7 +171,7 @@ module cla ( co, ci, xo, to_idu_carry1, to_idu_carry2, idu_carry_out);
168171
cla_not g34 (.a(w66), .x(w67) );
169172
cla_not g35 (.a(w19), .x(w20) );
170173
cla_not g36 (.a(w55), .x(w17) );
171-
endmodule // cla
174+
endmodule // idu_cla
172175

173176
// Module Definitions [It is possible to wrap here on your primitives]
174177

@@ -180,6 +183,8 @@ module cla_nand4 ( a, b, c, d, x);
180183
input wire d;
181184
output wire x;
182185

186+
assign x = ~(a&b&c&d);
187+
183188
endmodule // cla_nand4
184189

185190
module cla_nand3 ( c, b, a, x);
@@ -189,6 +194,8 @@ module cla_nand3 ( c, b, a, x);
189194
input wire a;
190195
output wire x;
191196

197+
assign x = ~(a&b&c);
198+
192199
endmodule // cla_nand3
193200

194201
module cla_nand ( a, b, x);
@@ -197,6 +204,8 @@ module cla_nand ( a, b, x);
197204
input wire b;
198205
output wire x;
199206

207+
assign x = ~(a&b);
208+
200209
endmodule // cla_nand
201210

202211
module cla_nor ( a, b, x);
@@ -205,26 +214,9 @@ module cla_nor ( a, b, x);
205214
input wire b;
206215
output wire x;
207216

208-
endmodule // cla_nor
209-
210-
module cla_not3 ( c, b, a, x);
211-
212-
input wire c;
213-
input wire b;
214-
input wire a;
215-
output wire x;
216-
217-
endmodule // cla_not3
218-
219-
module cla_not4 ( a, b, c, d, x);
217+
assign x= ~(a|b);
220218

221-
input wire a;
222-
input wire b;
223-
input wire c;
224-
input wire d;
225-
output wire x;
226-
227-
endmodule // cla_not4
219+
endmodule // cla_nor
228220

229221
module cla_nor3 ( a, b, c, x);
230222

@@ -233,12 +225,16 @@ module cla_nor3 ( a, b, c, x);
233225
input wire c;
234226
output wire x;
235227

228+
assign x = ~(a|b|c);
229+
236230
endmodule // cla_nor3
237231

238232
module cla_not ( a, x);
239233

240234
input wire a;
241235
output wire x;
242236

237+
assign x = ~a;
238+
243239
endmodule // cla_not
244240

T84C/netlist/idu_cla.xmlz

19.8 KB
Binary file not shown.

T84C/netlist/idu_cla_netlist.png

1.19 KB
Loading

T84C/netlist/regblock_cla.xmlz

-19.3 KB
Binary file not shown.

T84C/regblock.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
![regblock_cells_tran](imgstore/regblock_cells_tran.jpg)
4545

46-
В состав входит нецифровая ячейка, которая растягивает нижний уровень входного CLK и инвертирует фронт:
46+
В состав входит нецифровая ячейка, которая растягивает нижний уровень входного CLK и инвертирует фронт (используется для формирования сигнала `n_pch_bl`):
4747

4848
![regblock_duty_extend_tran](imgstore/regblock_duty_extend_tran.jpg)
4949

0 commit comments

Comments
 (0)