Podcast
Questions and Answers
What is one of the advantages of a balanced design in microarchitecture?
What is one of the advantages of a balanced design in microarchitecture?
What is a major downside of a multi-cycle design?
What is a major downside of a multi-cycle design?
In a multi-cycle microarchitecture, what defines the behavior of the processor in a specific state?
In a multi-cycle microarchitecture, what defines the behavior of the processor in a specific state?
What implements the 'process instruction' stage in a multi-cycle microarchitecture?
What implements the 'process instruction' stage in a multi-cycle microarchitecture?
Signup and view all the answers
How is the control signal for the next state determined in a multi-cycle system?
How is the control signal for the next state determined in a multi-cycle system?
Signup and view all the answers
What principle allows multiple ALUs to be used effectively in single-cycle machines?
What principle allows multiple ALUs to be used effectively in single-cycle machines?
Signup and view all the answers
What is unique about the stages in a multi-cycle microarchitecture's instruction processing cycle?
What is unique about the stages in a multi-cycle microarchitecture's instruction processing cycle?
Signup and view all the answers
What happens during each clock cycle in a multi-cycle microarchitecture?
What happens during each clock cycle in a multi-cycle microarchitecture?
Signup and view all the answers
What is the primary goal of multi-cycle microarchitecture?
What is the primary goal of multi-cycle microarchitecture?
Signup and view all the answers
How does multi-cycle microarchitecture determine the clock cycle time?
How does multi-cycle microarchitecture determine the clock cycle time?
Signup and view all the answers
In multi-cycle microarchitecture, what does the ISA specify?
In multi-cycle microarchitecture, what does the ISA specify?
Signup and view all the answers
What is meant by 'programmer-visible state' in the context of architectural state (AS)?
What is meant by 'programmer-visible state' in the context of architectural state (AS)?
Signup and view all the answers
What is one of the benefits of multi-cycle design regarding critical path?
What is one of the benefits of multi-cycle design regarding critical path?
Signup and view all the answers
In what way does multi-cycle microarchitecture optimize instruction execution?
In what way does multi-cycle microarchitecture optimize instruction execution?
Signup and view all the answers
What does 'bread and butter' design refer to in the context of multi-cycle microarchitecture?
What does 'bread and butter' design refer to in the context of multi-cycle microarchitecture?
Signup and view all the answers
What is a consequence of having multiple clock cycles for instruction transformation in a multi-cycle microarchitecture?
What is a consequence of having multiple clock cycles for instruction transformation in a multi-cycle microarchitecture?
Signup and view all the answers
What is the purpose of the Control Unit in a single-cycle MIPS processor?
What is the purpose of the Control Unit in a single-cycle MIPS processor?
Signup and view all the answers
Which signal indicates a write operation to memory in a single-cycle MIPS architecture?
Which signal indicates a write operation to memory in a single-cycle MIPS architecture?
Signup and view all the answers
In the single-cycle MIPS architecture, what role does the ALUControl signal play?
In the single-cycle MIPS architecture, what role does the ALUControl signal play?
Signup and view all the answers
How does the processor determine the next instruction address in a single-cycle MIPS processor?
How does the processor determine the next instruction address in a single-cycle MIPS processor?
Signup and view all the answers
Which component is responsible for selecting the source operand B for the ALU?
Which component is responsible for selecting the source operand B for the ALU?
Signup and view all the answers
What is the significance of the PCSrc signal in a single-cycle MIPS processor?
What is the significance of the PCSrc signal in a single-cycle MIPS processor?
Signup and view all the answers
What does the SignImm unit do in a single-cycle MIPS architecture?
What does the SignImm unit do in a single-cycle MIPS architecture?
Signup and view all the answers
Which register is typically used to hold the address of the next instruction to be executed?
Which register is typically used to hold the address of the next instruction to be executed?
Signup and view all the answers
What function does the WriteReg signal serve in the processor's operation?
What function does the WriteReg signal serve in the processor's operation?
Signup and view all the answers
Which of these is a key feature of the single-cycle MIPS processor architecture?
Which of these is a key feature of the single-cycle MIPS processor architecture?
Signup and view all the answers
Study Notes
Introduction to Microarchitecture: Multi-Cycle and Microprogrammed uArch
- Course: Introduction to Computer Architecture
- Lecture: 16th
- Textbook: COD 5th Edition
- Slides developed in part by: Profs. Dohyung Kim @ KNU, Computer architecture course @ KAIST, and SKKU
Multi-Cycle Microarchitecture
- Goal: Each instruction takes (close to) only the time it needs.
- Idea: Determine clock cycle time independently of instruction processing time.
- Each instruction takes as many clock cycles as needed.
- Multiple state transitions per instruction.
- States followed by each instruction are different.
The "Process Instruction" Step
- ISA (Instruction Set Architecture) specifies abstractly what the architectural state (AS') should be, given an instruction and AS.
- AS = Programmer-visible state at the beginning of an instruction
- AS' = Architectural (programmer visible) state at the end of a clock cycle
- Microarchitecture implements how AS is transformed to AS'.
- Many implementation choices exist.
- Programmer-invisible states can optimize instruction execution speed using multiple state transitions per instruction.
- Choice 1: Transform AS to AS' in a single clock cycle
- Choice 2: Transform AS to AS' in multiple clock cycles
Benefits of Multi-Cycle Design
- Critical path design: Reduce critical path independently of worst-case processing time.
- Bread and butter (common case) design: Focus resources on common cases, e.g., improving ADD vs DIV.
- Balanced design: No need for more resources than necessary. Reuse hardware components, e.g., multiple ALUs in a single-cycle machine.
Downsides of Multi-Cycle Design
- Need to store intermediate results at the end of each clock cycle.
- Hardware overhead for registers due to setup/hold overheads paid multiple times for an instruction.
Multi-Cycle Microarchitectures: Key Idea for Realization
- Implement the "process instruction" stage as a finite state machine (FSM) to sequence between states.
- The FSM returns to the "fetch instruction" state.
- States are defined by control signals asserted in that state.
- Control signals for the next state determined by the current state.
- Common states include Fetch, Decode, Evaluate Address, Fetch Operands, Execute, Store Result.
A Basic Multi-Cycle Microarchitecture
- Instruction processing divided into states.
- A stage can take multiple states in the instruction processing cycle.
- Multi-cycle microarchitecture sequences from state to state to process instructions.
- The machine's behavior in a state is entirely determined by control signals.
- Entire processor behavior defined by a finite state machine.
- Control signals in a state control datapath processing and generation of signals for the next clock cycle.
Multi-Cycle Datapath: Instruction Fetch
- STEP 1: Fetch instruction.
- Read instruction from memory location [PC] into instruction register (IR).
Multi-Cycle Datapath: lw Instructions
- STEPs for lw instructions (load word):
- Fetch instruction
- Read register
- Calculate memory address
- Read memory
- Write register
Benefits of Multi-Cycle Design
- Critical Path Design
- Bread and butter (common case) design.
- Balanced design
Multi-Cycle MIPS Processor
- Single-cycle microarchitecture: Cycle time limited by longest instruction (e.g., lw), lower clock frequency, and higher hardware cost.
- Multi-cycle microarchitecture: Higher clock frequency, simpler instructions, reuse hardware, hardware overhead for immediate results, and state transitions overhead
Other Instructions, Multi-cycle Datapath
- Different steps in the multi-cycle datapath for other instructions such as
sw
, (store word),beq
(branch if equal),R-type
instructions, andaddi
Complete Multi-Cycle Processor
- Includes Fetch, Decode, Execute, Memory, Writeback state.
Complete Multi-Cycle Controller FSM
- Includes details for each type of instruction, including Fetch, Decode, Executive, MemWrite, MemRead, and additional phases.
What If Memory Takes > One Cycle?
- Stay in the "memory access" state until memory returns data.
- "Memory Ready?" bit: Input to control logic determining next state.
Review: Single-Cycle MIPS Processor
- Diagram illustrating the single-cycle MIPS processor architecture.
Review: Single-Cycle MIPS Controls
- Combinational logic.
- Truth table showing control signals for various MIPS instructions (e.g. R-type, sw, beq, addi, j).
Review: Multi-Cycle MIPS Processor
- Diagram illustrating the multi-cycle MIPS processor architecture.
Microprogrammed Control Terminology
- Control signals associated with the current state (microinstruction).
- Microsequencing: Transitioning from one state to another by identifying the next state and microinstruction, and microsequencer determines the set of control signals for the next clock cycle.
What Happens in A Clock Cycle?
- Control signals (microinstruction) control datapath processing and generation of control signals for the next cycle.
- Datapath and microsequencer operate concurrently.
- Why not generate control signals for the current cycle? This will lengthen the clock cycle
A Clock Cycle
- Result of the current cycle (latch)
- Control signals needed for the next cycle
- Processing in the datapath for current cycle N
- Generation of control signals for cycle N+1
A Bad Clock Cycle
- Generation of control signals for cycle N (step 1).
- Processing for datapath for cycle N (step 2).
- Step 2 is dependent on step 1.
- If step 1 takes non-zero time, clock cycle is unnecessarily increased.
- Violates Control-Path Design principle.
A Simple Little Computer 3b
- 16 bits instruction, opcode [15:12] - 16 different opcodes.
- Control and datapath diagrams.
What Determines Next-State Control Signals?
- Current clock cycle events determine next-state control signals.
- Control signals from "Control" block are needed.
- Instruction Register (IR) determines the instruction executing: IR[15:12].
- The data path determines if a branch condition is met by the value of data path signal BEN.
- Determines whether a memory operation is still in progress.
The State Machine for Multi-Cycle Processing
- Little Computer 3b uarch determined by the 35 control signals and additional 7 bits from the datapath to the control logic.
- 35 control signals describe the control structure behavior.
- State machine diagram.
An Little Computer 3b State Machine
- Detailed state machine diagram describing the Little Computer 3b state machine.
An Little Computer 3b State Machine (cont'd)
- 30 distinct states in the state machine.
- Example #1: State 18 corresponds to the beginning of the instruction cycle.
- Example #2: States 18 → 33 → 35 during the fetch phase.
- Example #3: State 32 during the decode phase.
Little Computer 3b State Machine
- Questions: How many cycles does the fastest instruction take? How many cycles does the slowest instruction take? What determines the clock cycle time?
Little Computer 3b Datapath
- Diagram of the Little Computer 3b datapath.
Little Computer 3b Datapath (cont'd)
- Single-bus datapath design
- Advantage: Low hardware cost
- Disadvantage: Reduced concurrency
- Control signals
Little Computer 3b Control Signals
- Table of control signals for the Little Computer 3b.
Microprogrammed Control Structure
- Three components: Microinstruction, control store, microsequencer.
- Microinstruction: Control signals that control the datapath, next state.
- Control store: Memory structure storing microinstructions at unique locations.
- Microsequencer: Determines the address of the next microinstruction based on the current microinstruction and conditions.
Control Store
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.