From eacc352ebd09fffecbbd86e67c86051dcacd2154 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 3 Mar 2021 01:18:50 -0800 Subject: [PATCH] cpu: Remove comm types from O3CPUImpl. This struct is now empty, although we still need to keep it until all the types within O3 have been de-templated and no longer need a template argument. Change-Id: I3889bdbb1b8d638f7b04e5bfb7698e35eb7f2e57 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/42103 Reviewed-by: Gabe Black Maintainer: Gabe Black Tested-by: kokoro --- src/cpu/o3/comm.hh | 21 ++++++++++---------- src/cpu/o3/commit.hh | 33 +++++++++++++------------------ src/cpu/o3/commit_impl.hh | 8 ++++---- src/cpu/o3/cpu.hh | 26 +++++++----------------- src/cpu/o3/decode.hh | 31 ++++++++++++----------------- src/cpu/o3/decode_impl.hh | 6 +++--- src/cpu/o3/fetch.hh | 21 +++++++++----------- src/cpu/o3/fetch_impl.hh | 4 ++-- src/cpu/o3/iew.hh | 33 ++++++++++++------------------- src/cpu/o3/iew_impl.hh | 6 +++--- src/cpu/o3/impl.hh | 23 +-------------------- src/cpu/o3/inst_queue.hh | 15 ++++++-------- src/cpu/o3/inst_queue_impl.hh | 7 ++++--- src/cpu/o3/lsq_unit.hh | 5 ++--- src/cpu/o3/probe/elastic_trace.hh | 2 ++ src/cpu/o3/rename.hh | 28 +++++++++++--------------- src/cpu/o3/rename_impl.hh | 6 +++--- 17 files changed, 108 insertions(+), 167 deletions(-) diff --git a/src/cpu/o3/comm.hh b/src/cpu/o3/comm.hh index eb85e5e1e3..c35c2bd8d7 100644 --- a/src/cpu/o3/comm.hh +++ b/src/cpu/o3/comm.hh @@ -51,9 +51,11 @@ #include "cpu/o3/limits.hh" #include "sim/faults.hh" +namespace O3Comm +{ + /** Struct that defines the information passed from fetch to decode. */ -template -struct DefaultFetchDefaultDecode +struct FetchStruct { int size; @@ -64,8 +66,7 @@ struct DefaultFetchDefaultDecode }; /** Struct that defines the information passed from decode to rename. */ -template -struct DefaultDecodeDefaultRename +struct DecodeStruct { int size; @@ -73,8 +74,7 @@ struct DefaultDecodeDefaultRename }; /** Struct that defines the information passed from rename to IEW. */ -template -struct DefaultRenameDefaultIEW +struct RenameStruct { int size; @@ -82,8 +82,7 @@ struct DefaultRenameDefaultIEW }; /** Struct that defines the information passed from IEW to commit. */ -template -struct DefaultIEWDefaultCommit +struct IEWStruct { int size; @@ -99,7 +98,6 @@ struct DefaultIEWDefaultCommit bool includeSquashInst[O3MaxThreads]; }; -template struct IssueStruct { int size; @@ -108,8 +106,7 @@ struct IssueStruct }; /** Struct that defines all backwards communication. */ -template -struct TimeBufStruct +struct TimeStruct { struct DecodeComm { @@ -225,4 +222,6 @@ struct TimeBufStruct bool iewUnblock[O3MaxThreads]; }; +} // namespace O3Comm + #endif //__CPU_O3_COMM_HH__ diff --git a/src/cpu/o3/commit.hh b/src/cpu/o3/commit.hh index 4c9a7b5a2d..cb954b8eb7 100644 --- a/src/cpu/o3/commit.hh +++ b/src/cpu/o3/commit.hh @@ -46,6 +46,7 @@ #include "base/statistics.hh" #include "cpu/exetrace.hh" #include "cpu/inst_seq.hh" +#include "cpu/o3/comm.hh" #include "cpu/o3/dyn_inst_ptr.hh" #include "cpu/o3/iew.hh" #include "cpu/o3/limits.hh" @@ -86,12 +87,6 @@ template class DefaultCommit { public: - // Typedefs from the Impl. - typedef typename Impl::TimeStruct TimeStruct; - typedef typename Impl::FetchStruct FetchStruct; - typedef typename Impl::IEWStruct IEWStruct; - typedef typename Impl::RenameStruct RenameStruct; - typedef O3ThreadState Thread; /** Overall commit status. Used to determine if the CPU can deschedule @@ -147,15 +142,15 @@ class DefaultCommit void setThreads(std::vector &threads); /** Sets the main time buffer pointer, used for backwards communication. */ - void setTimeBuffer(TimeBuffer *tb_ptr); + void setTimeBuffer(TimeBuffer *tb_ptr); - void setFetchQueue(TimeBuffer *fq_ptr); + void setFetchQueue(TimeBuffer *fq_ptr); /** Sets the pointer to the queue coming from rename. */ - void setRenameQueue(TimeBuffer *rq_ptr); + void setRenameQueue(TimeBuffer *rq_ptr); /** Sets the pointer to the queue coming from IEW. */ - void setIEWQueue(TimeBuffer *iq_ptr); + void setIEWQueue(TimeBuffer *iq_ptr); /** Sets the pointer to the IEW stage. */ void setIEWStage(DefaultIEW *iew_stage); @@ -326,29 +321,29 @@ class DefaultCommit private: /** Time buffer interface. */ - TimeBuffer *timeBuffer; + TimeBuffer *timeBuffer; /** Wire to write information heading to previous stages. */ - typename TimeBuffer::wire toIEW; + typename TimeBuffer::wire toIEW; /** Wire to read information from IEW (for ROB). */ - typename TimeBuffer::wire robInfoFromIEW; + typename TimeBuffer::wire robInfoFromIEW; - TimeBuffer *fetchQueue; + TimeBuffer *fetchQueue; - typename TimeBuffer::wire fromFetch; + typename TimeBuffer::wire fromFetch; /** IEW instruction queue interface. */ - TimeBuffer *iewQueue; + TimeBuffer *iewQueue; /** Wire to read information from IEW queue. */ - typename TimeBuffer::wire fromIEW; + typename TimeBuffer::wire fromIEW; /** Rename instruction queue interface, for ROB. */ - TimeBuffer *renameQueue; + TimeBuffer *renameQueue; /** Wire to read information from rename queue. */ - typename TimeBuffer::wire fromRename; + typename TimeBuffer::wire fromRename; public: /** ROB interface. */ diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh index 4442eb9904..3e7f97f8d8 100644 --- a/src/cpu/o3/commit_impl.hh +++ b/src/cpu/o3/commit_impl.hh @@ -259,7 +259,7 @@ DefaultCommit::setThreads(std::vector &threads) template void -DefaultCommit::setTimeBuffer(TimeBuffer *tb_ptr) +DefaultCommit::setTimeBuffer(TimeBuffer *tb_ptr) { timeBuffer = tb_ptr; @@ -272,7 +272,7 @@ DefaultCommit::setTimeBuffer(TimeBuffer *tb_ptr) template void -DefaultCommit::setFetchQueue(TimeBuffer *fq_ptr) +DefaultCommit::setFetchQueue(TimeBuffer *fq_ptr) { fetchQueue = fq_ptr; @@ -282,7 +282,7 @@ DefaultCommit::setFetchQueue(TimeBuffer *fq_ptr) template void -DefaultCommit::setRenameQueue(TimeBuffer *rq_ptr) +DefaultCommit::setRenameQueue(TimeBuffer *rq_ptr) { renameQueue = rq_ptr; @@ -292,7 +292,7 @@ DefaultCommit::setRenameQueue(TimeBuffer *rq_ptr) template void -DefaultCommit::setIEWQueue(TimeBuffer *iq_ptr) +DefaultCommit::setIEWQueue(TimeBuffer *iq_ptr) { iewQueue = iq_ptr; diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh index 2eeedea004..7b5fac05fb 100644 --- a/src/cpu/o3/cpu.hh +++ b/src/cpu/o3/cpu.hh @@ -550,35 +550,23 @@ class FullO3CPU : public BaseO3CPU RenameIdx, IEWIdx, CommitIdx, - NumStages }; - - /** Typedefs from the Impl to get the structs that each of the - * time buffers should use. - */ - typedef typename Impl::TimeStruct TimeStruct; - - typedef typename Impl::FetchStruct FetchStruct; - - typedef typename Impl::DecodeStruct DecodeStruct; - - typedef typename Impl::RenameStruct RenameStruct; - - typedef typename Impl::IEWStruct IEWStruct; + NumStages + }; /** The main time buffer to do backwards communication. */ - TimeBuffer timeBuffer; + TimeBuffer timeBuffer; /** The fetch stage's instruction queue. */ - TimeBuffer fetchQueue; + TimeBuffer fetchQueue; /** The decode stage's instruction queue. */ - TimeBuffer decodeQueue; + TimeBuffer decodeQueue; /** The rename stage's instruction queue. */ - TimeBuffer renameQueue; + TimeBuffer renameQueue; /** The IEW stage's instruction queue. */ - TimeBuffer iewQueue; + TimeBuffer iewQueue; private: /** The activity recorder; used to tell if the CPU has any diff --git a/src/cpu/o3/decode.hh b/src/cpu/o3/decode.hh index 1d9e04e1fd..20cb467d64 100644 --- a/src/cpu/o3/decode.hh +++ b/src/cpu/o3/decode.hh @@ -44,6 +44,7 @@ #include #include "base/statistics.hh" +#include "cpu/o3/comm.hh" #include "cpu/o3/dyn_inst_ptr.hh" #include "cpu/o3/limits.hh" #include "cpu/timebuf.hh" @@ -63,12 +64,6 @@ class FullO3CPU; template class DefaultDecode { - private: - // Typedefs from the Impl. - typedef typename Impl::FetchStruct FetchStruct; - typedef typename Impl::DecodeStruct DecodeStruct; - typedef typename Impl::TimeStruct TimeStruct; - public: /** Overall decode stage status. Used to determine if the CPU can * deschedule itself due to a lack of activity. @@ -112,13 +107,13 @@ class DefaultDecode std::string name() const; /** Sets the main backwards communication time buffer pointer. */ - void setTimeBuffer(TimeBuffer *tb_ptr); + void setTimeBuffer(TimeBuffer *tb_ptr); /** Sets pointer to time buffer used to communicate to the next stage. */ - void setDecodeQueue(TimeBuffer *dq_ptr); + void setDecodeQueue(TimeBuffer *dq_ptr); /** Sets pointer to time buffer coming from fetch. */ - void setFetchQueue(TimeBuffer *fq_ptr); + void setFetchQueue(TimeBuffer *fq_ptr); /** Sets pointer to list of active threads. */ void setActiveThreads(std::list *at_ptr); @@ -209,32 +204,32 @@ class DefaultDecode FullO3CPU *cpu; /** Time buffer interface. */ - TimeBuffer *timeBuffer; + TimeBuffer *timeBuffer; /** Wire to get rename's output from backwards time buffer. */ - typename TimeBuffer::wire fromRename; + typename TimeBuffer::wire fromRename; /** Wire to get iew's information from backwards time buffer. */ - typename TimeBuffer::wire fromIEW; + typename TimeBuffer::wire fromIEW; /** Wire to get commit's information from backwards time buffer. */ - typename TimeBuffer::wire fromCommit; + typename TimeBuffer::wire fromCommit; /** Wire to write information heading to previous stages. */ // Might not be the best name as not only fetch will read it. - typename TimeBuffer::wire toFetch; + typename TimeBuffer::wire toFetch; /** Decode instruction queue. */ - TimeBuffer *decodeQueue; + TimeBuffer *decodeQueue; /** Wire used to write any information heading to rename. */ - typename TimeBuffer::wire toRename; + typename TimeBuffer::wire toRename; /** Fetch instruction queue interface. */ - TimeBuffer *fetchQueue; + TimeBuffer *fetchQueue; /** Wire to get fetch's output from fetch queue. */ - typename TimeBuffer::wire fromFetch; + typename TimeBuffer::wire fromFetch; /** Queue of all instructions coming from fetch this cycle. */ std::queue insts[O3MaxThreads]; diff --git a/src/cpu/o3/decode_impl.hh b/src/cpu/o3/decode_impl.hh index fc03145bb9..90feb1c9df 100644 --- a/src/cpu/o3/decode_impl.hh +++ b/src/cpu/o3/decode_impl.hh @@ -161,7 +161,7 @@ DefaultDecode::DecodeStats::DecodeStats(FullO3CPU *cpu) template void -DefaultDecode::setTimeBuffer(TimeBuffer *tb_ptr) +DefaultDecode::setTimeBuffer(TimeBuffer *tb_ptr) { timeBuffer = tb_ptr; @@ -176,7 +176,7 @@ DefaultDecode::setTimeBuffer(TimeBuffer *tb_ptr) template void -DefaultDecode::setDecodeQueue(TimeBuffer *dq_ptr) +DefaultDecode::setDecodeQueue(TimeBuffer *dq_ptr) { decodeQueue = dq_ptr; @@ -186,7 +186,7 @@ DefaultDecode::setDecodeQueue(TimeBuffer *dq_ptr) template void -DefaultDecode::setFetchQueue(TimeBuffer *fq_ptr) +DefaultDecode::setFetchQueue(TimeBuffer *fq_ptr) { fetchQueue = fq_ptr; diff --git a/src/cpu/o3/fetch.hh b/src/cpu/o3/fetch.hh index 2b9e2de84a..ff6ffee119 100644 --- a/src/cpu/o3/fetch.hh +++ b/src/cpu/o3/fetch.hh @@ -44,6 +44,7 @@ #include "arch/decoder.hh" #include "base/statistics.hh" #include "config/the_isa.hh" +#include "cpu/o3/comm.hh" #include "cpu/o3/dyn_inst_ptr.hh" #include "cpu/o3/limits.hh" #include "cpu/pc_event.hh" @@ -72,10 +73,6 @@ template class DefaultFetch { public: - /** Typedefs from Impl. */ - typedef typename Impl::FetchStruct FetchStruct; - typedef typename Impl::TimeStruct TimeStruct; - /** * IcachePort class for instruction fetch. */ @@ -221,13 +218,13 @@ class DefaultFetch void regProbePoints(); /** Sets the main backwards communication time buffer pointer. */ - void setTimeBuffer(TimeBuffer *time_buffer); + void setTimeBuffer(TimeBuffer *time_buffer); /** Sets pointer to list of active threads. */ void setActiveThreads(std::list *at_ptr); /** Sets pointer to time buffer used to communicate to the next stage. */ - void setFetchQueue(TimeBuffer *fq_ptr); + void setFetchQueue(TimeBuffer *fq_ptr); /** Initialize stage. */ void startupStage(); @@ -404,23 +401,23 @@ class DefaultFetch FullO3CPU *cpu; /** Time buffer interface. */ - TimeBuffer *timeBuffer; + TimeBuffer *timeBuffer; /** Wire to get decode's information from backwards time buffer. */ - typename TimeBuffer::wire fromDecode; + typename TimeBuffer::wire fromDecode; /** Wire to get rename's information from backwards time buffer. */ - typename TimeBuffer::wire fromRename; + typename TimeBuffer::wire fromRename; /** Wire to get iew's information from backwards time buffer. */ - typename TimeBuffer::wire fromIEW; + typename TimeBuffer::wire fromIEW; /** Wire to get commit's information from backwards time buffer. */ - typename TimeBuffer::wire fromCommit; + typename TimeBuffer::wire fromCommit; //Might be annoying how this name is different than the queue. /** Wire used to write any information heading to decode. */ - typename TimeBuffer::wire toDecode; + typename TimeBuffer::wire toDecode; /** BPredUnit. */ BPredUnit *branchPred; diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh index a5627e1644..72b10c5609 100644 --- a/src/cpu/o3/fetch_impl.hh +++ b/src/cpu/o3/fetch_impl.hh @@ -262,7 +262,7 @@ FetchStatGroup::FetchStatGroup(FullO3CPU *cpu, DefaultFetch *fetch) } template void -DefaultFetch::setTimeBuffer(TimeBuffer *time_buffer) +DefaultFetch::setTimeBuffer(TimeBuffer *time_buffer) { timeBuffer = time_buffer; @@ -282,7 +282,7 @@ DefaultFetch::setActiveThreads(std::list *at_ptr) template void -DefaultFetch::setFetchQueue(TimeBuffer *ftb_ptr) +DefaultFetch::setFetchQueue(TimeBuffer *ftb_ptr) { // Create wire to write information to proper place in fetch time buf. toDecode = ftb_ptr->getWire(0); diff --git a/src/cpu/o3/iew.hh b/src/cpu/o3/iew.hh index a0f48697f0..24999b5b30 100644 --- a/src/cpu/o3/iew.hh +++ b/src/cpu/o3/iew.hh @@ -80,13 +80,6 @@ class FUPool; template class DefaultIEW { - private: - //Typedefs from Impl - typedef typename Impl::TimeStruct TimeStruct; - typedef typename Impl::IEWStruct IEWStruct; - typedef typename Impl::RenameStruct RenameStruct; - typedef typename Impl::IssueStruct IssueStruct; - public: /** Overall IEW stage status. Used to determine if the CPU can * deschedule itself due to a lack of activity. @@ -143,13 +136,13 @@ class DefaultIEW void clearStates(ThreadID tid); /** Sets main time buffer used for backwards communication. */ - void setTimeBuffer(TimeBuffer *tb_ptr); + void setTimeBuffer(TimeBuffer *tb_ptr); /** Sets time buffer for getting instructions coming from rename. */ - void setRenameQueue(TimeBuffer *rq_ptr); + void setRenameQueue(TimeBuffer *rq_ptr); /** Sets time buffer to pass on instructions to commit. */ - void setIEWQueue(TimeBuffer *iq_ptr); + void setIEWQueue(TimeBuffer *iq_ptr); /** Sets pointer to list of active threads. */ void setActiveThreads(std::list *at_ptr); @@ -303,37 +296,37 @@ class DefaultIEW void updateExeInstStats(const O3DynInstPtr &inst); /** Pointer to main time buffer used for backwards communication. */ - TimeBuffer *timeBuffer; + TimeBuffer *timeBuffer; /** Wire to write information heading to previous stages. */ - typename TimeBuffer::wire toFetch; + typename TimeBuffer::wire toFetch; /** Wire to get commit's output from backwards time buffer. */ - typename TimeBuffer::wire fromCommit; + typename TimeBuffer::wire fromCommit; /** Wire to write information heading to previous stages. */ - typename TimeBuffer::wire toRename; + typename TimeBuffer::wire toRename; /** Rename instruction queue interface. */ - TimeBuffer *renameQueue; + TimeBuffer *renameQueue; /** Wire to get rename's output from rename queue. */ - typename TimeBuffer::wire fromRename; + typename TimeBuffer::wire fromRename; /** Issue stage queue. */ - TimeBuffer issueToExecQueue; + TimeBuffer issueToExecQueue; /** Wire to read information from the issue stage time queue. */ - typename TimeBuffer::wire fromIssue; + typename TimeBuffer::wire fromIssue; /** * IEW stage time buffer. Holds ROB indices of instructions that * can be marked as completed. */ - TimeBuffer *iewQueue; + TimeBuffer *iewQueue; /** Wire to write infromation heading to commit. */ - typename TimeBuffer::wire toCommit; + typename TimeBuffer::wire toCommit; /** Queue of all instructions coming from rename this cycle. */ std::queue insts[O3MaxThreads]; diff --git a/src/cpu/o3/iew_impl.hh b/src/cpu/o3/iew_impl.hh index 54327fa5a4..57edc9375c 100644 --- a/src/cpu/o3/iew_impl.hh +++ b/src/cpu/o3/iew_impl.hh @@ -306,7 +306,7 @@ DefaultIEW::clearStates(ThreadID tid) template void -DefaultIEW::setTimeBuffer(TimeBuffer *tb_ptr) +DefaultIEW::setTimeBuffer(TimeBuffer *tb_ptr) { timeBuffer = tb_ptr; @@ -324,7 +324,7 @@ DefaultIEW::setTimeBuffer(TimeBuffer *tb_ptr) template void -DefaultIEW::setRenameQueue(TimeBuffer *rq_ptr) +DefaultIEW::setRenameQueue(TimeBuffer *rq_ptr) { renameQueue = rq_ptr; @@ -334,7 +334,7 @@ DefaultIEW::setRenameQueue(TimeBuffer *rq_ptr) template void -DefaultIEW::setIEWQueue(TimeBuffer *iq_ptr) +DefaultIEW::setIEWQueue(TimeBuffer *iq_ptr) { iewQueue = iq_ptr; diff --git a/src/cpu/o3/impl.hh b/src/cpu/o3/impl.hh index d9d3e1fc82..b3b21e99e6 100644 --- a/src/cpu/o3/impl.hh +++ b/src/cpu/o3/impl.hh @@ -29,8 +29,6 @@ #ifndef __CPU_O3_IMPL_HH__ #define __CPU_O3_IMPL_HH__ -#include "cpu/o3/comm.hh" - /** Implementation specific struct that defines several key types to the * CPU, the stages within the CPU, the time buffers, and the DynInst. * The struct defines the ISA, the CPU policy, the specific DynInst, the @@ -39,25 +37,6 @@ * This is one of the key things that must be defined for each hardware * specific CPU implementation. */ -struct O3CPUImpl -{ - /** The struct for communication between fetch and decode. */ - typedef DefaultFetchDefaultDecode FetchStruct; - - /** The struct for communication between decode and rename. */ - typedef DefaultDecodeDefaultRename DecodeStruct; - - /** The struct for communication between rename and IEW. */ - typedef DefaultRenameDefaultIEW RenameStruct; - - /** The struct for communication between IEW and commit. */ - typedef DefaultIEWDefaultCommit IEWStruct; - - /** The struct for communication within the IEW stage. */ - typedef ::IssueStruct IssueStruct; - - /** The struct for all backwards communication. */ - typedef TimeBufStruct TimeStruct; -}; +struct O3CPUImpl {}; #endif // __CPU_O3_SPARC_IMPL_HH__ diff --git a/src/cpu/o3/inst_queue.hh b/src/cpu/o3/inst_queue.hh index 879655d6be..7791cdcf7d 100644 --- a/src/cpu/o3/inst_queue.hh +++ b/src/cpu/o3/inst_queue.hh @@ -50,6 +50,7 @@ #include "base/statistics.hh" #include "base/types.hh" #include "cpu/inst_seq.hh" +#include "cpu/o3/comm.hh" #include "cpu/o3/dep_graph.hh" #include "cpu/o3/dyn_inst_ptr.hh" #include "cpu/o3/limits.hh" @@ -91,10 +92,6 @@ template class InstructionQueue { public: - //Typedefs from the Impl. - typedef typename Impl::IssueStruct IssueStruct; - typedef typename Impl::TimeStruct TimeStruct; - // Typedef of iterator through the list of instructions. typedef typename std::list::iterator ListIt; @@ -143,10 +140,10 @@ class InstructionQueue void setActiveThreads(std::list *at_ptr); /** Sets the timer buffer between issue and execute. */ - void setIssueToExecuteQueue(TimeBuffer *i2eQueue); + void setIssueToExecuteQueue(TimeBuffer *i2eQueue); /** Sets the global time buffer. */ - void setTimeBuffer(TimeBuffer *tb_ptr); + void setTimeBuffer(TimeBuffer *tb_ptr); /** Determine if we are drained. */ bool isDrained() const; @@ -300,13 +297,13 @@ class InstructionQueue /** The queue to the execute stage. Issued instructions will be written * into it. */ - TimeBuffer *issueToExecuteQueue; + TimeBuffer *issueToExecuteQueue; /** The backwards time buffer. */ - TimeBuffer *timeBuffer; + TimeBuffer *timeBuffer; /** Wire to read information from timebuffer. */ - typename TimeBuffer::wire fromCommit; + typename TimeBuffer::wire fromCommit; /** Function unit pool. */ FUPool *fuPool; diff --git a/src/cpu/o3/inst_queue_impl.hh b/src/cpu/o3/inst_queue_impl.hh index 315974247e..e521fc13a8 100644 --- a/src/cpu/o3/inst_queue_impl.hh +++ b/src/cpu/o3/inst_queue_impl.hh @@ -441,14 +441,15 @@ InstructionQueue::setActiveThreads(list *at_ptr) template void -InstructionQueue::setIssueToExecuteQueue(TimeBuffer *i2e_ptr) +InstructionQueue::setIssueToExecuteQueue( + TimeBuffer *i2e_ptr) { issueToExecuteQueue = i2e_ptr; } template void -InstructionQueue::setTimeBuffer(TimeBuffer *tb_ptr) +InstructionQueue::setTimeBuffer(TimeBuffer *tb_ptr) { timeBuffer = tb_ptr; @@ -779,7 +780,7 @@ InstructionQueue::scheduleReadyInsts() DPRINTF(IQ, "Attempting to schedule ready instructions from " "the IQ.\n"); - IssueStruct *i2e_info = issueToExecuteQueue->access(0); + O3Comm::IssueStruct *i2e_info = issueToExecuteQueue->access(0); O3DynInstPtr mem_inst; while ((mem_inst = std::move(getDeferredMemInstToExecute()))) { diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh index 14768f8d20..704a20be76 100644 --- a/src/cpu/o3/lsq_unit.hh +++ b/src/cpu/o3/lsq_unit.hh @@ -53,6 +53,7 @@ #include "arch/locked_mem.hh" #include "config/the_isa.hh" #include "cpu/inst_seq.hh" +#include "cpu/o3/comm.hh" #include "cpu/o3/dyn_inst_ptr.hh" #include "cpu/o3/lsq.hh" #include "cpu/timebuf.hh" @@ -85,8 +86,6 @@ class LSQUnit public: static constexpr auto MaxDataBytes = MaxVecRegLenInBytes; - typedef typename Impl::IssueStruct IssueStruct; - using LSQSenderState = typename LSQ::LSQSenderState; using LSQRequest = typename LSQ::LSQRequest; private: @@ -521,7 +520,7 @@ class LSQUnit Addr cacheBlockMask; /** Wire to read information from the issue stage time queue. */ - typename TimeBuffer::wire fromIssue; + typename TimeBuffer::wire fromIssue; /** Whether or not the LSQ is stalled. */ bool stalled; diff --git a/src/cpu/o3/probe/elastic_trace.hh b/src/cpu/o3/probe/elastic_trace.hh index 914e4eab4e..d43eb36066 100644 --- a/src/cpu/o3/probe/elastic_trace.hh +++ b/src/cpu/o3/probe/elastic_trace.hh @@ -50,8 +50,10 @@ #include #include +#include "base/statistics.hh" #include "cpu/o3/dyn_inst_ptr.hh" #include "cpu/o3/impl.hh" +#include "cpu/reg_class.hh" #include "mem/request.hh" #include "params/ElasticTrace.hh" #include "proto/inst_dep_record.pb.h" diff --git a/src/cpu/o3/rename.hh b/src/cpu/o3/rename.hh index 0fa8f18f20..1424bdb7b1 100644 --- a/src/cpu/o3/rename.hh +++ b/src/cpu/o3/rename.hh @@ -47,6 +47,7 @@ #include "base/statistics.hh" #include "config/the_isa.hh" +#include "cpu/o3/comm.hh" #include "cpu/o3/commit.hh" #include "cpu/o3/dyn_inst_ptr.hh" #include "cpu/o3/free_list.hh" @@ -73,11 +74,6 @@ template class DefaultRename { public: - // Typedefs from the Impl. - typedef typename Impl::DecodeStruct DecodeStruct; - typedef typename Impl::RenameStruct RenameStruct; - typedef typename Impl::TimeStruct TimeStruct; - // A deque is used to queue the instructions. Barrier insts must // be added to the front of the queue, which is the only reason for // using a deque instead of a queue. (Most other stages use a @@ -134,13 +130,13 @@ class DefaultRename void regProbePoints(); /** Sets the main backwards communication time buffer pointer. */ - void setTimeBuffer(TimeBuffer *tb_ptr); + void setTimeBuffer(TimeBuffer *tb_ptr); /** Sets pointer to time buffer used to communicate to the next stage. */ - void setRenameQueue(TimeBuffer *rq_ptr); + void setRenameQueue(TimeBuffer *rq_ptr); /** Sets pointer to time buffer coming from decode. */ - void setDecodeQueue(TimeBuffer *dq_ptr); + void setDecodeQueue(TimeBuffer *dq_ptr); /** Sets pointer to IEW stage. Used only for initialization. */ void setIEWStage(DefaultIEW *iew_stage) @@ -322,28 +318,28 @@ class DefaultRename FullO3CPU *cpu; /** Pointer to main time buffer used for backwards communication. */ - TimeBuffer *timeBuffer; + TimeBuffer *timeBuffer; /** Wire to get IEW's output from backwards time buffer. */ - typename TimeBuffer::wire fromIEW; + typename TimeBuffer::wire fromIEW; /** Wire to get commit's output from backwards time buffer. */ - typename TimeBuffer::wire fromCommit; + typename TimeBuffer::wire fromCommit; /** Wire to write infromation heading to previous stages. */ - typename TimeBuffer::wire toDecode; + typename TimeBuffer::wire toDecode; /** Rename instruction queue. */ - TimeBuffer *renameQueue; + TimeBuffer *renameQueue; /** Wire to write any information heading to IEW. */ - typename TimeBuffer::wire toIEW; + typename TimeBuffer::wire toIEW; /** Decode instruction queue interface. */ - TimeBuffer *decodeQueue; + TimeBuffer *decodeQueue; /** Wire to get decode's output from decode queue. */ - typename TimeBuffer::wire fromDecode; + typename TimeBuffer::wire fromDecode; /** Queue of all instructions coming from decode this cycle. */ InstQueue insts[O3MaxThreads]; diff --git a/src/cpu/o3/rename_impl.hh b/src/cpu/o3/rename_impl.hh index 1a5409ba68..01904cfd31 100644 --- a/src/cpu/o3/rename_impl.hh +++ b/src/cpu/o3/rename_impl.hh @@ -186,7 +186,7 @@ DefaultRename::regProbePoints() template void -DefaultRename::setTimeBuffer(TimeBuffer *tb_ptr) +DefaultRename::setTimeBuffer(TimeBuffer *tb_ptr) { timeBuffer = tb_ptr; @@ -202,7 +202,7 @@ DefaultRename::setTimeBuffer(TimeBuffer *tb_ptr) template void -DefaultRename::setRenameQueue(TimeBuffer *rq_ptr) +DefaultRename::setRenameQueue(TimeBuffer *rq_ptr) { renameQueue = rq_ptr; @@ -212,7 +212,7 @@ DefaultRename::setRenameQueue(TimeBuffer *rq_ptr) template void -DefaultRename::setDecodeQueue(TimeBuffer *dq_ptr) +DefaultRename::setDecodeQueue(TimeBuffer *dq_ptr) { decodeQueue = dq_ptr;