How dadongshangu/async_fifo works
Project type and purpose
• This is a hardware IP project implementing an Asynchronous FIFO in Verilog.
• It provides:
– RTL sources (src/)
– Two verification flows: simple Verilog TB (sim/) and UVM environment (sim_uvm/)
– Static linting/quality checks (spyglass/)
– Synthesis scripts (synthesis/)
File structure
• src/: Core RTL modules – async_fifo.v, fifo_mem.v, gray_sync2d.v, rptr_empty.v, wptr_full.v
• sim/: Basic Verilog testbench (top_tb.v + makefile)
• sim_uvm/: UVM testbench components – interfaces, agents, drivers, sequencer, scoreboard, environment, tests, sequences
• spyglass/: Project file, Tcl scripts to run Synopsys SpyGlass linting
• synthesis/: Synopsys DC scripts (Tcl + timing) and makefile
README insights
• Design based on Cummings’ asynchronous FIFO paper.
• Three phases implemented: RTL, basic TB, UVM TB.
• UVM environment follows standard agent/driver/monitor/scoreboard/model pattern.
Main components
a. DUT (src/)
– async_fifo top
– Internal sub-blocks: dual-port memory, gray-code pointer synchronizers, pointer arithmetic & status (full/empty) logic
b. Verification
– Simple Verilog TB (sim/top_tb.v)
– UVM environment (sim_uvm/)
• Interface block (asyncf_if)
• Upstream & downstream agents: driver, sequencer, monitor, transaction
• Scoreboard + reference model
• Virtual sequencer to coordinate sequences
• Test cases (case0, case1, base_test)
c. Static analysis
– SpyGlass flow (spyglass/run_sg.tcl)
d. Synthesis flow
– Synopsys DC scripts (synthesis/main.tcl, synopsys.tcl, timing.tcl)
Relationships and interactions
• DUT <> Testbench
– Clock & reset domains (src/ gray_sync2d handles crossing)
– FIFO interface signals (write_data, write_en, read_data, read_en, full, empty)
• UVM environment <> DUT
– Virtual interface bound to DUT’s ports
– Drivers generate transactions, monitors capture response
– Scoreboard compares DUT output vs reference model
• Tools flows
– SpyGlass reads src/ + sim_uvm/ for lint checks
– DC reads src/ + constraints for synthesis & timing analysis
Architectural patterns & design principles
• Dual-clock FIFO with pointer synchronization (Gray code)
• Modular UVM agent/driver/monitor/scoreboard/test hierarchy
• Separation of concerns: RTL vs verification vs lint vs synthesis
Detailed elements to capture
• Internal FIFO memory and pointer sync blocks inside DUT
• UVM hierarchy: environment → agents → drivers/monitors → sequencer → sequences
• Reference model path feeding scoreboard
• Top-level scripts invoking each flow (Makefiles, Tcl)