r/chipdesign • u/smilodon1 • 4h ago
Full ready/valid FIFO: accept a write on the same cycle as a read?
I’m preparing for design interview and saw a synchronous FIFO coding problem and want a sanity check on the full-boundary behavior.
(original problem: ASIC.FYI Q892 )
My implementation is:
assign rd_valid = !empty;
wire pop = rd_valid && rd_ready;
assign wr_ready = !full || pop;
wire push = wr_valid && wr_ready;
——
If the FIFO is full and a read is accepted, this also allows a new write on the same edge. Occupancy stays full and there’s no bubble.
The downside is that wr_ready now has a combinational dependency on downstream rd_ready. The simpler alternative is probably assign wr_ready = !full;
That removes the path, but the replacement write isn’t accepted until the following cycle.
If a spec only says “implement a synchronous ready/valid FIFO,” which behavior would you normally assume? Is the full-boundary exchange part of expected FIFO behavior, or just a throughput optimization that needs to be stated explicitly?