efinix: get family name from device name
This commit is contained in:
parent
f37188c358
commit
148d124d03
|
@ -242,8 +242,6 @@ class EfinityToolchain:
|
|||
run = True,
|
||||
**kwargs):
|
||||
|
||||
family = "Trion" # FIXME: Add Titanium support.
|
||||
|
||||
self.ifacewriter.set_build_params(platform, build_name)
|
||||
|
||||
# Create Build Directory.
|
||||
|
@ -283,7 +281,7 @@ class EfinityToolchain:
|
|||
|
||||
# Generate project file (.xml)
|
||||
_build_xml(
|
||||
family = family,
|
||||
family = platform.family,
|
||||
device = platform.device,
|
||||
timing_model = platform.timing_model,
|
||||
build_name = build_name,
|
||||
|
@ -318,7 +316,7 @@ class EfinityToolchain:
|
|||
"--write-efx-verilog", f"outflow/{build_name}.map.v",
|
||||
"--write-premap-module", f"outflow/{build_name}.elab.vdb",
|
||||
"--binary-db", f"{build_name}.vdb",
|
||||
"--family", family,
|
||||
"--family", platform.family,
|
||||
"--device", platform.device,
|
||||
"--mode", "speed",
|
||||
"--max_ram", "-1",
|
||||
|
@ -345,7 +343,7 @@ class EfinityToolchain:
|
|||
r = tools.subprocess_call_filtered([self.efinity_path + "/bin/python3",
|
||||
self.efinity_path + "/scripts/efx_run_pt.py",
|
||||
f"{build_name}",
|
||||
family,
|
||||
platform.family,
|
||||
platform.device
|
||||
], common.colors)
|
||||
if r != 0:
|
||||
|
@ -353,7 +351,7 @@ class EfinityToolchain:
|
|||
|
||||
r = tools.subprocess_call_filtered([self.efinity_path + "/bin/efx_pnr",
|
||||
"--circuit", f"{build_name}",
|
||||
"--family", family,
|
||||
"--family", platform.family,
|
||||
"--device", platform.device,
|
||||
"--operating_conditions", platform.timing_model,
|
||||
"--pack",
|
||||
|
@ -379,7 +377,7 @@ class EfinityToolchain:
|
|||
"--source", f"work_pnr/{build_name}.lbf",
|
||||
"--dest", f"{build_name}.hex",
|
||||
"--device", platform.device,
|
||||
"--family", family,
|
||||
"--family", platform.family,
|
||||
"--periph", f"outflow/{build_name}.lpf",
|
||||
"--oscillator_clock_divider", "DIV8",
|
||||
"--spi_low_power_mode", "off",
|
||||
|
|
|
@ -24,6 +24,10 @@ class EfinixPlatform(GenericPlatform):
|
|||
self.timing_model = self.device[-2:]
|
||||
self.device = self.device[:-2]
|
||||
self.iobank_info = iobank_info
|
||||
if self.device[:2] == "Ti":
|
||||
self.family = "Titanium"
|
||||
else:
|
||||
self.family = "Trion"
|
||||
|
||||
if os.getenv("LITEX_ENV_EFINITY", False) == False:
|
||||
msg = "Unable to find or source Efinity toolchain, please either:\n"
|
||||
|
|
Loading…
Reference in New Issue