Skip to content
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

Use Litex generated tests in the soc litex designs for xc7 #1657

Merged
merged 13 commits into from
Nov 4, 2020

Conversation

tmichalak
Copy link
Contributor

@tmichalak tmichalak commented Sep 7, 2020

The objective of this PR is to have the netlists for the litex designs used in xc7 soc tests to be auto-generated.
This PR is WIP because so far it has been verified only on the mini_litex design and it depends on other PRs that haven't been merged yet such as the SDC plugin, params plugin integration, SDC plugin integration. It also requires the latest VPR with the never_prune attribute support. Last, but not least there are some SDC commands that have to be handled by Yosys.

@probot-autolabeler probot-autolabeler bot added arch-artix7 lang-python Issue uses (or requires) Python language. lang-verilog Issue uses (or requires) Verilog language. lang-xml Issues uses (or requires) XML language. third-party type-utils Issues is related to the scripts inside the repo. type-vpr labels Sep 7, 2020
@tmichalak tmichalak force-pushed the use-litex-to-generate-tests branch 2 times, most recently from f6e5903 to 2bb7680 Compare September 16, 2020 10:19
@probot-autolabeler probot-autolabeler bot added the arch-ice40 Issue related to the iCE40 architecture description. label Sep 16, 2020
@tmichalak tmichalak force-pushed the use-litex-to-generate-tests branch 5 times, most recently from 51dfbcd to bfb5564 Compare October 8, 2020 14:05
@acomodi acomodi force-pushed the use-litex-to-generate-tests branch from bfb5564 to f78acf8 Compare October 12, 2020 18:16
@acomodi acomodi requested review from mithro and litghost October 12, 2020 18:26
@acomodi acomodi force-pushed the use-litex-to-generate-tests branch from 72e2264 to d9f0f3b Compare October 12, 2020 18:29
Copy link
Contributor

@litghost litghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments in

xc/xc7/tests/soc/litex/base/CMakeLists.txt Outdated Show resolved Hide resolved
xc/xc7/tests/soc/litex/base/CMakeLists.txt Outdated Show resolved Hide resolved
xc/xc7/tests/soc/litex/fixup_xdc.py Show resolved Hide resolved
xc/xc7/tests/soc/litex/fixup_xdc.py Outdated Show resolved Hide resolved
xc/xc7/tests/soc/litex/mini/CMakeLists.txt Outdated Show resolved Hide resolved
xc/xc7/tests/soc/litex/mini/CMakeLists.txt Outdated Show resolved Hide resolved
@acomodi acomodi requested a review from litghost October 13, 2020 13:49
@acomodi acomodi force-pushed the use-litex-to-generate-tests branch from 64f2fc1 to 555d81f Compare October 13, 2020 13:51
@acomodi acomodi changed the title WIP: Use Litex generated tests in the soc litex designs for xc7 Use Litex generated tests in the soc litex designs for xc7 Oct 13, 2020
common/cmake/litex.cmake Outdated Show resolved Hide resolved
XDC ${LITEX_GATEWARE}/top.xdc
)
else()
add_fpga_target(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to support PCF / SDC? I believe XDC should always work now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a comment about that. I have seen the following problem. For the minilitex test without DDR and without ethernet, the PLL that is generated by Litex has clocks that will not get used as related to DDR.

This generates issues when creating the SDC, as the final SDC will have clocks that are absent in the VPR netlist.

I believe that this might be yet another fix for the plugin? If a clock does not have any loads, the constraints should not be emitted for that clock.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the symbiflow flag is provided, LiteX generates the SDC and PCF

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this might be yet another fix for the plugin? If a clock does not have any loads, the constraints should not be emitted for that clock.

I believe that there was talk of VPR demoting a missing clock match to a warning instead of an error. Maybe something to bring up with Vaughn?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I'd argue that it should be accepted without a warning to create a clock on a net with no loads. The key here is have the SDC parser recongize the difference between:

  • A net that was pruned because it has no loads
  • A net that doesn't exist at all

The first is not a warning, and the second is likely user error. This seems like something to fix in VPR upstream.

@acomodi acomodi force-pushed the use-litex-to-generate-tests branch 2 times, most recently from 4efc05f to 270a0a2 Compare October 26, 2020 09:16
@litghost litghost self-requested a review October 27, 2020 17:16
FIXUP_SCRIPT ${FIXUP_XDC}
FLAGS
--toolchain symbiflow
VIVADO_XDC arty_clocks.xdc
Copy link
Contributor

@litghost litghost Oct 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not using the XDC from LiteX? Or does LiteX not supply a clock constraint?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LiteX does supply clock constraints, but the problem was, IIRC, that the output of fasm2bels (Verilog/XDC) does not include certain clock ports present in the LiteX generated XDC, ending up in an error when trying to read it.

I need to double-check this though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still outstanding?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will open an issue to keep track of this

Copy link
Contributor

@litghost litghost Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general we need an issue tracking the burn down for the remaining "weirdness" around the LiteX support. Examples include this, the fixup_xdc script, the --toolchain symbiflow/SDC stuff from the other converstation, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh and the bittool / diff FASM disable too.

Copy link
Contributor

@litghost litghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

acomodi and others added 13 commits November 3, 2020 17:48
Also added new required submodules

Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
Also use regexp for the fixup xdc script

Signed-off-by: Alessandro Comodi <[email protected]>
Signed-off-by: Alessandro Comodi <[email protected]>
@acomodi acomodi force-pushed the use-litex-to-generate-tests branch from 832481f to 71ae720 Compare November 3, 2020 16:48
@acomodi acomodi requested a review from litghost November 4, 2020 17:25
@acomodi
Copy link
Contributor

acomodi commented Nov 4, 2020

CI went finally green

GENERATE_SCRIPT ${GENERATE_LITEX}
FIXUP_SCRIPT ${FIXUP_XDC}
FLAGS
--toolchain symbiflow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does --toolchain symbiflow do? I noticed that xc/xc7/tests/soc/litex/mini_ddr/CMakeLists.txt doesn't use --toolchain symbiflow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was related to the fact that the PLL generate extra clocks and BUFG which are not used, ending up in clocks generated in the SDC, but they are absent in the cleaned circuit in VPR, therefore the SDC commands for the inexistent generate an error

Copy link
Contributor

@litghost litghost Nov 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a row into the burndown to address this issue. If VPR sweeps a netlist, and an SDC that was valid looks invalid, that needs to not be an error. I believe we discussed this a couple times, but it keeps cropping up.

@litghost litghost merged commit 5f35cd6 into f4pga:master Nov 4, 2020
@litghost
Copy link
Contributor

litghost commented Nov 4, 2020

The outstanding comments still need to be addressed, but please open follow up PRs.

@acomodi acomodi deleted the use-litex-to-generate-tests branch March 23, 2021 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-artix7 arch-ice40 Issue related to the iCE40 architecture description. lang-python Issue uses (or requires) Python language. lang-verilog Issue uses (or requires) Verilog language. lang-xml Issues uses (or requires) XML language. third-party type-utils Issues is related to the scripts inside the repo. type-vpr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants