One fine day we might create our ModelSim project files on demand.
authorMalte S. Stretz <mss@apache.org>
Sun, 28 Jun 2009 15:33:34 +0000 (17:33 +0200)
committerMalte S. Stretz <mss@apache.org>
Sun, 28 Jun 2009 15:33:34 +0000 (17:33 +0200)
.gitignore
bos2k9.mpf.sh [new file with mode: 0755]

index 2ebacfa..3ba25f5 100644 (file)
@@ -8,3 +8,5 @@ transcript
 *.rpt
 *.bak
 *.dpf
+*.mpf
+*.mti
diff --git a/bos2k9.mpf.sh b/bos2k9.mpf.sh
new file mode 100755 (executable)
index 0000000..822b337
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+# TODO
+
+pfile=${0%.*}
+qfile=${pfile%.mpf}.qsf
+
+set_global_assignment() {
+  local name arg lib
+   while [ $# -gt 0 ]; do
+    case "$1" in
+      -name)
+        name=$2
+        arg=$3
+        shift 2
+      ;;
+      -library)
+        lib=$2
+        shift 1
+      ;;
+    esac
+    shift
+  done
+  lib=${lib:-work}
+  case "$name" in
+    PROJECT_OUTPUT_DIRECTORY)
+      outdir=$arg
+    ;;
+    VHDL_FILE)
+      echo $arg $lib
+    ;;
+  esac
+}
+
+while read cmd line; do
+  if type "$cmd" > /dev/null 2>&1; then
+    "$cmd" $line
+  fi
+done < $qfile
+