diff options
| author | jackbackrack | 2015-04-27 16:21:23 -0700 |
|---|---|---|
| committer | jackbackrack | 2015-04-27 16:21:23 -0700 |
| commit | 8c8f6b99d2eb8bc783179c7c0113fc4a734c9585 (patch) | |
| tree | 2a1288531c558310c5acaedd4957097a380b6ab0 /bin | |
| parent | 136352557ba0c6b9c97621e9dfefb4009faef7cc (diff) | |
build scripts
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/appall.sh | 28 | ||||
| -rwxr-xr-x | bin/build.sh | 5 | ||||
| -rwxr-xr-x | bin/buildtest.sh | 4 | ||||
| -rw-r--r-- | bin/filter.cpp | 11 | ||||
| -rwxr-xr-x | bin/fir2flo.sh | 4 | ||||
| -rwxr-xr-x | bin/firall.sh | 27 | ||||
| -rwxr-xr-x | bin/flo-app.sh | 8 | ||||
| -rwxr-xr-x | bin/floall.sh | 28 | ||||
| -rwxr-xr-x | bin/test.sh | 3 |
9 files changed, 118 insertions, 0 deletions
diff --git a/bin/appall.sh b/bin/appall.sh new file mode 100755 index 00000000..0e676ed6 --- /dev/null +++ b/bin/appall.sh @@ -0,0 +1,28 @@ +#!/bin/bash +FILES="BitsOps \ + BundleWire \ + ComplexAssign \ + Counter \ + DirChange \ + EnableShiftRegister \ + GCD \ + LFSR16 \ + MemorySearch \ + ModuleVec \ + Mul \ + Outer \ + RegisterVecShift \ + Risc \ + Rom \ + SIntOps \ + Stack \ + Tbl \ + UIntOps \ + VecApp \ + VecShiftRegister \ + VendingMachine" + +for file in $FILES; do + echo $file + (cd generated; ../bin/flo-app.sh $file >& $file.appout) +done diff --git a/bin/build.sh b/bin/build.sh new file mode 100755 index 00000000..202afe7c --- /dev/null +++ b/bin/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sbt "run $1" +(cd generated; fir2flo.sh $1) +(cd generated; flo-app $1) diff --git a/bin/buildtest.sh b/bin/buildtest.sh new file mode 100755 index 00000000..67d50252 --- /dev/null +++ b/bin/buildtest.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +build.sh $1 +test.sh $1 diff --git a/bin/filter.cpp b/bin/filter.cpp new file mode 100644 index 00000000..ce67b8e3 --- /dev/null +++ b/bin/filter.cpp @@ -0,0 +1,11 @@ +#include <stdio.h> + +int main (int argc, char* argv[]) { + int c; + for (;;) { + c = getchar(); + if (c == EOF) break; + char nc = (c == '$' || c == '#') ? '_' : c; + putchar(nc); + } +} diff --git a/bin/fir2flo.sh b/bin/fir2flo.sh new file mode 100755 index 00000000..5a528ab1 --- /dev/null +++ b/bin/fir2flo.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +$HOME/bar/firrtl/utils/bin/firrtl -i $1.fir -o $1.flo -x X # -p tkwTgc +$HOME/bar/chisel3-tests/bin/filter < $1.flo > tmp; mv tmp $1.flo diff --git a/bin/firall.sh b/bin/firall.sh new file mode 100755 index 00000000..971f68fe --- /dev/null +++ b/bin/firall.sh @@ -0,0 +1,27 @@ +#!/bin/bash +FILES="BitsOps \ + BundleWire \ + ComplexAssign \ + Counter \ + DirChange \ + EnableShiftRegister \ + GCD \ + LFSR16 \ + MemorySearch \ + ModuleVec \ + Mul \ + Outer \ + RegisterVecShift \ + Risc \ + Rom \ + SIntOps \ + Stack \ + Tbl \ + UIntOps \ + VecApp \ + VecShiftRegister \ + VendingMachine" + +for file in $FILES; do + sbt "run $file" +done diff --git a/bin/flo-app.sh b/bin/flo-app.sh new file mode 100755 index 00000000..bac47702 --- /dev/null +++ b/bin/flo-app.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +flo-llvm $1.flo +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 diff --git a/bin/floall.sh b/bin/floall.sh new file mode 100755 index 00000000..eda9c2c0 --- /dev/null +++ b/bin/floall.sh @@ -0,0 +1,28 @@ +#!/bin/bash +FILES="BitsOps \ + BundleWire \ + ComplexAssign \ + Counter \ + DirChange \ + EnableShiftRegister \ + GCD \ + LFSR16 \ + MemorySearch \ + ModuleVec \ + Mul \ + Outer \ + RegisterVecShift \ + Risc \ + Rom \ + SIntOps \ + Stack \ + Tbl \ + UIntOps \ + VecApp \ + VecShiftRegister \ + VendingMachine" + +for file in $FILES; do + echo -n $file "-> " + (cd generated; ../bin/fir2flo.sh $file > $file.out; grep "res = " $file.out) +done diff --git a/bin/test.sh b/bin/test.sh new file mode 100755 index 00000000..d9be3e0e --- /dev/null +++ b/bin/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sbt "run $1 --test" |
