mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
distinguish between dict and list connectors in error message
This commit is contained in:
parent
cfaba189c4
commit
750f8c41b9
1 changed files with 5 additions and 1 deletions
|
@ -168,7 +168,11 @@ class ConnectorManager:
|
|||
if pn.isdigit():
|
||||
pn = int(pn)
|
||||
assert conn in self.connector_table, f"No connector named '{conn}' is available"
|
||||
assert pn in self.connector_table[conn], f"There is no pin '{pn}' on connector '{conn}'"
|
||||
conn_entry = self.connector_table[conn]
|
||||
if isinstance(conn_entry, dict):
|
||||
assert pn in conn_entry, f"There is no pin '{pn}' on connector '{conn}'"
|
||||
else:
|
||||
assert pn < len(conn_entry), f"There is no pin with number '{pn}' on connector '{conn}', maximum is {len(conn_entry)-1}"
|
||||
conn_pn = self.connector_table[conn][pn]
|
||||
if ":" in conn_pn:
|
||||
conn_pn = self.resolve_identifiers([conn_pn])[0]
|
||||
|
|
Loading…
Reference in a new issue