From 9842c95ef5b8081537b64c83eee7c2dba5ce80ba Mon Sep 17 00:00:00 2001 From: Gwenhael Goavec-Merou Date: Mon, 2 Oct 2023 14:45:10 +0200 Subject: [PATCH] build/efinix/platform: adding method to get resource name based on signal --- litex/build/efinix/platform.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/litex/build/efinix/platform.py b/litex/build/efinix/platform.py index 007031094..2f877ac0e 100644 --- a/litex/build/efinix/platform.py +++ b/litex/build/efinix/platform.py @@ -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: