diff -r 52aa238d2f66 -r 3a8e34a03c9e src/mem/external_master.cc --- a/src/mem/external_master.cc Mon Jan 09 13:15:10 2017 +0100 +++ b/src/mem/external_master.cc Mon Jan 09 13:18:20 2017 +0100 @@ -36,6 +36,7 @@ * * Authors: Andrew Bardsley * Curtis Dunham + * Christian Menard */ #include @@ -43,6 +44,7 @@ #include "debug/ExternalPort.hh" #include "mem/external_master.hh" +#include "sim/system.hh" std::map ExternalMaster::portHandlers; @@ -52,7 +54,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 & diff -r 52aa238d2f66 -r 3a8e34a03c9e src/mem/ExternalMaster.py --- a/src/mem/ExternalMaster.py Mon Jan 09 13:15:10 2017 +0100 +++ b/src/mem/ExternalMaster.py Mon Jan 09 13:18:20 2017 +0100 @@ -35,8 +35,10 @@ # # Authors: Andrew Bardsley # Curtis Dunham +# Christian Menard from m5.params import * +from m5.proxy import * from MemObject import MemObject class ExternalMaster(MemObject): @@ -50,3 +52,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 52aa238d2f66 -r 3a8e34a03c9e src/mem/external_master.hh --- a/src/mem/external_master.hh Mon Jan 09 13:15:10 2017 +0100 +++ b/src/mem/external_master.hh Mon Jan 09 13:18:20 2017 +0100 @@ -36,6 +36,7 @@ * * Authors: Andrew Bardsley * Curtis Dunham + * Christian Menard */ /** @@ -129,6 +130,8 @@ Handler *handler); void init(); + + const MasterID masterId; };