summaryrefslogtreecommitdiff
path: root/code/glue/sim-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'code/glue/sim-wrapper')
-rwxr-xr-xcode/glue/sim-wrapper24
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
contact: Jan Huwald // Impressum