Hello Group,
I could use some advice on hooking up asynchonous FIFO16s to an SRAM interface. Specifically I have two FIFOs on different clocks feeding the address lines of the SRAM, on a third clock. A control circuit looks at the two EMPTY flags to determine which fifo output should be muxed onto the address lines.
Starting with empty FIFOs and looking at the result of writing an address into one of the fifo I get the events as follows:
1) Write address into fifo 2) After a few RDCLKs the EMPTY flag will sync and drop 3) At the next RDCLK, the logic sets an enable FLAG indicating which fifo it picked, and that FLAG signal goes to the fifo RD_EN 4) At the next RDCLK, the address is muxed to the address and the SRAM WR is made active. Since the RD_EN signal was on at last clock, the EMPTY flag goes high now. 5) Two clocks RDCLK later data is muxed out to the DATA bus. This is a No Bus Delay Latency SRAM.My issue is that the EMPTY flag is active low for two clock cycles and this is ambiguous. Does it mean that there are two data in the FIFO or just one? I have been thinking about running the FLAG as combinatorial logic without a clock since both EMPTY signals are synched to the RDCLK. But this doesn't seem right. Any advice would be appreciated.
Thanks,
Brad Smallridge Ai Vision