Skip to content

Commit a67fec5

Browse files
authored
correct paths to support 2020.1 changes (#141)
* correct paths to support 2020.1 changes Signed-off-by: Bruno Mesnet <bruno.mesnet@fr.ibm.com>
1 parent 6221c80 commit a67fec5

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

hardware/sim/run_sim

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,16 @@
302302
SIM_INIT='' # default init value for simulator
303303
SIM_ARG='' # -batch overrides -tcl
304304
VPI_OPT='libdpi.so'
305-
#DEBUG 7/22 - add cd later so need to add path
306-
#SIM_ARG+=" -t xsrun.tcl" # -tclbatch arg
307-
SIM_ARG+=" -t $SNAP_ROOT/hardware/sim/xsrun.tcl" # -tclbatch arg
305+
#7/22: starting with 2020.1 xsim simulator need now to be called from xsim vs SIMOUT
306+
SIM_ARG+=" -t ./$SIMOUT/xsrun.tcl" # -tclbatch arg
308307

309308
# SIM_ARG+=" -t xsrun.tcl +model_data+." # syntax errors
310309
if [ "$AET" == "1" ];then
311-
`sed -i "s/#source xsaet.tcl/ source xsaet.tcl/g" xsrun.tcl` # enable/uncomment AET generation in xsrun.tcl
310+
#7/22: starting with 2020.1 xsim simulator need now to be called from xsim vs SIMOUT
311+
`sed -i "s|#source xsaet.tcl| source ./$SIMOUT/xsaet.tcl|g" xsrun.tcl` # enable/uncomment AET generation in xsrun.tcl
312312
else
313-
`sed -i "s/ source xsaet.tcl/#source xsaet.tcl/g" xsrun.tcl` # disable/comment AET generation in xsrun.tcl
313+
#7/22: starting with 2020.1 xsim simulator need now to be called from xsim vs SIMOUT
314+
`sed -i "s| source xsaet.tcl|#source ./$SIMOUT/xsaet.tcl|g" xsrun.tcl` # disable/comment AET generation in xsrun.tcl
314315
fi
315316
elif [ "$SIMDIR" == "questa" ];then
316317
SIM_INIT='' # default init value for simulator
@@ -337,9 +338,9 @@
337338
##### call Simulator
338339
if [ "$SIMULATOR" == "irun" ]||[ "$SIMULATOR" == "xrun" ];then SIM_ARG+=" -r";fi
339340
echo "**** call simulator=$SIMULATOR $SIM_ARG $SIMTOP $SIM_PARM in background, wait for socket in $SIMULATOR.log->shim_host.dat"|tee -a sim.log &
340-
#DEBUG 7/22 - add cd to remove the 2020.1 issue
341341
if [ "$SIMULATOR" == "xsim" ];then
342-
cd $SNAP_ROOT/hardware/sim/$SIMDIR;
342+
#7/22: starting with 2020.1 xsim simulator need now to be called from xsim vs SIMOUT
343+
cd ..;
343344
$SIMULATOR $SIM_ARG $SIMTOP $SIM_PARM |tee -a $SIMOUT/sim.log &
344345
cd $SIMOUT;
345346
else
@@ -585,4 +586,10 @@
585586
cd $SIMBASE; sleep 5; grep --text -Hi 'testcase RC=0, ' $SIMOUT/stim.log|sed 's/\// /g'|awk '{print $1}'|xargs -i{} rm -fr "{}" 2>/dev/null # remove directories with 0 errors
586587
fi
587588
#echo "*** leftover processes on this machine:"; ps -ef|grep -E "$SIMULATOR|ocse|genwqe"|grep $IAM|grep -v grep
589+
590+
#7/22: starting with 2020.1 xsim simulator need now to be called from xsim vs SIMOUT
591+
#so the top.wdb has to be moved to the $SIMOUT current directory
592+
if [ "$SIMULATOR" == "xsim" ];then
593+
mv ../top.wdb .
594+
fi
588595
exit $TCRC

0 commit comments

Comments
 (0)