From a62e3bd84b2271ed521ec996dc652d6daf63fde2 Mon Sep 17 00:00:00 2001 From: Steven Herbst Date: Fri, 10 May 2024 17:49:43 -0700 Subject: [PATCH] Fix name collision in SbNetwork.connect (#221) --- setup.py | 2 +- switchboard/network.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ba124627..ffacab25 100644 --- a/setup.py +++ b/setup.py @@ -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 # diff --git a/switchboard/network.py b/switchboard/network.py index 2f1050b1..4cc0fb41 100644 --- a/switchboard/network.py +++ b/switchboard/network.py @@ -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