[tooling]: Add Nix devshells for core_ibex functional DV and example synthesis flow#2437
Open
hcallahan-lowrisc wants to merge 7 commits into
Open
[tooling]: Add Nix devshells for core_ibex functional DV and example synthesis flow#2437hcallahan-lowrisc wants to merge 7 commits into
hcallahan-lowrisc wants to merge 7 commits into
Conversation
Replace hardcoded #!/bin/bash shebangs with #!/usr/bin/env bash and drop the absolute /bin/bash path in subprocess calls, for compatibility with systems (e.g. NixOS) where bash is not at /bin/bash. Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
…arnings Pass -Wno-error=implicit-function-declaration and -Wno-error=int-conversion via -Xcflags to VCS in both the vendored google_riscv-dv simulator config and the ibex rtl_simulation config, fixing build failures with newer compilers that treat these as errors by default. This allows VCS to be used with a more modern toolchain under some conditions. Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
The .#eda_shell can be used to bootstrap dependencies for running the core_ibex uvm environment, which requires a cosimulation model of spike to be present. This shell correctly sets up environment variables to point to the model. The basic .#shell can be used to simulate the Ibex simple system. Future documentation improvements are needed to explain how these environments can be used to run each verification environment. Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
On Linux, build spike via pkgsCompat (nixos-20.09, GCC 9.3 / glibc 2.32) so the resulting shared libraries carry only GLIBC_2.32 / GLIBCXX_3.4.28 symbol version requirements — compatible with older toolchains / libs such as xcelium cdsgcc/gcc/9.3 toolchain and Ubuntu 22.04. Without this, the default nixpkgs GCC 14 build produces shared libraries requiring GLIBCXX_3.4.32, which is not provided by cdsgcc/gcc/9.3. The shared libraries are also linked with -static-libstdc++/-static-libgcc so they carry no DT_NEEDED on libstdc++.so.6 themselves. On other platforms (e.g. aarch64-darwin) the normal lowrisc-nix package is used since Xcelium ABI constraints don't apply there. Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
… from assign. SV2V does not like the explicit lifetime, so use this approach to keep both this and stricter tools (like xcelium) happy.
Provide a .#syn_shell development environment in which the sample synthesis flow using yosys can be executed. This shell provisions the nangate45 PDK into the nix store and sets an environment variable pointing to it which is picked up by the synthesis scripts. A quick-start for how to use this shell is added to the syn/README. Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
Signed-off-by: Harry Callahan <hcallahan@lowrisc.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add some nix development shells for reproducibly bootstrapping the FOSS project dependencies for the core_ibex UVM environment and the example synthesis flow.
This is a spiritual successor to #2156, which has remained useful as a PoC and should have been completed and merged long ago. The missing link, and what cause me many headaches in the interim period, was modifying the spike derivation to build using a suitably old toolchain and statically-linking some libraries such that host dependencies are minimized and the symbol version floor is low. This allows the library to be successfully linked and remain ABI compatible with proprietary simulators running on older distro releases using relatively-ancient bundled C/Cpp toolchains (such as gcc93).
To get a devShell with deps for the UVM / cosim DV flow in
dv/uvm/core_ibex/:To get a devShell for running the example yosys synthesis flow in
syn: