-
Notifications
You must be signed in to change notification settings - Fork 211
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
migen.genlib: Improve "first word fall through" docs. #152
base: master
Are you sure you want to change the base?
Conversation
* Moved "first word fall through" `fwft` to be part of _FIFOInterface. * Added documentation what the hell `fwft` stands for. * Checks the compatibility of the `fwft` argument given to the FIFO.
@@ -48,7 +52,8 @@ class _FIFOInterface: | |||
Acknowledge `dout`. If asserted, the next entry will be | |||
available on the next cycle (if `readable` is high then). | |||
""" | |||
def __init__(self, width, depth): | |||
|
|||
def __init__(self, width, depth, fwft=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FIFOInterface
does not use fwft
and therefore should not have this parameter.
_FIFOInterface.__init__(self, width, depth) | ||
def __init__(self, width, depth, fwft=False): | ||
assert not fwft, "fwft is not supported on the AsyncFIFO." | ||
_FIFOInterface.__init__(self, width, depth, fwft=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This AsyncFIFO
is always FWFT (in general there is no reason for an async FIFO not to be FWFT).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a sync FIFO it's either:
- non-FWFT
- asynchronous reads (lots of resources used, timing issues)
- 2 cycles of latency instead of 1
The async FIFO does not have to make this compromise (the latency is already high enough from the CDC and hides the memory latency).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see inline comments
fwft
to be part of _FIFOInterface.fwft
stands for.fwft
argument given to the FIFO.