Fifofum: FIFO generator © Copyright 2007 Adrian Lewis | ![]() |
  |
---|
| Fifofum Home PageFifofum is a GUI-based tool for building FIFOs in Verilog HDL. Fifofum can generate FIFOs that store entries in either flip-flops, single-port memories, or dual-port memories. All FIFOs use a standard interface and protocol regardless of the storage type. Fifofum can also generate asynchronous FIFOs for sending data between two clock domains.Features
DownloadFifofum is included in the Prepro release.Why use Fifofum?Most ASIC design groups develop a library of modules that perform common and useful tasks; FIFOs and arbiters are obvious examples. This approach is much more efficient than having each designer create and test their own implementation. However, there are lots of possible FIFO types and options, and building a design library is not the primary goal of an ASIC development group. Fifofum can generate lots of different FIFO configurations with plenty of options, so why develop your own library?The choice of storage medium for FIFO entries depends on the FIFO size and access requirements. For FIFOs containing less than 1k bits, a flip-flop implementation is usually more efficient than a memory-based implementation; using a single-port memory rather than a dual-port memory saves area but halves the bandwidth available for data transfers. As design constraints often change during or after the initial design phase, having a consistant interface regardless of storage type is highly desirable; the FIFO size and type can be changed without having to change the logic that interfaces to the FIFO. Fifofum generates FIFOs that use a standard interface, which makes migrating between storage implementations transparent to the surrounding logic, aside from changes in timing characteristics. Fifofum FIFOs also support lots of cool features - quite literally in the case of the low-power option. There are also lots of optional extras, but as the FIFOs are fully configurable, you only get the options you need. FIFO specificationsStandard Interface
Both the read and write interfaces to Fifofum FIFOs are based on the same standard interface using the same protocol.
The source An important characteristic of this protocol is that FIFOs using this protocol may be connected in series without any additional glue logic. User logic using this protocol may also be connected in series to FIFOs or other similar logic. Optional outputsRegardless of FIFO type, a FIFO may be configured to include four optional outputs:wr_full, wr_space, rd_empty, rd_count ; which indicate the current state of the FIFO.
wr_full is the inverse of wr_ready , neither is it always true that rd_empty is the inverse of rd_valid .
Synchronous flip-flop based FIFOs
Fifofum generates flip-flop based FIFOs of any bit width and any depth.
In general it is not possible to write to the FIFO when it is full, even if the FIFO is being read on the same cycle.
For one-entry-deep FIFOs, it is possible to write when the FIFO is full provided that the FIFO is also being read; note that this feature creates a timing path between FIFO entries are stored in arrays of flip-flops, either a simple Verilog memory or, in the low power configuration, an array of flop-flops per-FIFO-entry. Details of the low-power implementation are documented below. Synchronous dual-port memory-based FIFOs
Fifofum generates dual-port memory-based FIFOs of any bit width and any depth. For mid-sized FIFOs, a FIFO based on a dual-port memory is more area efficient than a FIFO based on flip-flips, though it is important to take into account routing area to the memory and memory-BIST logic. These FIFOs provide two additional interfaces for connection to the read and write ports of a user-provided dual-port memory. The write port interface contains three signals:
Synchronous single-port memory-based FIFOs
Fifofum generates single-port memory-based FIFOs of any bit width and any depth.
For large FIFOs, a FIFO based on a single-port memory is more area efficient than a FIFO based on a dual-port memory, though it is important to understand the performance implications of this implementation.
For FIFOs based on flip-flops and dual-port memories, it is possible to read and write simultaneously and continuously for as long as the user requires.
FIFOs based on single-port memories have half the memory bandwidth of FIFOs base on a dual-port memory; simultaneous reads and writes are not possible.
If both operations are requested on the same cycle, priority can either be given to the read or the write operation.
Fifofum can generate single-port FIFOs with either read or write priority.
Note that if the FIFO is configured with read-priority, a timing path exists between These FIFOs provide an additional interface for connection to a user-provided single-port memory. The interface contains five signals:
Asynchronous flip-flop based FIFOs
Fifofum generates asynchronous flip-flop-based FIFOs of any bit width.
The depth of the asynchronous FIFOs must be 2 to the power of any positive, non-zero, integer, i.e. 2, 4, 8, etc.
The read and write interfaces of these FIFOs can operate on two independent clock domains.
All
Both clock domains have their own asynchronous reset input ( The asynchronous FIFO maintains two gray-code counters, one in each domain. As both interfaces use the value of both counters, the value of each counter is double-synchronized for use by the other clock domain. The use of gray code ensures that the value captured by the receiving clock domain is either the current or next counter value as the value changes. The synchronous reset must also be passed to both domains to ensure that both counter are reset and that an empty FIFO remains empty throughout the reset operation. A double-synchronizer is used to avoid meta-stablity in the receiving clock domain. FIFO entries are stored in arrays of flip-flops, either a simple Verilog memory or, in the low power configuration, an array of flop-flops per-FIFO-entry. Details of the low-power implementation are documented below. Low-power clock gating
FIFO entries are stored in arrays of flip-flops, either a simple Verilog memory or, in the low power configuration, an array of flop-flops per-FIFO-entry. In the low-power configuration, the array of flip-flops for each entry has a gated clock which is only enabled when that entry is being written.
Low-power FIFOs have a
The user can either provide the name of the clock-gate module or use the clock-gate module (
Timing characteristics
Building FIFOs with FifofumFifofum is a Python/Tk script. There are no arguments, just typefifofum to invoke the script and start the GUI.
Once the desired FIFO configuration has been specified, the FIFO and an option test-bench can be built.
Fifofum generates a makefile <module>.make , then runs make using the generated makefile.
Make will build <module>.v and, optionally, the testbench fff_test.v .
Building FIFOs using the GUI
The GUI is divided into five vertically-stacked sections:
Building FIFOs using MakeGUIs are not for everyone and it is often preferable to build on-the-fly rather than save generated source code. If you're building your source code tree usingmake , then building FIFOs with Fifofum couldn't be easier.
Fifofum generates a Makefile for each FIFO built using the GUI.
You can build FIFOs using your Makefile by integrating build rules extracted from the makefiles generated by Fifofum.
For example, the following rule can be extracted from the example.v: fff_fifo.plv example.make prepro -r '#$$' -r '<#;>' -r '>#;>' -r '#[;]#' -o $@ $< ++ example:fflp32x8e +fff_gateWhere fff_fifo.plv is the Prepro source for all Fifofum FIFOs; example:fflp32x8e is a condensed description of the FIFO specification; and +fff_gate specifies name of the external clock gate module.
This website uses CSS stylesheets and Frames. |
---|
  |
---|