mem_dep_unit_impl.hh (5529:9ae69b9cd7fd) mem_dep_unit_impl.hh (6005:1dc178e53487)
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 30 unchanged lines hidden (view full) ---

39MemDepUnit<MemDepPred, Impl>::MemDepUnit()
40 : loadBarrier(false), loadBarrierSN(0), storeBarrier(false),
41 storeBarrierSN(0), iqPtr(NULL)
42{
43}
44
45template <class MemDepPred, class Impl>
46MemDepUnit<MemDepPred, Impl>::MemDepUnit(DerivO3CPUParams *params)
1/*
2 * Copyright (c) 2004-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 30 unchanged lines hidden (view full) ---

39MemDepUnit<MemDepPred, Impl>::MemDepUnit()
40 : loadBarrier(false), loadBarrierSN(0), storeBarrier(false),
41 storeBarrierSN(0), iqPtr(NULL)
42{
43}
44
45template <class MemDepPred, class Impl>
46MemDepUnit<MemDepPred, Impl>::MemDepUnit(DerivO3CPUParams *params)
47 : depPred(params->SSITSize, params->LFSTSize), loadBarrier(false),
47 : _name(params->name + ".memdepunit"),
48 depPred(params->SSITSize, params->LFSTSize), loadBarrier(false),
48 loadBarrierSN(0), storeBarrier(false), storeBarrierSN(0), iqPtr(NULL)
49{
50 DPRINTF(MemDepUnit, "Creating MemDepUnit object.\n");
51}
52
53template <class MemDepPred, class Impl>
54MemDepUnit<MemDepPred, Impl>::~MemDepUnit()
55{

--- 15 unchanged lines hidden (view full) ---

71 }
72
73#ifdef DEBUG
74 assert(MemDepEntry::memdep_count == 0);
75#endif
76}
77
78template <class MemDepPred, class Impl>
49 loadBarrierSN(0), storeBarrier(false), storeBarrierSN(0), iqPtr(NULL)
50{
51 DPRINTF(MemDepUnit, "Creating MemDepUnit object.\n");
52}
53
54template <class MemDepPred, class Impl>
55MemDepUnit<MemDepPred, Impl>::~MemDepUnit()
56{

--- 15 unchanged lines hidden (view full) ---

72 }
73
74#ifdef DEBUG
75 assert(MemDepEntry::memdep_count == 0);
76#endif
77}
78
79template <class MemDepPred, class Impl>
79std::string
80MemDepUnit<MemDepPred, Impl>::name() const
81{
82 return "memdepunit";
83}
84
85template <class MemDepPred, class Impl>
86void
87MemDepUnit<MemDepPred, Impl>::init(DerivO3CPUParams *params, int tid)
88{
89 DPRINTF(MemDepUnit, "Creating MemDepUnit %i object.\n",tid);
90
80void
81MemDepUnit<MemDepPred, Impl>::init(DerivO3CPUParams *params, int tid)
82{
83 DPRINTF(MemDepUnit, "Creating MemDepUnit %i object.\n",tid);
84
85 _name = csprintf("%s.memDep%d", params->name, tid);
91 id = tid;
92
93 depPred.init(params->SSITSize, params->LFSTSize);
94}
95
96template <class MemDepPred, class Impl>
97void
98MemDepUnit<MemDepPred, Impl>::regStats()
99{
100 insertedLoads
86 id = tid;
87
88 depPred.init(params->SSITSize, params->LFSTSize);
89}
90
91template <class MemDepPred, class Impl>
92void
93MemDepUnit<MemDepPred, Impl>::regStats()
94{
95 insertedLoads
101 .name(name() + ".memDep.insertedLoads")
96 .name(name() + ".insertedLoads")
102 .desc("Number of loads inserted to the mem dependence unit.");
103
104 insertedStores
97 .desc("Number of loads inserted to the mem dependence unit.");
98
99 insertedStores
105 .name(name() + ".memDep.insertedStores")
100 .name(name() + ".insertedStores")
106 .desc("Number of stores inserted to the mem dependence unit.");
107
108 conflictingLoads
101 .desc("Number of stores inserted to the mem dependence unit.");
102
103 conflictingLoads
109 .name(name() + ".memDep.conflictingLoads")
104 .name(name() + ".conflictingLoads")
110 .desc("Number of conflicting loads.");
111
112 conflictingStores
105 .desc("Number of conflicting loads.");
106
107 conflictingStores
113 .name(name() + ".memDep.conflictingStores")
108 .name(name() + ".conflictingStores")
114 .desc("Number of conflicting stores.");
115}
116
117template <class MemDepPred, class Impl>
118void
119MemDepUnit<MemDepPred, Impl>::switchOut()
120{
121 assert(instList[0].empty());

--- 464 unchanged lines hidden ---
109 .desc("Number of conflicting stores.");
110}
111
112template <class MemDepPred, class Impl>
113void
114MemDepUnit<MemDepPred, Impl>::switchOut()
115{
116 assert(instList[0].empty());

--- 464 unchanged lines hidden ---