Skip to content

Commit

Permalink
Revert "build/efinix/platform: fix get_pin_name()"
Browse files Browse the repository at this point in the history
This reverts commit 0cb101d.

Temporary fix for liteeth/phy/titaniumrgmii regression
  • Loading branch information
trabucayre committed Sep 3, 2024
1 parent 3bdbe1e commit 4152d22
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions litex/build/efinix/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,26 @@ def get_pin(self, sig):
sig = sig.value
return sig

def get_pin_name(self, sig):
def get_pin_name(self, sig, without_index=False):
if sig is None:
return None
assert len(sig) == 1
idx = 0
slc = False
while isinstance(sig, _Slice) and hasattr(sig, "value"):
slc = True
idx = sig.start
sig = sig.value
slc = hasattr(sig, "nbits") and sig.nbits > 1
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]
name = name + (f"{idx}" if slc else "")
return name
name = resource[0] + "_" + resource[2]
if without_index is False:
name = name + (f"{idx}" if slc else "")
return name
else:
return resource[0] + (f"{idx}" if slc else "")
return None

def get_pad_name(self, sig):
Expand Down

0 comments on commit 4152d22

Please sign in to comment.