6
6
import subprocess
7
7
import tempfile
8
8
9
- import artiq
10
9
from artiq import __artiq_dir__ as artiq_dir
11
10
from artiq .frontend .bit2bin import bit2bin
12
11
@@ -18,13 +17,13 @@ def get_argparser():
18
17
epilog = """\
19
18
Valid actions:
20
19
21
- * proxy: load the flash proxy bitstream
22
- * bitstream : write bitstream to flash
20
+ * proxy: load the flash proxy gateware bitstream
21
+ * gateware : write gateware bitstream to flash
23
22
* bios: write bios to flash
24
23
* runtime: write runtime to flash
25
24
* storage: write storage image to flash
26
- * load: load bitstream into device (volatile but fast)
27
- * start: trigger the target to (re)load its bitstream from flash
25
+ * load: load gateware bitstream into device (volatile but fast)
26
+ * start: trigger the target to (re)load its gateware bitstream from flash
28
27
29
28
Prerequisites:
30
29
@@ -42,7 +41,7 @@ def get_argparser():
42
41
parser .add_argument ("-f" , "--storage" , help = "write file to storage area" )
43
42
parser .add_argument ("-d" , "--dir" , help = "look for files in this directory" )
44
43
parser .add_argument ("ACTION" , nargs = "*" ,
45
- default = "proxy bitstream bios runtime start" .split (),
44
+ default = "proxy gateware bios runtime start" .split (),
46
45
help = "actions to perform, default: %(default)s" )
47
46
return parser
48
47
@@ -55,15 +54,15 @@ def main():
55
54
"kc705" : {
56
55
"chip" : "xc7k325t" ,
57
56
"start" : "xc7_program xc7.tap" ,
58
- "bitstream " : 0x000000 ,
57
+ "gateware " : 0x000000 ,
59
58
"bios" : 0xaf0000 ,
60
59
"runtime" : 0xb00000 ,
61
60
"storage" : 0xb80000 ,
62
61
},
63
62
"pipistrello" : {
64
63
"chip" : "xc6slx45" ,
65
64
"start" : "xc6s_program xc6s.tap" ,
66
- "bitstream " : 0x000000 ,
65
+ "gateware " : 0x000000 ,
67
66
"bios" : 0x170000 ,
68
67
"runtime" : 0x180000 ,
69
68
"storage" : 0x200000 ,
@@ -83,23 +82,23 @@ def main():
83
82
proxy_base = "bscan_spi_{}.bit" .format (config ["chip" ])
84
83
proxy = None
85
84
for p in [opts .dir , os .path .expanduser ("~/.migen" ),
86
- "/usr/local/share/migen" , "/usr/share/migen" ]:
85
+ "/usr/local/share/migen" , "/usr/share/migen" ]:
87
86
proxy_ = os .path .join (p , proxy_base )
88
87
if os .access (proxy_ , os .R_OK ):
89
88
proxy = "jtagspi_init 0 {}" .format (proxy_ )
90
89
break
91
90
if not proxy :
92
91
raise SystemExit (
93
- "proxy bitstream {} not found" .format (proxy_base ))
92
+ "proxy gateware bitstream {} not found" .format (proxy_base ))
94
93
prog .append (proxy )
95
- elif action == "bitstream " :
94
+ elif action == "gateware " :
96
95
bin = os .path .join (opts .dir , "top.bin" )
97
96
if not os .access (bin , os .R_OK ):
98
97
bin = tempfile .mkstemp ()[1 ]
99
98
bit = os .path .join (opts .dir , "top.bit" )
100
99
conv = True
101
100
prog .append ("jtagspi_program {} 0x{:x}" .format (
102
- bin , config ["bitstream " ]))
101
+ bin , config ["gateware " ]))
103
102
elif action == "bios" :
104
103
prog .append ("jtagspi_program {} 0x{:x}" .format (
105
104
os .path .join (opts .dir , "bios.bin" ), config ["bios" ]))
0 commit comments