Skip to content
BetterDL

Read port

Also called: register file read port, read address, read ports, output port

A register file's output path: a read address selects one register, and its value appears on the port's n data outputs through multiplexers.

A read port lets you look at one register in a register file. You give it a read address; it outputs that register's n bits.

How it is built: for each of the n output bits, one k:1 multiplexer picks that bit from whichever register the address selects. So one read port is n MUXes of size k:1, each with log₂ k select lines driven by the read address.

Key properties:

  • Reading is combinational: no clock is needed. Change the address and, after a short delay, the output shows the new register.
  • Reading never changes the stored values.
  • Ports are independent. Most register files have two read ports, so an instruction can fetch two operands, such as R2 and R3 for R1 ← R2 + R3, in the same cycle. Each port needs its own full set of MUXes.

Because registers only change at a clock edge, a read port that is reading a register being written in the same cycle shows the old value until the edge. See read during write.

The matching input path is the write port.

Worked example

Example

Counting MUXes

A register file has 32 registers of 8 bits and three read ports, built from 1-bit 32:1 MUXes. How many MUXes, and how many select lines each?

  1. 1.

    One port needs one 32:1 MUX per output bit: 8 MUXes.

  2. 2.

    Three ports: 3 × 8 = 24 MUXes.

  3. 3.

    Each 32:1 MUX has log₂ 32 = 5 select lines, driven by that port's read address.

Common mistakes

  • Thinking a read needs a clock edge. A read port is combinational.

  • Sharing one set of MUXes between two read ports. Each port must select independently.

Practice Read port

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Read port is taught in Registers and Basic CPU / Computer Architecture.