summaryrefslogtreecommitdiff
path: root/src/cpu/func_unit.cc
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
committerNathan Binkert <nate@binkert.org>2007-07-23 21:51:38 -0700
commitabc76f20cb98c90e8dab416dd16dfd4a954013ba (patch)
treef3131e68a09c1b4537e17df5b14df21df53746e4 /src/cpu/func_unit.cc
parent552097b92e37fb4c0fd27960afe0a03c02894f11 (diff)
downloadgem5-abc76f20cb98c90e8dab416dd16dfd4a954013ba.tar.xz
Major changes to how SimObjects are created and initialized. Almost all
creation and initialization now happens in python. Parameter objects are generated and initialized by python. The .ini file is now solely for debugging purposes and is not used in construction of the objects in any way. --HG-- extra : convert_revision : 7e722873e417cb3d696f2e34c35ff488b7bff4ed
Diffstat (limited to 'src/cpu/func_unit.cc')
-rw-r--r--src/cpu/func_unit.cc54
1 files changed, 8 insertions, 46 deletions
diff --git a/src/cpu/func_unit.cc b/src/cpu/func_unit.cc
index c20578a43..d7aeb5b37 100644
--- a/src/cpu/func_unit.cc
+++ b/src/cpu/func_unit.cc
@@ -32,7 +32,8 @@
#include "base/misc.hh"
#include "cpu/func_unit.hh"
-#include "sim/builder.hh"
+#include "params/OpDesc.hh"
+#include "params/FUDesc.hh"
using namespace std;
@@ -116,56 +117,17 @@ FuncUnit::issueLatency(OpClass capability)
//
// The operation-class description object
//
-
-BEGIN_DECLARE_SIM_OBJECT_PARAMS(OpDesc)
-
- SimpleEnumParam<OpClass> opClass;
- Param<unsigned> opLat;
- Param<unsigned> issueLat;
-
-END_DECLARE_SIM_OBJECT_PARAMS(OpDesc)
-
-BEGIN_INIT_SIM_OBJECT_PARAMS(OpDesc)
-
- INIT_ENUM_PARAM(opClass, "type of operation", opClassStrings),
- INIT_PARAM(opLat, "cycles until result is available"),
- INIT_PARAM(issueLat, "cycles until another can be issued")
-
-END_INIT_SIM_OBJECT_PARAMS(OpDesc)
-
-
-CREATE_SIM_OBJECT(OpDesc)
+OpDesc *
+OpDescParams::create()
{
- return new OpDesc(getInstanceName(), opClass, opLat, issueLat);
+ return new OpDesc(name, opClass, opLat, issueLat);
}
-REGISTER_SIM_OBJECT("OpDesc", OpDesc)
-
-
//
// The FuDesc object
//
-
-BEGIN_DECLARE_SIM_OBJECT_PARAMS(FUDesc)
-
- SimObjectVectorParam<OpDesc *> opList;
- Param<unsigned> count;
-
-END_DECLARE_SIM_OBJECT_PARAMS(FUDesc)
-
-
-BEGIN_INIT_SIM_OBJECT_PARAMS(FUDesc)
-
- INIT_PARAM(opList, "list of operation classes for this FU type"),
- INIT_PARAM(count, "number of these FU's available")
-
-END_INIT_SIM_OBJECT_PARAMS(FUDesc)
-
-
-CREATE_SIM_OBJECT(FUDesc)
+FUDesc *
+FUDescParams::create()
{
- return new FUDesc(getInstanceName(), opList, count);
+ return new FUDesc(name, opList, count);
}
-
-REGISTER_SIM_OBJECT("FUDesc", FUDesc)
-