build: efinix: platform.py: add `get_pins_location` and `get_pins_name`

add `get_pins_location` and  `get_pins_name`.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2024-09-26 15:53:56 +02:00
parent f8dc03810d
commit e9a4b178ce
1 changed files with 21 additions and 0 deletions

View File

@ -91,6 +91,15 @@ class EfinixPlatform(GenericPlatform):
return [pins[idx]]
return None
def get_pins_location(self, sig):
if sig is None:
return None
sc = self.constraint_manager.get_sig_constraints()
for s, pins, others, resource in sc:
if (s == sig) and (pins[0] != 'X'):
return pins
return None
def get_pin_properties(self, sig):
ret = []
if sig is None:
@ -150,6 +159,18 @@ class EfinixPlatform(GenericPlatform):
return name
return None
def get_pins_name(self, sig):
if sig is None:
return None
sc = self.constraint_manager.get_sig_constraints()
for s, pins, others, resource in sc:
if s == sig:
name = resource[0] + (f"{resource[1]}" if resource[1] is not None else "")
if resource[2]:
name = name + "_" + resource[2]
return name
return None
def get_pad_name(self, sig):
""" Return pin name (GPIOX_Y_ZZZ).