SRAM and FIFO Memories in Actel’s Low-Power Flash Devices
v1.1 6-15
FIFO Usage
ESTOP and FSTOP Usage
The ESTOP pin is used to stop the read counter from counting any further once the FIFO is empty
(i.e., the EMPTY flag goes HIGH). Likewise, the FSTOP pin is used to stop the write counter from
counting any further once the FIFO is full (i.e., the FULL flag goes HIGH).
The FIFO counters in the IGLOOe and ProASIC3E device start the count at zero, reach the maximum
depth for the configuration (e.g., 511 for a 512×9 configuration), and then restart at zero. An
example application for ESTOP, where the read counter keeps counting, would be writing to the
FIFO once and reading the same content over and over without doing another write.
FIFO Flag Usage Considerations
The AEVAL and AFVAL pins are used to specify the 12-bit AEMPTY and AFULL threshold values. The
FIFO contains separate 12-bit write address (WADDR) and read address (RADDR) counters. WADDR
is incremented every time a write operation is performed, and RADDR is incremented every time a
read operation is performed. Whenever the difference between WADDR and RADDR is greater
than or equal to AFVAL, the AFULL output is asserted. Likewise, whenever the difference between
WADDR and RADDR is less than or equal to AEVAL, the AEMPTY output is asserted. To handle
different read and write aspect ratios, AFVAL and AEVAL are expressed in terms of total data bits
instead of total data words. When users specify AFVAL and AEVAL in terms of read or write words,
the SmartGen tool translates them into bit addresses and configures these signals automatically.
SmartGen configures the AFULL flag to assert when the write address exceeds the read address by
at least a predefined value. In a 2k×8 FIFO, for example, a value of 1,500 for AFVAL means that the
AFULL flag will be asserted after a write when the difference between the write address and the
read address reaches 1,500 (there have been at least 1,500 more writes than reads). It will stay
asserted until the difference between the write and read addresses drops below 1,500.
The AEMPTY flag is asserted when the difference between the write address and the read address
is less than a predefined value. In the example above, a value of 200 for AEVAL means that the
AEMPTY flag will be asserted when a read causes the difference between the write address and the
read address to drop to 200. It will stay asserted until that difference rises above 200. Note that the
FIFO can be configured with different read and write widths; in this case, the AFVAL setting is
based on the number of write data entries, and the AEVAL setting is based on the number of read
data entries. For aspect ratios of 512×9 and 256×18, only 4,096 bits can be addressed by the 12 bits
of AFVAL and AEVAL. The number of words must be multiplied by 8 and 16 instead of 9 and 18.
The SmartGen tool automatically uses the proper values. To avoid halfwords being written or read,
which could happen if different read and write aspect ratios were specified, the FIFO will assert
FULL or EMPTY as soon as at least one word cannot be written or read. For example, if a two-bit
word is written and a four-bit word is being read, the FIFO will remain in the empty state when the
first word is written. This occurs even if the FIFO is not completely empty, because in this case, a
complete word cannot be read. The same is applicable in the full state. If a four-bit word is written
and a two-bit word is read, the FIFO is full and one word is read. The FULL flag will remain asserted
because a complete word cannot be written at this point.
Variable Aspect Ratio and Cascading
Variable aspect ratio and cascading allow users to configure the memory in the width and depth
required. The memory block can be configured as a FIFO by combining the basic memory block
with dedicated FIFO controller logic. The FIFO macro is named FIFO4KX18. Low-power flash device
RAM can be configured as 1, 2, 4, 9, or 18 bits wide. By cascading the memory blocks, any multiple
of those widths can be created. The RAM blocks can be from 256 to 4,096 bits deep, depending on
the aspect ratio, and the blocks can also be cascaded to create deeper areas. Refer to the aspect
ratios available for each macro cell in the "SRAM Features" section on page 6-7. The largest
continuous configurable memory area is equal to half the total memory available on the device,
because the RAM is separated into two groups, one on each side of the device.
The Actel SmartGen core generator will automatically configure and cascade both RAM and FIFO
blocks. Cascading is accomplished using dedicated memory logic and does not consume user gates
for depths up to 4,096 bits deep and widths up to 18, depending on the configuration. Deeper
memory will utilize some user gates to multiplex the outputs.