Magic‐1 Signal Control and Interconnection Analysis - retrotruestory/M1DEV GitHub Wiki
Magic-1 Signal Control and Interconnection Analysis
Clock Generation and Distribution Network
-
Primary Clock Generation:
- Crystal oscillator (16MHz) feeds into 74LS04 inverter for initial buffering
- Output connects to 74LS93 counter for clock division
- Creates multiple clock phases: CLKA, CLKB, CLKC, and CLKD with precise phase relationships
- CLKA directly drives the microsequencer clock input
- CLKB feeds the memory timing control circuit
- Clock stability maintained by dedicated power filtering (10μF + 0.1μF)
-
Clock Distribution:
- Main clock branch splits through 74F244 buffers to minimize skew
- Critical paths:
- Clock → Am2909 sequencer (pin 11) → microcode EPROM address lines
- Clock → 74LS374 register clock inputs for A-bus, B-bus sources
- Clock → 74LS374 register clock inputs for ALU result latching
- Signal integrity preserved through termination resistors (330Ω)
Control Sequencing Mechanisms
-
Microinstruction Sequencing:
- Am2909 microprogram sequencer (U42) drives address lines A0-A8 of microcode EPROMs
- Four address sources controlled by FE and PUP inputs:
- μPC+1 (sequential execution) when FE=0, PUP=0
- Stack (subroutine return) when FE=1, PUP=0
- Register Y (branch target) when FE=0, PUP=1
- Direct D inputs (instruction dispatch) when FE=1, PUP=1
- Sequencer control inputs derived from:
- Current microinstruction bits 16-19
- Condition test results from 74LS151 (U36)
- Instruction register contents for opcode dispatch
-
Microcode Store Organization:
- 40-bit microinstruction word spans five 27C512 EPROMs (U44-U48)
- Address inputs (A0-A8) connected in parallel to all EPROMs
- Data outputs organized as:
- EPROM1 (U44): bits 0-7 (ALU function, source registers)
- EPROM2 (U45): bits 8-15 (destination registers, memory control)
- EPROM3 (U46): bits 16-23 (sequencer control, condition select)
- EPROM4 (U47): bits 24-31 (bus operations, special flags)
- EPROM5 (U48): bits 32-39 (branch addresses, additional control)
Register and Data Path Connections
-
Register File Implementation:
- Eight 16-bit registers implemented with 74LS374 octal D flip-flops
- Register selection logic:
- Source register select (bits 4-7) drives 74LS138 decoder (U22)
- Destination register select (bits 8-11) drives 74LS138 decoder (U23)
- Register output enables connect to respective 74LS138 outputs
- Register clock inputs connect to system clock through enable gates
-
Bus Structures and Connections:
- A-Bus (First operand path):
- Inputs from register file outputs through 74LS244 buffers
- Selected by microcode bits 4-7 via 74LS138 decoder
- Connected to ALU A inputs
- B-Bus (Second operand path):
- Similar structure to A-bus with independent select
- Connected to ALU B inputs
- C-Bus (Result distribution):
- Driven by ALU output through 74LS244 buffers
- Connects to all register inputs
- Destination selected by microcode bits 8-11
- A-Bus (First operand path):
-
ALU Signal Paths:
- Four 74LS181 ALU chips (U1-U4) cascaded for 16-bit operation
- Control inputs:
- Function select (S0-S3): Direct connection from microcode bits 0-3
- Mode control (M): From microcode bit 28
- Carry-in (Cin): From microcode bit 29 or status register
- Signal propagation:
- Carry output from each 4-bit section connects to carry input of next section
- 74LS182 look-ahead generators (U5-U6) accelerate carry propagation
- Output signals:
- Result bus connects directly to C-bus drivers
- Status outputs (A=B, Cout) connect to condition testing logic
Memory Control Signal Paths
-
Address Generation Logic:
- Memory Address Register (MAR) implemented with two 74LS374 chips
- Address sources:
- PC for instruction fetch
- ALU output for data addressing
- DMA controller during DMA operations
- Address lines connect to:
- Address decoder circuits (74LS138)
- Page translation logic
- Physical address bus drivers (74LS244)
-
Memory Control Signals:
- Read enable (/RD) generated by microcode bit 12
- Write enable (/WR) generated by microcode bit 13
- Memory request (MREQ) generated by microcode bit 14
- Chip select decoding:
- Upper address bits feed into 74LS138 decoders
- Individual chip selects routed to corresponding memory chips
- Wait state generation:
- Memory ready signal sampled by 74LS74 flip-flop
- Clock stretching performed for slow devices
- WAIT signal fed back to microsequencer
-
Page Translation Mechanism:
- Virtual address from MAR split into:
- Page number (upper bits) → Page table lookup circuit
- Offset (lower bits) → Direct connection to physical address
- Page table implemented with:
- 74LS670 register files for page descriptors
- 74LS85 comparators for page number matching
- Protection bits checked against current operation type
- Translation results:
- Physical page number combined with offset
- Exception signal generated for invalid accesses
- Final physical address drives main address bus
- Virtual address from MAR split into:
Condition Testing and Branch Control
-
Status Flag Handling:
- Status register implemented with 74LS174 hex D flip-flops
- Flag sources:
- Zero (Z): NOR of all result bits
- Negative (N): Direct connection from result bit 15
- Carry (C): From final ALU carry output
- Overflow (V): Calculated from input and output MSBs
- Flag updates controlled by microcode bit 30
- Flag outputs routed to condition multiplexer (74LS151)
-
Condition Test Circuit:
- 74LS151 8-input multiplexer selects condition to test:
- Input 0: Always true (1)
- Input 1: Zero flag
- Input 2: Not Zero flag
- Input 3: Carry flag
- Input 4: Not Carry flag
- Input 5: Negative flag
- Input 6: External condition input
- Input 7: Always false (0)
- Selection controlled by microcode bits 20-22
- Output connected to microsequencer condition test input (pin 8)
- Branch taken when condition output is true and microsequencer control enables branching
- 74LS151 8-input multiplexer selects condition to test:
Interrupt Handling Circuitry
-
Interrupt Detection Logic:
- Eight interrupt sources connect to 74LS148 priority encoder
- Interrupt mask register implements selective enabling
- Encoded interrupt number (3 bits) stored in latch when interrupt acknowledged
- INTR signal generated when unmasked interrupts present
-
Interrupt Control Sequence:
- Interrupt request signal connects to microcode condition test multiplexer
- When sampled and acknowledged:
- Current PC saved to stack (microcode-controlled sequence)
- Status register saved to stack
- Interrupt vector calculated from encoded interrupt number
- PC loaded with interrupt handler address
- Interrupt mask updated to prevent re-interruption
- Return from interrupt reverses the process through explicit instructions
I/O Interface Signal Paths
-
UART Interface Connections:
- 16550 UART address lines connect to system address bus A0-A2
- Data lines D0-D7 connect to lower byte of system data bus
- Control signals:
- /RD and /WR from memory control logic
- Chip select from address decoder (specific I/O address range)
- Interrupt output connects to interrupt controller input
- Serial lines connect to RS-232 level shifters (MAX232 chip)
-
IDE Controller Signal Paths:
- Address lines A0-A2 select IDE registers
- Data path through 74LS245 transceivers for isolation
- Control lines:
- /RD and /WR timing from system control signals
- CS0/CS1 from address decoder outputs
- DMA request/acknowledge lines connect to system DMA controller
- IDE interrupt connects to system interrupt controller
This detailed signal analysis demonstrates the intricate interconnections and control mechanisms that enable the Magic-1 to function as a complete, integrated computer system built from discrete TTL components. Each signal path is carefully designed to maintain proper timing relationships and ensure reliable operation across various operating conditions.