47. Four-Bank Conflict Arbiter

Loading simulator…

Complete the template by building the bank comparator first, then the conflict logic, and finally the two grant paths.

1. Build the 2-bit Bank Comparator

Each requester provides a 2-bit bank address:

Bank0[1:0] = {Bank0_1, Bank0_0}
Bank1[1:0] = {Bank1_1, Bank1_0}

Compare the corresponding address bits with two XOR gates:

BANK_MSB_DIFF = Bank0_1 ⊕ Bank1_1
BANK_LSB_DIFF = Bank0_0 ⊕ Bank1_0

An XOR output is 1 when that pair of bank bits is different.

Connect both XOR outputs to the ANY_BANK_DIFF OR gate:

ANY_BANK_DIFF = BANK_MSB_DIFF + BANK_LSB_DIFF

Therefore, ANY_BANK_DIFF=1 if either bank-address bit differs.

The arbiter needs the opposite condition, so connect ANY_BANK_DIFF and the supplied CONST_1 to the SAME_BANK XOR gate:

SAME_BANK = ANY_BANK_DIFF ⊕ 1

This produces:

SAME_BANK = 1  → both requesters selected the same bank
SAME_BANK = 0  → the requesters selected different banks

2. Detect Simultaneous Requests

Connect Request0 and Request1 to the BOTH_REQUESTS AND gate:

BOTH_REQUESTS = Request0 · Request1

BOTH_REQUESTS becomes 1 only when both requesters are active at the same time.

3. Generate the Conflict Signal

Connect BOTH_REQUESTS and SAME_BANK to the CONFLICT_LOGIC AND gate:

Conflict = BOTH_REQUESTS · SAME_BANK

A conflict is therefore generated only when both conditions are true:

  • both requesters are active;
  • both requesters selected the same bank.

If the two active requests select different banks, SAME_BANK=0, so Conflict=0 and both requests may proceed.

4. Connect the Requester 0 Grant

Requester 0 has fixed priority, so connect Request0 directly to Grant0:

Grant0 = Request0

This is valid because requester 0 is always granted whenever it is active, including during a same-bank conflict.

5. Build the Requester 1 Blocking Logic

Requester 1 must be blocked only when Conflict=1.

First invert Conflict using the NO_CONFLICT XOR gate and CONST_1:

NO_CONFLICT = Conflict ⊕ 1

Then connect Request1 and NO_CONFLICT to the GRANT1_LOGIC AND gate:

Grant1 = Request1 · NO_CONFLICT

So:

Conflict = 0 → an active Request1 is granted
Conflict = 1 → Grant1 is forced to 0

The completed circuit therefore allows both requests to proceed when they target different banks, but when both target the same bank, Conflict is asserted and requester 0 receives the grant.