Article ID: 000082706 Content Type: Troubleshooting Last Reviewed: 09/11/2012

Why doesn't the Altera SPI-4.2 Atlantic FIFO size parameter indicate actual usable bytes of the FIFO?

Environment

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Description

The number of writable locations in the Altera® SPI-4.2 transmit (Tx) MegaCore® function Atlantic™ FIFO is a reduced value when compared with the value set in Atlantic FIFO Threshold High (FTH) parameter settings. The FTH controls when the aN_atxdav signal is asserted and deasserted for the write side of the FIFO buffer. The aN_atxdav signal indicates when there is room available to write new data into the FIFO buffer, and is asserted whenever the remaining space in the buffer is greater than the FTH value. Therefore, the writable locations of the FIFO or space available in the FIFO (when aN_atxdav is asserted) is given as:

buffer size(bytes) - FTH(bytes)

However, there are four locations of the Atlantic FIFO which are not usable. This means the Atlantic FIFO only starts writing on the fifth location onwards. This impacts the actual writable locations of the FIFO as compared to the FTH value set. For example, the SPI-4.2 transmitter core with the following configuration:

Buffer Size = 1024 bytes

FTH = 672 bytes

Atlantic Interface Width = 128 bits

Data Path Width = 128 bits

Since the Atlantic interface width and data path width are 128 bits, the FTH incremental value (N bytes) will be 32 bytes. In this case, the FIFO has:

1024 / 32 = 32 locations

Converting FTH value of 672 bytes into number of FIFO locations:

FTH / (FTH incremental value) = 672 / 32 = 21

The aN_atxdav signal will be deasserted when the write level of the FIFO reaches the 21st location of the FIFO. The actual FIFO writable location before aN_atxdav signal deassert is:

(32 fifo locations - 4 fifo unusable locations) - 21 FTH locations = 7 locations or 224 bytes

Related Products

This article applies to 1 products

Intel® Programmable Devices