cpu-minor: Rename Minor namespace as minor

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::Minor became ::minor.

Change-Id: I408aa3d269ed7454ed0f488bd363d521602e58af
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45428
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-05-06 20:49:40 -03:00
committed by Daniel Carvalho
parent 9f55bb8478
commit fa505f1c23
29 changed files with 111 additions and 79 deletions

View File

@@ -41,7 +41,8 @@
#include "cpu/minor/trace.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
void
@@ -59,8 +60,8 @@ MinorActivityRecorder::minorTrace() const
stages << ',';
}
Minor::minorTrace("activity=%d stages=%s\n", getActivityCount(),
minor::minorTrace("activity=%d stages=%s\n", getActivityCount(),
stages.str());
}
}
} // namespace minor

View File

@@ -47,7 +47,8 @@
#include "cpu/activity.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** ActivityRecorder with a Ticked interface */
@@ -65,6 +66,6 @@ class MinorActivityRecorder : public ActivityRecorder
{ }
};
}
} // namespace minor
#endif /* __CPU_MINOR_ACTIVITY_HH__ */

View File

@@ -56,7 +56,8 @@
#include "cpu/minor/trace.hh"
#include "cpu/timebuf.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** Interface class for data with reporting/tracing facilities. This
@@ -208,7 +209,7 @@ class MinorBuffer : public Named, public TimeBuffer<ElemType>
data << ',';
}
Minor::minorTrace("%s=%s\n", dataName, data.str());
minor::minorTrace("%s=%s\n", dataName, data.str());
}
};
@@ -547,7 +548,7 @@ class Queue : public Named, public Reservable
data << ',';
}
Minor::minorTrace("%s=%s\n", dataName, data.str());
minor::minorTrace("%s=%s\n", dataName, data.str());
}
};
@@ -654,6 +655,6 @@ class InputBuffer : public Reservable
}
};
}
} // namespace minor
#endif /* __CPU_MINOR_BUFFERS_HH__ */

View File

