summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJim Lawson2015-07-24 17:17:01 -0700
committerJim Lawson2015-07-24 17:17:01 -0700
commite73450165c59d68b524689a7169e03140a41a1c5 (patch)
treeb7236f80d9abf60775ecbcefe6f7ca25557dce73 /bin
parent94893bad972ded686a2c68dd334aa40b92e3b85d (diff)
parent3976145bb8c7595ad0f0a7fbb4ccbbd3030d8873 (diff)
Merge pull request #1 from ucb-bar/packagedir
Packagedir
Diffstat (limited to 'bin')
-rwxr-xr-xbin/appall.sh2
-rwxr-xr-xbin/buildtest.sh4
-rwxr-xr-xbin/filter14
-rwxr-xr-xbin/fir2flo.sh6
-rwxr-xr-xbin/flo2app.sh17
-rwxr-xr-xbin/floall.sh2
6 files changed, 32 insertions, 13 deletions
diff --git a/bin/appall.sh b/bin/appall.sh
index 3c9054f1..32f1c118 100755
--- a/bin/appall.sh
+++ b/bin/appall.sh
@@ -3,5 +3,5 @@ shift 1
for file in "$@"; do
echo $file
- (cd generated; ../chisel3/bin/flo2app.sh $file >& $file.appout)
+ (cd generated; $CHISEL_BIN/flo2app.sh $file >& $file.appout)
done
diff --git a/bin/buildtest.sh b/bin/buildtest.sh
index 67d50252..1dd96ecb 100755
--- a/bin/buildtest.sh
+++ b/bin/buildtest.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-build.sh $1
-test.sh $1
+$CHISEL_BIN/build.sh $1
+$CHISEL_BIN/test.sh $1
diff --git a/bin/filter b/bin/filter
new file mode 100755
index 00000000..0038ba47
--- /dev/null
+++ b/bin/filter
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+import fileinput
+import sys
+
+for line in fileinput.input():
+ for ch in line:
+ och = ch
+ if ch == '#':
+ och = '_'
+ elif ch == '$':
+ och = "::"
+ sys.stdout.write(och)
+
+
diff --git a/bin/fir2flo.sh b/bin/fir2flo.sh
index 57dd8e74..3d425a4a 100755
--- a/bin/fir2flo.sh
+++ b/bin/fir2flo.sh
@@ -1,4 +1,6 @@
#!/bin/bash
-$HOME/bar/firrtl/utils/bin/firrtl -i $1.fir -o $1.flo -X flo # -x X # -p c # tkwTgc
-$HOME/bar/chisel3/bin/filter < $1.flo > tmp; mv tmp $1.flo
+$CHISEL_BIN/firrtl -i $1.fir -o $1.flo -X flo # -x X # -p c # tkwTgc
+if [ $? ] ; then
+ $CHISEL_BIN/filter < $1.flo > tmp && mv tmp $1.flo
+fi
diff --git a/bin/flo2app.sh b/bin/flo2app.sh
index 44326dd0..f02ba8c0 100755
--- a/bin/flo2app.sh
+++ b/bin/flo2app.sh
@@ -1,9 +1,12 @@
#!/bin/bash
-echo FLO-LLVM DONE
-/users/jrb/bar/chisel3/bin/flo-llvm $1.flo # --vcdtmp
-echo FLO-LLVM DONE
-flo-llvm-release $1.flo --harness > $1-harness.cpp
-echo FLO-LLVM-RELEASE DONE
-g++ -o $1 $1-harness.cpp $1.o
-echo GPP DONE
+flo-llvm $1.flo # --vcdtmp
+if [ $? ] ; then
+ echo FLO-LLVM DONE
+ flo-llvm-release $1.flo --harness > $1-harness.cpp
+fi
+if [ $? ] ; then
+ echo FLO-LLVM-RELEASE DONE
+ clang++ -o $1 $1-harness.cpp $1.o
+ echo GPP DONE
+fi
diff --git a/bin/floall.sh b/bin/floall.sh
index 872b78a5..31dca1e2 100755
--- a/bin/floall.sh
+++ b/bin/floall.sh
@@ -2,5 +2,5 @@
shift 1
for file in "$@"; do
echo -n $file "-> "
- (cd generated; ../chisel3/bin/fir2flo.sh $file > $file.out; grep "res = " $file.out)
+ (cd generated; $CHISEL_BIN/fir2flo.sh $file > $file.out; grep "res = " $file.out)
done