Merge pull request #2118 from long-pham/pr_openfpgaloader

Add FTDI serial number option to openfpgaloader
This commit is contained in:
enjoy-digital 2024-11-12 21:40:57 +01:00 committed by GitHub
commit e9e0140c74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,7 @@ from litex.build.generic_programmer import GenericProgrammer
class OpenFPGALoader(GenericProgrammer): class OpenFPGALoader(GenericProgrammer):
needs_bitreverse = False needs_bitreverse = False
def __init__(self, board="", cable="", freq=0, fpga_part="", index_chain=None): def __init__(self, board="", cable="", freq=0, fpga_part="", index_chain=None, ftdi_serial=None):
# openFPGALoader base command. # openFPGALoader base command.
self.cmd = ["openFPGALoader"] self.cmd = ["openFPGALoader"]
@ -36,6 +36,9 @@ class OpenFPGALoader(GenericProgrammer):
if index_chain is not None: if index_chain is not None:
self.cmd += ["--index-chain", str(int(index_chain))] self.cmd += ["--index-chain", str(int(index_chain))]
if ftdi_serial is not None:
self.cmd += ["--ftdi-serial", str(ftdi_serial)]
def load_bitstream(self, bitstream_file): def load_bitstream(self, bitstream_file):
# Load base command. # Load base command.
cmd = self.cmd + ["--bitstream", bitstream_file] cmd = self.cmd + ["--bitstream", bitstream_file]