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

FuseSoC and XSIM #262

Merged
merged 10 commits into from
Sep 27, 2022
Merged

FuseSoC and XSIM #262

merged 10 commits into from
Sep 27, 2022

Conversation

micprog
Copy link
Member

@micprog micprog commented Sep 15, 2022

Improves compatibility for fusesoc and vivado xsim and includes a limited test for this in the internal CI. Replaces #232. Fixes #226, #247.

.gitlab-ci.yml Outdated
- mkdir fusesoc && cd fusesoc
- $HOME/.local/bin/fusesoc library add axi ..
- $HOME/.local/bin/fusesoc core list
- vitis $HOME/.local/bin/fusesoc run --tool xsim --target sim --no-export pulp-platform.org::axi:$(cat ../VERSION | sed s/-/./g)
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should add a version here and use the newest one installed (vitis-2022.1-zr)

@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
Copy link
Collaborator

Choose a reason for hiding this comment

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

Mention vitis and fusesoc CI maybe?

Copy link
Collaborator

@thommythomaso thommythomaso left a comment

Choose a reason for hiding this comment

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

LGTM!

@skokvermon
Copy link
Contributor

Juste tested this branch and it is not working

`ifdef XSIM is not working with vivado xsim

fusesoc run --tool xsim --target sim_xbar --no-export pulp-platform.org::axi:0.37.0
ERROR: [VRFC 10-2991] 'randomize' is not declared under prefix 'w_beat' [/home/skok/pkgs/testFuse/fusesoc_libraries/axi/src/axi_test.sv:1204]
ERROR: [VRFC 10-2991] 'randomize' is not declared under prefix 'r_beat' [/home/skok/pkgs/testFuse/fusesoc_libraries/axi/src/axi_test.sv:1364]
ERROR: [VRFC 10-2991] 'randomize' is not declared under prefix 'b_beat' [/home/skok/pkgs/testFuse/fusesoc_libraries/axi/src/axi_test.sv:1464]

You have to replace all `ifdef XSIM by `ifdef XILINX_SIMULATOR

Official source is here:
https://docs.xilinx.com/r/en-US/ug900-vivado-logic-simulation/Predefined-Macros

#232 has correct fixes which have been removed by this PR

Copy link
Contributor

@skokvermon skokvermon left a comment

Choose a reason for hiding this comment

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

commit 2fb9778
has to be reverted and fixed

@skokvermon
Copy link
Contributor

depends on pulp-platform/common_cells#139

@thommythomaso thommythomaso merged commit 9b904be into master Sep 27, 2022
@thommythomaso thommythomaso deleted the fuse_xsim branch September 27, 2022 17:41
@thommythomaso
Copy link
Collaborator

Which version of XSIM do you use?

@thommythomaso
Copy link
Collaborator

We use Vivado 2022.04 in the CI, which works just fine for us.

@skokvermon
Copy link
Contributor

I have vivado 2022.1
CI use sim target which works.
Most other bench targets will show the randomize error message
Unfortunately, if you correct it, you will mostly have unsupported default disable iff
Then if corrected, I had seg fault on axi_xbar bench which I can't find any workaround.

I found out that I could workaround one of these segfaults in my own bench by replacing

      axi_drv_t::ax_beat_t ax_beat = new();

by

      axi_test::axi_driver #(.AW(AXI_AW), .DW(AXI_DW), .IW(AXI_IW), .UW(AXI_UW))::ax_beat_t ax_beat = new();

It doesn't like using a subtype of a typedef type.
However, I can't make axi_xbar bench to work

@thommythomaso
Copy link
Collaborator

I have vivado 2022.1 CI use sim target which works. Most other bench targets will show the randomize error message Unfortunately, if you correct it, you will mostly have unsupported default disable iff Then if corrected, I had seg fault on axi_xbar bench which I can't find any workaround.

I found out that I could workaround one of these segfaults in my own bench by replacing

      axi_drv_t::ax_beat_t ax_beat = new();

by

      axi_test::axi_driver #(.AW(AXI_AW), .DW(AXI_DW), .IW(AXI_IW), .UW(AXI_UW))::ax_beat_t ax_beat = new();

It doesn't like using a subtype of a typedef type. However, I can't make axi_xbar bench to work

I just tried it locally as well and it fails with the sim_xbar target. I will revert the define ofc. Sorry for that.

Can you maybe create a new PR with all the fixes you require for the xbar TB to work?

@skokvermon
Copy link
Contributor

skokvermon commented Sep 27, 2022

#264

sim_xbar bench segfaults...
however sim_lite_xbar works (but doesn't seem to end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Xilinx Vivado Simulator
3 participants