NVIDIA Interview Question: Design an arbiter.... | Glassdoor

Interview Question

ASIC Design Engineer Interview

Design an arbiter.

Answer

Interview Answer

1 Answer

0

Let's say we want to take turns to dequeue from two FIFOs. For the first fifo, the interface is vld0, deq0. For the second FIFO, the interface is vld1, deq1. The code can be like this:

assign deq0 = vld0 & (~sel | ~vld1);
assign deq1 = vld1 & ( sel | ~vld0);

assign next_sel = ( (deq0 & ~sel) | (deq1 & sel) ) ? ~sel : sel;

always_ff @(posedge clk)
  if( ~rst)
    sel <= 1'b0;
  else
    sel <= next_sel;
  end
end

Anonymous on May 29, 2016

Add Answers or Comments

To comment on this, Sign In or Sign Up.