Register Data Transfer System
Complex register-to-register data transfer with multiplexers. Learn data bus operations and register file management.
배울 내용
- Move data between registers using a shared bus.
- Use tri-state buffers to arbitrate which register drives the bus.
- Apply LOAD signals to capture bus data into destination registers.
- Recognize this as the foundational architecture of CPU register files.
- Trace a single-cycle register-to-register transfer step by step.
작동 원리
A register data transfer system demonstrates how multiple registers share a common bus for moving data. This is the core architecture inside every CPU's register file: many registers, one (or a few) bus(es), with arbitration logic to ensure exactly one register drives the bus at any moment.
Key components: - Source register read: Each register has a tri-state output buffer (or MUX channel) gated by a read-enable. Asserting READ on register A drives A's contents onto the bus. - Destination register write: Each register has a load-enable input. Asserting LOAD on register B captures the bus value into B on the next clock edge. - Tri-state arbitration: Only one register's READ should be active at a time, otherwise multiple drivers conflict on the bus.
A single-cycle transfer: 1. Cycle starts; bus is at high-Z. 2. Source register's READ asserts → its data drives the bus. 3. Destination register's LOAD asserts → on the rising clock edge, dst captures the bus. 4. READ and LOAD release; bus returns to high-Z.
This is the micro-architectural foundation of CPU register files: every move instruction (MOV, LD, ST, etc.) ultimately decomposes into reads of source registers, computation, and writes to destination registers — all over shared internal buses.
단계별로 시도해 보세요
위 임베드에서 입력을 설정한 후, 예상 결과를 읽고 직접 확인하세요.
- 1Reg A = 1010 READ_A = 1 LOAD_B = 1 Clock = rising예상:
Reg B = 1010관찰 포인트: Step 1: READ_A asserts → A's contents drive the bus. Step 2: LOAD_B asserts → on clock edge, B captures the bus. After: B = 1010. - 2READ_A = 0 READ_B = 0예상:
Bus = high-Z관찰 포인트: No reads active — bus floats. Real systems have weak pull-ups or pull-downs to default it to a known value. - 3READ_A = 1 READ_B = 1예상:
Bus contention!관찰 포인트: Both registers driving simultaneously → contention. In real silicon this stresses the transistors and produces undefined behaviour. Always ensure exactly one driver is active. - 4Reg B = 0101 READ_B = 1 LOAD_A = 1 Clock = rising예상:
Reg A = 0101관찰 포인트: Reverse direction — read B onto bus, load into A. Same architecture handles transfers in either direction.
사용된 구성 요소
실제 응용 사례
CPU register-file design. Modern CPUs have register files supporting 2–4 reads and 1–2 writes per cycle. Same shared-bus pattern, just wider and faster.
DMA controllers. A DMA engine moves data between memory regions; conceptually it uses register-transfer logic with addresses and counters playing the role of source/dest registers.
Pipeline forwarding paths. When stage N+1 needs data from stage N's output before it's written back, forwarding multiplexers route the value across pipeline stages — a small register-transfer subsystem.
Microcontroller peripheral DMA. Peripherals' control registers move data from receive FIFOs to system RAM via internal buses with this pattern.
Educational simulators (e.g., MIPS). Teaching CPU architecture often starts with a register-transfer demonstration so students see how individual data movements compose into full instruction execution.