Skip to content

Commit

Permalink
Fix name collision in SbNetwork.connect (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgherbst authored May 11, 2024
1 parent b0a8be8 commit a62e3bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from setuptools import setup, find_packages
from pybind11.setup_helpers import Pybind11Extension, build_ext

__version__ = "0.2.0"
__version__ = "0.2.1"

#################################################################################
# parse_reqs, long_desc from https://github.com/siliconcompiler/siliconcompiler #
Expand Down
5 changes: 4 additions & 1 deletion switchboard/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ def external(self, intf, name=None, txrx=None, uri=None):
# save interface

if name is None:
name = intf.name
name = f'{intf.inst.name}_{intf.name}'

assert name not in self.intf_defs, \
f'Network already contains an external interface called "{name}".'

self.intf_defs[name] = intf_def

Expand Down

0 comments on commit a62e3bd

Please sign in to comment.