URL
https://opencores.org/ocsvn/tcp_socket/tcp_socket/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
2 |
jondawson |
#!/usr/bin/env python
|
2 |
|
|
|
3 |
|
|
"""compile, build and download the ATLYS demo to the ATLYS development kit"""
|
4 |
|
|
|
5 |
|
|
import sys
|
6 |
|
|
import os
|
7 |
|
|
import shutil
|
8 |
|
|
|
9 |
|
|
from user_settings import xilinx
|
10 |
|
|
|
11 |
|
|
current_directory = os.getcwd()
|
12 |
|
|
working_directory = "ATLYS"
|
13 |
|
|
shutil.copyfile("xilinx_input/ATLYS.ucf", os.path.join(working_directory, "ATLYS.ucf"))
|
14 |
|
|
shutil.copyfile("xilinx_input/ATLYS.prj", os.path.join(working_directory, "ATLYS.prj"))
|
15 |
|
|
shutil.copyfile("xilinx_input/xst_mixed.opt", os.path.join(working_directory, "xst_mixed.opt"))
|
16 |
|
|
shutil.copyfile("xilinx_input/balanced.opt", os.path.join(working_directory, "balanced.opt"))
|
17 |
|
|
shutil.copyfile("xilinx_input/bitgen.opt", os.path.join(working_directory, "bitgen.opt"))
|
18 |
|
|
os.chdir(working_directory)
|
19 |
|
|
|
20 |
|
|
if "compile" in sys.argv or "all" in sys.argv:
|
21 |
|
|
print "Compiling C files using chips ...."
|
22 |
|
|
retval = os.system("../chips2/c2verilog ../source/user_design_atlys.c")
|
23 |
|
|
retval = os.system("../chips2/c2verilog ../source/server.c")
|
24 |
|
|
if retval != 0:
|
25 |
|
|
sys.exit(-1)
|
26 |
|
|
|
27 |
|
|
if "build" in sys.argv or "all" in sys.argv:
|
28 |
|
|
print "Building Demo using Xilinx ise ...."
|
29 |
|
|
retval = os.system("%s/xflow -synth xst_mixed.opt -p XC6Slx45-CSG324 -implement balanced.opt -config bitgen.opt ATLYS"%xilinx)
|
30 |
|
|
if retval != 0:
|
31 |
|
|
sys.exit(-1)
|
32 |
|
|
|
33 |
|
|
if "download" in sys.argv or "all" in sys.argv:
|
34 |
|
|
print "Downloading bit file to development kit ...."
|
35 |
|
|
retval = os.system("sudo djtgcfg prog -d Atlys -i 0 -f ATLYS.bit")
|
36 |
|
|
if retval != 0:
|
37 |
|
|
sys.exit(-1)
|
38 |
|
|
|
39 |
|
|
os.chdir(current_directory)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.