Instruction and inputs

Immediate values support decimal, hex (0x...), and binary (0b...).

Values accept decimal or hexadecimal 32-bit words. For loads, memory word is the value returned by memory; for stores, it is shown as the supplied read value.

add evaluated through the CS Tools single-cycle datapath model.

Path overview

Single-cycle MIPS datapath architecture diagramPC -> Instruction Memory: active (Critical Path). PC (0x00400000) addresses instruction memory.PC -> PC+4 Adder: active. PC routes to the PC + 4 incrementer.PC+4 -> Branch Mux: active. PC + 4 (0x00400004) routes to Branch Mux input 0.PC+4 -> Branch Adder: inactive. PC + 4 supplies base address to branch adder.PC+4 -> MemtoReg Mux (Link): inactive. PC + 4 return address routes to MemtoReg mux for $ra write-back.Opcode -> Control Unit: active. Instruction opcode [31:26] routes to control unit.rs -> Read Register 1: active (Critical Path). Instruction rs field [25:21] selects Read Register 1.rt -> Read Register 2: active. Instruction rt field [20:16] selects Read Register 2.rt/rd -> RegDst Mux: active. Instruction rt [20:16] and rd [15:11] route to RegDst mux.Write Register -> Register File: active. Selected register number (8) routes to Write Register port.Immediate -> Extension Unit: inactive. Immediate field [15:0] routes to extension unit.Extended Immediate -> ALUSrc Mux: inactive. Extended immediate routes to ALUSrc mux input 1.Shifted Immediate -> Branch Adder: inactive. Sign-extended branch offset shifted left 2 routes to branch adder.Read Data 1 -> ALU Input A: active. Read Data 1 routes to ALU input A.Read Data 1 (rs) -> Jump Mux (jr): inactive. Register rs value routes directly to Jump Mux as destination address for jr.Read Data 2 -> ALUSrc Mux: active (Critical Path). Read Data 2 routes to ALUSrc mux input 0.Read Data 2 -> Data Memory Write Data: inactive. Data memory write port unused.ALUSrc Mux -> ALU Input B: active (Critical Path). Selected second operand routes to ALU input B.ALU Result -> Data Memory Address: inactive. Data memory address bus inactive.ALU Result -> MemtoReg Mux (Bypass): active (Critical Path). ALU result routes directly to MemtoReg mux (bypassing data memory).ALU Zero -> Branch AND: inactive. ALU Zero flag routes to branch decision logic.Branch Target -> Branch Mux: inactive. Branch target address routes to Branch Mux input 1.Branch Decision -> Branch Mux Select: inactive. Branch decision signal controls Branch Mux selection.Branch Mux Output -> Jump Mux: active. Branch mux output routes to Jump Mux input 0.Target [25:0] -> Jump Logic: inactive. Instruction target field [25:0] routes to jump target generator.Jump Target -> Jump Mux: inactive. Concatenated jump target routes to Jump Mux input 1.Selected Next PC -> PC: active. Final next PC value feeds back to update the PC register.Memory Read Data -> MemtoReg Mux: inactive. Memory read data bus inactive.Write Data -> Register File: active. Selected write data routes to register file Write Data port.Syscall Trap -> Runtime Console: inactive. Syscall trap inactive.Program Counter: active (Critical Path). Current instruction address 0x00400000.PCregisterPC+4 Adder: active. Calculates sequential next PC (0x00400004).PC+4adderInstruction Memory: active (Critical Path). Fetches the 32-bit instruction word from instruction memory.InstrmemoryControl Unit: active. Decodes opcode to assert single-cycle control signals.ControlunitRegister File: active (Critical Path). Reads operand registers and writes result to destination register.Registersread/writeRegDst Multiplexer: active. RegDst = 1: selects destination register rd ([15:11]).MuxRegDstExtension Unit: inactive. Extension unit inactive for R-type, jump, or syscall.Extendsign/zeroALUSrc Multiplexer: active (Critical Path). ALUSrc = 0: selects register Read Data 2 as second ALU operand.MuxALUSrcArithmetic Logic Unit: active (Critical Path). Computes arithmetic or logical operation per ALUOp and function code.ALUexecutionBranch Adder: inactive. Branch adder inactive.BranchadderBranch Decision Gate: inactive. Branch decision logic inactive.ANDbranchBranch Multiplexer: active. Selects sequential next instruction address (PC + 4).MuxBranchJump Target Logic: inactive. Jump target logic inactive.JumptargetJump Multiplexer: active. Passes branch multiplexer output to Next PC.MuxJumpData Memory: inactive. Data memory is bypassed and not accessed.Data Memread/writeMemtoReg Multiplexer: active (Critical Path). MemtoReg = 0: selects ALU result for write-back (memory bypassed).MuxMemToRegSyscall Extension Unit: inactive. Syscall extension unit inactive.SyscallruntimeInstruction-specific active datapath · select or hover nodes and paths to synchronize

The highlighted route is paired with exact values and controls below. Reduced-motion settings do not hide information.

Critical Path & Timing Analysis

Single-cycle execution clock period is governed by the longest combinational path between sequential registers.

Min Clock Period
670 ps
Single-cycle minimum period
Max Clock Frequency
1492.54 MHz
(1.493 GHz)
Critical Endpoint
Register file synchronous write setup
Arrival: 670 ps
Bottleneck Component
Instruction Memory
Highest delay on critical path

Delay Profile Configuration

Adjust component delays in picoseconds (1 – 100,000 ps) to observe how technology parameters affect the critical path.

ps
ps
ps
ps
ps
ps
ps
ps
ps
ps
ps
ps

Critical Path Component Sequence

Sequential component delays along the critical path
Stage / NodeUnit DelayCumulative ArrivalPredecessorTiming Status
Program Counterpc0 ps0 ps—Critical
Instruction Memoryimem250 ps250 pspcCritical
Register Filereg_file150 ps400 psimemCritical
ALUSrc Multiplexeralu_src_mux25 ps425 psreg_fileCritical
Arithmetic Logic Unitalu200 ps625 psalu_src_muxCritical
MemtoReg Multiplexermem_to_reg_mux25 ps650 psaluCritical
Endpoint: Register file synchronous write setup20 ps670 psmem_to_reg_muxEndpoint

Datapath Graph Elements

17 components · 30 routes

Functional units, multiplexers, and interconnecting directed buses. Select or hover any component or route to synchronize highlights with the architecture diagram.

Control vector

Single-cycle control vector values
RegDstALUSrcMemtoRegRegWriteMemReadMemWriteBranchJumpLinkALUOp
10010000010

0 means inactive, 1 means asserted, X means don’t-care for this instruction, and ? means the classic datapath model does not define the signal.

Signal and value table

Computed datapath signals and intermediate values
SignalValueExplanation
PC0x00400000 (4194304)Address of the instruction being evaluated.
Instruction word0x012A4020Fetched 32-bit machine word.
Read register 10x00000009 (9)Register number selected by the rs field.
Read data 10x00000007 (7)Value supplied by the first register-file read port.
Read register 20x0000000A (10)Register number selected by the rt field.
Read data 20x00000005 (5)Value supplied by the second register-file read port.
Immediate extension0x00004020 (16416)The 16-bit immediate is sign-extended.
ALU input A0x00000007 (7)The first ALU operand comes from read data 1.
ALU input B0x00000005 (5)The ALUSrc mux selects read data 2.
ALU result0x0000000C (12)Result produced by the selected ALU operation.
Register write target0x00000008 (8)Destination selected by the RegDst mux.
Register write data0x0000000C (12)MemToReg selects the ALU result.
Next PC0x00400004 (4194308)No branch or jump is active.