Skip to content

Implement StreamBuffer modules#15

Open
lucat1 wants to merge 1 commit intofpgasystems:mainfrom
lucat1:stream-cache
Open

Implement StreamBuffer modules#15
lucat1 wants to merge 1 commit intofpgasystems:mainfrom
lucat1:stream-cache

Conversation

@lucat1
Copy link
Copy Markdown
Contributor

@lucat1 lucat1 commented Jan 31, 2026

These modules allow you to write and (immediately) retrieve data to/from the FPGA's HBM.
The Reader and Writer modules are interconnected with a "link" that notifies the reader of when new data has been fully flushed to the HBM by the writer. This is designed such that a middleware can be placed in between the reader and writer to get the reader to read only parts of the written memory.

Included in this PR is a minor generalization of the StreamWriter and a small bugfix:

  1. Moved from the metaIntf notify to an abstract notify interface for interrupts. Added a small combinatorial module to write up the new abstraction to the metaIntf provided by Coyote. This allows modules (like the StreamBufferWriter) that don't necessarily send interrupts to the host to handle the feedback from the StreamWriter in different ways.
  2. Set the mem_config.buffer_ready signal to low when the StreamWriter is resetting, by way of adding a new RESET state to the StreamWriter state machine. This prevents discarding potential databeats while the module is being reset (this can happen, as there are delays added by the reset resync logic).

@lucat1 lucat1 force-pushed the stream-cache branch 4 times, most recently from 9679f4e to d1f56e8 Compare January 31, 2026 13:51
- wip: implemented stream cache writer, working on reader

- implement stream reader

- add tests for stream cache

- move from stream cache to buffer, change semantics

- use a reset state to prevent mem_config_i swallowing in StreamWriter

- clarify unit test names

- remove old needless edits

- tie off other card signals if any
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The StreamBufferReader needs a config to be able to replay the same data multiple times.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My idea for this was just that the link instead of being piped directly from the writer to the reader, would go through by a middleman component. There we decide what to have the reader read, and if repeatedly, how many times, and such.
But that's conceptually logic that belongs to another module IMO.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, fair enough. That makes sense. Let me try out the stuff and then I will merge it. We need it fairly soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants