lowRISC / lowRISC/opentitan

Standardize all FIFOs in OpenTitan

Open
#7,826 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:RTL Earlgrey-PROD Triaged IP:csrng IP:i2c IP:spi_device IP:spi_host IP:uart Priority:P3 Subsystem:Entropy Type:Enhancement Type:Icebox
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

Many of our blocks (such as uart, I2C, spi_device, spi_host, csrng etc) contain one or more FIFOs, which support some of following features.

1. FIFO status: Size, watermark, empty, full, overflow, underflow, read/write pointer, idle
2. Interrupts: watermark, empty, full, overflow, underflow
3. FIFO operations: FIFO reset

Request a design enhancement to create a standardized FIFO wrap to support all these features with parameters that can enable/disable the supports. And use this wrapper in all the design. Here are some rationales:

1. Simplify the IP-level verification and reduce DV effort.
It's very time consuming to verify these FIFO features in block-level testbench, especially if we want to model the FIFO behaviors in scoreboard to test them thoroughly. If we standardize it, we could have a standalone TB to verify the FIFO and only do integration test in IP-level as well as excluding code coverage of the FIFO

2. Have consistent behavior and naming.
We already have different names for FIFO watermark in our IPs. In Uart, we define watermark to be edge-triggered interrupt. Since we don't standardize it, it's possible that some other designers define it as a level-triggered interrupt in their block.

Include DV folks. @rasmus-madsen @rswarbrick @senelson7 @sriyerg @matutem @cindychip @udinator

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inventorying the FIFO implementations in the uart, I2C, spi_device, spi_host, and csrng blocks and compare their status, interrupt, and reset behavior. Define the standardized wrapper and its configurable features with the DV stakeholders, then confirm that the affected blocks use it consistently and that standalone FIFO verification covers the supported behavior.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.