. ^/ I: W6 d* o% H; `5 }; i( cFMlist1="`get_epicrc ./.epicrc user_adfm_obj_modules_force`" ( T: F5 j& e: q7 [2 ^0 E/ D[ "$FMlist1" = "" ] && FMlist1="`get_epicrc $HOME/.epicrc user_adfm_obj_modules_force`"7 |" s$ h' C1 V, m$ c! L: Z4 v. |
[ "$FMlist1" = "" ] && FMlist1="`get_epicrc $EPIC_DIR/.epicrc user_adfm_obj_modules_force`"' a( i* K7 ~: R* _5 m5 |0 \- a
& }: [- U1 _& x: I
if [ $# -gt 0 -o "$FMlist1" != "" -o "$fmlist1" != "" ]; then * A1 \+ G7 G4 u% u/ U2 K # note that the buildmod script will set the CMDLINE variable 9 h" x& z, b0 Q0 ]0 W( _' H. M . $EPIC_BIN/scripts/buildmod/ \2 i% k+ T- x/ W# \* t
( ~7 T T6 o7 Z- }5 o T2 I& n #echo "This is the value of cmdline=$CMDLINE"! r2 y5 N/ n: G9 C6 k5 z7 d
#exit 0 7 Z$ V3 W( [# W [5 a. j* { 6 U0 l# h( @/ f# D" D/ [( u # if a new timemill/powrmill/pathmill built, run the new one. [" w4 x9 z/ \, `3 X. k5 Z
[ -x "$rundir/$cmd$EPIC_EXEX" ] && command="$rundir/$cmd$EPIC_EXEX" 9 \. D3 x1 D( gfi! C' q* o* j# D3 Z2 I. l. @! m
( m' d! I* |. u" w1 T# _$ [if [ "$cmd" = "timemill" -o "$cmd" = "powrmill" -o "$cmd" = "nanosim" ]; then' S J# L+ V6 H3 [4 q' Z( Q
if [ $have_har_flag -eq 1 ]; then ' x4 r, Q* P9 z' d is_special_har_run=14 X) J1 t: U: R6 G8 s2 V
if [ "$o_option" = "" ]; then ( {/ D5 M) O q" F* v2 u/ j' K case $cmd in & n4 }! Z+ i% |" q: ^ timemill) 6 e9 d7 d2 ~, s D( | har_ofile_prefix=timemill X8 f$ L" r, S* i+ e' z- t1 |' l ;;/ G" C# J. g$ l& l- a2 n5 w
powrmill), U" ?" @/ y5 T0 h- n n. Z0 b
har_ofile_prefix=powrmill 3 I+ A8 d! k( @" ? ;; 5 [$ K/ [4 _5 J* v; p3 \ nanosim) D8 ?9 F0 J! |, R
har_ofile_prefix=nanosim : E4 }: }* _. @ ;;+ M5 \% x I- k3 m, F
esac 0 x, R s1 |1 I; S) E5 r else # Q! d- {3 \2 ^) f' E2 W' a/ q har_ofile_prefix=$o_option* r1 r4 V+ y9 R. u' n" ]9 p' M6 n
fi9 K" j' i" S7 v# \8 p b* I" T
fi . J) f/ R7 S/ n. r( vfi " r) |. g$ b/ r7 G $ Q3 k$ E2 r$ ^) z7 v- n6 R# Call Double precision version of the product if -D: k7 d7 d0 X% C
# or simulation time > 1,000,000 ns. 6 D6 ~$ H8 |7 ], m* q u# I9 A- fif [ "$cmd" = "timemill" -o "$cmd" = "powrmill" -o "$cmd" = "nanosim" -o "$cmd" = "railmill" -o "$cmd" = "pwarc" ]; then r4 I$ p7 o$ m1 O
% Q A9 V; ?. P5 X4 S9 `. ]
# Now the binary always has the ACE feature0 ~# }% o: E0 J9 {
USE_ACE=YES& @7 E9 d3 ]3 L& H1 i' I
; D8 r& |+ T/ H1 L1 Y
HAVE_DP=NO( r% }0 i; E7 `. S# g: v
EXTRA_CAPACITY=NO ! `& d) e H1 V3 d" ]6 m DB_REAL=${FORCE_DB_REAL:-"0"}4 A1 b6 X0 L6 a+ e
$ t0 p6 @* V. |% ~: c6 G* X$ ?( }
# Enhance for ACE ease of use : U- y# x, b$ O- ]* ?7 {" p2 q& D( \ # If no command line option or only a -T option, do: " g, B: F4 q, R/ Q% t # 1. set -A option 2 S r& b! q9 k4 h+ H! W% G2 v # 2. assume input file to be hspice $ u( \3 q4 Z' O # 3. set -o to input file prefix ' H( ?4 V1 W9 U! J; c1 ]! s. w, Z! p # 4. set -z to input file prefix! {. X+ X1 y9 R+ N- d4 a: V
# 5. set -c to default config file# A7 O# B" o1 b& x5 j
netlist=""2 V, O) j. W8 W- z! A8 A1 t$ }
minusT=NO2 H f8 W) K2 F; s; x3 r# A
useStdCmdOpt=0 : q! y/ R/ C0 p# S7 h prefix=""- x# f$ ?7 B! m, v' s) n" \
circuitType="" % Y) y4 i; D% b. ^) i for opt in $CMDLINE & m( p/ j7 n Y7 f+ e do( `# k8 }8 T' J* p" h
case "$opt" in # [- c) F9 C$ K* A7 ]6 L7 K
-T) % B( P4 S0 b: n minusT=YES 9 b2 J: ~, B. `. m4 D5 J9 V ;;# a+ ~( |% c8 X# x" \* j) B
-*) , `- e3 ^+ h# X6 M0 s5 U, H # using standard powrmill command line ' r- R5 z' M- \: x useStdCmdOpt=1 ) R- u8 V3 L# N2 z break 1 Z. Q) n2 }( `# W0 c ;; - q5 j9 J& u0 W* s. q3 J) `0 F *) # k' j1 j2 k8 p9 j if [ "$minusT" = "YES" ]; then, x: I* X& D; i3 i6 C/ C, n
circuitType=$opt 4 `0 A1 n2 z0 ]" M5 h minusT=NO # reset flag) G4 L2 u5 }6 W" M; M! p
else & y6 q; @" Z9 D2 L% a/ |) {5 l, @ if [ "$netlist" = "" ]; then 9 x+ \; W( v: O6 A prefix=`basename $opt` W# B6 B/ u( x
prefix=`expr $prefix : '\([^.]*\)\..*' \| $prefix` 6 E1 [: U2 x) \# f% i4 O6 P fi% I4 ~- _, Z7 b5 [) ?% f J/ E8 A
netlist="$netlist $opt". E2 s' e5 L: M S* H
fi$ d% J6 r1 e' Q) U1 s
;;) h1 x6 L+ j( r8 t# A
esac, }( ?* J) H" n
done! ?# }1 S; z2 _9 x; S V
+ w" E$ _; C( V% K3 c
5 l( _ n. F5 D# z( s& }$ K( [
if [ $useStdCmdOpt -eq 1 ]; then ; Y/ @" l' i( U% H5 l' c # use standard powrmill/timemill command option+ z7 q9 I( ]4 `. l! m
for opt in $CMDLINE 3 F2 f" k9 U" w/ T) x+ D do / p3 R7 v( ?1 A- ]7 S' f/ O A) l h case "$opt" in 5 H$ z; U Z1 K. ^1 M
-A)9 p* t" f" ?4 i, D
DB_REAL=1+ q" K4 v- [% H
;; , n' T6 ]9 `* k* M/ B1 s1 A# ] esac : c7 k2 J- z0 N done ( x2 v$ p5 I- c" _' d7 y6 ~6 ` if [ "$netlist" != "" ]; then9 Y. T- _2 ^/ a5 I8 t
CMDLINE="-nspice $CMDLINE"$ i) u( w. q) q" J
fi r# ^4 V: L% Z: U: o) C! S' ^
else - ^3 Q3 w$ t% q5 N& y3 F if [ "$netlist" != "" ]; then 7 Y2 z y# J. H% t EPIC_DEFAULT_CFG_DIR=${EPIC_DEFAULT_CFG_DIR:-"$EPIC_AUXX/etc/$cmd"}9 \9 t* Q8 `; V- w8 R* E
# construct new command option3 K3 S% ]& B) A) I: w% G
if [ -f $cmd.ini -a "$circuitType" = "" ]; then 9 a* R# f( J8 L/ E& R CMDLINE="-nspice $cmd.ini $netlist" 8 M) S. e% p6 }" o, \3 S- E! \ else! I- P" U/ z! ?
if [ "$circuitType" = "" ]; then 9 }" I4 K) q; v$ T2 r6 Y! N; f circuitType="msana"! B* u$ W, d/ y+ f: [ t
fi% b* i" `4 k) I5 I1 a: b
CMDLINE="-nspice $netlist -c $EPIC_DEFAULT_CFG_DIR/$circuitType.cfg"8 S% W! {8 Y! U/ ^( S1 m
fi 5 Z) {+ a9 h& n$ n CMDLINE="$CMDLINE -A -o $prefix" 7 [" e$ j V( n1 O" d DB_REAL=1 6 W; J5 \3 F! R8 k echo $cmd $CMDLINE 3 I) Z/ c' e- n* K6 _- {0 C- o fi `6 C1 R& R- r# Y& s: [2 Z. @ fi ; Y N" o+ y, L" n; H8 J+ xfi # cmd is timemill or powrmill or nanosim or railmill or pwarc 8 x- K% q7 e& i. u! u, E0 t5 w9 A& a4 U8 b6 T! H
[ "$HAVE_DP" = "YES" ] && [ -x "${command}_a" ] && command=$command"_a"0 R# H7 Y% O6 O- z8 k
[ "$USE_ACE" = "YES" -a "$DB_REAL" = "1" -a -x "${command}_a" ] && command=$command"_a" . U8 s$ k1 M+ A. f2 m5 o8 L0 {[ "$USE_ACE" = "YES" -a "$vlog_design" != "" -a -x "${command}_v" ] && command=$command"_v") z2 i3 O- w: @9 B
0 K1 z7 U* _. \- o y% ]' p
if [ "$__engine_wrapper_called__" != "Indeed" ]; then6 C* U4 ^3 l- S5 G
__engine_wrapper_called__=Indeed/ ?# {7 T1 ]4 ]6 y. R
if [ "$cmd" != "amps" ]; then6 S0 V+ J1 V4 Y+ k1 {9 g, W5 y
export __engine_wrapper_called__ 2 B* t7 T3 d; x( K; I) i7 a* d3 U9 e fi 8 r* i- t L7 D3 D, r: p6 [5 G$ Z H( P% C& W4 \, [
trap "cleanup" 0) ?9 i, D# L3 e! f7 O
trap "" 2( @4 k. t" L/ S! r4 ~" B' X+ M
5 O8 W7 E* ]# p* ^# X
[ -d "$rundir" ] && rm -fr $rundir$ u' V _+ K+ t
[ -d "$rundir" ] || mkdir $rundir8 U* ]6 D1 \8 c& c: V
2 C0 F6 {0 D5 k4 v/ e s
case "$EPIC_ARCH" in $ ]" K- y8 b$ m. {% ~ *SUN*64) 7 X9 V% X' N0 f, z LD_LIBRARY_PATH="$libpathLD_LIBRARY_PATH"# A; O4 A* A/ |" ^: `7 g6 i5 R
export LD_LIBRARY_PATH, ]! D8 \2 B* E( Z" O
suffix=.so 1 F& G( w! A* ?: d ld_err_code=127' }, O7 i. {& f/ D/ ?; w5 M: D! i
;;8 u1 X; N9 h9 I8 j: g4 h
*SUN*4) - P. N1 x' i, c Z5 z" M+ D
LD_LIBRARY_PATH="$libpathLD_LIBRARY_PATH" - Z$ B" N+ m8 T) B8 E0 h" }# O export LD_LIBRARY_PATH , j/ y3 N2 ]& h' ^ suffix=.so.1.0 ; q+ h+ ~) ]6 j" T0 Z# a: N3 y ld_err_code=1272 z/ ?, \9 F9 X& |; \
;; ) W: W1 ^+ j/ B" h, }. x2 q# u *SUN*5) ) J+ {, z) r6 H
LD_LIBRARY_PATH="$libpathLD_LIBRARY_PATH" 1 t& X8 J* Z" h' t) ` export LD_LIBRARY_PATH . K8 U' L1 g) C1 o! f% P suffix=.so + l/ x# k* u5 ?. y/ N1 _ ld_err_code=127% R2 t" R( p+ p6 e2 j" ?; G, \+ N
;; . y' d$ u( C( Q6 m x86sol*) 2 J( a2 F/ G* C, I; g4 t% h
LD_LIBRARY_PATH="$libpathLD_LIBRARY_PATH" # T4 i- c$ [2 e5 C# G export LD_LIBRARY_PATH ) [" t L8 }/ R7 T- _& } suffix=.so* y/ u* e& D# ~9 d$ |( `" ]7 ]
ld_err_code=1276 H3 W. z( `' l: z r W8 M
;; 5 M7 X; r; e m9 P- F/ r2 n9 t: ? *AIX* | aix64) 5 f- a/ @" m5 P' q # When genepiclib creates shared objects, it creates a import file and " P8 f7 \* T6 z( @5 C l2 ^ # uses timemill as program. So at exec time,program timemill is needed ! T- F0 _) w1 E: W4 r
# in LIBPATH , h4 |3 ~# m% y# i* z $ln_default $command $rundir/foomill / J% N. ]: w3 B$ N- N LIBPATH="$libpathLIBPATH:/lib:/usr/lib" R4 H1 K1 p0 X* T8 Z! A! ~
export LIBPATH! L3 E$ D! W3 x5 J
suffix=.o+ r7 U) w9 B7 z% l! V# A1 a' \
ld_err_code=8 0 U) H* V9 n- n6 ]5 v0 `$ A1 n0 e/ ]+ `) f if [ "$EPIC_ARCH" = "RS6000_AIX_4" -o "$EPIC_ARCH" = "RS6000_AIX_5" -o "$EPIC_ARCH" = "aix64" ]; then + W2 l% ?% h9 n tdir=`echo "/tmp/d"$$`% t% M* X+ f% A8 x+ @2 P
[ -d "$tdir" ] || mkdir $tdir2 D( }. Z* N$ X6 B
if [ -f $EPIC_DIR/libCustom.o ]; then+ f D) n2 p5 B' a3 f3 N& P1 [! ]
cp $EPIC_DIR/libCustom.o $tdir/ - `# t* s$ L2 Y+ F6 {% J9 O $ln_default $tdir/libCustom.o $rundir/ ) ]) m/ Z! Y) G7 A9 |& [ fi ) b4 U" F/ Y9 q1 O% w- n; ^ if [ -f $EPIC_DIR/libModel.o ]; then( ?+ w% y7 h# B4 l' X% j$ E0 B* o- i
cp $EPIC_DIR/libModel.o $tdir/0 }; J6 c% Q0 E
$ln_default $tdir/libModel.o $rundir/; n9 D+ N8 ^7 U6 c9 T* [. q. F; `2 S
fi 7 G. c- s$ h, e if [ -f $EPIC_DIR/libFuncModel.o ]; then6 ~1 g1 E R8 H$ C( d% h: c
cp $EPIC_DIR/libFuncModel.o $tdir/$ M/ ?( M+ F% s$ [7 H( o
$ln_default $tdir/libFuncModel.o $rundir/ . b& z; _/ N) k9 L( m8 h! z$ a fi 4 L' ]3 I4 a0 p% d if [ -f $EPIC_DIR/libFuncModel.34.o ]; then- q' R4 p5 x2 e
cp $EPIC_DIR/libFuncModel.34.o $tdir/ 3 W8 q, Q3 p$ K' _% {- W- ] $ln_default $tdir/libFuncModel.34.o $rundir/; A* D& o$ A1 p5 u& Z" Z5 b
fi, |$ A# U' j$ P% C: Z& \" c6 Y6 Q9 }
fi 5 V; Y% u1 k4 t #Set the IBM flag to enable more shared segids2 ~) q! w0 h" L m* X5 I% n, V
EXTSHM="ON"! \/ U0 E1 o) ]' Q* a: ^8 ]
export EXTSHM, |& z \9 H7 |% j* b
;;4 Q7 g* x' Y' S! n0 y! @
*LINUX*) x( d/ Q9 \5 t- D# D
suffix=.so ' F* N; q! q) y* R x$ [7 [4 d8 _ ld_err_code=1 4 x7 n( T0 B: a3 X ;;" {& b; ~1 \" u+ {1 U( z$ O" E8 p
*amd64*) 3 s& s5 W% u( N- L, D suffix=.so , c! M3 p7 L! Y! F# W2 H) q ld_err_code=1 7 m( j3 [) B) I) C+ | ;;( l! \; d+ o- U3 r
*suse64*) 4 i* H8 P8 v! o) ?/ x! z0 D7 { suffix=.so" @6 j: N) o: P$ K6 x' v$ w" w
ld_err_code=1: h6 j* t, |/ E% P
;; 7 V8 F) J' F2 z3 ? ` *suse32*) ) ]! m+ t- C+ x, M; N; S2 l6 u0 w4 }
suffix=.so' s2 V( a' `6 I0 S' U6 n( k
ld_err_code=1 3 z. \# a/ P2 {( |$ ]% ~ ;; 9 |# ?) ?* K' [8 F) j' V' _ esac 0 h. g i9 j% {! x. X! u 8 p# v6 T( F: K9 ^ [ "$has_custom" = "YES" ] && ulib="$ulib $cwd/libCustom$suffix" * \6 C9 O0 S2 H' H1 n/ F; E, B) e [ "$cmdname" != "timemill" ] && [ "$cmdname" != "powrmill" ] \ 5 X' S z! C7 ?- p- m( m && [ "$cmdname" != "nanosim" ] \ + Y+ L/ R4 @, M3 y9 R1 B: [, D && [ "$has_model" = "YES" ] && ulib="$ulib $cwd/libModel$suffix" - p+ t$ e$ H5 O2 ?" w [ "$_VA_" = "YES" ] && ulib="$ulib $cwd/libva$suffix" 0 O: Y! r; }- r8 y' h1 h+ B# C* q# x- B, ?
#Look for command line option for libFuncModel.so " Q9 f$ ]* f" g' K# user_library_next=0 $ {; X- I }4 ~$ v has_fmlib="" ' T, s) B3 X+ w. w1 Q/ c! T for opt in $CMDLINE% v( e" i5 t" I- P
do. B# ~) w9 v* Q' [$ P
case "$opt" in 8 j( Q/ t3 ^7 {9 C1 }' P% g# F; C
-fm)5 ?. g. L2 H! R: _5 K( w p
CMDLINE="$CMDLINE $cwd/libModel$suffix" ! X l3 q& ]/ {3 \2 ]# ?( @ ;;6 Y+ A* G# X& W& ^2 d
-fm_user_lib)* K" |& w3 D' M2 g9 Z2 K: V
has_fmlib="YES" , N. o6 t! B" `( G. i, H. P/ a# user_library_next=17 k- l5 l$ {! n7 h$ ]9 w
;; ( z4 G& X5 F/ _6 h; S -xc) / ]# F* `) ?% _, X" |0 h# d+ _
if [ "$EXTRA_CAPACITY" = "NO" ]; then4 N$ U$ [: f. f$ _; F* x0 f$ Y/ b: b
EXTRA_CAPACITY=YES ! n7 k+ e `- J- } fi $ p6 z! U% c+ L. c% N ;; ) R" N/ Z s3 O( ~0 k6 b# *)! C" s4 b6 P& v8 ?# m
# if [ $user_library_next -eq 1 ]; then % y2 \3 K, `9 f! I9 t% a# v! o( A& p# if [ -f "$opt" ]; then$ p" x* t$ ^; A5 @; M N1 Q
# libfmodel=$opt ; E6 ~, S8 Q" Y$ H) D7 o# else % L+ {) ~+ v x. u5 e; h# echo "-fm_user_lib: Specified file not found" 4 p! } U3 P$ `6 o- _# echo "-fm_user_lib: Specified file not found" >> .epicscriptmessages 6 o- U; u E) D7 b) e K5 `# fi % D- H ^+ w8 x0 x" Q) m! L# user_library_next=04 o7 A- v1 X8 X- v
# fi ' e$ R- D7 B0 q$ U# ;;6 a+ J# u4 p: O A7 {# L3 V
esac: U9 t; F8 K( ~; C+ q* w
done6 u* r- C# p6 q& b, ]" X, G* n
1 Z0 |; o& j* P3 s2 b if [ $cmdname = "timemill" -o $cmdname = "powrmill" -o $cmdname = "nanosim" ]; then x2 F& X- |! \0 o8 P& @& n/ z( S$ I flib=""7 z; g, t0 T5 z, G- x8 `2 k/ I
if [ "$has_fmlib" = "" ]; then 4 O4 ]' Z5 ^/ ^! y& Z flib="$flib `get_epicrc ./.epicrc user_libraries`"$ `) n+ t0 G/ W p2 e% ^2 D
flib="$flib `get_epicrc $HOME/.epicrc user_libraries`"; X C% \0 I6 Q% r" i+ m2 @
flib="$flib `get_epicrc $EPIC_DIR/.epicrc user_libraries`" . t3 o" l. E! k2 \) U. m fi 1 H/ c2 t2 @: x8 L* Y fi v" c' h. j6 k- j& R2 r
. P) H Z [) ~, ?& z! R* P
for i in $ulib: m1 [; g6 g7 a
do3 T" E, p, f7 V" w* J# U8 R
[ ! -f "$i" ] && continue ) c& M" Y, e1 C dir=`dirname $i`; cd $dir; dir=`pwd`; cd $cwd : ?$ o# I' {1 y6 D# Q8 x3 w X i="$dir/`basename $i`"9 y* T9 r U- @9 N% v
case "$i" in 6 i) E9 |9 Q5 l3 F0 [7 i *libCustom$suffix*) [ "$libcustom" = "" ] && libcustom=$i;; ; Q0 M8 P c! t. |0 I7 p *libFuncModel$suffix*) [ "$libfmodel" = "" ] && libfmodel=$i;;. T7 `- |. Y0 U( n% V0 `8 ]
*libModel$suffix*) [ "$libmodel" = "" ] && libmodel=$i;;/ d! e; b. ^9 f9 {; @
*libva$suffix) [ "$libva" = "" ] && libva=$i;;8 }9 u$ c9 M7 \7 O$ _* o$ Z' ~9 d
esac ' D9 D5 Y7 }* f" `1 M [ "$libcustom" != "" -a "$libfmodel" != "" -a "$libmodel" != "" ] \ / x/ _1 s/ J1 m* z/ ~( d. \ && break6 D' O* V0 f0 W5 \
done: |# |! u$ \5 [
7 g# V. a E7 Z6 H5 W3 ^ n$ d
# symbolic link shared libraries to .epicrun$$ 7 P6 C$ P0 R D; H+ W cd $EPIC_DIR; epicdir=`pwd`; cd $cwd8 K3 Z( W- }* p5 S' T( i+ d2 @
if [ $cmdname != "timemill" -a $cmdname != "powrmill" -a $cmdname != "nanosim" ]; then' L2 n# g0 Q4 Y3 T' ~
if [ "$libfmodel" != "" ]; then, n2 @5 D6 E" u2 j' l. v4 S
[ "$libfmodel" != "$epicdir/libFuncModel$suffix" ] && \2 p( K& ^! e y* s& |$ `* V" }0 t
echo "Using $libfmodel ..." && \- j( w& S9 s' Z' m7 g3 [
echo "Using $libfmodel ..." >> $EPIC_SCRIPT_MESSAGES_FILE3 M: R) W+ [2 S2 k; y
if [ -f $rundir/libFuncModel$suffix ]; then . M# t0 A7 d( W rm $rundir/libFuncModel$suffix- Q8 V! Y( ~7 [9 [6 ~
fi, c2 k) U! r8 v1 {+ N3 x
$ln_default $libfmodel $rundir 9 F4 v, }; D0 g+ [) L4 p
fi ' [6 D1 P7 {2 X& }. _ if [ "$libmodel" != "" ]; then# @, F8 X; X X. Q# v9 w
[ "$libmodel" != "$epicdir/libModel$suffix" ] && \* b$ j* {# y* A) Y0 ?3 u. v% [3 D# i r
echo "Using $libmodel ..." && \+ t1 m9 b r' Y. w$ Y# |
echo "Using $libmodel ..." >> $EPIC_SCRIPT_MESSAGES_FILE t8 H( T5 J! t8 R" y7 J8 L
if [ -f $rundir/libModel$suffix ]; then5 i# l% t! u& J( F7 E, |) \
rm $rundir/libModel$suffix 6 {! B) O+ d) |2 |+ [6 f: g0 T3 H fi 9 V: `1 j, g+ O( \1 x/ v $ln_default $libmodel $rundir , M' k' x7 |. Z, ^3 E
fi r- ]9 l- Y; V- M \5 t fi# R# d. u5 a( w4 z, X* m9 j
if [ "$libcustom" != "" ]; then& V: C( G4 b- L1 ~9 j5 C) e! |
[ "$libcustom" != "$epicdir/libCustom$suffix" ] && \( a, H; G' t1 N t3 }/ p
echo "Using $libcustom ..." % g" Z! s& d& s1 I if [ -f $rundir/libCustom$suffix ]; then, I0 g% U1 a% h7 c
rm $rundir/libCustom$suffix ^# Q7 h9 {0 E1 M( J fi ; s% K9 D3 e5 U6 q1 ^& k $ln_default $libcustom $rundir . z4 q( Z- j$ v8 T6 V. R3 {% D
fi 5 h# G# t& s" d% l; [9 S" I" w* A; b" C8 g" v1 l0 Q
if [ "$flib" != "" -a "$flib" != " " ]; then, k6 X Q( J3 \( h
CMDLINE="$CMDLINE -fm_user_lib $flib" 6 z4 b! E$ W) ?6 N fi+ \, a; X' K8 }, M
$ S7 X/ c" U0 P! D1 K9 y3 P if [ "$libva" != "" ]; then `2 E2 W# `9 ]; {/ q+ c) V7 j4 B
if [ -f $rundir/libva$suffix ]; then 9 m' i3 A) Y, n8 R. s1 m1 f rm $rundir/libva$suffix- g% ^3 y' ]' g S
fi ! b4 }+ v3 ~0 i, i9 o $ln_default $libva $rundir + y$ W3 [: z/ m. a
fi& A2 P, t u& e
3 h6 f& Q, t P0 Q4 k4 c( X) }5 q 2 c& |) z! d* f- T0 } # VCORE design library Z) h' b3 C% l1 e, X: r0 k
if [ "$vlog_design" != "" ]; then; T7 U6 O- _& M$ Q" Y+ c h: R
$ln_default $cwd/$vlog_design $rundir/`basename $vlog_design`5 R( {8 ]8 d& O, L1 T9 r
fi # L! f& q2 Y: e & s5 U$ n$ \7 J" h if [ "$EPIC_EXTRA_CAPACITY" = "1" ]; then ; A/ \) m0 z. @! s5 } EXTRA_CAPACITY=YES 7 A, h' r" V5 S fi $ m: P; h8 f' j7 V2 o6 ^6 K/ X2 k( F
[ "$EXTRA_CAPACITY" = "YES" -a "$USE_ACE" = "YES" -a "$DB_REAL" = "0" -a -x "${command}_xc" ] && command=$command"_xc" 3 q) x$ _, e1 y! u8 J [ "$EXTRA_CAPACITY" = "YES" -a "$USE_ACE" = "YES" -a "$DB_REAL" = "1" -a -x "${command}_a_xc" ] && command=$command"_a_xc" & g( b8 S K1 ?$ J #Create temp file if dual process is on+ L& a9 v1 z/ q$ E# v
if [ "$EPIC_ARCH" = "SUN4_SUNOS_5" ]; then / a& i8 q7 ~" a; M# s6 { if [ "$EXTRA_CAPACITY" = "YES" ]; then& {% @. h1 a0 N3 k; c. N' F
touch $rundir/rpcidfile . z* A# m( o. k0 a5 i fi, g# G/ k; L) O
fi+ E; H' z6 F' [# u- D, m& `
fi & C0 k7 J; S' t' O 5 U; @8 W5 X+ ^- j$ H1 d, T2 B' frun_cmd() ! [. K# E4 z0 Q; U* \0 U4 f{3 e$ _" y1 t6 b" P
command=$1+ M- c6 l: `& \# V+ k
shift + |& z: `: p% H" j) K) f% ~ 4 E- D9 x2 U/ O if [ x"$VA_FILE" != x"" ] ; then. u" f5 b8 H, M& X: Y; e4 z
cmdline=$ARGV& G+ |! G, y2 x. C# M# U
else 5 o S8 j" W; f* G1 | cmdline=$@+ @$ \- q% k$ s1 V$ T
fi# C, H5 p9 Z4 t
9 T' Y$ K. k3 c2 ^ x
debug=${DEBUGGER:+"$DEBUGGER $command"};9 ^ g; r0 L/ ^ w7 }0 b
- c# y3 J$ y% F* q7 T4 W
# To disable Exec-shield-randomize in RHEL3 U3+ when running nanosim and nanosim_a. R( v* n" R) W" P6 D# r Y
# so save-restore may work. + K! c3 r8 G4 M6 s0 H7 d9 y setarchStr=3 S7 {/ F4 v0 u- x# ?2 e$ A
cmd2run=`basename $command`- z) R! ?0 V8 h v) {# M/ f1 \0 R
if [ ${cmd2run} = 'nanosim' -o ${cmd2run} = 'nanosim_a' -o ${cmd2run} = 'powrmill' -o ${cmd2run} = 'timemill' ]; then0 e& t* O6 R, n; K1 Q; z
if [ "$EPIC_ARCH" = "IBMPC_LINUX_LINUX" ]; then , p# N1 Y/ | L setarchStr="setarch i386 -R "+ u' \0 v% B2 w7 I9 Y' m
fi$ g- ^; y) z, m" q9 `9 a
if [ "$EPIC_ARCH" = "linux" ]; then 5 w3 Y% L4 N' Q a- Y setarchStr="setarch i386 -R " * A3 A) u2 O: `: y5 Q fi ( w. m; R( Z( H$ h3 ~( k if [ "$EPIC_ARCH" = "amd64" ]; then$ W# |$ l- t% e' _+ b8 H
setarchStr="setarch i686 -R " ; J( E) \( @) _" J" ] U x: B4 }3 \ fi " o. T$ m; f5 F5 q0 [9 S6 h" j" h) { if [ "$EPIC_ARCH" = "suse32" ]; then n: g+ x9 [0 a1 u6 \: S4 y* i' b5 R* h7 N setarchStr="setarch_suse i386 -R " 4 M! z: w7 f; Z3 l k8 K fi . w0 Z0 X; [" p- q9 J; b if [ "$EPIC_ARCH" = "suse64" ]; then , E9 z. a, x; Q$ j* W2 ]9 u0 h setarchStr="setarch_suse i686 -R "+ { Q! Y7 g- J3 g4 w
fi: X$ Q3 t2 Z* ?! Q
fi9 r, p8 e9 x* I, o
9 ~% O$ d4 F% `- K* D8 \ ret_stat=08 T0 J1 n% T, n8 ?4 p8 H k- p" i
if [ -x "$command" ]; then4 N" C C, |: F9 W2 ~* }; M3 i" C
if [ "$debug" ]; then! x# U3 R- c A4 ~4 ]# R0 J+ W% {
_debug_args_=$cmdline 2 q( f8 K( r$ \! j . .epic-debug8 m! W% V4 l8 {: E2 ?- _
else 0 [5 M7 t9 q: j; D DEBUGGER=; export DEBUGGER5 D% ?8 l+ l, e/ _/ M; x
$setarchStr $command $cmdline ' @2 o4 L% j, B' K fi , _; J- U; `# {* M# I ret_stat=$?' K& @# C4 S+ A+ @+ m, {3 z
else - M8 j0 p) e2 F+ ]1 U0 g! D echo "Corrupt installation, executable \"$1\" not found!" & U8 M- L: K% i5 R( G, x ret_stat=19 l6 e7 H" o4 S: v; U8 N# L# _- H
fi2 f1 X% k, H% j. r1 T1 s
} / F: G- w( r4 S' y" S3 ]! C w3 H; S* w* Q8 Q: h# q
# keep runing cmd if ctrl file exist/ R: W \- R% l# T# M% a" X
* i2 c1 w: {# m: E9 `1 orun_loop() . s, @6 f) h+ ?, r4 D{! ?8 W \4 r# D! S2 D( }( Q, ^3 p
command=$1 / W3 y* V6 F+ n/ ` shift ) n: @1 B+ \# e6 \ w5 U4 S ; u# Y/ M. _. }9 ~, P& t" a if [ x"$VA_FILE" != x"" ] ; then( O4 k3 I3 ~( `- f" q* }
cmdline=$ARGV8 X8 l$ ?% v# R" G5 M
else) U6 a t# D: b3 ^
cmdline=$@; J- E' t1 f4 O
fi 5 h n8 {2 j2 h" | 2 b5 y5 ]% `" @& J while [ $ret_stat -eq 0 -a -r $LOOP_CTRL_FILE$$ ]; do 4 s3 Y, F; k1 x . $LOOP_CTRL_FILE$$; o5 Y! s5 t/ l. ]2 S
run_cmd $command $cmdline -banner 2# a. v/ y5 s u* `3 E; T
done;: R" N# p( f: l" C
' |0 Y. T) v- D/ _! {, W) i1 z( P4 b if [ $ret_stat -ne 0 -a -r $LOOP_CTRL_FILE$$ ]; then 3 Q. {9 g7 [$ [! | v rm -f $LOOP_CTRL_FILE$$) @ T2 O5 C; v$ X
fi & {( L, h0 r* U2 v}9 s( v# S1 R5 _7 h+ ]. B
2 w$ H" l* E% q
har_check_ret_stat(). S, [, @" D) Y8 P/ u9 [
{ 2 R$ n' Q+ l' R/ r7 P if [ $ret_stat -ne 0 ]; then 0 t: s4 L$ {4 l6 V4 m
echo "Simulator returned with non-zero exit status. Stopping." # O( }& o- N; ?6 s ~: V exit 1. @# c% {1 ]4 F M; [/ K! o
fi }5 L/ Z9 J. F% d8 p7 q4 [} * _: B) P& [* d m5 u+ N9 n) d7 I
#9 P0 R7 l9 t7 V0 ]
# set stacksize and datasize limit 0 p& ]* k. }9 r3 t# 4 k" t! W. r, E# R8 X6 ^# C" Q4 y! v# B5 }, l: [( u6 @; a0 z4 g
set_data_limit7 h# ^- g2 q E) p# m
set_stack_limit `. P( R3 b* u+ ]% ^
+ U) M- O" q1 `" [7 T0 b, q9 X#rm -f $LOOP_CTRL_FILE, z' r5 f& q5 q! h9 }, ~
% u; W, q) v# h1 B( e2 l
run_main()/ s! c3 V* l, a% l- O
{ 0 ^( w7 d5 b+ {! E* b: b0 P$ |if [ $is_special_har_run -eq 1 ]; then4 m( D/ W! u5 ^1 C0 l2 e$ C% J
if [ "$har_ofile_prefix" = "" ]; then3 l% p5 _! g l
echo "Wrapper bug. Notify Synopsys technical support." 1 T) O: X3 q1 A1 i+ h2 D8 {2 T" @ exit 1 ) D3 N& Y# m+ l+ f. Y fi1 C8 a0 A S$ [9 [% W4 ?2 e
if [ "$har_hilo_file" = "" ]; then " Z6 Z. m3 T) |3 x$ [ # no user specified hi lo file - do both runs" H+ k. U. \- `6 |4 q
run_cmd $command $CMDLINE -har_one -har_setup5 r+ D1 y4 K8 {& \
if [ $ret_stat -ne 126 ]; then L; i. E) i# R q, J har_check_ret_stat . C2 E7 L# T- R if [ -r $LOOP_CTRL_FILE$$ ]; then( M# F; j: E. F, U0 k, {
run_loop $command $CMDLINE -har_one -har_sim ${har_ofile_prefix}.hl+ i; R$ {( Y8 o& x+ p1 L1 A! x5 U
rm -f ${har_ofile_prefix}.hl" X9 h, W9 B4 ~9 S) I& X- v' d* g7 Z
else3 k, R2 _& d7 F% _2 R" R
run_cmd $command $CMDLINE -har_one -har_rmhilo -har_sim ${har_ofile_prefix}.hl% Z7 M: E- E5 C
fi ' O4 h$ f6 @! O9 L, D else $ A- d) j0 N) h1 E7 D* A' G3 T6 \/ L1 S ret_stat=0& x5 k' S2 ^! K7 [/ D
fi ) P3 F5 E$ T s! E5 D else7 ?+ s5 j1 D5 y+ G
# user gave a hi lo file name2 S8 c" ?) a, v2 R$ T
if [ -f $har_hilo_file -a -s $har_hilo_file ]; then" ~( M0 a- k( P7 {5 Q0 |7 \' o/ Q. C$ w
# file exists - use it - only do sim run * h& B9 G& w4 }7 L% M2 W, f run_cmd $command $CMDLINE -har_one -har_ff -har_sim ${har_hilo_file}7 c5 j- N- J3 M8 X9 k7 a1 b
run_loop $command $CMDLINE -har_one -har_ff -har_sim ${har_hilo_file}! U$ u2 W2 {: M
else 1 n( r& D& t) [: c) d # no such file - generate it - do both runs: z8 Z6 E8 b: S/ o7 X
run_cmd $command $CMDLINE -har_one -har_fnf -har_setup ! u# o) K2 d; U H if [ $ret_stat -ne 126 ]; then# S* d% g# m; m) J, V+ Q7 h$ ^: K
har_check_ret_stat" n8 d$ x9 x4 P- \
if [ ! -f ${har_ofile_prefix}.hl ]; then 9 R+ O6 K* b& N0 m' a/ u6 {( T: o echo "No hi lo file generated after setup phase. " " G, F' P, y5 O5 i+ G echo "Contact Synopsys technical support." * d) S6 c$ C7 K% x1 m6 x) t exit 1 8 ]/ T8 n/ x5 F else' t3 X$ F8 T, X2 U
if [ ${har_ofile_prefix}.hl != $har_hilo_file ]; then3 Z- L# {" S' J5 ]3 c; O- u; x( r
mv ${har_ofile_prefix}.hl $har_hilo_file% g& H! a% Q4 L* }: x/ q
fi 9 a3 y) c P a* O6 W, R8 A fi( B# e" r# h7 N: A: z. w$ t" |
if [ -r $LOOP_CTRL_FILE$$ ]; then4 K* M4 {# s6 F6 n A, E& F( a' j
run_loop $command $CMDLINE -har_one -har_sim $har_hilo_file/ Q8 Q& U& z7 g
else* K, N" r, A, g( _5 w$ E
run_cmd $command $CMDLINE -har_one -har_sim $har_hilo_file + X7 O; z6 |& }+ x fi" P: m+ \: ~+ g* R; m) v, |% g
else % F9 y; h% m- r5 n8 d2 \
ret_stat=0 " i# i8 s5 Q1 [# u# e5 ]/ P+ A fi * x7 m3 g" `" Q1 r" J8 P( P fi ( v0 Y# f9 z& i+ N fi 8 J! O! u+ U0 L' Z: T0 `else 0 O2 r! `" N0 f/ @# don't loop if -har_setup, u& M. X1 ~6 W- f e1 Z7 q5 U" b( a& g) }
if [ $have_har_setup_flag -eq 1 ]; then - v& e/ q) o& p8 t! Y" ? V! ^ run_cmd $command $CMDLINE / ?& [8 W6 D* p7 p B! m( t) ] if [ -r $LOOP_CTRL_FILE$$ ]; then ; ^- N# }) e, |1 F8 G" [ rm -f $LOOP_CTRL_FILE$$/ ?8 T: t8 [- t
fi3 V, y3 Z, r9 y: r. S) p# T
else ; J2 ]1 \# \+ h5 j run_cmd $command $CMDLINE% H% U8 J7 M: @1 j1 n! D
run_loop $command $CMDLINE- u0 I- o1 J0 a: ~ L
fi% ?8 a" z7 `7 [& C
fi1 E; ~+ L0 d! ]! x7 x' ~8 O
4 `# n: d. b* l+ k/ O+ A: g9 O
if [ $ret_stat -eq 0 -a $cmdname = "powrmill" -a $postgres = "y" -a ! -z "$workDir" ]; then# q* ^" w) r" m; r. U$ B4 r! @) p
pwCreateErrDB -w $workDir -e $errFile 2 M0 f+ E( r9 @* I- Y% z ret_stat=$?' m8 f& J/ h4 D8 \4 ?
fi, r6 E6 n. r _% [/ O* u! H
}; y; ]+ C0 D; T8 y* \( a) f
& Z% A% c- L! f4 V( m* T( I
cleanup_alter() 1 x1 U8 Z6 Y5 U. G8 T7 \4 N- L{7 [) S! @8 ~5 D/ q9 W2 W$ D' X
/bin/rm -f $ALTER_COUNT_FILE 1>&2 ! i, S% l' B: f% Z" V4 c /bin/rm -f $ALTER_HK_FILE 1>&2 ( b( A; [! a: G( p} 5 e5 V4 r- J! B( } / t( \9 y) u# j/ d' n#generate alter temp files based on pid , o# Q* O; y' w+ u% T4 pALTER_COUNT_FILE="$ALTER_COUNT_FILE"$$3 Q6 L1 x- Q9 H6 A; {/ b* ~
if [ -f $ALTER_COUNT_FILE ]0 W: X5 Y: d+ B" r/ {7 ~
then 6 R1 b/ K4 [( R" @
until [ ! -f $ALTER_COUNT_FILE ]0 K# h( w" s! D2 \
do/ @& b7 Y5 [$ }4 V( u" {- Y9 q
ALTER_COUNT_FILE="$ALTER_COUNT_FILE"$$7 O0 o6 y2 S: b* V' L/ \( y7 J
done * H8 S: { E0 g9 N, X* ^fi ( T. P6 d0 N' \2 R9 o, fexport ALTER_COUNT_FILE/ `. H/ N. J' i/ i* H) [
# R' t K m% M$ H6 D) a
ALTER_HK_FILE="$ALTER_HK_FILE"$$ % H( ~& F0 { V$ z9 ] Lif [ -f $ALTER_HK_FILE ] 9 Z0 N* Q4 ^ {then , ?( \5 s" `* b8 h( W8 C" F
until [ ! -f $ALTER_HK_FILE ] ; D4 U; w4 T# `: d/ s! ? do) a$ S2 a8 u6 z1 |
ALTER_HK_FILE="$ALTER_HK_FILE"$$ # D3 S% c" K7 P done 1 P! D6 L' w& [9 s% y% |fi3 }! d, N# {* @0 ~
export ALTER_HK_FILE 1 Y( ]( S9 U' K3 N8 Q 3 J: j" V* G. V o4 s/ J3 A#generate monte carlo related temp files based on pid' B- Z0 r' l" t( W
cleanup_monte() ( I, S( ? Y# k" Q{ 5 B; ] h; X! F8 z3 @0 m4 D /bin/rm -f $MONTE_IMG_FILE 1>&2 |+ X0 Q; y- ?) e /bin/rm -f $MONTE_IMG_FILE.gz 1>&2 , b/ C/ e- h) m6 w) c /bin/rm -f $MONTE_COUNT_FILE 1>&2 0 \: O" M5 G$ _9 Y /bin/rm -f $MONTE_CFG_FILE 1>&2 ?/ h( Y# l3 F# Z
} * G1 t0 Z, i( o6 [ L; k$ r$ P7 I1 G1 d# v! x' @ l
MONTE_COUNT_FILE="$MONTE_COUNT_FILE"$$ & A( }& w8 j. _# X! vif [ -f $MONTE_COUNT_FILE ] + n+ i1 [- f- Y& m6 |then - s s {8 X$ I- E8 u9 M4 ] until [ ! -f $MONTE_COUNT_FILE ]: ?* |# l& W* s# i' D+ }) Y' v
do [& }7 p- u) A+ G, O
MONTE_COUNT_FILE="$MONTE_COUNT_FILE"$$, u3 Z4 M- C4 H
done4 A" i% S4 T' F$ s' _- s# K
fi 4 F; l8 s% a( \6 K1 Jexport MONTE_COUNT_FILE , [9 i: Z3 i O " I& R( I% x w1 z! N2 _MONTE_IMG_FILE="$MONTE_IMG_FILE"$$ - w& b: Z8 U/ K% @7 i# a+ fif [ -f $MONTE_IMG_FILE ] 6 m+ M9 [% h$ k- d" \then i4 ]7 H% p9 p( E
until [ ! -f $MONTE_IMG_FILE ] / e2 V6 E. y' Y. x/ t: g do( k. w+ j$ T3 z+ U
MONTE_IMG_FILE="$MONTE_IMG_FILE"$$4 s8 M* @" }$ a& U9 W: |6 ?
done * s6 M8 F( v& c5 V6 ifi- V1 ?; a2 i" R T
export MONTE_IMG_FILE 4 j) y# a; k& w: R ! u7 F! K# `4 O6 w" a# vMONTE_CFG_FILE="$MONTE_CFG_FILE"$$ 8 V' Q x9 i- n; D' _5 Jif [ -f $MONTE_CFG_FILE ] e; A& Z f5 W: N
then O; v+ s! T1 a/ |3 ?8 b; ?; S until [ ! -f $MONTE_CFG_FILE ]: J" I# I+ ^3 S" b+ C: C
do+ B) }/ K( H, R& r/ v
MONTE_CFG_FILE="$MONTE_CFG_FILE"$$ p5 x# T! l: q: u5 T& s
done: [ G4 Y0 w, _& [/ k( ^% [
fi u) c, f+ {( x
" s: p6 U" @; q# main iteration 8 m& G* B+ b5 n# d2 E* p& N: @run_main + u7 U" d, q' f9 f8 E7 W. T9 }" B, g; n; V6 j) F2 k6 C6 \
if [ $ret_stat -ne 0 ] 2 z6 {) S/ r4 b$ ^
then / ^8 m" N1 Z6 Z' ]* E% c% d n cleanup_alter . Z, Y2 F: Y. c+ K9 g% ^ cleanup_monte ' [/ n- B3 S, I3 T$ R Exit $ret_stat 6 H0 n8 _! i+ K; b p( i0 r, Ufi3 j' p, W- M i% p
& Y u$ _# H. \3 A* i ?#Alter related iterations4 s N& ]9 f7 O* T+ j9 \
+ P4 s7 j% X4 r* A eiterations=0 ! f+ c# a4 P" n- t3 Q# zcount=0 % Z: {) S4 @( d! ]! ]1 Y! Q5 bif test -s "$ALTER_COUNT_FILE" / X& X3 H& @0 X( t+ N* [9 ythen & \ j4 o4 N: b+ N if [ -r $ALTER_COUNT_FILE ]; then4 B H m, v, n# g
exec 7< $ALTER_COUNT_FILE& E( J0 `5 [9 C. n- a
read iterations <&7 * d& i: {$ V; t+ F2 c O; T; Z( B fi% u$ h, a& M9 \. A
fi M/ O: K; r8 B2 P R 1 c9 B$ [& Y) u$ u: f& Btrap 'echo Program Interrupt; cleanup_alter; exit 1' 2+ C! _! R, {) D2 n
while [ $count -lt $iterations ]3 M6 K5 z% \# J2 }/ R
do1 a+ T' j8 h8 j8 K6 S
count=`expr $count + 1` % S7 K% s5 g4 o* ] ALTER_COUNT=$count * W: f3 z8 D2 g B+ |$ B export ALTER_COUNT- p: b0 K& O9 R6 O* r$ l
) x' o p% b8 u# K2 v
run_main2 n( G$ P' \( H7 V1 B
! [) [1 g5 q" g0 `0 i9 ], D
done% T' | I- d, E4 A# I5 M) }
' C p2 J* Y. k) u! q# R# A
#Monte carlo related iterations 5 R4 g+ u4 Y) f* M% e% q6 E' C " T Y9 q6 i& ? N0 O3 \. L5 w* ]% Dmonte_runtime_summary() $ E7 R" W+ Q* z% a3 J2 ]{7 Y' \! ^- {. c0 | i" w5 C) a
keyword_1=real1 W. c8 N5 w/ u8 s$ Y) \( x
keyword_2=user3 _. W9 s! ]- f: C7 H
keyword_3=sys V Y& C% {8 S8 {) S! z' F
ofile_prefix=nanosim0 ~! T9 j; n# x9 y& z$ ?$ n% b
* D0 v% q" Q5 z/ P- n if [ ! -z "$o_option" ]; then - j: B+ G# h8 N6 m logfile=${o_option}.log ! E2 l9 W) U3 v# f/ O else6 [. q r' M B( B! l' Q
logfile=${ofile_prefix}.log! h$ }7 w4 {" y5 H2 O6 |
fi% S( Q) ]3 o, P& D1 U
7 ~! z3 s: W% H
if [ -f $logfile ]; then 3 l3 U2 I& Y: v) @: G2 j( u) a. v( A echo "*** Monte Carlo Total Run Time Summary ***" >> $logfile 4 Z; g; ~' F" @* t; G! c3 k+ n
cat $logfile | grep ${keyword_1} | grep ${keyword_2} | grep ${keyword_3} | awk 'BEGIN{ t_real=0; t_user=0; t_sys=0; } NF==6 { t_real=t_real+$1; t_user=t_user+$3; t_sys=t_sys+$5 } END{ print "\t", t_real, $2, t_user, $4, t_sys, $6 }' >> $logfile ! h# E( W3 j9 h+ E" F1 k7 F8 T' I7 t fi 1 C& w2 {. {5 r6 _8 ^}+ Y: p6 I% d5 y4 q9 p: m