updated build scripts
authoradam <adam@megacz.com>
Mon, 5 Feb 2007 19:09:24 +0000 (20:09 +0100)
committeradam <adam@megacz.com>
Mon, 5 Feb 2007 19:09:24 +0000 (20:09 +0100)
Makefile

index ed2de7f..6a37da3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,20 +41,27 @@ remote_run += gcc test.c;
 remote_run += echo running;
 remote_run +=  ./a.out /dev/selectmap1 fleet.bin
 
+verilog_files  = $(shell find src -name \*.v)
+verilog_files += $(shell find src -name \*.inc)
+
 runfpga: fleet.jar
        mkdir -p build
        $(java) $(cp) $(interpreter_class) --dump-code
-       $(java) $(cp) edu.berkeley.fleet.slipway.Client < build/fleet.bin
+       $(java) $(cp) edu.berkeley.fleet.slipway.Client superbowl.bit < build/fleet.bin
 
 mrunfpga: fleet.jar build/main.bit
+       mkdir -p build
        $(java) $(cp) $(interpreter_class) --dump-code
        rsync -zare ssh --progress --verbose build/main.bit root@bee441.cs.berkeley.edu:/var/slipway/megacz.bit
        $(java) $(cp) edu.berkeley.fleet.slipway.Client megacz.bit < build/fleet.bin
 
-build/main.bit: contrib/demo.ships $(shell find src -name \*.v)
+build/fabric.v: $(verilog_files) src/edu/berkeley/fleet/slipway/Slipway.java
        make fleet.jar
        mkdir -p build
-       $(java) $(cp) $(interpreter_class) --dump-fabric < contrib/demo.ships | tee build/fabric.v
+       $(java) $(cp) $(interpreter_class) --dump-fabric > build/fabric.v
+
+build/main.bit: build/fabric.v $(verilog_files)
+       make fleet.jar
        rsync -zare ssh --progress --delete --verbose ./ ${host}:${remote_dir}
        ssh ${host} 'make -C ${remote_dir} synth XILINX=${remote_xilinx}'
        scp ${host}:${remote_dir}/build/main.bit build/
@@ -68,7 +75,7 @@ synth:
        rm -rf build/_ngo
        $(xilinx)xst -intstyle ise -ifn main.xst -ofn main.syr < main.xst
        $(xilinx)ngdbuild -intstyle ise -dd _ngo -nt timestamp -uc main.ucf -p xc2vp70-ff1704-6 main.ngc main.ngd
-       $(xilinx)map -intstyle ise -p xc2vp70-ff1704-6 -cm area -l -pr b -k 4 -c 100 -tx off -o main_map.ncd main.ngd main.pcf
+       $(xilinx)map -intstyle ise -p xc2vp70-ff1704-6 -cm speed -l -pr b -k 4 -c 100 -tx off -o main_map.ncd main.ngd main.pcf
        $(xilinx)par -w -intstyle ise -pl std -ol std -t 99 main_map.ncd main.ncd main.pcf
        $(xilinx)bitgen -intstyle ise -d -f main.ut main.ncd
 #      $(xilinx)trce -intstyle ise -e 3 -l 3 -s 6 -xml main main.ncd -o main.twr main.pcf
@@ -107,6 +114,7 @@ dist:
        darcs get . --repo-name=fleet-`date +%d.%h.%y`
        make -C fleet-`date +%d.%h.%y` fleet.jar
        rm -rf fleet-`date +%d.%h.%y`/build
+       cp _darcs/prefs/defaultrepo fleet-`date +%d.%h.%y`/_darcs/prefs/defaultrepo
        tar cvzf fleet-`date +%d.%h.%y`.tgz fleet-`date +%d.%h.%y`
        rm -rf fleet-`date +%d.%h.%y`
        mv fleet-`date +%d.%h.%y`.tgz /afs/research.cs.berkeley.edu/class/fleet/website/files/