bespoke-silicon-group / basejump_stl

BaseJump STL: A Standard Template Library for SystemVerilog
http://bjump.org/
Other
512 stars 98 forks source link

unlikely but important async fifo gotcha #105

Open taylor-bsg opened 5 years ago

taylor-bsg commented 5 years ago

https://github.com/bespoke-silicon-group/basejump_stl/blob/fa50804e78143c5b16c6d4010f9513083e8ef286/bsg_async/bsg_async_fifo.v#L61

Although the async FIFO ensures that the SRAM is never written in the same place as it currently being read, in a synthesized SRAM, it is theoretically possible that changes resulting from the write can propagate to the output either because the FIFO is empty and a write is being done to where the read is currently pointing or simply because the MUX that is MUXing among register items is glitchy. It is thus theoretically possible, depending on synthesis results, for async writes to cause temporary glitches at inopportune times that violate setup and hold time of the destination flops. A more stable solution would be to add a hardened data gate that prevents data changes from propagating when a read is not being performed.

dpetrisko commented 1 year ago

Fixed by https://github.com/bespoke-silicon-group/basejump_stl/pull/575 ? @taylor-bsg