@@ -50,15 +50,15 @@ MinorCPU::MinorCPU(const MinorCPUParams &params) :
stats(this)
{
/* This is only written for one thread at the moment */
Minor::MinorThread *thread;
minor::MinorThread *thread;
for (ThreadID i = 0; i < numThreads; i++) {
if (FullSystem) {
thread = new Minor::MinorThread(this, i, params.system,
thread = new minor::MinorThread(this, i, params.system,
params.mmu, params.isa[i]);
thread->setStatus(ThreadContext::Halted);
} else {
thread = new Minor::MinorThread(this, i, params.system,
thread = new minor::MinorThread(this, i, params.system,
params.workload[i], params.mmu,
params.isa[i]);
}
@@ -73,9 +73,9 @@ MinorCPU::MinorCPU(const MinorCPUParams &params) :
fatal("The Minor model doesn't support checking (yet)\n");
}
Minor::MinorDynInst::init();
minor::MinorDynInst::init();
pipeline = new Minor::Pipeline(*this, params);
pipeline = new minor::Pipeline(*this, params);
activityRecorder = pipeline->getActivityRecorder();
fetchEventWrapper = NULL;
@@ -269,7 +269,7 @@ MinorCPU::activateContext(ThreadID thread_id)
/* Wake up the thread, wakeup the pipeline tick */
threads[thread_id]->activate();
wakeupOnEvent(Minor::Pipeline::CPUStageId);
wakeupOnEvent(minor::Pipeline::CPUStageId);
if (!threads[thread_id]->getUseForClone())//the thread is not cloned
{

View File

@@ -44,6 +44,7 @@
#ifndef __CPU_MINOR_CPU_HH__
#define __CPU_MINOR_CPU_HH__
#include "base/compiler.hh"
#include "cpu/minor/activity.hh"
#include "cpu/minor/stats.hh"
#include "cpu/base.hh"
@@ -51,15 +52,18 @@
#include "enums/ThreadPolicy.hh"
#include "params/MinorCPU.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** Forward declared to break the cyclic inclusion dependencies between
* pipeline and cpu */
class Pipeline;
/** Minor will use the SimpleThread state for now */
typedef SimpleThread MinorThread;
};
} // namespace minor
/**
* MinorCPU is an in-order CPU model with four fixed pipeline stages:
@@ -71,26 +75,26 @@ typedef SimpleThread MinorThread;
*
* This pipeline is carried in the MinorCPU::pipeline object.
* The exec_context interface is not carried by MinorCPU but by
* Minor::ExecContext objects
* created by Minor::Execute.
* minor::ExecContext objects
* created by minor::Execute.
*/
class MinorCPU : public BaseCPU
{
protected:
/** pipeline is a container for the clockable pipeline stage objects.
* Elements of pipeline call TheISA to implement the model. */
Minor::Pipeline *pipeline;
minor::Pipeline *pipeline;
public:
/** Activity recording for pipeline. This belongs to Pipeline but
* stages will access it through the CPU as the MinorCPU object
* actually mediates idling behaviour */
Minor::MinorActivityRecorder *activityRecorder;
minor::MinorActivityRecorder *activityRecorder;
/** These are thread state-representing objects for this CPU. If
* you need a ThreadContext for *any* reason, use
* threads[threadId]->getTC() */
std::vector<Minor::MinorThread *> threads;
std::vector<minor::MinorThread *> threads;
public:
/** Provide a non-protected base class for Minor's Ports as derived
@@ -129,7 +133,7 @@ class MinorCPU : public BaseCPU
void wakeup(ThreadID tid) override;
/** Processor-specific statistics */
Minor::MinorStats stats;
minor::MinorStats stats;
/** Stats interface from SimObject (by way of BaseCPU) */
void regStats() override;

View File

@@ -42,7 +42,8 @@
#include "cpu/minor/pipeline.hh"
#include "debug/Decode.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
Decode::Decode(const std::string &name,
@@ -344,8 +345,8 @@ Decode::minorTrace() const
else
(*out.inputWire).reportData(data);
Minor::minorTrace("insts=%s\n", data.str());
minor::minorTrace("insts=%s\n", data.str());
inputBuffer[0].minorTrace();
}
}
} // namespace minor

View File

@@ -53,7 +53,8 @@
#include "cpu/minor/dyn_inst.hh"
#include "cpu/minor/pipe_data.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/* Decode takes instructions from Fetch2 and decomposes them into micro-ops
@@ -160,6 +161,6 @@ class Decode : public Named
bool isDrained();
};
}
} // namespace minor
#endif /* __CPU_MINOR_DECODE_HH__ */

View File

@@ -48,7 +48,8 @@
#include "debug/MinorExecute.hh"
#include "enums/OpClass.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
const InstSeqNum InstId::firstStreamSeqNum;
@@ -241,4 +242,4 @@ MinorDynInst::~MinorDynInst()
delete traceData;
}
}
} // namespace minor

View File

@@ -59,7 +59,8 @@
#include "sim/faults.hh"
#include "sim/insttracer.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
class MinorDynInst;
@@ -294,6 +295,6 @@ class MinorDynInst : public RefCounted
/** Print a summary of the instruction */
std::ostream &operator <<(std::ostream &os, const MinorDynInst &inst);
}
} // namespace minor
#endif /* __CPU_MINOR_DYN_INST_HH__ */

View File

@@ -56,7 +56,8 @@
#include "mem/request.hh"
#include "debug/MinorExecute.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/* Forward declaration of Execute */
@@ -403,6 +404,6 @@ class ExecContext : public ::ExecContext
}
};
}
} // namespace minor
#endif /* __CPU_MINOR_EXEC_CONTEXT_HH__ */

View File

@@ -53,7 +53,8 @@
#include "debug/MinorTrace.hh"
#include "debug/PCEvent.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
Execute::Execute(const std::string &name_,
@@ -1675,7 +1676,7 @@ Execute::minorTrace() const
stalled << ',';
}
Minor::minorTrace("insts=%s inputIndex=%d streamSeqNum=%d"
minor::minorTrace("insts=%s inputIndex=%d streamSeqNum=%d"
" stalled=%s drainState=%d isInbetweenInsts=%d\n",
insts.str(), executeInfo[0].inputIndex, executeInfo[0].streamSeqNum,
stalled.str(), executeInfo[0].drainState, isInbetweenInsts(0));
@@ -1896,4 +1897,4 @@ Execute::getDcachePort()
return lsq.getDcachePort();
}
}
} // namespace minor

View File

