diff options
author | Miles Kaufmann <milesck@eecs.umich.edu> | 2007-08-30 15:16:59 -0400 |
---|---|---|
committer | Miles Kaufmann <milesck@eecs.umich.edu> | 2007-08-30 15:16:59 -0400 |
commit | 54cc0053f0a6822e47a49771976af6daaabc24bb (patch) | |
tree | 72e6c7879de698347832e1e1475afbb9c1be2b70 /src/mem/cache/base_cache.hh | |
parent | 9cb49ab9e0ff8917d20fd7dc81be3ce5ecc81bd8 (diff) | |
download | gem5-54cc0053f0a6822e47a49771976af6daaabc24bb.tar.xz |
params: Deprecate old-style constructors; update most SimObject constructors.
SimObjects not yet updated:
- Process and subclasses
- BaseCPU and subclasses
The SimObject(const std::string &name) constructor was removed. Subclasses
that still rely on that behavior must call the parent initializer as
: SimObject(makeParams(name))
--HG--
extra : convert_revision : d6faddde76e7c3361ebdbd0a7b372a40941c12ed
Diffstat (limited to 'src/mem/cache/base_cache.hh')
-rw-r--r-- | src/mem/cache/base_cache.hh | 52 |
1 files changed, 4 insertions, 48 deletions
diff --git a/src/mem/cache/base_cache.hh b/src/mem/cache/base_cache.hh index 6a4eec43e..5049f68f1 100644 --- a/src/mem/cache/base_cache.hh +++ b/src/mem/cache/base_cache.hh @@ -52,6 +52,7 @@ #include "mem/packet.hh" #include "mem/tport.hh" #include "mem/request.hh" +#include "params/BaseCache.hh" #include "sim/eventq.hh" #include "sim/sim_exit.hh" @@ -354,54 +355,9 @@ class BaseCache : public MemObject virtual void regStats(); public: - - class Params - { - public: - /** The hit latency for this cache. */ - int hitLatency; - /** The block size of this cache. */ - int blkSize; - int numMSHRs; - int numTargets; - int numWriteBuffers; - /** - * The maximum number of misses this cache should handle before - * ending the simulation. - */ - Counter maxMisses; - - std::vector<Range<Addr> > cpuSideFilterRanges; - std::vector<Range<Addr> > memSideFilterRanges; - /** - * Construct an instance of this parameter class. - */ - Params(int _hitLatency, int _blkSize, - int _numMSHRs, int _numTargets, int _numWriteBuffers, - Counter _maxMisses, - std::vector<Range<Addr> > cpu_side_filter_ranges, - std::vector<Range<Addr> > mem_side_filter_ranges) - : hitLatency(_hitLatency), blkSize(_blkSize), - numMSHRs(_numMSHRs), numTargets(_numTargets), - numWriteBuffers(_numWriteBuffers), maxMisses(_maxMisses), - cpuSideFilterRanges(cpu_side_filter_ranges), - memSideFilterRanges(mem_side_filter_ranges) - { - } - }; - - /** - * Create and initialize a basic cache object. - * @param name The name of this cache. - * @param hier_params Pointer to the HierParams object for this hierarchy - * of this cache. - * @param params The parameter object for this BaseCache. - */ - BaseCache(const std::string &name, Params ¶ms); - - ~BaseCache() - { - } + typedef BaseCacheParams Params; + BaseCache(const Params *p); + ~BaseCache() {} virtual void init(); |