Skip to content

Commit

Permalink
[nix] run vcs wrapper in result dir
Browse files Browse the repository at this point in the history
Signed-off-by: unlsycn <unlsycn@unlsycn.com>
  • Loading branch information
unlsycn committed Oct 15, 2024
1 parent 29bd971 commit f33a407
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions templates/chisel/nix/gcd/scripts/vcs-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ cp -r "$_VCS_SIM_DAIDIR" "$_CURRENT/"

if [ -n "$_VCS_COV_DIR" ]; then
cp -vr "$_LIB/$_VCS_COV_DIR" "$_CURRENT/"
_CM_ARG="-cm assert -cm_dir $_CURRENT/$_VCS_COV_DIR"
_CM_ARG="-cm assert -cm_dir ./$_VCS_COV_DIR" # vcs runs in $_CURRENT
fi

chmod -R +w "$_CURRENT"
pushd "$_CURRENT" >/dev/null

_emu_name=$(basename "$_VCS_SIM_BIN")
_daidir=$(basename "$_VCS_SIM_DAIDIR")

export LD_LIBRARY_PATH="$_CURRENT/$_daidir:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$PWD/$_daidir:$LD_LIBRARY_PATH"

"$_VCS_FHS_ENV" -c "$_CURRENT/$_emu_name $_CM_ARG $_EXTRA_ARGS" &> >(tee $_CURRENT/vcs-emu-journal.log)
"$_VCS_FHS_ENV" -c "./$_emu_name $_CM_ARG $_EXTRA_ARGS" &> >(tee $./vcs-emu-journal.log)

if [ -n "$_VCS_COV_DIR" ]; then
"$_VCS_FHS_ENV" -c "urg -dir "$_CURRENT/$_VCS_COV_DIR" -format text"
cp -vr ./urgReport "$_CURRENT/"
"$_VCS_FHS_ENV" -c "urg -dir "./$_VCS_COV_DIR" -format text"
fi

if ((${DATA_ONLY:-0})); then
rm -f "$_CURRENT/$_emu_name"
rm -f "./$_emu_name"
fi

set -e _emu_name _daidir
Expand Down

0 comments on commit f33a407

Please sign in to comment.