diff options
author | Michael LeBeane <michael.lebeane@amd.com> | 2016-09-13 23:06:32 -0400 |
---|---|---|
committer | Michael LeBeane <michael.lebeane@amd.com> | 2016-09-13 23:06:32 -0400 |
commit | cc58148fe11fd9f579cf7b918472552897c809fb (patch) | |
tree | 938935b5cdddad7b00c7c2e0182c4267e4c97996 | |
parent | 4c903d04128e2232e1121ea5344904bf86342094 (diff) | |
download | gem5-cc58148fe11fd9f579cf7b918472552897c809fb.tar.xz |
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.
-rw-r--r-- | src/python/swig/pyobject.cc | 28 |
1 files 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<EtherObject*>(o1); - ed1 = dynamic_cast<EtherDevice*>(o1); - eo2 = dynamic_cast<EtherObject*>(o2); - ed2 = dynamic_cast<EtherDevice*>(o2); + EtherObject *eo1, *eo2; + EtherDevice *ed1, *ed2; + eo1 = dynamic_cast<EtherObject*>(o1); + ed1 = dynamic_cast<EtherDevice*>(o1); + eo2 = dynamic_cast<EtherObject*>(o2); + ed2 = dynamic_cast<EtherDevice*>(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 |