Skip to content

Design review, datapath cards (control-path pass) — 2026-09-21

One card of the 2026-09-21 datapath review: the Index Register card 1.1, findings R1-R3. The other cards, the system-level items S1-S3 and the summary: hardware/reviews/datapath-2026-09-21.md.

Second pass after mechanical-2026-09-21.md (mechanical). Cards: ALU v3.2, Index Register 1.1, Memory v1.3, Mem Switch 1.1, Mem Register 1.0. Method: every select / enable / strobe / clock / reset net was traced pin-to-pin from kicad/<ver>/reports/netlist.net (pin names and types from the Eagle symbols) with chip types from the Eagle .brd, and checked against the way the sequencer microcode actually drives the bus (firmware/microcode/ucode-generator2/), because several hardware choices only work under a microcode convention. Signal polarity: - prefix = active low. Gate delays quoted are LS-TTL typicals from the datasheets in docs/datasheets/.

Severity: HIGH = would stop the card working or damage parts; MED = unreliable / depends on a convention that is not enforced by hardware; LOW = housekeeping or documentation.


Index Register card 1.1 (hardware/cards/register/kicad/v1.1/)

R1 — MED: CD4077 (4000-series CMOS) driven by LS-TTL outputs, and it sits in every bus turn-around path

  • IC34 is a 4077 from the Eagle 40xx library (CD4077B-class, board value 4077N), VDD = 5 V. Its inputs: pin 2 = -RESET (sequencer IC36.6, 74LS04), pin 6 and 13 = -LDSEL (IC32.12/J2, 74LS139), pin 12 = -RDSEL (IC32.4/J1, 74LS139), pin 9 = -HL-SWAP (sequencer IC28.12, 74LS374). Other inputs are GND. No pull-ups on any of them (RN1/RN2 10 k are on ADATA, not here).
  • A CD4077B needs VIH >= 3.5 V at 5 V; an LS output guarantees only 2.7 V (typically 3.4 V unloaded). Outputs: pin 3 = RESET (CLR of all sixteen 74LS192s), pin 4 = BUS-DIR (IC35/36/37 74LS245 DIR), pin 11 = N$42 (XNOR of -RDSEL,-LDSEL: the 245 enable term), pin 10 = N$41 (swap select). CD4077B propagation is ~100 ns typical, 150+ ns max at 5 V, so it is the slowest element between a bus strobe and this card's data drivers.

Failure scenario: a register read/load that works on one card or one chip lot and not another, or a card that clears its registers (RESET output high) when -RESET is only pulled to ~2.5-3 V. Bench: meter on IC34 pins 2, 6, 9, 12, 13 when the corresponding line is inactive; anything under 3.5 V is out of spec for the part. Scope pin 11 against pin 12 for the delay.

R2 — MED: count strobe is a plain OR with the read select, so a change of REG-RD-ID while -REG-UP/-REG-DN is low counts the deselected register

  • Per register (R0 shown; R1 = IC15, R2 = IC25, R3 = IC47 identical): IC1.3 (74LS32) N$17 = -R0-RDSEL OR -REG-UP -> IC3.5 (74LS192 UP); IC1.6 N$18 = -R0-RDSEL OR -REG-DN -> IC3.4 (DN); carries cascade IC3->IC4->IC5->IC6. -R0-RDSEL = IC33.4 (74LS139) from REG-RD-ID0-1, gated by -RDSEL <- J1 <- IC32 (ID2-3) gated by N$19 = IC31.3 = -BUS-EN OR -REG-FUNC-RD.
  • A 74LS192 counts on the rising edge of UP (DN high). N$17 rises when either input rises. If -REG-UP is low and the decoder deselects R0 (ID changes, or -REG-FUNC-RD released first), R0 counts.

The microcode's incrementReg() (main.c:203-214) sets ID + -REG-FUNC-RD + -REG-UP in one line and clears -REG-UP and -REG-FUNC-RD together, which yields exactly one edge — but only if -REG-FUNC-RD was not already active with a different ID in the preceding line; the author's own comment at main.c:202 ("might be an issue if current setRdId reg is different") is this hazard. Bench: bus tester: -BUS-EN low, -REG-FUNC-RD low with ID = R1, -REG-UP low, change ID to R0, release: R1 has incremented.

R3 — LOW: same-card register-to-register moves cannot use -HL-SWAP

With both -RDSEL and -LDSEL active on one card, N$42 = 1 disables IC35/36 and (through IC31.11 = N$42 OR -HL-SWAP) IC37, so the move goes over the internal ADATA bus with no byte-swap path. Cross-card moves swap fine. Microcode only uses -HL-SWAP with memory/TMP transfers today, so this is a constraint, not a fault.

Checked, no issue (register card)

  • Bus direction (the note's open question "should it be based on -RD-SEL"): BUS-DIR = XNOR(GND, -LDSEL) = 1 (DATA->ADATA) only when this card is load-selected, 0 (ADATA->DATA) otherwise; the 245s are enabled (N$1 = N$41 OR N$42 low) only when exactly one of RD/LD is on this card and no swap is requested. All four cases (read here / load elsewhere, load here / read elsewhere, both here, neither) resolve to a single driver. The design as drawn is correct.
  • Swap path: IC37 (DATA0-7 <-> ADATA8-15) enabled only when -HL-SWAP low AND N$42 low; IC35/36 disabled then (N$41 = HL-SWAP). Mutually exclusive.
  • Register load: IC3/IC4 LD = N$16 = -R0-LDSEL OR -REG-LD-LO; IC5/IC6 LD = N$22 = -R0-LDSEL OR -REG-LD-HI. Level-sensitive load; the microcode (register.c:52-60) sets -REG-FUNC-LD + ID one line before the -REG-LD-LO pulse and the source one line before that, and the 245 releases (via R1's slow path) after the LD input has already risen (LS32 from -REG-LD-LO), so data is held through the load window.
  • Address drive: IC38 second half (ID2-3, G = -BUS-EN OR -VMA) -> J3 -> first half (ID0-1) -> one of -R0..R3-ADDRSEL -> IC41/42, IC17/18, IC27/28, IC49/50 (74LS244). One register per bus, one card per J3 setting.
  • Read enables: N$20 = -R0-RDSEL OR -REG-RD-LO -> IC7 (low byte -> ADATA0-7); N$21 with -REG-RD-HI -> IC8. With only one half read, the other ADATA byte is the RN1/RN2 10 k pull-ups ($FF) and is driven onto DATA by the other 245 — a definition, not a conflict.
  • 74LS192 cascade CO->UP, BO->DN, stage n to n+1, ripple over four chips; CLR = RESET active high matches the inverted bus -RESET. Unused CO/BO on IC6/12/22/44 are outputs, fine.
  • Both card-select headers (J1 RD, J2 LD, J3 ADDR) must be set to the same ID2-3 code on a card; the microcode uses the same 4-bit number for all three IDs (main.c:145-164).

Last updated 26 October 2026