Skip to question
asic.fyi
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
asic.fyi/Interview questions/Schedule bank commands with accepted-slot cooldown

Hardware interview practice

Schedule bank commands with accepted-slot cooldown

MediumRTL DesignSystemVerilog

Buffer a frame of commands for four banks, then reorder across banks so repeated commands to one bank have at least C intervening accepted slots. Emit accepted idle tokens only when no pending bank is eligible.

Try it in the question bankReason first. Then compare.

Keep this exact question selected while you check your answer and review the full solution.

Practice this question →
Reviewed example

Work through one case

Input
C=1; framed commands in arrival order: bank0=A, bank0=B, bank1=C
Expected output
accepted slots: bank0 A, bank1 C, bank0 B

Bank 0 initially has the largest queue; after A, one accepted command from bank 1 supplies the required intervening cooldown slot before B.

What to cover

Requirements

  1. Buffer 1 through 16 commands and capture C in the range 0 through 3 with the first command.
  2. Preserve arrival order within each bank while allowing reordering across banks.
  3. Choose the eligible bank with the largest pending count and break ties by lower bank ID.
  4. Advance cooldown, FIFO heads, and pending counts only when slot_valid and slot_ready are both high.
  5. Count accepted idle tokens as intervening slots and hold the selected token stable during backpressure.
asic.fyi · Learn silicon end to end.info@asic.fyi