Merge pull request #1884 from motec-research/efinix_spi_width
Efinix: suport spi width for passive loading
This commit is contained in:
commit
cd1088dbe9
|
@ -361,8 +361,19 @@ class EfinityToolchain(GenericToolchain):
|
||||||
"--io_weak_pullup", "on",
|
"--io_weak_pullup", "on",
|
||||||
"--enable_roms", "on",
|
"--enable_roms", "on",
|
||||||
"--mode", self.platform.spi_mode,
|
"--mode", self.platform.spi_mode,
|
||||||
"--width", "1",
|
"--width", self.platform.spi_width,
|
||||||
"--enable_crc_check", "on"
|
"--enable_crc_check", "on"
|
||||||
], common.colors)
|
], common.colors)
|
||||||
if r != 0:
|
if r != 0:
|
||||||
raise OSError("Error occurred during efx_pgm execution.")
|
raise OSError("Error occurred during efx_pgm execution.")
|
||||||
|
|
||||||
|
# BINARY
|
||||||
|
os.environ['EFXPGM_HOME'] = self.efinity_path + "/pgm"
|
||||||
|
r = tools.subprocess_call_filtered([self.efinity_path + "/bin/python3",
|
||||||
|
self.efinity_path + "/pgm/bin/efx_pgm/export_bitstream.py",
|
||||||
|
"hex_to_bin",
|
||||||
|
f"{self._build_name}.hex",
|
||||||
|
f"{self._build_name}.bin"
|
||||||
|
], common.colors)
|
||||||
|
if r != 0:
|
||||||
|
raise OSError("Error occurred during export_bitstream execution.")
|
||||||
|
|
|
@ -23,13 +23,14 @@ class EfinixPlatform(GenericPlatform):
|
||||||
|
|
||||||
_supported_toolchains = ["efinity"]
|
_supported_toolchains = ["efinity"]
|
||||||
|
|
||||||
def __init__(self, *args, iobank_info=None, toolchain="efinity", spi_mode="active", **kwargs):
|
def __init__(self, *args, iobank_info=None, toolchain="efinity", spi_mode="active", spi_width="1", **kwargs):
|
||||||
GenericPlatform.__init__(self, *args, **kwargs)
|
GenericPlatform.__init__(self, *args, **kwargs)
|
||||||
|
|
||||||
self.timing_model = self.device[-2:]
|
self.timing_model = self.device[-2:]
|
||||||
self.device = self.device[:-2]
|
self.device = self.device[:-2]
|
||||||
self.iobank_info = iobank_info
|
self.iobank_info = iobank_info
|
||||||
self.spi_mode = spi_mode
|
self.spi_mode = spi_mode
|
||||||
|
self.spi_width = spi_width
|
||||||
if self.device[:2] == "Ti":
|
if self.device[:2] == "Ti":
|
||||||
self.family = "Titanium"
|
self.family = "Titanium"
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue