-
Notifications
You must be signed in to change notification settings - Fork 29
Fix/noc backpressure #300
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
base: master
Are you sure you want to change the base?
Fix/noc backpressure #300
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,27 +23,34 @@ def construct(s, DataType): | |
| # Interface | ||
| s.recv_fu = RecvIfcRTL(DataType) | ||
| s.recv_xbar = RecvIfcRTL(DataType) | ||
| s.fu_xbar_rdy = InPort(b1) | ||
| s.send = SendIfcRTL(DataType) | ||
|
|
||
| @update | ||
| def process(): | ||
| # Initializes the delivered message. | ||
| s.send.msg @= DataType() | ||
|
|
||
| # The messages from two sources (i.e., xbar and FU) won't be valid | ||
| # simultaneously (confliction would be caused if they both are valid), | ||
| # which is guaranteed by the compiler/software. | ||
| s.send.msg.predicate @= s.recv_fu.msg.predicate | s.recv_xbar.msg.predicate | ||
| s.send.msg.payload @= s.recv_xbar.msg.payload | s.recv_fu.msg.payload | ||
| fu_active = s.recv_fu.val & s.fu_xbar_rdy | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that a handshake check? |
||
| xbar_active = s.recv_xbar.val | ||
|
|
||
| if fu_active: | ||
| s.send.msg.predicate @= s.send.msg.predicate | s.recv_fu.msg.predicate | ||
| s.send.msg.payload @= s.send.msg.payload | s.recv_fu.msg.payload | ||
| if xbar_active: | ||
| s.send.msg.predicate @= s.send.msg.predicate | s.recv_xbar.msg.predicate | ||
| s.send.msg.payload @= s.send.msg.payload | s.recv_xbar.msg.payload | ||
|
|
||
| # FIXME: bypass won't be necessary any more with separate xbar design. | ||
| # s.send.msg.bypass @= 0 | ||
| # s.send.msg.delay @= s.recv_fu.msg.delay | s.recv_xbar.msg.delay | ||
|
|
||
| s.send.val @= s.recv_fu.val | s.recv_xbar.val | ||
| s.recv_fu.rdy @= s.send.rdy | ||
| # Only let FU traffic win once the FU crossbar has actually committed | ||
| # the multicast/send for this cycle; otherwise the link can expose | ||
| # transient FU output and create cross-tile bubbles. | ||
| s.send.val @= fu_active | xbar_active | ||
| s.recv_fu.rdy @= s.send.rdy & s.fu_xbar_rdy | ||
|
Comment on lines
+48
to
+52
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have similar feeling with @yyan7223, this part is a bit confusing. It sounds the root cause might not be here. Or we need a concrete example to show case why we need to change this file. The file originally should only target simple |
||
| s.recv_xbar.rdy @= s.send.rdy | ||
|
|
||
| def line_trace(s): | ||
| return f"from_fu:{s.recv_fu.msg} or from_xbar:{s.recv_xbar.msg} => out:{s.send.msg} ## " | ||
|
|
||
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.
s.recv_fualready contains a rdy signal, why would we still needs.fu_xbar_rdy?