diff options
author | Jan Huwald <jh@sotun.de> | 2012-05-07 19:53:27 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2012-05-07 19:53:27 (GMT) |
commit | 00b209240138660db1ded3ef3870023964ce6e4e (patch) | |
tree | 8ffaec780b060bdc478929aa714b8af2ee760671 /code/glue/sim-wrapper |
Diffstat (limited to 'code/glue/sim-wrapper')
-rwxr-xr-x | code/glue/sim-wrapper | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/code/glue/sim-wrapper b/code/glue/sim-wrapper new file mode 100755 index 0000000..9825409 --- /dev/null +++ b/code/glue/sim-wrapper @@ -0,0 +1,24 @@ +#!/bin/sh + +if [ ! $# -eq 10 ]; then + echo 'wrong parameter count (see ./sim-current for parameter order and add the model (current/if/...) as the first param)' >&2 + exit 1 +fi + +# determine the path of the simulaton program +SIM=`dirname $0`/../core/sim-$1 +if [ ! -x $SIM ]; then + echo "executable ($SIM) does not exist" >&2 + exit 1 +fi + +# check if one of the input files is executable +if [ -x $2 -o -x $3 -o -x $4 -o -x $5 -o -x $5 -o -x $6 -o -x $6 -o -x $7 -o -x $8 -o -x $9 ]; then + # yes -> interactive simulation + # create the FIFOs to communicate + echo Interactive spike program is not NOT IMPLEMENTED + exit 1 +else + # no -> static simulation + $SIM $2 $3 $4 $5 $6 $7 $8 $9 $10 +fi |