Merge pull request #1258 from ucb-bar/fix-open-files-limit-and-fsim

fix open files issue and bump firesim with various fixes
This commit is contained in:
Sagar Karandikar
2022-10-18 18:06:38 -07:00
committed by GitHub
8 changed files with 75 additions and 3 deletions

1
.gitignore vendored
View File

@@ -18,3 +18,4 @@ tags
.bsp/
.conda-env/
.#*
first-clone-setup-fast-log

View File

@@ -2,6 +2,23 @@
This changelog follows the format defined here: https://keepachangelog.com/en/1.0.0/
## [1.8.1] - 2022-10-18
Various fixes and improvements, bump FireSim to 1.15.1.
### Added
* Bump chipyard to integrate mempress #1253
### Changed
* Default VCS simulators should generate FSDB #1252
* Bump to FireSim 1.15.1 for various improvements #1258
### Fixed
* Revert to using sbt-launch.jar to run SBT #1251
* Fix open files issue automatically on systems with a sufficiently large hard limit, to work around buildroot bug. #1258
* Fixed PATH issues in generated env.sh #1258
* Fixed scripts/repo-clean.sh to restore clean repo state again #1258
## [1.8.0] - 2022-09-30
Adds support for NoC-based interconnects with Constellation (https://constellation.readthedocs.io/en/latest/). Switch to Conda for dependency/environment management. Bump Rocket Chip and other hardware libraries. Bump to FireSim 1.15.0.

View File

@@ -96,4 +96,5 @@ $RDIR/scripts/gen-tags.sh
cat << EOT >> env.sh
# line auto-generated by $0
conda activate $RDIR/.conda-env
source $RDIR/scripts/fix-open-files.sh
EOT

View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -ex
{
export MAKEFLAGS=-j16
STARTDIR=$(git rev-parse --show-toplevel)
./build-setup.sh riscv-tools -f
source $STARTDIR/.conda-env/etc/profile.d/conda.sh
source env.sh
./scripts/firesim-setup.sh
cd sims/firesim
source sourceme-f1-manager.sh --skip-ssh-setup
cd sim
unset MAKEFLAGS
make verilator
export MAKEFLAGS=-j16
cd $STARTDIR/software/firemarshal
./init-submodules.sh
marshal -v build br-base.json
cd $STARTDIR
./scripts/repo-clean.sh
} 2>&1 | tee first-clone-setup-fast-log

12
scripts/fix-open-files.sh Normal file
View File

@@ -0,0 +1,12 @@
# first, check if the system allows sufficient limits (the hard limit)
HARD_LIMIT=$(ulimit -Hn)
REQUIRED_LIMIT=16384
if [ "$HARD_LIMIT" -lt "$REQUIRED_LIMIT" ]; then
echo "WARNING: Your system does not support an open files limit (the output of 'ulimit -Sn' and 'ulimit -Hn') of at least $REQUIRED_LIMIT, which is required to workaround a bug in buildroot. You will not be able to build a Linux distro with FireMarshal until this is addressed."
fi
# in any case, set the soft limit to the same value as the hard limit
ulimit -Sn $(ulimit -Hn)

View File

@@ -149,7 +149,7 @@ fi
cat << EOT >> env.sh
# line auto-generated by init-submodules-no-riscv-tools.sh
__DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")"
__DIR="$RDIR"
PATH=\$__DIR/bin:\$PATH
PATH=\$__DIR/software/firemarshal:\$PATH
EOT

View File

@@ -16,7 +16,7 @@ rm -rf $RDIR/toolchains/esp-tools/riscv-tests/build.log
pushd $RDIR/generators/constellation
if [ -d espresso ]
then
git submodule deinit espresso
git submodule deinit -f espresso
fi
popd
)
@@ -25,3 +25,11 @@ rm -rf $RDIR/toolchains/esp-tools/riscv-tests/build.log
git config --local status.showUntrackedFiles no
popd
)
(
pushd $RDIR/generators/cva6/src/main/resources/vsrc
if [ -d cva6 ]
then
git submodule deinit -f cva6
fi
popd
)