Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming FIFO: Signals Read/Write Availability using Watermarks #150

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

occheung
Copy link
Contributor

Description

This PR adjusts the stb/ack control signal behavior of FIFOs with watermarks. FIFO only signals availability when a complete packet/burst can be transferred.

  • when given a low watermark
    • sink ack can be asserted when the FIFO has a complete packet, ready to receive
    • eop is not considered in this case, as packet length is likely unknown
  • when given a high watermark
    • source stb can be asserted when the FIFO has a complete packet, ready to send
    • eop is respected

Related PR

See migen 294.

@@ -78,13 +78,122 @@ def __init__(self, fifo_class, layout, depth):
self.fifo.re.eq(self.source.ack)
]

if hi_wm is not None:
self.fifo.add_almost_full(hi_wm)
Copy link
Member

Choose a reason for hiding this comment

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

Why not create the FIFO with the watermarks in the first place, instead of calling such functions?

@sbourdeauducq
Copy link
Member

FIFO only signals availability when a complete packet/burst can be transferred.

This explanation should be in code comments and/or docstrings, not just in this PR description.

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