Skip to content

Commit

Permalink
build/efinix/platform: adding method to get resource name based on si…
Browse files Browse the repository at this point in the history
…gnal
  • Loading branch information
trabucayre committed Oct 2, 2023
1 parent e8689eb commit 9842c95
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions litex/build/efinix/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@ def get_pin_name(self, sig, without_index=False):
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:
Expand Down

0 comments on commit 9842c95

Please sign in to comment.