Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45428 )

Change subject: cpu-minor: Rename Minor namespace as minor
......................................................................

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 <[email protected]>
---
M src/cpu/minor/activity.cc
M src/cpu/minor/activity.hh
M src/cpu/minor/buffers.hh
M src/cpu/minor/cpu.cc
M src/cpu/minor/cpu.hh
M src/cpu/minor/decode.cc
M src/cpu/minor/decode.hh
M src/cpu/minor/dyn_inst.cc
M src/cpu/minor/dyn_inst.hh
M src/cpu/minor/exec_context.hh
M src/cpu/minor/execute.cc
M src/cpu/minor/execute.hh
M src/cpu/minor/fetch1.cc
M src/cpu/minor/fetch1.hh
M src/cpu/minor/fetch2.cc
M src/cpu/minor/fetch2.hh
M src/cpu/minor/func_unit.cc
M src/cpu/minor/func_unit.hh
M src/cpu/minor/lsq.cc
M src/cpu/minor/lsq.hh
M src/cpu/minor/pipe_data.cc
M src/cpu/minor/pipe_data.hh
M src/cpu/minor/pipeline.cc
M src/cpu/minor/pipeline.hh
M src/cpu/minor/scoreboard.cc
M src/cpu/minor/scoreboard.hh
M src/cpu/minor/stats.cc
M src/cpu/minor/stats.hh
M src/cpu/minor/trace.hh
29 files changed, 74 insertions(+), 97 deletions(-)



diff --git a/src/cpu/minor/activity.cc b/src/cpu/minor/activity.cc
index aefe65c..b91bd77 100644
--- a/src/cpu/minor/activity.cc
+++ b/src/cpu/minor/activity.cc
@@ -41,8 +41,7 @@

 #include "cpu/minor/trace.hh"

