Verilog RTL II – FIFO
Parameterization, FSM, memories, FIFO, arbiter, interrupts
What you will learn and practise
Complete the stages in order and retain the requested evidence.
FIFO architecture
Read/write pointers
Full/empty/occupancy
Overflow/underflow
Parameterized depth/width
1. FIFO storage
2. Write pointer
3. Read pointer
4. Empty/full logic
5. Write/read operations
6. Simultaneous R/W
7. Occupancy count
8. Overflow/underflow
9. Almost-full/empty
10. Param width/depth
11. Complete synchronous FIFO
12. FIFO error/status flags
Debug pointer and full/empty off-by-one bugs
Independent configurable FIFO
Synchronous FIFO + status/error logic
Build a configurable synchronous FIFO with correct pointer, occupancy, full/empty and error/status behavior.
- Create project_workspace/week3_verilog_rtl2/day14_fifo with rtl, tb, sim and logs directories.
- Use one clock domain only for this Week 3 FIFO.
- Exercise reset, empty, full, simultaneous read/write and boundary conditions.
- Implement FIFO storage.
- Implement write and read pointers.
- Implement empty/full logic.
- Implement write/read operations and simultaneous R/W.
- Add occupancy count.
- Add overflow and underflow detection.
- Add almost-full/almost-empty status.
- Parameterize width and depth.
- Integrate the complete synchronous FIFO and error/status flags.
- Explain the relationship between pointers and FIFO occupancy.
- Explain full and empty boundary conditions.
- Describe overflow and underflow handling.
- Explain simultaneous read/write behavior.
- Identify common FIFO off-by-one errors.
Repair pointer and full/empty off-by-one defects and show the corrected boundary waveforms.
- FIFO RTL
- testbench
- boundary-condition results
- waveform
- debug notes
- Empty/full behavior is correct
- Overflow/underflow are handled
- Parameterized FIFO passes configured-depth tests
Build, run and retain evidence
project_workspace/week3_verilog_rtl2/day14_fifo/
RunWaveformReview before completing Day 14
- Concept
What conditions do FIFO full and empty represent?
Review answer
Empty means no valid queued entries are available to read; full means no free FIFO entry is available for another valid write under the selected FIFO architecture.
- RTL reasoning
For a valid simultaneous read and write on a synchronous FIFO, what normally happens to occupancy?
Review answer
Occupancy normally remains unchanged because one entry is removed while one entry is added, although both pointers advance.
- Debugging
A FIFO asserts full one entry too early. What class of defect should be investigated first?
Review answer
An off-by-one error in full detection, occupancy comparison, pointer comparison or configured depth handling.
- Short answer
Which boundary tests are essential before declaring a synchronous FIFO complete?
Review answer
Reset/empty, fill-to-full, overflow attempt, ordered reads, simultaneous read/write, pointer wraparound, drain-to-empty and underflow attempt.
Assessment: