From abc76f20cb98c90e8dab416dd16dfd4a954013ba Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 23 Jul 2007 21:51:38 -0700 Subject: 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 --- src/mem/bridge.cc | 50 ++++---------------------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) (limited to 'src/mem/bridge.cc') diff --git a/src/mem/bridge.cc b/src/mem/bridge.cc index 8bc32711d..f4e3dc8b3 100644 --- a/src/mem/bridge.cc +++ b/src/mem/bridge.cc @@ -39,7 +39,7 @@ #include "base/trace.hh" #include "mem/bridge.hh" -#include "sim/builder.hh" +#include "params/Bridge.hh" Bridge::BridgePort::BridgePort(const std::string &_name, Bridge *_bridge, BridgePort *_otherPort, @@ -367,50 +367,8 @@ Bridge::BridgePort::getDeviceAddressRanges(AddrRangeList &resp, otherPort->getPeerAddressRanges(resp, snoop); } -BEGIN_DECLARE_SIM_OBJECT_PARAMS(Bridge) - - Param req_size_a; - Param req_size_b; - Param resp_size_a; - Param resp_size_b; - Param delay; - Param nack_delay; - Param write_ack; - Param fix_partial_write_a; - Param fix_partial_write_b; - -END_DECLARE_SIM_OBJECT_PARAMS(Bridge) - -BEGIN_INIT_SIM_OBJECT_PARAMS(Bridge) - - INIT_PARAM(req_size_a, "The size of the queue for requests coming into side a"), - INIT_PARAM(req_size_b, "The size of the queue for requests coming into side b"), - INIT_PARAM(resp_size_a, "The size of the queue for responses coming into side a"), - INIT_PARAM(resp_size_b, "The size of the queue for responses coming into side b"), - INIT_PARAM(delay, "The miminum delay to cross this bridge"), - INIT_PARAM(nack_delay, "The minimum delay to nack a packet"), - INIT_PARAM(write_ack, "Acknowledge any writes that are received."), - INIT_PARAM(fix_partial_write_a, "Fixup any partial block writes that are received"), - INIT_PARAM(fix_partial_write_b, "Fixup any partial block writes that are received") - -END_INIT_SIM_OBJECT_PARAMS(Bridge) - -CREATE_SIM_OBJECT(Bridge) +Bridge * +BridgeParams::create() { - Bridge::Params *p = new Bridge::Params; - p->name = getInstanceName(); - p->req_size_a = req_size_a; - p->req_size_b = req_size_b; - p->resp_size_a = resp_size_a; - p->resp_size_b = resp_size_b; - p->delay = delay; - p->nack_delay = nack_delay; - p->write_ack = write_ack; - p->fix_partial_write_a = fix_partial_write_a; - p->fix_partial_write_b = fix_partial_write_b; - return new Bridge(p); + return new Bridge(this); } - -REGISTER_SIM_OBJECT("Bridge", Bridge) - - -- cgit v1.2.3