@@ -56,7 +56,8 @@
#include "cpu/minor/pipe_data.hh"
#include "cpu/minor/scoreboard.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** Execute stage. Everything apart from fetching and decoding instructions.
@@ -359,6 +360,6 @@ class Execute : public Named
void drainResume();
};
}
} // namespace minor
#endif /* __CPU_MINOR_EXECUTE_HH__ */

View File

@@ -50,7 +50,8 @@
#include "debug/Fetch.hh"
#include "debug/MinorTrace.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
Fetch1::Fetch1(const std::string &name_,
@@ -764,7 +765,7 @@ Fetch1::minorTrace() const
else
(*out.inputWire).reportData(data);
Minor::minorTrace("state=%s icacheState=%s in_tlb_mem=%s/%s"
minor::minorTrace("state=%s icacheState=%s in_tlb_mem=%s/%s"
" streamSeqNum=%d lines=%s\n", thread.state, icacheState,
numFetchesInITLB, numFetchesInMemorySystem,
thread.streamSeqNum, data.str());
@@ -772,4 +773,4 @@ Fetch1::minorTrace() const
transfers.minorTrace();
}
}
} // namespace minor

View File

@@ -54,7 +54,8 @@
#include "cpu/minor/pipe_data.hh"
#include "mem/packet.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** A stage responsible for fetching "lines" from memory and passing
@@ -409,6 +410,6 @@ class Fetch1 : public Named
bool isDrained();
};
}
} // namespace minor
#endif /* __CPU_MINOR_FETCH1_HH__ */

View File

@@ -49,7 +49,8 @@
#include "debug/Fetch.hh"
#include "debug/MinorTrace.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
Fetch2::Fetch2(const std::string &name,
@@ -642,10 +643,10 @@ Fetch2::minorTrace() const
else
(*out.inputWire).reportData(data);
Minor::minorTrace("inputIndex=%d havePC=%d predictionSeqNum=%d insts=%s\n",
minor::minorTrace("inputIndex=%d havePC=%d predictionSeqNum=%d insts=%s\n",
fetchInfo[0].inputIndex, fetchInfo[0].havePC,
fetchInfo[0].predictionSeqNum, data.str());
inputBuffer[0].minorTrace();
}
}
} // namespace minor

View File

@@ -54,7 +54,8 @@
#include "cpu/pred/bpred_unit.hh"
#include "params/MinorCPU.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** This stage receives lines of data from Fetch1, separates them into
@@ -227,6 +228,6 @@ class Fetch2 : public Named
bool isDrained();
};
}
} // namespace minor
#endif /* __CPU_MINOR_FETCH2_HH__ */

View File

@@ -71,7 +71,8 @@ MinorFUTiming::MinorFUTiming(
opClasses(params.opClasses)
{ }
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
void
@@ -209,4 +210,4 @@ FUPipeline::findTiming(const StaticInstPtr &inst)
return NULL;
}
}
} // namespace minor

View File

@@ -195,7 +195,8 @@ class MinorFUPool : public SimObject
{ }
};
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** Container class to box instructions in the FUs to make those
@@ -268,6 +269,6 @@ class FUPipeline : public FUPipelineBase, public FuncUnit
void advance();
};
}
} // namespace minor
#endif /* __CPU_MINOR_FUNC_UNIT_HH__ */

View File

@@ -51,7 +51,8 @@
#include "debug/Activity.hh"
#include "debug/MinorMem.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
LSQ::LSQRequest::LSQRequest(LSQ &port_, MinorDynInstPtr inst_, bool isLoad_,
@@ -950,7 +951,7 @@ LSQ::StoreBuffer::minorTrace() const
os << ',';
}
Minor::minorTrace("addr=%s num_unissued_stores=%d\n", os.str(),
minor::minorTrace("addr=%s num_unissued_stores=%d\n", os.str(),
numUnissuedAccesses);
}
@@ -1665,7 +1666,7 @@ LSQ::pushFailedRequest(MinorDynInstPtr inst)
void
LSQ::minorTrace() const
{
Minor::minorTrace("state=%s in_tlb_mem=%d/%d stores_in_transfers=%d"
minor::minorTrace("state=%s in_tlb_mem=%d/%d stores_in_transfers=%d"
" lastMemBarrier=%d\n",
state, numAccessesInDTLB, numAccessesInMemorySystem,
numStoresInTransfers, lastMemBarrier[0]);
@@ -1794,4 +1795,4 @@ LSQ::threadSnoop(LSQRequestPtr request)
}
}
}
} // namespace minor

