# HG changeset patch # Parent b3d5f0e9e258ed714edf90dab772ace96141da0f diff -r b3d5f0e9e258 src/mem/ExternalMaster.py --- a/src/mem/ExternalMaster.py Wed Oct 19 06:20:04 2016 -0400 +++ b/src/mem/ExternalMaster.py Wed Oct 26 17:51:32 2016 +0200 @@ -37,6 +37,7 @@ # Curtis Dunham from m5.params import * +from m5.proxy import * from MemObject import MemObject class ExternalMaster(MemObject): @@ -50,3 +51,5 @@ port_data = Param.String('stub', 'A string to pass to the port' ' handler (in a format specific to the handler) to describe how' ' the port should be bound/bindable/discoverable') + + system = Param.System(Parent.any, 'System this external port belongs to') diff -r b3d5f0e9e258 src/mem/external_master.hh --- a/src/mem/external_master.hh Wed Oct 19 06:20:04 2016 -0400 +++ b/src/mem/external_master.hh Wed Oct 26 17:51:32 2016 +0200 @@ -129,6 +129,8 @@ Handler *handler); void init(); + + const MasterID masterId; }; diff -r b3d5f0e9e258 src/mem/external_master.cc --- a/src/mem/external_master.cc Wed Oct 19 06:20:04 2016 -0400 +++ b/src/mem/external_master.cc Wed Oct 26 17:51:32 2016 +0200 @@ -43,6 +43,7 @@ #include "debug/ExternalPort.hh" #include "mem/external_master.hh" +#include "sim/system.hh" std::map ExternalMaster::portHandlers; @@ -52,7 +53,8 @@ externalPort(NULL), portName(params->name + ".port"), portType(params->port_type), - portData(params->port_data) + portData(params->port_data), + masterId(params->system->getMasterId(params->name)) {} BaseMasterPort &