diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-07-09 12:35:39 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-07-09 12:35:39 -0400 |
commit | b265d9925c123f0df50db98cf56dab6a3596b54b (patch) | |
tree | 2b115ce862733a499c453352db3a6ae5b9f93cd6 /src/mem | |
parent | 1c2ee987f37f4aac16cd0ff3e3ceeff949066a94 (diff) | |
download | gem5-b265d9925c123f0df50db98cf56dab6a3596b54b.tar.xz |
Port: Align port names in C++ and Python
This patch is a first step to align the port names used in the Python
world and the C++ world. Ultimately it serves to make the use of
config.json together with output from the simulation easier, including
post-processing of statistics.
Most notably, the CPU, cache, and bus is addressed in this patch, and
there might be other ports that should be updated accordingly. The
dash name separator has also been replaced with a "." which is what is
used to concatenate the names in python, and a separation is made
between the master and slave port in the bus.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/bridge.cc | 4 | ||||
-rw-r--r-- | src/mem/cache/cache_impl.hh | 4 | ||||
-rw-r--r-- | src/mem/coherent_bus.cc | 6 | ||||
-rw-r--r-- | src/mem/noncoherent_bus.cc | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/mem/bridge.cc b/src/mem/bridge.cc index 3a5313e7b..e9dc68a03 100644 --- a/src/mem/bridge.cc +++ b/src/mem/bridge.cc @@ -79,9 +79,9 @@ Bridge::BridgeMasterPort::BridgeMasterPort(const std::string &_name, Bridge::Bridge(Params *p) : MemObject(p), - slavePort(p->name + "-slave", this, masterPort, p->delay, + slavePort(p->name + ".slave", this, masterPort, p->delay, p->nack_delay, p->resp_size, p->ranges), - masterPort(p->name + "-master", this, slavePort, p->delay, p->req_size), + masterPort(p->name + ".master", this, slavePort, p->delay, p->req_size), ackWrites(p->write_ack), _params(p) { if (ackWrites) diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index f7901261f..7b332e31d 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -72,9 +72,9 @@ Cache<TagStore>::Cache(const Params *p, TagStore *tags) tempBlock = new BlkType(); tempBlock->data = new uint8_t[blkSize]; - cpuSidePort = new CpuSidePort(p->name + "-cpu_side_port", this, + cpuSidePort = new CpuSidePort(p->name + ".cpu_side", this, "CpuSidePort"); - memSidePort = new MemSidePort(p->name + "-mem_side_port", this, + memSidePort = new MemSidePort(p->name + ".mem_side", this, "MemSidePort"); tags->setCache(this); diff --git a/src/mem/coherent_bus.cc b/src/mem/coherent_bus.cc index 5bcb2f14f..b0dedfaf4 100644 --- a/src/mem/coherent_bus.cc +++ b/src/mem/coherent_bus.cc @@ -62,7 +62,7 @@ CoherentBus::CoherentBus(const CoherentBusParams *p) // vector ports, and the presence of the default port, the ports // are enumerated starting from zero for (int i = 0; i < p->port_master_connection_count; ++i) { - std::string portName = csprintf("%s-p%d", name(), i); + std::string portName = csprintf("%s.master[%d]", name(), i); MasterPort* bp = new CoherentBusMasterPort(portName, *this, i); masterPorts.push_back(bp); } @@ -71,7 +71,7 @@ CoherentBus::CoherentBus(const CoherentBusParams *p) // our corresponding master port if (p->port_default_connection_count) { defaultPortID = masterPorts.size(); - std::string portName = csprintf("%s-default", name()); + std::string portName = name() + ".default"; MasterPort* bp = new CoherentBusMasterPort(portName, *this, defaultPortID); masterPorts.push_back(bp); @@ -79,7 +79,7 @@ CoherentBus::CoherentBus(const CoherentBusParams *p) // create the slave ports, once again starting at zero for (int i = 0; i < p->port_slave_connection_count; ++i) { - std::string portName = csprintf("%s-p%d", name(), i); + std::string portName = csprintf("%s.slave[%d]", name(), i); SlavePort* bp = new CoherentBusSlavePort(portName, *this, i); slavePorts.push_back(bp); } diff --git a/src/mem/noncoherent_bus.cc b/src/mem/noncoherent_bus.cc index fb306bfeb..237e8726b 100644 --- a/src/mem/noncoherent_bus.cc +++ b/src/mem/noncoherent_bus.cc @@ -62,7 +62,7 @@ NoncoherentBus::NoncoherentBus(const NoncoherentBusParams *p) // vector ports, and the presence of the default port, the ports // are enumerated starting from zero for (int i = 0; i < p->port_master_connection_count; ++i) { - std::string portName = csprintf("%s-p%d", name(), i); + std::string portName = csprintf("%s.master[%d]", name(), i); MasterPort* bp = new NoncoherentBusMasterPort(portName, *this, i); masterPorts.push_back(bp); } @@ -71,7 +71,7 @@ NoncoherentBus::NoncoherentBus(const NoncoherentBusParams *p) // our corresponding master port if (p->port_default_connection_count) { defaultPortID = masterPorts.size(); - std::string portName = csprintf("%s-default", name()); + std::string portName = name() + ".default"; MasterPort* bp = new NoncoherentBusMasterPort(portName, *this, defaultPortID); masterPorts.push_back(bp); @@ -79,7 +79,7 @@ NoncoherentBus::NoncoherentBus(const NoncoherentBusParams *p) // create the slave ports, once again starting at zero for (int i = 0; i < p->port_slave_connection_count; ++i) { - std::string portName = csprintf("%s-p%d", name(), i); + std::string portName = csprintf("%s.slave[%d]", name(), i); SlavePort* bp = new NoncoherentBusSlavePort(portName, *this, i); slavePorts.push_back(bp); } |