Professional Documents
Culture Documents
Design of Asynchronous FIFO
Design of Asynchronous FIFO
Design of Asynchronous FIFO
Abstract— FIFOs are used to transfer data from one FIFOs are primarily of two types:
clock domain to another. Asynchronous FIFOs had
become an important building block for designing Synchronous FIFO
new systems. By using an asynchronous FIFO design
Asynchronous FIFO
with grey pointer and dual flip-flop synchronizers,
we can transmit data safely without any data loss, In synchronous FIFO, a single clock is used for both
while also improving design efficiency. We also write and read operations, and the clock frequency is the
tested for FIFO Empty and FIFO Full conditions. same.
The purpose of this work is to simulate and analyze
an asynchronous FIFO design using Verilog coding
and simulation is done on modelsim. Two independent clocks are required for read and write
pointers in an asynchronous FIFO, and both pointers
must be accessed with two different clock frequencies.
Keywords—FIFO, Asynchronous FIFO, One clock is used to write data into the memory, while
Synchronizer, gray counter, FIFO Full, FIFO another is used to read data from the memory.
Empty Inherently, FIFO designs have the issue of
synchronizing with other clock domain pointer logic
I. INTRODUCTION and safely controlling the read and write operations of
A first-in, first-out data buffer is known as a FIFO. It FIFO memory locations with user logic. The write clock
differs from regular memory in that it does not have domain writes data into the FIFO, whereas the read
external read and write address lines. It's incredibly easy clock domain reads data out of the FIFO.
to use. The drawback is that it can only be read and
written in a specific order, rather than randomly. It is
used to pass data between two different systems with
same clock with different technologies
FIFO Full and Empty Conditions: changing signals on the same clock edge. The first fact
to remember about a Gray code is that the code distance
There are two scenarios to consider. The first is when between any two adjacent words is just 1 (only one bit
the FIFO is full, and the second is when the FIFO is can change from one Gray count to the next). The
empty. It can be seen that the findings in both second fact to remember about a Gray code counter is
circumstances reveal the condition of the control signal. that most useful Gray code counters must have power-
A. under the border condition, when full =1 of-2 counts in the sequence. It is possible to make a
When using FIFO write only (WR), full = 1, read = 1,
Gray code counter that counts an even number of
and empty= 1.
sequences but conversions to and from these sequences
As shown in Fig. 4, the FIFO is full, indicating that the
incoming data is full. As a result, no data will be stored is generally not as simple to do as the standard Gray
in the buffer until the control signal wr en, which is code.
dependent on wr clk, is high.
// judge full
always@(posedge wr_clk) begin
if(wr_rst) full <= 0;
else if( (rd_ptr_grr[$clog2(DATA_DEPTH) - 1 : 0]
== wr_ptr_g[$clog2(DATA_DEPTH) - 1 : 0])
&&(rd_ptr_grr[$clog2(DATA_DEPTH)] !=
wr_ptr_g[$clog2(DATA_DEPTH)] ) ) begin
full <= 1;
end
else full <= 0;
end
Analysis process
write clock cycle Tw = 1000/80 ns = 12.5ns;
similarly, read clock cycle is 20ns;
burst write length is 120 data, and it takes 120*12.5 =
1500ns to write 120 data;
read out within 1500ns Data 1500/20ns = 75;
so the minimum FIFO depth is 120 - 75 = 45;
VI. CONCLUSION
Since the data provided by the write clock domain to the
asynchronous fifo is identical to the data received from
the asynchronous fifo by the read clock domain.
Consequently, the Functionally, asynchronous fifo is
correct. As shown in Figure 1and 2. The application of
Grey coding scheme effectively improves the stability
of circuit. The proper use of level synchronizer greatly
decreases the probability of semi-stable state.
Fig2: Simulation of Asynchronous FIFO Read operation
REFERENCES
[1] Liu, B. Q., Liu, M. Z., Yang, G., Mao, X. B., & Li,
H. L. (2014). Research and Design of
Asynchronous FIFO Based on FPGA. In Applied
Mechanics and Materials (Vol. 644, pp. 3440-
3444). Trans Tech Publications Ltd.
[2] Dadhania Prashant, C. (2013). Designing
asynchronous FIFO. Journal Of Information,
Knowledge and Reseaarch In Electronics and
communication Engineering, 2(2).
[3] Vigneshwaran, K., & Rex, I. G. (2020). Design and
Verification of Asynchronous FIFO. International
Fig3: . Simulation results when FIFO Empty condition Journal of Modern Agriculture, 9(3), 206-210.
[4] Implementation and Verification of Asynchronous
FIFO Under Boundary Condition” P Rajshekhar
Rao Dept. of Avionics Inst. of Science &
Technology, JNTUK Kakinada, India
[5] Kumar, A., Shankar, N. S., & Sharma, N. (2014).
Verification of Asynchronous FIFO using System
Verilog. International Journal of Computer
Applications, 975, 8887.
[6] Cummings, C. E. (2002, March). Simulation and
synthesis techniques for asynchronous FIFO
design. In SNUG 2002 (Synopsys Users Group
Conference, San Jose, CA, 2002) User Papers.
[7] Zhang, X., Wang, J., Wang, Y., Chen, D., & Lai, J.
(2012, October). BRAM-based asynchronous FIFO
Fig:4 . Simulation results when FIFO FULL Condition
in FPGA with optimized cycle latency. In 2012
IEEE 11th International Conference on Solid-State
and Integrated Circuit Technology (pp. 1-3).
IEEE.`
[8] YU, H., & FAN, X. Y. (2007). Research and
Implementation of Asynchronous FIFO Based on
FPGA [J]. Microelectronics & Computer