2 projectname = working-bee2
4 build_machine = sting.eecs.berkeley.edu
5 build_machine_xilinx_path = /opt/xilinx/ISE9.2i_lin/
6 build_machine_work_dir = ~/$(projectname)
9 ## you probably want to customize the stuff above this line
11 ## you probably don't want to change anything below this line
13 xilinx = cd $(build_machine_work_dir);
14 xilinx += LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(XILINX)/bin/lin
15 xilinx += XILINX=$(XILINX)
16 xilinx += PATH=$$PATH:$(XILINX)/bin/lin
17 xilinx += $(XILINX)/bin/lin/
21 remote_run = user_unprogram 1;
22 remote_run += user_program 1 $(bitfile);
24 verilog_files = $(find . -name \*.v)
26 run: upload build/fpga/$(bitfile)
27 ssh root@$(bee2_machine) '$(remote_run)'
29 upload: build/fpga/$(bitfile)
30 scp build/fpga/$(bitfile) root@$(bee2_machine):
32 build/fpga/$(bitfile): $(verilog_files)
34 rsync -zare --progress --delete --verbose ./ ${build_machine_work_dir}
35 time ssh ${build_machine} 'make -C ${build_machine_work_dir} -f Makefile0 synth XILINX=${build_machine_xilinx_path}'
36 cp main.bit build/fpga/$(bitfile)
41 for A in *.v; do echo verilog work \""$$A"\"; done > main.prj
44 rm -rf build/fpga/_ngo
45 $(xilinx)xst -intstyle xflow -ifn main.xst -ofn main.syr < main.xst
46 $(xilinx)ngdbuild -intstyle xflow -dd _ngo -nt timestamp -uc main.ucf -p xc2vp70-ff1704-6 main.ngc main.ngd
47 $(xilinx)map -intstyle xflow -p xc2vp70-ff1704-6 -cm speed -l -pr b -k 4 -c 100 -tx off -o main_map.ncd main.ngd main.pcf
48 $(xilinx)par -w -intstyle xflow -pl std -ol std -t 99 main_map.ncd main.ncd main.pcf
49 $(xilinx)bitgen -intstyle xflow -d -f main.ut main.ncd
50 # $(xilinx)trce -intstyle xflow -e 3 -l 3 -s 6 -xml main main.ncd -o main.twr main.pcf