44. Memory Depth Expansion

Loading simulator…

Two 2×2 memory banks are already provided. Complete the missing connections so the two banks operate as one 4×2 memory.

1. Complete the Bank Write Selection

Address1 selects which memory bank can be written.

Connect:

Address1 → BANK0_WE select pin
Address1 → BANK1_WE select pin

Write_Enable → BANK0_WE in0
Write_Enable → BANK1_WE in1

The opposite inputs of the two MUXes are already connected to logic 0.

Therefore:

BANK0_WE = Write_Enable · Address1’
BANK1_WE = Write_Enable · Address1

So:

Address1 = 0 → Bank 0 can be written
Address1 = 1 → Bank 1 can be written

Only the selected bank receives the active write-enable signal.

2. Connect the Local Word Address

Address0 selects Word 0 or Word 1 inside both banks.

Connect:

Address0 → common local-address line

This supplied line already reaches the select pins of:

B0_W0_LOAD
B0_W1_LOAD
B1_W0_LOAD
B1_W1_LOAD

B0_READ_B1
B0_READ_B0
B1_READ_B1
B1_READ_B0

The resulting write-selection equations are:

B0_W0_LOAD = BANK0_WE · Address0’
B0_W1_LOAD = BANK0_WE · Address0

B1_W0_LOAD = BANK1_WE · Address0’
B1_W1_LOAD = BANK1_WE · Address0

For example, when:

Address1 = 1
Address0 = 0
Write_Enable = 1

then:

BANK1_WE = 1
B1_W0_LOAD = 1
B1_W1_LOAD = 0

so only Bank 1, Word 0 is updated on the next rising clock edge.

3. Storage and Hold Operation

The hold/write circuitry is already complete. Each D flip-flop receives data through a MUX that selects either its current Q value or the corresponding Data_In bit.

For each stored bit:

D = Load’ · Q + Load · Data_In

Therefore:

Load = 0 → keep the previous value
Load = 1 → select Data_In for the next rising edge

This allows one addressed word to be written while the remaining three words retain their stored values.

4. Complete the Final Read Connections

Each bank already produces separate bit-1 and bit-0 read outputs. Connect these local read MUXes to the final output MUXes.

For output bit 1:

B0_READ_B1 out0 → OUT_B1 in0
B1_READ_B1 out0 → OUT_B1 in1

For output bit 0:

B0_READ_B0 out0 → OUT_B0 in0
B1_READ_B0 out0 → OUT_B0 in1

Now OUT_B1 selects between bit 1 from the two banks, while OUT_B0 selects between bit 0 from the two banks.

5. Connect the Final Bank Select

The select pins of OUT_B1 and OUT_B0 are already connected together in the predefined circuit. Connect this common select line to Address1.

Address1 → OUT_B1 select
Address1 → OUT_B0 select

The final read equations become:

Data_Out1 =
Address1’ · Bank0_Out1 +
Address1 · Bank1_Out1

Data_Out0 =
Address1’ · Bank0_Out0 +
Address1 · Bank1_Out0

Therefore:

Address1 = 0 → read Bank 0
Address1 = 1 → read Bank 1

Address0 then selects Word 0 or Word 1 within that bank.

6. Final Address Operation

The completed memory uses the address bits as:

Address1 Address0

00 → Bank 0, Word 0
01 → Bank 0, Word 1
10 → Bank 1, Word 0
11 → Bank 1, Word 1

A write occurs only on the rising edge of Clock when Write_Enable = 1. The read path is combinational, so changing Address1 or Address0 changes the selected Data_Out1:Data_Out0 without requiring another clock edge.