summaryrefslogtreecommitdiff
path: root/src/python/swig
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-11-07 01:06:54 -0800
committerGabe Black <gblack@eecs.umich.edu>2011-11-07 01:06:54 -0800
commit812277ac6aeb16397d4c0c76cca0ebe6969cd87d (patch)
tree96546190ea6017ba468cc69e0bf3531cf79e670f /src/python/swig
parent8b4a3f4070f6d0af07c3f08dcdbd8b6aa05e34f4 (diff)
downloadgem5-812277ac6aeb16397d4c0c76cca0ebe6969cd87d.tar.xz
SE/FS: Remove FULL_SYSTEM from swig.
Diffstat (limited to 'src/python/swig')
-rw-r--r--src/python/swig/pyobject.cc44
1 files changed, 19 insertions, 25 deletions
diff --git a/src/python/swig/pyobject.cc b/src/python/swig/pyobject.cc
index 7847a6f3a..82a54545f 100644
--- a/src/python/swig/pyobject.cc
+++ b/src/python/swig/pyobject.cc
@@ -34,16 +34,13 @@
#include "base/inifile.hh"
#include "base/output.hh"
-#include "config/full_system.hh"
-#include "mem/mem_object.hh"
-#include "mem/port.hh"
-#include "sim/sim_object.hh"
-
-#if FULL_SYSTEM
#include "dev/etherdevice.hh"
#include "dev/etherint.hh"
#include "dev/etherobject.hh"
-#endif
+#include "mem/mem_object.hh"
+#include "mem/port.hh"
+#include "sim/full_system.hh"
+#include "sim/sim_object.hh"
using namespace std;
@@ -65,8 +62,6 @@ lookupPort(SimObject *so, const std::string &name, int i)
return p;
}
-#if FULL_SYSTEM
-
EtherInt *
lookupEthPort(SimObject *so, const std::string &name, int i)
{
@@ -84,7 +79,6 @@ lookupEthPort(SimObject *so, const std::string &name, int i)
p = ed->getEthPort(name, i);
return p;
}
-#endif
/**
* Connect the described MemObject ports. Called from Python via SWIG.
@@ -98,28 +92,28 @@ connectPorts(SimObject *o1, const std::string &name1, int i1,
mo1 = dynamic_cast<MemObject*>(o1);
mo2 = dynamic_cast<MemObject*>(o2);
-#if FULL_SYSTEM
- EtherObject *eo1, *eo2;
- EtherDevice *ed1, *ed2;
- eo1 = dynamic_cast<EtherObject*>(o1);
- ed1 = dynamic_cast<EtherDevice*>(o1);
+ 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);
+ 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
Port *p1 = lookupPort(o1, name1, i1);
Port *p2 = lookupPort(o2, name2, i2);