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 <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -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<class Impl>
|
||||
struct DefaultFetchDefaultDecode
|
||||
struct FetchStruct
|
||||
{
|
||||
int size;
|
||||
|
||||
@@ -64,8 +66,7 @@ struct DefaultFetchDefaultDecode
|
||||
};
|
||||
|
||||
/** Struct that defines the information passed from decode to rename. */
|
||||
template<class Impl>
|
||||
struct DefaultDecodeDefaultRename
|
||||
struct DecodeStruct
|
||||
{
|
||||
int size;
|
||||
|
||||
@@ -73,8 +74,7 @@ struct DefaultDecodeDefaultRename
|
||||
};
|
||||
|
||||
/** Struct that defines the information passed from rename to IEW. */
|
||||
template<class Impl>
|
||||
struct DefaultRenameDefaultIEW
|
||||
struct RenameStruct
|
||||
{
|
||||
int size;
|
||||
|
||||
@@ -82,8 +82,7 @@ struct DefaultRenameDefaultIEW
|
||||
};
|
||||
|
||||
/** Struct that defines the information passed from IEW to commit. */
|
||||
template<class Impl>
|
||||
struct DefaultIEWDefaultCommit
|
||||
struct IEWStruct
|
||||
{
|
||||
int size;
|
||||
|
||||
@@ -99,7 +98,6 @@ struct DefaultIEWDefaultCommit
|
||||
bool includeSquashInst[O3MaxThreads];
|
||||
};
|
||||
|
||||
template<class Impl>
|
||||
struct IssueStruct
|
||||
{
|
||||
int size;
|
||||
@@ -108,8 +106,7 @@ struct IssueStruct
|
||||
};
|
||||
|
||||
/** Struct that defines all backwards communication. */
|
||||
template<class Impl>
|
||||
struct TimeBufStruct
|
||||
struct TimeStruct
|
||||
{
|
||||
struct DecodeComm
|
||||
{
|
||||
@@ -225,4 +222,6 @@ struct TimeBufStruct
|
||||
bool iewUnblock[O3MaxThreads];
|
||||
};
|
||||
|
||||
} // namespace O3Comm
|
||||
|
||||
#endif //__CPU_O3_COMM_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 Impl>
|
||||
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<Impl> Thread;
|
||||
|
||||
/** Overall commit status. Used to determine if the CPU can deschedule
|
||||
@@ -147,15 +142,15 @@ class DefaultCommit
|
||||
void setThreads(std::vector<Thread *> &threads);
|
||||
|
||||
/** Sets the main time buffer pointer, used for backwards communication. */
|
||||
void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr);
|
||||
void setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr);
|
||||
|
||||
void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr);
|
||||
void setFetchQueue(TimeBuffer<O3Comm::FetchStruct> *fq_ptr);
|
||||
|
||||
/** Sets the pointer to the queue coming from rename. */
|
||||
void setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr);
|
||||
void setRenameQueue(TimeBuffer<O3Comm::RenameStruct> *rq_ptr);
|
||||
|
||||
/** Sets the pointer to the queue coming from IEW. */
|
||||
void setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr);
|
||||
void setIEWQueue(TimeBuffer<O3Comm::IEWStruct> *iq_ptr);
|
||||
|
||||
/** Sets the pointer to the IEW stage. */
|
||||
void setIEWStage(DefaultIEW<Impl> *iew_stage);
|
||||
@@ -326,29 +321,29 @@ class DefaultCommit
|
||||
|
||||
private:
|
||||
/** Time buffer interface. */
|
||||
TimeBuffer<TimeStruct> *timeBuffer;
|
||||
TimeBuffer<O3Comm::TimeStruct> *timeBuffer;
|
||||
|
||||
/** Wire to write information heading to previous stages. */
|
||||
typename TimeBuffer<TimeStruct>::wire toIEW;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire toIEW;
|
||||
|
||||
/** Wire to read information from IEW (for ROB). */
|
||||
typename TimeBuffer<TimeStruct>::wire robInfoFromIEW;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire robInfoFromIEW;
|
||||
|
||||
TimeBuffer<FetchStruct> *fetchQueue;
|
||||
TimeBuffer<O3Comm::FetchStruct> *fetchQueue;
|
||||
|
||||
typename TimeBuffer<FetchStruct>::wire fromFetch;
|
||||
typename TimeBuffer<O3Comm::FetchStruct>::wire fromFetch;
|
||||
|
||||
/** IEW instruction queue interface. */
|
||||
TimeBuffer<IEWStruct> *iewQueue;
|
||||
TimeBuffer<O3Comm::IEWStruct> *iewQueue;
|
||||
|
||||
/** Wire to read information from IEW queue. */
|
||||
typename TimeBuffer<IEWStruct>::wire fromIEW;
|
||||
typename TimeBuffer<O3Comm::IEWStruct>::wire fromIEW;
|
||||
|
||||
/** Rename instruction queue interface, for ROB. */
|
||||
TimeBuffer<RenameStruct> *renameQueue;
|
||||
TimeBuffer<O3Comm::RenameStruct> *renameQueue;
|
||||
|
||||
/** Wire to read information from rename queue. */
|
||||
typename TimeBuffer<RenameStruct>::wire fromRename;
|
||||
typename TimeBuffer<O3Comm::RenameStruct>::wire fromRename;
|
||||
|
||||
public:
|
||||
/** ROB interface. */
|
||||
|
||||
@@ -259,7 +259,7 @@ DefaultCommit<Impl>::setThreads(std::vector<Thread *> &threads)
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
DefaultCommit<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
DefaultCommit<Impl>::setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr)
|
||||
{
|
||||
timeBuffer = tb_ptr;
|
||||
|
||||
@@ -272,7 +272,7 @@ DefaultCommit<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
DefaultCommit<Impl>::setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr)
|
||||
DefaultCommit<Impl>::setFetchQueue(TimeBuffer<O3Comm::FetchStruct> *fq_ptr)
|
||||
{
|
||||
fetchQueue = fq_ptr;
|
||||
|
||||
@@ -282,7 +282,7 @@ DefaultCommit<Impl>::setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr)
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
DefaultCommit<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr)
|
||||
DefaultCommit<Impl>::setRenameQueue(TimeBuffer<O3Comm::RenameStruct> *rq_ptr)
|
||||
{
|
||||
renameQueue = rq_ptr;
|
||||
|
||||
@@ -292,7 +292,7 @@ DefaultCommit<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr)
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
DefaultCommit<Impl>::setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr)
|
||||
DefaultCommit<Impl>::setIEWQueue(TimeBuffer<O3Comm::IEWStruct> *iq_ptr)
|
||||
{
|
||||
iewQueue = iq_ptr;
|
||||
|
||||
|
||||
@@ -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<TimeStruct> timeBuffer;
|
||||
TimeBuffer<O3Comm::TimeStruct> timeBuffer;
|
||||
|
||||
/** The fetch stage's instruction queue. */
|
||||
TimeBuffer<FetchStruct> fetchQueue;
|
||||
TimeBuffer<O3Comm::FetchStruct> fetchQueue;
|
||||
|
||||
/** The decode stage's instruction queue. */
|
||||
TimeBuffer<DecodeStruct> decodeQueue;
|
||||
TimeBuffer<O3Comm::DecodeStruct> decodeQueue;
|
||||
|
||||
/** The rename stage's instruction queue. */
|
||||
TimeBuffer<RenameStruct> renameQueue;
|
||||
TimeBuffer<O3Comm::RenameStruct> renameQueue;
|
||||
|
||||
/** The IEW stage's instruction queue. */
|
||||
TimeBuffer<IEWStruct> iewQueue;
|
||||
TimeBuffer<O3Comm::IEWStruct> iewQueue;
|
||||
|
||||
private:
|
||||
/** The activity recorder; used to tell if the CPU has any
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <queue>
|
||||
|
||||
#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 Impl>
|
||||
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<TimeStruct> *tb_ptr);
|
||||
void setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr);
|
||||
|
||||
/** Sets pointer to time buffer used to communicate to the next stage. */
|
||||
void setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr);
|
||||
void setDecodeQueue(TimeBuffer<O3Comm::DecodeStruct> *dq_ptr);
|
||||
|
||||
/** Sets pointer to time buffer coming from fetch. */
|
||||
void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr);
|
||||
void setFetchQueue(TimeBuffer<O3Comm::FetchStruct> *fq_ptr);
|
||||
|
||||
/** Sets pointer to list of active threads. */
|
||||
void setActiveThreads(std::list<ThreadID> *at_ptr);
|
||||
@@ -209,32 +204,32 @@ class DefaultDecode
|
||||
FullO3CPU<Impl> *cpu;
|
||||
|
||||
/** Time buffer interface. */
|
||||
TimeBuffer<TimeStruct> *timeBuffer;
|
||||
TimeBuffer<O3Comm::TimeStruct> *timeBuffer;
|
||||
|
||||
/** Wire to get rename's output from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromRename;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromRename;
|
||||
|
||||
/** Wire to get iew's information from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromIEW;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromIEW;
|
||||
|
||||
/** Wire to get commit's information from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromCommit;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::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<TimeStruct>::wire toFetch;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire toFetch;
|
||||
|
||||
/** Decode instruction queue. */
|
||||
TimeBuffer<DecodeStruct> *decodeQueue;
|
||||
TimeBuffer<O3Comm::DecodeStruct> *decodeQueue;
|
||||
|
||||
/** Wire used to write any information heading to rename. */
|
||||
typename TimeBuffer<DecodeStruct>::wire toRename;
|
||||
typename TimeBuffer<O3Comm::DecodeStruct>::wire toRename;
|
||||
|
||||
/** Fetch instruction queue interface. */
|
||||
TimeBuffer<FetchStruct> *fetchQueue;
|
||||
TimeBuffer<O3Comm::FetchStruct> *fetchQueue;
|
||||
|
||||
/** Wire to get fetch's output from fetch queue. */
|
||||
typename TimeBuffer<FetchStruct>::wire fromFetch;
|
||||
typename TimeBuffer<O3Comm::FetchStruct>::wire fromFetch;
|
||||
|
||||
/** Queue of all instructions coming from fetch this cycle. */
|
||||
std::queue<O3DynInstPtr> insts[O3MaxThreads];
|
||||
|
||||
@@ -161,7 +161,7 @@ DefaultDecode<Impl>::DecodeStats::DecodeStats(FullO3CPU<Impl> *cpu)
|
||||
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultDecode<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
DefaultDecode<Impl>::setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr)
|
||||
{
|
||||
timeBuffer = tb_ptr;
|
||||
|
||||
@@ -176,7 +176,7 @@ DefaultDecode<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultDecode<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr)
|
||||
DefaultDecode<Impl>::setDecodeQueue(TimeBuffer<O3Comm::DecodeStruct> *dq_ptr)
|
||||
{
|
||||
decodeQueue = dq_ptr;
|
||||
|
||||
@@ -186,7 +186,7 @@ DefaultDecode<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr)
|
||||
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultDecode<Impl>::setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr)
|
||||
DefaultDecode<Impl>::setFetchQueue(TimeBuffer<O3Comm::FetchStruct> *fq_ptr)
|
||||
{
|
||||
fetchQueue = fq_ptr;
|
||||
|
||||
|
||||
@@ -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 Impl>
|
||||
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<TimeStruct> *time_buffer);
|
||||
void setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *time_buffer);
|
||||
|
||||
/** Sets pointer to list of active threads. */
|
||||
void setActiveThreads(std::list<ThreadID> *at_ptr);
|
||||
|
||||
/** Sets pointer to time buffer used to communicate to the next stage. */
|
||||
void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr);
|
||||
void setFetchQueue(TimeBuffer<O3Comm::FetchStruct> *fq_ptr);
|
||||
|
||||
/** Initialize stage. */
|
||||
void startupStage();
|
||||
@@ -404,23 +401,23 @@ class DefaultFetch
|
||||
FullO3CPU<Impl> *cpu;
|
||||
|
||||
/** Time buffer interface. */
|
||||
TimeBuffer<TimeStruct> *timeBuffer;
|
||||
TimeBuffer<O3Comm::TimeStruct> *timeBuffer;
|
||||
|
||||
/** Wire to get decode's information from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromDecode;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromDecode;
|
||||
|
||||
/** Wire to get rename's information from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromRename;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromRename;
|
||||
|
||||
/** Wire to get iew's information from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromIEW;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromIEW;
|
||||
|
||||
/** Wire to get commit's information from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromCommit;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromCommit;
|
||||
|
||||
//Might be annoying how this name is different than the queue.
|
||||
/** Wire used to write any information heading to decode. */
|
||||
typename TimeBuffer<FetchStruct>::wire toDecode;
|
||||
typename TimeBuffer<O3Comm::FetchStruct>::wire toDecode;
|
||||
|
||||
/** BPredUnit. */
|
||||
BPredUnit *branchPred;
|
||||
|
||||
@@ -262,7 +262,7 @@ FetchStatGroup::FetchStatGroup(FullO3CPU<Impl> *cpu, DefaultFetch *fetch)
|
||||
}
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultFetch<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *time_buffer)
|
||||
DefaultFetch<Impl>::setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *time_buffer)
|
||||
{
|
||||
timeBuffer = time_buffer;
|
||||
|
||||
@@ -282,7 +282,7 @@ DefaultFetch<Impl>::setActiveThreads(std::list<ThreadID> *at_ptr)
|
||||
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultFetch<Impl>::setFetchQueue(TimeBuffer<FetchStruct> *ftb_ptr)
|
||||
DefaultFetch<Impl>::setFetchQueue(TimeBuffer<O3Comm::FetchStruct> *ftb_ptr)
|
||||
{
|
||||
// Create wire to write information to proper place in fetch time buf.
|
||||
toDecode = ftb_ptr->getWire(0);
|
||||
|
||||
@@ -80,13 +80,6 @@ class FUPool;
|
||||
template<class Impl>
|
||||
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<TimeStruct> *tb_ptr);
|
||||
void setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr);
|
||||
|
||||
/** Sets time buffer for getting instructions coming from rename. */
|
||||
void setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr);
|
||||
void setRenameQueue(TimeBuffer<O3Comm::RenameStruct> *rq_ptr);
|
||||
|
||||
/** Sets time buffer to pass on instructions to commit. */
|
||||
void setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr);
|
||||
void setIEWQueue(TimeBuffer<O3Comm::IEWStruct> *iq_ptr);
|
||||
|
||||
/** Sets pointer to list of active threads. */
|
||||
void setActiveThreads(std::list<ThreadID> *at_ptr);
|
||||
@@ -303,37 +296,37 @@ class DefaultIEW
|
||||
void updateExeInstStats(const O3DynInstPtr &inst);
|
||||
|
||||
/** Pointer to main time buffer used for backwards communication. */
|
||||
TimeBuffer<TimeStruct> *timeBuffer;
|
||||
TimeBuffer<O3Comm::TimeStruct> *timeBuffer;
|
||||
|
||||
/** Wire to write information heading to previous stages. */
|
||||
typename TimeBuffer<TimeStruct>::wire toFetch;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire toFetch;
|
||||
|
||||
/** Wire to get commit's output from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromCommit;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromCommit;
|
||||
|
||||
/** Wire to write information heading to previous stages. */
|
||||
typename TimeBuffer<TimeStruct>::wire toRename;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire toRename;
|
||||
|
||||
/** Rename instruction queue interface. */
|
||||
TimeBuffer<RenameStruct> *renameQueue;
|
||||
TimeBuffer<O3Comm::RenameStruct> *renameQueue;
|
||||
|
||||
/** Wire to get rename's output from rename queue. */
|
||||
typename TimeBuffer<RenameStruct>::wire fromRename;
|
||||
typename TimeBuffer<O3Comm::RenameStruct>::wire fromRename;
|
||||
|
||||
/** Issue stage queue. */
|
||||
TimeBuffer<IssueStruct> issueToExecQueue;
|
||||
TimeBuffer<O3Comm::IssueStruct> issueToExecQueue;
|
||||
|
||||
/** Wire to read information from the issue stage time queue. */
|
||||
typename TimeBuffer<IssueStruct>::wire fromIssue;
|
||||
typename TimeBuffer<O3Comm::IssueStruct>::wire fromIssue;
|
||||
|
||||
/**
|
||||
* IEW stage time buffer. Holds ROB indices of instructions that
|
||||
* can be marked as completed.
|
||||
*/
|
||||
TimeBuffer<IEWStruct> *iewQueue;
|
||||
TimeBuffer<O3Comm::IEWStruct> *iewQueue;
|
||||
|
||||
/** Wire to write infromation heading to commit. */
|
||||
typename TimeBuffer<IEWStruct>::wire toCommit;
|
||||
typename TimeBuffer<O3Comm::IEWStruct>::wire toCommit;
|
||||
|
||||
/** Queue of all instructions coming from rename this cycle. */
|
||||
std::queue<O3DynInstPtr> insts[O3MaxThreads];
|
||||
|
||||
@@ -306,7 +306,7 @@ DefaultIEW<Impl>::clearStates(ThreadID tid)
|
||||
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultIEW<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
DefaultIEW<Impl>::setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr)
|
||||
{
|
||||
timeBuffer = tb_ptr;
|
||||
|
||||
@@ -324,7 +324,7 @@ DefaultIEW<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultIEW<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr)
|
||||
DefaultIEW<Impl>::setRenameQueue(TimeBuffer<O3Comm::RenameStruct> *rq_ptr)
|
||||
{
|
||||
renameQueue = rq_ptr;
|
||||
|
||||
@@ -334,7 +334,7 @@ DefaultIEW<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr)
|
||||
|
||||
template<class Impl>
|
||||
void
|
||||
DefaultIEW<Impl>::setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr)
|
||||
DefaultIEW<Impl>::setIEWQueue(TimeBuffer<O3Comm::IEWStruct> *iq_ptr)
|
||||
{
|
||||
iewQueue = iq_ptr;
|
||||
|
||||
|
||||
@@ -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<O3CPUImpl> FetchStruct;
|
||||
|
||||
/** The struct for communication between decode and rename. */
|
||||
typedef DefaultDecodeDefaultRename<O3CPUImpl> DecodeStruct;
|
||||
|
||||
/** The struct for communication between rename and IEW. */
|
||||
typedef DefaultRenameDefaultIEW<O3CPUImpl> RenameStruct;
|
||||
|
||||
/** The struct for communication between IEW and commit. */
|
||||
typedef DefaultIEWDefaultCommit<O3CPUImpl> IEWStruct;
|
||||
|
||||
/** The struct for communication within the IEW stage. */
|
||||
typedef ::IssueStruct<O3CPUImpl> IssueStruct;
|
||||
|
||||
/** The struct for all backwards communication. */
|
||||
typedef TimeBufStruct<O3CPUImpl> TimeStruct;
|
||||
};
|
||||
struct O3CPUImpl {};
|
||||
|
||||
#endif // __CPU_O3_SPARC_IMPL_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 Impl>
|
||||
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<O3DynInstPtr>::iterator ListIt;
|
||||
|
||||
@@ -143,10 +140,10 @@ class InstructionQueue
|
||||
void setActiveThreads(std::list<ThreadID> *at_ptr);
|
||||
|
||||
/** Sets the timer buffer between issue and execute. */
|
||||
void setIssueToExecuteQueue(TimeBuffer<IssueStruct> *i2eQueue);
|
||||
void setIssueToExecuteQueue(TimeBuffer<O3Comm::IssueStruct> *i2eQueue);
|
||||
|
||||
/** Sets the global time buffer. */
|
||||
void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr);
|
||||
void setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *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<IssueStruct> *issueToExecuteQueue;
|
||||
TimeBuffer<O3Comm::IssueStruct> *issueToExecuteQueue;
|
||||
|
||||
/** The backwards time buffer. */
|
||||
TimeBuffer<TimeStruct> *timeBuffer;
|
||||
TimeBuffer<O3Comm::TimeStruct> *timeBuffer;
|
||||
|
||||
/** Wire to read information from timebuffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromCommit;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromCommit;
|
||||
|
||||
/** Function unit pool. */
|
||||
FUPool *fuPool;
|
||||
|
||||
@@ -441,14 +441,15 @@ InstructionQueue<Impl>::setActiveThreads(list<ThreadID> *at_ptr)
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
InstructionQueue<Impl>::setIssueToExecuteQueue(TimeBuffer<IssueStruct> *i2e_ptr)
|
||||
InstructionQueue<Impl>::setIssueToExecuteQueue(
|
||||
TimeBuffer<O3Comm::IssueStruct> *i2e_ptr)
|
||||
{
|
||||
issueToExecuteQueue = i2e_ptr;
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
InstructionQueue<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
InstructionQueue<Impl>::setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr)
|
||||
{
|
||||
timeBuffer = tb_ptr;
|
||||
|
||||
@@ -779,7 +780,7 @@ InstructionQueue<Impl>::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()))) {
|
||||
|
||||
@@ -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<Impl>::LSQSenderState;
|
||||
using LSQRequest = typename LSQ<Impl>::LSQRequest;
|
||||
private:
|
||||
@@ -521,7 +520,7 @@ class LSQUnit
|
||||
Addr cacheBlockMask;
|
||||
|
||||
/** Wire to read information from the issue stage time queue. */
|
||||
typename TimeBuffer<IssueStruct>::wire fromIssue;
|
||||
typename TimeBuffer<O3Comm::IssueStruct>::wire fromIssue;
|
||||
|
||||
/** Whether or not the LSQ is stalled. */
|
||||
bool stalled;
|
||||
|
||||
@@ -50,8 +50,10 @@
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#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"
|
||||
|
||||
@@ -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 Impl>
|
||||
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<TimeStruct> *tb_ptr);
|
||||
void setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr);
|
||||
|
||||
/** Sets pointer to time buffer used to communicate to the next stage. */
|
||||
void setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr);
|
||||
void setRenameQueue(TimeBuffer<O3Comm::RenameStruct> *rq_ptr);
|
||||
|
||||
/** Sets pointer to time buffer coming from decode. */
|
||||
void setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr);
|
||||
void setDecodeQueue(TimeBuffer<O3Comm::DecodeStruct> *dq_ptr);
|
||||
|
||||
/** Sets pointer to IEW stage. Used only for initialization. */
|
||||
void setIEWStage(DefaultIEW<Impl> *iew_stage)
|
||||
@@ -322,28 +318,28 @@ class DefaultRename
|
||||
FullO3CPU<Impl> *cpu;
|
||||
|
||||
/** Pointer to main time buffer used for backwards communication. */
|
||||
TimeBuffer<TimeStruct> *timeBuffer;
|
||||
TimeBuffer<O3Comm::TimeStruct> *timeBuffer;
|
||||
|
||||
/** Wire to get IEW's output from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromIEW;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromIEW;
|
||||
|
||||
/** Wire to get commit's output from backwards time buffer. */
|
||||
typename TimeBuffer<TimeStruct>::wire fromCommit;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire fromCommit;
|
||||
|
||||
/** Wire to write infromation heading to previous stages. */
|
||||
typename TimeBuffer<TimeStruct>::wire toDecode;
|
||||
typename TimeBuffer<O3Comm::TimeStruct>::wire toDecode;
|
||||
|
||||
/** Rename instruction queue. */
|
||||
TimeBuffer<RenameStruct> *renameQueue;
|
||||
TimeBuffer<O3Comm::RenameStruct> *renameQueue;
|
||||
|
||||
/** Wire to write any information heading to IEW. */
|
||||
typename TimeBuffer<RenameStruct>::wire toIEW;
|
||||
typename TimeBuffer<O3Comm::RenameStruct>::wire toIEW;
|
||||
|
||||
/** Decode instruction queue interface. */
|
||||
TimeBuffer<DecodeStruct> *decodeQueue;
|
||||
TimeBuffer<O3Comm::DecodeStruct> *decodeQueue;
|
||||
|
||||
/** Wire to get decode's output from decode queue. */
|
||||
typename TimeBuffer<DecodeStruct>::wire fromDecode;
|
||||
typename TimeBuffer<O3Comm::DecodeStruct>::wire fromDecode;
|
||||
|
||||
/** Queue of all instructions coming from decode this cycle. */
|
||||
InstQueue insts[O3MaxThreads];
|
||||
|
||||
@@ -186,7 +186,7 @@ DefaultRename<Impl>::regProbePoints()
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
DefaultRename<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
DefaultRename<Impl>::setTimeBuffer(TimeBuffer<O3Comm::TimeStruct> *tb_ptr)
|
||||
{
|
||||
timeBuffer = tb_ptr;
|
||||
|
||||
@@ -202,7 +202,7 @@ DefaultRename<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr)
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
DefaultRename<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr)
|
||||
DefaultRename<Impl>::setRenameQueue(TimeBuffer<O3Comm::RenameStruct> *rq_ptr)
|
||||
{
|
||||
renameQueue = rq_ptr;
|
||||
|
||||
@@ -212,7 +212,7 @@ DefaultRename<Impl>::setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr)
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
DefaultRename<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr)
|
||||
DefaultRename<Impl>::setDecodeQueue(TimeBuffer<O3Comm::DecodeStruct> *dq_ptr)
|
||||
{
|
||||
decodeQueue = dq_ptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user