Fix set_bus_skew constraint upper bound in axis_async_fifo.tcl #33
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.
The goal of the constraint is to ensure that parallel Gray-coded words sampled in the destination domain always assume valid values. Since Gray code is used, within each source clock period, a maximum of one bit can change value. Hence the skew constraint should have an upper bound that is equal to the period of the source clock.
This is equivalent to saying that in each destination word, the bits might come from two different source words.
The previous constraint used the destination clock period. This can fail when going from a fast to a slow clock. Imagine going from a 5 ns clock to a 10 ns clock. Words sampled in the destination domain can come from three different source words, meaning that multiple bits might have changed value, meaning that the Gray code might not be valid.
There is a third
set_bus_skew
constraint for thewr_ptr_commit_sync_reg
signal. This does not seem to use Gray code. So I don't really know what this is. I'm leaving this as it is, maybe someone with more insight into the design can decide what to do with this.