-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make all GTH tx interfaces operate in the same domain #688
Conversation
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.
In general LGTM! I've got a few questions.
Edit: I've added a PR cover letter including diagrams.
(N.Clock _, N.Clock _) -> True | ||
(N.ClockN _, N.ClockN _) -> True | ||
(N.Reset _, N.Reset _) -> True | ||
(N.Enable _, N.Enable _) -> True |
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.
Why doesn't this compare domains? Could you add the explanation in a comment?
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.
Let's get this merged, add a comment in another PR.
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.
What this functions gets something like: Clock rxUser2
and Clock GthRx
So the right side is a concrete monomorphic type, but the left side still contains a type variable.
If you really want to properly check this, you'd have to do unification of the type variables over all the ports together.
And you can't do a simple per port check like this.
{ txOutClock :: Clock tx1 | ||
-- ^ TODO |
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.
We can delete this right? The clock is generated outside of this block.
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.
I've added #696
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.
txOutClock
can not be deleted.
It's only connected one of the channels.
But on that one it's the source that feeds the "user clock network", which is what creates the txClock(2) used for everything.
, rxOutClock :: Clock rx1 | ||
-- ^ TODO |
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.
Same for this?
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.
I've added #696
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.
Similar as for the tx side, but here all of them are actually used individually because all domains are different.
Before merging: please squash the formatting commits into parent(s). Edit: done |
ad90f2f
to
731431d
Compare
To make it easier to understand which signal to into ilaPlotSetup
731431d
to
39459ce
Compare
39459ce
to
46c6ee1
Compare
Let's keep the handwritten implementation in the history in case we need it
46c6ee1
to
9ba7c19
Compare
This PR moves all transceiver TX interfaces to the same domain, instead of separate domains with (potentially) small phase offsets.
Note that the RX interfaces are in separate domains. (by design)
Background
In typical applications either:
Bittide is unique (?) in that we want an asymmetric setup: all the transmit domains should be the (exact) same, while receive domains remain independent. Because this is not covered by the typical use cases, we need to manually implement clock logic instead of relying on high-level Xilinx primitives.
Up to now, we've configured the transceivers as if all links were independent. Still, we provided the same reference clock to all individual links. In practice this would therefore amount to the asymmetric case. The problem is that static timing analysis will not apply across these domains, and we would therefore need clock domain crossing logic (FIFOs) to satisfy our design rule checks. This is for good reasons though: if we cannot apply STA, we cannot guarantee the sequential/digital abstraction and therefore risk failing bitstreams.
Up to now, this hasn't mattered much: for our experiments we haven't critically relied on the transmit domain being exactly equal. With the on-FPGA switch demo around the corner, we would like to get rid of the separate domains, hence this PR.
Old situation
New situation
Future work
There is now a whole bunch of redundant code dealing with n domains, which can be simplified. Preferably we'd do this after merging #654, as that PR will end up deleting a lot of code anyway.