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

Fixed FPGA build for ubuntu 24.04 and add btb trashing test #1042

Merged
merged 8 commits into from
Nov 1, 2024

Conversation

rosethompson
Copy link
Contributor

Resolves issue #1040. Hopefully this time without the ECA error.
Also adds another test which forces the btb to trash. Jump and divide instructions alias to the same location such as btb is forced to miss on every access. Enough accesses are made so the I$ misses during one of these triggering a rare condition.

…o occupy the same location in the btb. Instruction class prediction mispredicts ever time. This is useful incase someone changes the hazard code or fpu.
@jordancarlin
Copy link
Member

The new test should probably be added to tests.vh so it is actually run during regression.

Looks like Vivado isn't officially supported on Ubuntu 24.04 yet (only 20.04 and 22.04) which is probably why there are issues. I wonder if symlinking the versions of ncurses that are installed in ubuntu 24.04 (v6 I think) to v5 would work instead. Not sure if there are breaking changes that prevent it from working with the newer versions though.

@rosethompson
Copy link
Contributor Author

I'm running into more problems with ubuntu 24.04. glibc has issues with questa and imperasDV.
Additionally Vivado did not install the udev rules so it did not have the correct permissions to access the JTAG programming hardware. It works after manually installing and restarting udev. 24.04 is proving to be hassle.

@jordancarlin
Copy link
Member

I've only tested regular tool flow and Verilator with 24.04, none of the proprietary tools. Hopefully it'll get better once there is official support for it from Vivado. What were the issues with Questa and ImpressDV?

@rosethompson
Copy link
Contributor Author

This is error running lockstep questa version 2023.4_3 with ImperasDV.

# ** Fatal: (vsim-3828) Could not link 'vsim_auto_compile.so': cmd = '/opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/gcc -shared -fPIC -B/usr/lib/x86_64-linux-gnu -o "/tmp/rose@mustafar_dpi_48279/linux_x86_64_gcc-10.3.0/vsim_auto_compile.so"  "/tmp/rose@mustafar_dpi_48279/linux_x86_64_gcc-10.3.0/exportwrapper.o"   -Wl,-Bsymbolic -Wl,--wrap=uvm_hdl_check_path,--wrap=uvm_hdl_deposit,--wrap=uvm_hdl_force,--wrap=uvm_hdl_read,--wrap=uvm_hdl_release,--wrap=uvm_hdl_release_and_read '
# (vsim-50) A call to system(/opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/gcc -shared -fPIC -B/usr/lib/x86_64-linux-gnu -o "/tmp/rose@mustafar_dpi_48279/linux_x86_64_gcc-10.3.0/vsim_auto_compile.so"  "/tmp/rose@mustafar_dpi_48279/linux_x86_64_gcc-10.3.0/exportwrapper.o"   -Wl,-Bsymbolic -Wl,--wrap=uvm_hdl_check_path,--wrap=uvm_hdl_deposit,--wrap=uvm_hdl_force,--wrap=uvm_hdl_read,--wrap=uvm_hdl_release,--wrap=uvm_hdl_release_and_read  >'/tmp/questatmp.iFZOg9' 2>&1) returned error code '1'.
#    The logfile contains the following messages:
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section `.relr.dyn'
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: cannot find /lib/x86_64-linux-gnu/libc.so.6
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: /lib/x86_64-linux-gnu/libc.so.6: unknown type [0x13] section `.relr.dyn'
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: skipping incompatible /lib/x86_64-linux-gnu/libc.so.6 when searching for /lib/x86_64-linux-gnu/libc.so.6
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section `.relr.dyn'
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: cannot find /lib64/ld-linux-x86-64.so.2
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: /lib64/ld-linux-x86-64.so.2: unknown type [0x13] section `.relr.dyn'
# /opt/mentor/questasim/gcc-10.3.0-linux_x86_64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.3.0/ld: skipping incompatible /lib64/ld-linux-x86-64.so.2 when searching for /lib64/ld-linux-x86-64.so.2
# collect2: error: ld returned 1 exit status

…ing with older versions of Ubuntu, but one 24.04 it causes vivado to not find the rom and ram.
@davidharrishmc
Copy link
Contributor

Should we just say that Ubuntu 24.04 isn't compatible with current Questa? Does the latest Questa make any difference?

@jordancarlin
Copy link
Member

@rosethompson For Vivado on Ubuntu 24.04 I got the following to work instead of the more complicated install script:

ln -s /lib/x86_64-linux-gnu/libncurses.so.6 /lib/x86_64-linux-gnu/libncurses.so.5
ln -s /lib/x86_64-linux-gnu/libtinfo.so.6 /lib/x86_64-linux-gnu/libntinfo.so.5

It seems like it is looking for those specific names but works fine with the newer version. This way they will still get updated and managed by the system.

@rosethompson
Copy link
Contributor Author

I like that fix for vivado. As for Questa I'm not able to run the latest version. The 2024 versions require a new license server and James had some issues getting running.

@rosethompson
Copy link
Contributor Author

I'll take bin/vivado-ubuntu24.04-libs.sh out of the PR. Shall we add the symlinks to wally-tool-chain-install.sh? Jordan you probably know best where to put it.

…lution by symlinking the new libncurses6 and libtinfo6 to the old libraries.
@rosethompson rosethompson changed the title Add script to install required libraries for Vivado on Ubuntu 24.04 Fixed FPGA build for ubuntu 24.04 and add btb trashing test Oct 30, 2024
@jordancarlin
Copy link
Member

I'll take bin/vivado-ubuntu24.04-libs.sh out of the PR. Shall we add the symlinks to wally-tool-chain-install.sh? Jordan you probably know best where to put it.

Done in #1046

@jordancarlin
Copy link
Member

Maybe we merge this for now and then open an issue to track the Questa problem with Ubuntu 24.04

@rosethompson
Copy link
Contributor Author

That sounds like a good plan. I'll open an issue.

@davidharrishmc davidharrishmc merged commit 0540ab1 into openhwgroup:main Nov 1, 2024
1 check passed
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.

3 participants