lowRISC / lowRISC/opentitan

[spi_device] Extend the configurable range of the readbuf_watermark interrupt

Open
#30,873 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

IP:spi_device
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

#29623 requests the ability for Device SW to be notified via interrupt when an emulated spi_flash transfer completes. This would be desirable for end-of-reads from the Flash Payload Buffer particularly.

The context of the above request is the usage of flash emulation mode for a message-passing protocol, where response messages are smaller than the full size of the current payload buffer, and hence the 'double-buffering' / flip-stimulated invalidation of the previous buffer half for emulation of an arbitrarily large flash memory is not required. Extend the range of the readbuf_watermark so it can cover the entire read payload address space (10 ->11 bits), and allow software to disable double-buffering such that the watermark always applies at a fixed offset within the read buffer (the watermark currently is relative to the base address of the 'active' half of the buffer).

This is a more targeted approach than the proposal in #30868, choosing to provide an end-of-transfer mechanism specifically for reads up to the maximum size of the read payload buffer if the device SW has enough information to set the watermark threshold accordingly. One approach may prove to be sufficient.

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 with #29623 and the spi_device implementation of readbuf_watermark, then review the alternative proposal in #30868 for context. Done means the watermark covers the full read payload address space and software can disable double-buffering so the threshold remains at a fixed read-buffer offset.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.