build/efinix/platform: adding method to get resource name based on signal

This commit is contained in:
Gwenhael Goavec-Merou 2023-10-02 14:45:10 +02:00
parent e8689eb1dc
commit 9842c95ef5
1 changed files with 13 additions and 0 deletions

View File

@ -143,6 +143,19 @@ class EfinixPlatform(GenericPlatform):
return resource[0] + (f"{idx}" if slc else "")
return None
def get_pad_name(self, sig):
""" Return pin name (GPIOX_Y_ZZZ).
Parameters
==========
sig: Signal
Signal for which pad name is searched.
"""
if sig is None:
return None
pin = self.get_pin_location(sig)[0]
return self.parser.get_pad_name_from_pin(pin)
def get_sig_constraint(self, sig):
sc = self.constraint_manager.get_sig_constraints()
for s, pins, others, resource in sc: