From b265d9925c123f0df50db98cf56dab6a3596b54b Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 9 Jul 2012 12:35:39 -0400 Subject: 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. --- src/cpu/inorder/cpu.cc | 9 +++++---- src/cpu/inorder/cpu.hh | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/cpu/inorder') diff --git a/src/cpu/inorder/cpu.cc b/src/cpu/inorder/cpu.cc index 580389564..f67691d0a 100644 --- a/src/cpu/inorder/cpu.cc +++ b/src/cpu/inorder/cpu.cc @@ -82,8 +82,9 @@ using namespace std; using namespace TheISA; using namespace ThePipeline; -InOrderCPU::CachePort::CachePort(CacheUnit *_cacheUnit) : - CpuPort(_cacheUnit->name() + "-cache-port", _cacheUnit->cpu), +InOrderCPU::CachePort::CachePort(CacheUnit *_cacheUnit, + const std::string& name) : + CpuPort(_cacheUnit->name() + name, _cacheUnit->cpu), cacheUnit(_cacheUnit) { } @@ -230,8 +231,8 @@ InOrderCPU::InOrderCPU(Params *params) stageWidth(params->stageWidth), resPool(new ResourcePool(this, params)), timeBuffer(2 , 2), - dataPort(resPool->getDataUnit()), - instPort(resPool->getInstUnit()), + dataPort(resPool->getDataUnit(), ".dcache_port"), + instPort(resPool->getInstUnit(), ".icache_port"), removeInstsThisCycle(false), activityRec(params->name, NumStages, 10, params->activity), system(params->system), diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index 615d0eb90..3103201dd 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -165,7 +165,7 @@ class InOrderCPU : public BaseCPU public: /** Default constructor. */ - CachePort(CacheUnit *_cacheUnit); + CachePort(CacheUnit *_cacheUnit, const std::string& name); protected: -- cgit v1.2.3