Programmable Flags - 1.0 English

Embedded FIFO Generator LogiCORE IP Product Guide (PG327)

Document ID
PG327
Release Date
2023-05-10
Version
1.0 English
The FIFO supports programmable flags to indicate that the FIFO has reached a user-defined fill level.
  • Programmable full (prog_full) indicates that the FIFO has reached a user-defined full threshold.
  • Programmable empty (prog_empty) indicates that the FIFO has reached a user-defined empty threshold.

For these thresholds, you can set a constant value or choose to have dedicated input ports, enabling the thresholds to change dynamically in circuit. Hysteresis is also optionally supported, by providing unique assert and negate values for each flag. Detailed information about these options are provided below.

Programmable Full

The Embedded FIFO Generator core supports the programmable full threshold. The programmable full flag (prog_full) is asserted when the number of entries in the FIFO is greater than or equal to the user-defined threshold. When the programmable full flag is asserted, the FIFO can continue to be written to until the full flag (full) is asserted. If the number of words in the FIFO is less than the threshold, the flag is deasserted.
Note: If a write operation occurs on a rising clock edge that causes the number of words to meet or exceed the programmable full threshold, then the programmable full flag will assert on the next rising clock edge. The deassertion of the programmable full flag has a longer delay, and depends on the relationship between the write and read clocks.
Note: See the Vivado IDE screen for valid ranges for threshold.

The following figure shows the programmable full flag. You can write the FIFO until there are seven words in the FIFO. Because the programmable full threshold is set to seven, the FIFO asserts prog_full after seven words are written into the FIFO.

Figure 1. Programmable Full Threshold: Threshold Set to 7

Programmable Full Threshold Range Restrictions

The programmable full threshold ranges depend on several features that dictate the way the FIFO is implemented, and include the following features:

  • FIFO Implementation Type (Common or Independent Clock FIFOs)
  • Symmetric or Non-symmetric Port Aspect Ratio
  • Read Mode (Standard or First-Word-Fall-Through)
The Vivado IDE automatically parameterizes the threshold ranges based on these features, allowing you to choose only within the valid ranges.
Note: Refer to the Vivado IDE for valid ranges for each threshold. To avoid unexpected behavior, it is not recommended to give out-of-range threshold values.

Programmable Empty

The Embedded FIFO Generator core supports the programmable empty threshold. The programmable empty flag (prog_empty) is asserted when the number of entries in the FIFO is less than or equal to the user-defined threshold. If the number of words in the FIFO is greater than the threshold, the flag is deasserted.
Note: If a read operation occurs on a rising clock edge that causes the number of words in the FIFO to be equal to or less than the programmable empty threshold, then the programmable empty flag will assert on the next rising clock edge. The deassertion of the programmable empty flag has a longer delay, and depends on the read and write clocks.
Note: See the Vivado IDE for valid ranges for each threshold.

The following figure shows the programmable empty flag. You can write to the FIFO until there are five words in the FIFO. Because the programmable empty threshold is set to four, prog_empty is asserted until more than four words are present in the FIFO. After five words (or more) are present in the FIFO, prog_empty is deasserted.

Figure 2. Programmable Empty Threshold: Threshold Set to 4

Programmable Empty Threshold Range Restrictions

The programmable empty threshold ranges depend on several features that dictate the way the FIFO is implemented, described as follows:
  • FIFO Implementation Type (Common or Independent Clock FIFOs)
  • Symmetric or Non-symmetric Port Aspect Ratio
  • Read Mode (Standard or First-Word-Fall-Through)
The Vivado IDE automatically parameterizes the threshold ranges based on these features, allowing you to choose only within the valid ranges.
Note: Refer to the Vivado IDE for valid ranges for threshold. To avoid unexpected behavior, do not use out-of-range threshold values.