Skip to content

Commit eb8ba14

Browse files
committedFeb 28, 2015
kx705: add programmer parameter
1 parent b53e2b0 commit eb8ba14

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

Diff for: ‎mibuild/platforms/kc705.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
)
379379
]
380380

381-
def Platform(*args, toolchain="vivado", **kwargs):
381+
def Platform(*args, toolchain="vivado", programmer="xc3sprog", **kwargs):
382382
if toolchain == "ise":
383383
xilinx_platform = XilinxISEPlatform
384384
elif toolchain == "vivado":
@@ -396,7 +396,12 @@ def __init__(self, crg_factory=lambda p: CRG_DS(p, "clk156", "cpu_reset")):
396396
xilinx_platform.__init__(self, "xc7k325t-ffg900-2", _io, crg_factory, _connectors)
397397

398398
def create_programmer(self):
399-
return XC3SProg("jtaghs1_fast", "bscan_spi_kc705.bit")
399+
if programmer == "xc3sprog":
400+
return XC3SProg("jtaghs1_fast", "bscan_spi_kc705.bit")
401+
elif programmer == "vivado":
402+
return VivadoProgrammer()
403+
else:
404+
raise ValueError("{} programmer is not supported".format(programmer))
400405

401406
def do_finalize(self, fragment):
402407
try:
@@ -415,4 +420,5 @@ def do_finalize(self, fragment):
415420
self.add_platform_command("CONFIG DCI_CASCADE = \"33 32 34\";")
416421
else:
417422
self.add_platform_command("set_property DCI_CASCADE {{32 34}} [get_iobanks 33]")
423+
418424
return RealPlatform(*args, **kwargs)

0 commit comments

Comments
 (0)
Please sign in to comment.