From cc58148fe11fd9f579cf7b918472552897c809fb Mon Sep 17 00:00:00 2001 From: Michael LeBeane Date: Tue, 13 Sep 2016 23:06:32 -0400 Subject: [PATCH] misc: Remove FullSystem check for networking components Ethernet devices are currently only hooked up if running in FS mode. Much of the Ethernet networking code is generic and can be used to build non-Ethernet device models. Some of these device models do not require a complex driver stack and can be built to use an EmulatedDriver in SE mode. This patch enables etherent interfaces to properly connect regardless of whether the simulation is in FS or SE mode. --- src/python/swig/pyobject.cc | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/python/swig/pyobject.cc b/src/python/swig/pyobject.cc index fb49f4309..dc3a48643 100644 --- a/src/python/swig/pyobject.cc +++ b/src/python/swig/pyobject.cc @@ -77,25 +77,23 @@ connectPorts(SimObject *o1, const std::string &name1, int i1, SimObject *o2, const std::string &name2, int i2) { #if THE_ISA != NULL_ISA - if (FullSystem) { - EtherObject *eo1, *eo2; - EtherDevice *ed1, *ed2; - eo1 = dynamic_cast(o1); - ed1 = dynamic_cast(o1); - eo2 = dynamic_cast(o2); - ed2 = dynamic_cast(o2); + EtherObject *eo1, *eo2; + EtherDevice *ed1, *ed2; + eo1 = dynamic_cast(o1); + ed1 = dynamic_cast(o1); + eo2 = dynamic_cast(o2); + ed2 = dynamic_cast(o2); - if ((eo1 || ed1) && (eo2 || ed2)) { - EtherInt *p1 = lookupEthPort(o1, name1, i1); - EtherInt *p2 = lookupEthPort(o2, name2, i2); + if ((eo1 || ed1) && (eo2 || ed2)) { + EtherInt *p1 = lookupEthPort(o1, name1, i1); + EtherInt *p2 = lookupEthPort(o2, name2, i2); - if (p1 != NULL && p2 != NULL) { + if (p1 != NULL && p2 != NULL) { - p1->setPeer(p2); - p2->setPeer(p1); + p1->setPeer(p2); + p2->setPeer(p1); - return 1; - } + return 1; } } #endif