Repository navigation
hw: Add new common cells to down/up size data stream - #363
Merged
Merged
Conversation
Lore0599
requested review from
colluca and
phsauter
and removed request for
colluca
September 18, 2026 08:02
colluca
requested changes
Sep 18, 2026
colluca
requested changes
Sep 18, 2026
colluca
approved these changes
Sep 18, 2026
phsauter
approved these changes
Sep 18, 2026
phsauter
left a comment
Collaborator
There was a problem hiding this comment.
Assertions are working and testbenches as well, everything looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add cc_stream_downsizer / cc_stream_upsizer
This PR introduces two generic ready/valid stream width converters, parametrized.
New Cells
cc_stream_downsizer drains one wide beat into
WideWidth/NarrowWidthnarrow beats, LSB first. It doesn't register the wide word: as long asinp_ready_ois low, the master must hold it stable anyway (standard handshake rule), so each slice is just indexed straight offinp_data_i.cc_stream_upsizer does the reverse. Here each narrow beat is genuinely new data, so the first
Ratio-1slices do need to be captured into a register bank. The last slice is the exception: it's streamed outcombinationally together with the stored ones; in the same cycle it's accepted, instead of being registered and presented a cycle later. That keeps its acceptance directly tied to
oup_ready_i, and means the sequence "accept last slice of one word" / "start accepting the first slice of the next" costs zero extra cycles.HW cost:
Downsizer is register-free besides the counter; upsizer holds
(Ratio-1) * NarrowWidthbits of state. Neither adds combinational depth beyondcc_counter's own.Testbench
Add two testbenches generated by AI 🤖