45. Register Bank with Separate Read/Write Ports

Loading simulator…

The storage cells, feedback paths, Data_In distribution, and Clock wiring are already complete. The missing connections complete two independent access paths: a synchronous write port and a combinational read port.

1. Complete the Write Selection

Connect the three write-control inputs to their existing common lines:

Write_Enable   → common write-enable line
Write_Address1 → common write-pair select line
Write_Address0 → common register-select line

The predefined wiring distributes these signals to the write-decoder MUXes. Complete the four pair-enable connections:

LOW_PAIR_WE out0  → REG0_LOAD in0
LOW_PAIR_WE out0  → REG1_LOAD in1
HIGH_PAIR_WE out0 → REG2_LOAD in0
HIGH_PAIR_WE out0 → REG3_LOAD in1

This produces:

REG0_LOAD = Write_Enable · Write_Address1’ · Write_Address0’
REG1_LOAD = Write_Enable · Write_Address1’ · Write_Address0
REG2_LOAD = Write_Enable · Write_Address1  · Write_Address0’
REG3_LOAD = Write_Enable · Write_Address1  · Write_Address0

Only the selected register loads Data_In1:Data_In0 on the rising edge; all other registers hold through their supplied feedback MUXes.

2. Complete the Read Selection

Connect:

Read_Address0 → common first-stage read-select line

The line already reaches READ01_B1, READ01_B0, READ23_B1, and READ23_B0.

Then complete the four data connections:

READ01_B1 out0 → OUT_B1 in0
READ23_B1 out0 → OUT_B1 in1
READ01_B0 out0 → OUT_B0 in0
READ23_B0 out0 → OUT_B0 in1

Finally connect:

Read_Address1 → common final read-select line

The completed read mapping is:

00 → Register 0
01 → Register 1
10 → Register 2
11 → Register 3

3. Independent Read and Write Behavior

Write_Address1:Write_Address0 selects which register may update on the rising edge, while Read_Address1:Read_Address0 independently selects which register appears at Data_Out1:Data_Out0.

When both addresses are the same, the output shows the old stored value before the rising edge and the new stored value after the edge settles. With Write_Enable = 0, every register holds its previous value.