-
Notifications
You must be signed in to change notification settings - Fork 108
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
Support for IDDR and ODDR #1502
Conversation
c113787
to
77eb3f4
Compare
I didn't see any CI errors besides #1400 so I rebased it on top of master. Now the CI should pass. |
xc/xc7/fasm2bels/iob_models.py
Outdated
- Detects whether there is an OBUFT with T input routed to const1. If so | ||
then checks whether the ZINV_T1 inverter is enabled in the neighboring | ||
OLOGIC site. If both cases are true then the OBUFT is replaced with an | ||
OBUF. |
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.
Good comment, thanks!
xc/xc7/fasm2bels/iob_models.py
Outdated
return | ||
|
||
# Get the neighboring IOI3 tile prefix and loc | ||
ioi_tile_loc = site.tile.rsplit("_", maxsplit=1)[1] |
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.
Rather than doing a string replace here, why not walk 1 tile to the left or right? That would be more robust?
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.
Fixed.
xc/xc7/fasm2bels/ioi_models.py
Outdated
data_rate = '"DDR"' | ||
bel.parameters['DATA_RATE'] = data_rate | ||
|
||
# TODO: There shouldn't be mixed width in FASM features. |
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 feels like it could crop up in a new fasm2bels failure in the future. Is it possible to add a failing test now to demostrate the issue you are mentioning here?
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.
@litghost You mean add it and then disable? (we want green CI). I can think of a test with data width of eg. 4 that cannot be decoded now.
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.
@litghost You mean add it and then disable? (we want green CI). I can think of a test with data width of eg. 4 that cannot be decoded now.
That is one way to go. I think the valid options are:
- Create and issue, and attach a failing test case so that it can be fixed in the future
- Create the failing test case and fix it in this PR
The TODO by itself is insufficient.
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'll go with an issue then. Solving it probably requires adjustment to prjxray fuzzers, and I think that this PR is already kind of big.
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.
There: #1589
This PR needs to be rebased. |
@litghost I've discovered an issue with handling of In the techmap I map Similarly, there is an issue in fasm2bels - whenever I decode a @acomodi You have dealt with |
@mkurc-ant , as far as I understood with the ISERDES, the CLKB inverter is not enabled by any feature, with, or without it, the bitstream remains the same. What I have done in fasm2bels, at the time, was to add the IS_CLKB_INVERTED parameter to the ISERDES, but still assign the same net to CLK and CLKB. This avoids Vivado complaining about the clock signals being the same. |
@acomodi Thanks, I'll try that. |
@acomodi That did the trick! I now have IDDR and ODDR working in hardware as well as correct decoding in fasm2bels. Although there is a fasm difference:
But I probably know the cause, we shouldn't emit |
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
…ey have OSERDES connected. Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This reverts commit 1a50773. Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
…SERDES Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
This PR adds support for IDDR and ODDR primitives.
IDDR
toIDDR_2CLK
The
IDDR
is added as another mode of the ILOGICE3 pb_type. The connectionIDELAY
->IDDR
is modeled as amux
- no need for separate pb_types.An
ODDR
can be used to drive eitherO
orT
of an(I)OBUFT(DS)
. Two independentODDR
s can be packed into the sameOLOGIC
site to driveO
andT
independently.For that the
OLOGICE3
pb_type has two modes:OSERDESE2
andOLOGIC
. In the second mode there are two almost identical child pb_types - one forODDR
forOQ
and one forODDR
forTQ
. These pb_types can operate independently either in theODDR
mode or a pass-through mode. This allows to have all combinations ofODDR
uses.Depending on where an
ODDR
is used, different fasm features have to be emitted. Fortunately forO
andT
they have one-to-one correspondences. The same blif models for both could be used. They are however nested i different pb_types that provide necessary parameters to fasm features mappings.For the updated
OLOGICE3
model to work theT
connection forOBUF
had to be made explicit. The IOB architecture has been modified to have theOBUFT
by default. That allowed 'O' and 'T' paths to be split and made fully independent.The issue with Vivado routing OBUFT.T to const1 + enabling inversion while it is logically connected to const0 has been fixed according to the suggestion in the issue: #1514