-namespace Minor
-{
+namespace minor {

 void
 MinorActivityRecorder::minorTrace() const
@@ -62,4 +61,4 @@
MINORTRACE("activity=%d stages=%s\n", getActivityCount(), stages.str());
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/activity.hh b/src/cpu/minor/activity.hh
index 2872e6f..bc061f4 100644
--- a/src/cpu/minor/activity.hh
+++ b/src/cpu/minor/activity.hh
@@ -47,8 +47,7 @@

 #include "cpu/activity.hh"

-namespace Minor
-{
+namespace minor {

 /** ActivityRecorder with a Ticked interface */
 class MinorActivityRecorder : public ActivityRecorder
@@ -65,6 +64,6 @@
     { }
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_ACTIVITY_HH__ */
diff --git a/src/cpu/minor/buffers.hh b/src/cpu/minor/buffers.hh
index 11ae83a..05f375e 100644
--- a/src/cpu/minor/buffers.hh
+++ b/src/cpu/minor/buffers.hh
@@ -56,8 +56,7 @@
 #include "cpu/minor/trace.hh"
 #include "cpu/timebuf.hh"

-namespace Minor
-{
+namespace minor {

 /** Interface class for data with reporting/tracing facilities.  This
  *  interface doesn't actually have to be used as other classes which need
@@ -654,6 +653,6 @@
     }
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_BUFFERS_HH__ */
diff --git a/src/cpu/minor/cpu.cc b/src/cpu/minor/cpu.cc
index 02f934c..31de890 100644
--- a/src/cpu/minor/cpu.cc
+++ b/src/cpu/minor/cpu.cc
@@ -50,15 +50,15 @@
     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 @@
         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 @@

     /* 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
     {
diff --git a/src/cpu/minor/cpu.hh b/src/cpu/minor/cpu.hh
index c26136d..0fbf39e 100644
--- a/src/cpu/minor/cpu.hh
+++ b/src/cpu/minor/cpu.hh
@@ -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,17 @@
 #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 +74,26 @@
  *
  *  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 +132,7 @@
     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;
diff --git a/src/cpu/minor/decode.cc b/src/cpu/minor/decode.cc
index 17e1621..c6244a6 100644
--- a/src/cpu/minor/decode.cc
+++ b/src/cpu/minor/decode.cc
@@ -42,8 +42,7 @@
 #include "cpu/minor/pipeline.hh"
 #include "debug/Decode.hh"

-namespace Minor
-{
+namespace minor {

 Decode::Decode(const std::string &name,
     MinorCPU &cpu_,
@@ -348,4 +347,4 @@
     inputBuffer[0].minorTrace();
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/decode.hh b/src/cpu/minor/decode.hh
index 2f97c4b..14d74e9 100644
--- a/src/cpu/minor/decode.hh
+++ b/src/cpu/minor/decode.hh
@@ -53,8 +53,7 @@
 #include "cpu/minor/dyn_inst.hh"
 #include "cpu/minor/pipe_data.hh"

-namespace Minor
-{
+namespace minor {

 /* Decode takes instructions from Fetch2 and decomposes them into micro-ops
  * to feed to Execute.  It generates a new sequence number for each
@@ -160,6 +159,6 @@
     bool isDrained();
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_DECODE_HH__ */
diff --git a/src/cpu/minor/dyn_inst.cc b/src/cpu/minor/dyn_inst.cc
index c4e18e7..80484ce 100644
--- a/src/cpu/minor/dyn_inst.cc
+++ b/src/cpu/minor/dyn_inst.cc
@@ -48,8 +48,7 @@
 #include "debug/MinorExecute.hh"
 #include "enums/OpClass.hh"

-namespace Minor
-{
+namespace minor {

 const InstSeqNum InstId::firstStreamSeqNum;
 const InstSeqNum InstId::firstPredictionSeqNum;
@@ -241,4 +240,4 @@
         delete traceData;
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/dyn_inst.hh b/src/cpu/minor/dyn_inst.hh
index 1e47b46..2676166 100644
--- a/src/cpu/minor/dyn_inst.hh
+++ b/src/cpu/minor/dyn_inst.hh
@@ -59,8 +59,7 @@
 #include "sim/faults.hh"
 #include "sim/insttracer.hh"

-namespace Minor
-{
+namespace minor {

 class MinorDynInst;

@@ -294,6 +293,6 @@
 /** Print a summary of the instruction */
 std::ostream &operator <<(std::ostream &os, const MinorDynInst &inst);

-}
+} // namespace minor

 #endif /* __CPU_MINOR_DYN_INST_HH__ */
diff --git a/src/cpu/minor/exec_context.hh b/src/cpu/minor/exec_context.hh
index c6cfc90..e9c1396 100644
--- a/src/cpu/minor/exec_context.hh
+++ b/src/cpu/minor/exec_context.hh
@@ -56,8 +56,7 @@
 #include "mem/request.hh"
 #include "debug/MinorExecute.hh"

-namespace Minor
-{
+namespace minor {

 /* Forward declaration of Execute */
 class Execute;
@@ -403,6 +402,6 @@
     }
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_EXEC_CONTEXT_HH__ */
diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc
index c9f4657..3c79d1a 100644
--- a/src/cpu/minor/execute.cc
+++ b/src/cpu/minor/execute.cc
@@ -53,8 +53,7 @@
 #include "debug/MinorTrace.hh"
 #include "debug/PCEvent.hh"

-namespace Minor
-{
+namespace minor {

 Execute::Execute(const std::string &name_,
     MinorCPU &cpu_,
@@ -1896,4 +1895,4 @@
     return lsq.getDcachePort();
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/execute.hh b/src/cpu/minor/execute.hh
index 02e5527..933ab15 100644
--- a/src/cpu/minor/execute.hh
+++ b/src/cpu/minor/execute.hh
@@ -56,8 +56,7 @@
 #include "cpu/minor/pipe_data.hh"
 #include "cpu/minor/scoreboard.hh"

-namespace Minor
-{
+namespace minor {

/** Execute stage. Everything apart from fetching and decoding instructions.
  *  The LSQ lives here too. */
@@ -359,6 +358,6 @@
     void drainResume();
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_EXECUTE_HH__ */
diff --git a/src/cpu/minor/fetch1.cc b/src/cpu/minor/fetch1.cc
index 6b5665e..e399eb2 100644
--- a/src/cpu/minor/fetch1.cc
+++ b/src/cpu/minor/fetch1.cc
@@ -49,8 +49,7 @@
 #include "debug/Fetch.hh"
 #include "debug/MinorTrace.hh"

-namespace Minor
-{
+namespace minor {

 Fetch1::Fetch1(const std::string &name_,
     MinorCPU &cpu_,
@@ -772,4 +771,4 @@
     transfers.minorTrace();
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/fetch1.hh b/src/cpu/minor/fetch1.hh
index 779c2b6..956970d 100644
--- a/src/cpu/minor/fetch1.hh
+++ b/src/cpu/minor/fetch1.hh
@@ -54,8 +54,7 @@
 #include "cpu/minor/pipe_data.hh"
 #include "mem/packet.hh"

-namespace Minor
-{
+namespace minor {

 /** A stage responsible for fetching "lines" from memory and passing
  *  them to Fetch2 */
@@ -409,6 +408,6 @@
     bool isDrained();
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_FETCH1_HH__ */
diff --git a/src/cpu/minor/fetch2.cc b/src/cpu/minor/fetch2.cc
index f1705bf..ab6f4a4 100644
--- a/src/cpu/minor/fetch2.cc
+++ b/src/cpu/minor/fetch2.cc
@@ -49,8 +49,7 @@
 #include "debug/Fetch.hh"
 #include "debug/MinorTrace.hh"

-namespace Minor
-{
+namespace minor {

 Fetch2::Fetch2(const std::string &name,
     MinorCPU &cpu_,
@@ -649,4 +648,4 @@
     inputBuffer[0].minorTrace();
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/fetch2.hh b/src/cpu/minor/fetch2.hh
index 6eeda59..d34008b 100644
--- a/src/cpu/minor/fetch2.hh
+++ b/src/cpu/minor/fetch2.hh
@@ -54,8 +54,7 @@
 #include "cpu/pred/bpred_unit.hh"
 #include "params/MinorCPU.hh"

-namespace Minor
-{
+namespace minor {

 /** This stage receives lines of data from Fetch1, separates them into
  *  instructions and passes them to Decode */
@@ -227,6 +226,6 @@
     bool isDrained();
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_FETCH2_HH__ */
diff --git a/src/cpu/minor/func_unit.cc b/src/cpu/minor/func_unit.cc
index 32cce24..716464a 100644
--- a/src/cpu/minor/func_unit.cc
+++ b/src/cpu/minor/func_unit.cc
@@ -71,8 +71,7 @@
     opClasses(params.opClasses)
 { }

-namespace Minor
-{
+namespace minor {

 void
 QueuedInst::reportData(std::ostream &os) const
@@ -209,4 +208,4 @@
     return NULL;
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/func_unit.hh b/src/cpu/minor/func_unit.hh
index ce51a99..7ef0567 100644
--- a/src/cpu/minor/func_unit.hh
+++ b/src/cpu/minor/func_unit.hh
@@ -195,8 +195,7 @@
     { }
 };

-namespace Minor
-{
+namespace minor {

 /** Container class to box instructions in the FUs to make those
  *  queues have correct bubble behaviour when stepped */
@@ -268,6 +267,6 @@
     void advance();
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_FUNC_UNIT_HH__ */
diff --git a/src/cpu/minor/lsq.cc b/src/cpu/minor/lsq.cc
index cfd1fd2..1a1f55a 100644
--- a/src/cpu/minor/lsq.cc
+++ b/src/cpu/minor/lsq.cc
@@ -50,8 +50,7 @@
 #include "debug/Activity.hh"
 #include "debug/MinorMem.hh"

-namespace Minor
-{
+namespace minor {

LSQ::LSQRequest::LSQRequest(LSQ &port_, MinorDynInstPtr inst_, bool isLoad_,
         RegIndex zero_reg, PacketDataPtr data_, uint64_t *res_) :
@@ -1793,4 +1792,4 @@
     }
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/lsq.hh b/src/cpu/minor/lsq.hh
index 96e3023..c1935ab 100644
--- a/src/cpu/minor/lsq.hh
+++ b/src/cpu/minor/lsq.hh
@@ -55,8 +55,7 @@
 #include "cpu/minor/trace.hh"
 #include "mem/packet.hh"

-namespace Minor
-{
+namespace minor {

 /* Forward declaration */
 class Execute;
@@ -741,6 +740,7 @@
  *  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__ */
diff --git a/src/cpu/minor/pipe_data.cc b/src/cpu/minor/pipe_data.cc
index a779bd6..0880131 100644
--- a/src/cpu/minor/pipe_data.cc
+++ b/src/cpu/minor/pipe_data.cc
@@ -37,8 +37,7 @@

 #include "cpu/minor/pipe_data.hh"

-namespace Minor
-{
+namespace minor {

 std::ostream &
 operator <<(std::ostream &os, BranchData::Reason reason)
@@ -284,4 +283,4 @@
     }
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/pipe_data.hh b/src/cpu/minor/pipe_data.hh
index a795a68..2b0d1e4 100644
--- a/src/cpu/minor/pipe_data.hh
+++ b/src/cpu/minor/pipe_data.hh
@@ -54,8 +54,7 @@
 #include "cpu/minor/dyn_inst.hh"
 #include "cpu/base.hh"

-namespace Minor
-{
+namespace minor {

/** Forward data betwen Execute and Fetch1 carrying change-of-address/stream
  *  information. */
@@ -288,6 +287,6 @@
     void reportData(std::ostream &os) const;
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_PIPE_DATA_HH__ */
diff --git a/src/cpu/minor/pipeline.cc b/src/cpu/minor/pipeline.cc
index c3b1d27..5472184 100644
--- a/src/cpu/minor/pipeline.cc
+++ b/src/cpu/minor/pipeline.cc
@@ -48,8 +48,7 @@
 #include "debug/MinorTrace.hh"
 #include "debug/Quiesce.hh"

-namespace Minor
-{
+namespace minor {

 Pipeline::Pipeline(MinorCPU &cpu_, const MinorCPUParams &params) :
     Ticked(cpu_, &(cpu_.BaseCPU::baseStats.numCycles)),
@@ -254,4 +253,4 @@
     return ret;
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/pipeline.hh b/src/cpu/minor/pipeline.hh
index b275f02..7293a09 100644
--- a/src/cpu/minor/pipeline.hh
+++ b/src/cpu/minor/pipeline.hh
@@ -54,11 +54,10 @@
 #include "params/MinorCPU.hh"
 #include "sim/ticked_object.hh"

-namespace Minor
-{
+namespace minor {

 /**
- * @namespace Minor
+ * @namespace minor
  *
* Minor contains all the definitions within the MinorCPU apart from the CPU
  * class itself
@@ -138,6 +137,6 @@
MinorActivityRecorder *getActivityRecorder() { return &activityRecorder; }
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_PIPELINE_HH__ */
diff --git a/src/cpu/minor/scoreboard.cc b/src/cpu/minor/scoreboard.cc
index 3fa60f1..8f3e9da 100644
--- a/src/cpu/minor/scoreboard.cc
+++ b/src/cpu/minor/scoreboard.cc
@@ -41,8 +41,7 @@
 #include "debug/MinorScoreboard.hh"
 #include "debug/MinorTiming.hh"

-namespace Minor
-{
+namespace minor {

 bool
 Scoreboard::findIndex(const RegId& reg, Index &scoreboard_index)
@@ -305,4 +304,4 @@
     MINORTRACE("busy=%s\n", result_stream.str());
 }

-}
+} // namespace minor
diff --git a/src/cpu/minor/scoreboard.hh b/src/cpu/minor/scoreboard.hh
index 7fefac8..e420584 100644
--- a/src/cpu/minor/scoreboard.hh
+++ b/src/cpu/minor/scoreboard.hh
@@ -53,8 +53,7 @@
 #include "cpu/minor/trace.hh"
 #include "cpu/reg_class.hh"

-namespace Minor
-{
+namespace minor {

 /** A scoreboard of register dependencies including, for each register:
  *  The number of in-flight instructions which will generate a result for
@@ -157,6 +156,6 @@
     void minorTrace() const;
 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_SCOREBOARD_HH__ */
diff --git a/src/cpu/minor/stats.cc b/src/cpu/minor/stats.cc
index b560fb6..ff6de80 100644
--- a/src/cpu/minor/stats.cc
+++ b/src/cpu/minor/stats.cc
@@ -37,8 +37,7 @@

 #include "cpu/minor/stats.hh"

-namespace Minor
-{
+namespace minor {

 MinorStats::MinorStats(BaseCPU *base_cpu)
     : statistics::Group(base_cpu),
@@ -75,4 +74,4 @@
     committedInstType.ysubnames(enums::OpClassStrings);
 }

-};
+} // namespace minor
diff --git a/src/cpu/minor/stats.hh b/src/cpu/minor/stats.hh
index fda79b3..7872bc1 100644
--- a/src/cpu/minor/stats.hh
+++ b/src/cpu/minor/stats.hh
@@ -48,8 +48,7 @@
 #include "cpu/base.hh"
 #include "sim/ticked_object.hh"

-namespace Minor
-{
+namespace minor {

 /** Currently unused stats class. */
 struct MinorStats : public statistics::Group
@@ -80,6 +79,6 @@

 };

-}
+} // namespace minor

 #endif /* __CPU_MINOR_STATS_HH__ */
diff --git a/src/cpu/minor/trace.hh b/src/cpu/minor/trace.hh
index a3bbb32..3fb661f 100644
--- a/src/cpu/minor/trace.hh
+++ b/src/cpu/minor/trace.hh
@@ -53,8 +53,7 @@
 #include "base/trace.hh"
 #include "debug/MinorTrace.hh"

-namespace Minor
-{
+namespace minor {

 /** DPRINTFN for MinorTrace reporting */
 #define MINORTRACE(...) \
@@ -68,6 +67,6 @@
 #define MINORLINE(sim_object, ...) \
     DPRINTFS(MinorTrace, (sim_object), "MinorLine: " __VA_ARGS__)

-}
+} // namespace minor

 #endif /* __CPU_MINOR_TRACE_HH__ */

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45428
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I408aa3d269ed7454ed0f488bd363d521602e58af
Gerrit-Change-Number: 45428
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to