View File

@@ -55,7 +55,8 @@
#include "cpu/minor/trace.hh"
#include "mem/packet.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/* Forward declaration */
@@ -741,6 +742,7 @@ class LSQ : public Named
* pushed into the packet as senderState */
PacketPtr makePacketForRequest(const RequestPtr &request, bool isLoad,
Packet::SenderState *sender_state = NULL, PacketDataPtr data = NULL);
}
} // namespace minor
#endif /* __CPU_MINOR_NEW_LSQ_HH__ */

View File

@@ -37,7 +37,8 @@
#include "cpu/minor/pipe_data.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
std::ostream &
@@ -284,4 +285,4 @@ ForwardInstData::reportData(std::ostream &os) const
}
}
}
} // namespace minor

View File

@@ -54,7 +54,8 @@
#include "cpu/minor/dyn_inst.hh"
#include "cpu/base.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** Forward data betwen Execute and Fetch1 carrying change-of-address/stream
@@ -288,6 +289,6 @@ class ForwardInstData /* : public ReportIF, public BubbleIF */
void reportData(std::ostream &os) const;
};
}
} // namespace minor
#endif /* __CPU_MINOR_PIPE_DATA_HH__ */

View File

@@ -48,7 +48,8 @@
#include "debug/MinorTrace.hh"
#include "debug/Quiesce.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
Pipeline::Pipeline(MinorCPU &cpu_, const MinorCPUParams &params) :
@@ -254,4 +255,4 @@ Pipeline::isDrained()
return ret;
}
}
} // namespace minor

View File

@@ -54,11 +54,12 @@
#include "params/MinorCPU.hh"
#include "sim/ticked_object.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/**
* @namespace Minor
* @namespace minor
*
* Minor contains all the definitions within the MinorCPU apart from the CPU
* class itself
@@ -138,6 +139,6 @@ class Pipeline : public Ticked
MinorActivityRecorder *getActivityRecorder() { return &activityRecorder; }
};
}
} // namespace minor
#endif /* __CPU_MINOR_PIPELINE_HH__ */

View File

@@ -41,7 +41,8 @@
#include "debug/MinorScoreboard.hh"
#include "debug/MinorTiming.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
bool
@@ -302,7 +303,7 @@ Scoreboard::minorTrace() const
i++;
}
Minor::minorTrace("busy=%s\n", result_stream.str());
minor::minorTrace("busy=%s\n", result_stream.str());
}
}
} // namespace minor

View File

@@ -53,7 +53,8 @@
#include "cpu/minor/trace.hh"
#include "cpu/reg_class.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** A scoreboard of register dependencies including, for each register:
@@ -157,6 +158,6 @@ class Scoreboard : public Named
void minorTrace() const;
};
}
} // namespace minor
#endif /* __CPU_MINOR_SCOREBOARD_HH__ */

View File

@@ -37,7 +37,8 @@
#include "cpu/minor/stats.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
MinorStats::MinorStats(BaseCPU *base_cpu)
@@ -77,4 +78,4 @@ MinorStats::MinorStats(BaseCPU *base_cpu)
committedInstType.ysubnames(enums::OpClassStrings);
}
};
} // namespace minor

View File

@@ -48,7 +48,8 @@
#include "cpu/base.hh"
#include "sim/ticked_object.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** Currently unused stats class. */
@@ -80,6 +81,6 @@ struct MinorStats : public Stats::Group
};
}
} // namespace minor
#endif /* __CPU_MINOR_STATS_HH__ */

View File

@@ -54,7 +54,8 @@
#include "base/trace.hh"
#include "debug/MinorTrace.hh"
namespace Minor
GEM5_DEPRECATED_NAMESPACE(Minor, minor);
namespace minor
{
/** DPRINTFN for MinorTrace reporting */
@@ -83,6 +84,6 @@ minorLine(const Named &named, const char *fmt, Args ...args)
args...);
}
}
} // namespace minor
#endif /* __CPU_MINOR_TRACE_HH__ */