mem_dep_unit.hh (5999:3cf8e71257e0) mem_dep_unit.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;

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

60 * upon. This unit must be checked prior to a memory operation being able
61 * to issue. Although this is templated, it's somewhat hard to make a generic
62 * memory dependence unit. This one is mostly for store sets; it will be
63 * quite limited in what other memory dependence predictions it can also
64 * utilize. Thus this class should be most likely be rewritten for other
65 * dependence prediction schemes.
66 */
67template <class MemDepPred, class Impl>
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;

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

60 * upon. This unit must be checked prior to a memory operation being able
61 * to issue. Although this is templated, it's somewhat hard to make a generic
62 * memory dependence unit. This one is mostly for store sets; it will be
63 * quite limited in what other memory dependence predictions it can also
64 * utilize. Thus this class should be most likely be rewritten for other
65 * dependence prediction schemes.
66 */
67template <class MemDepPred, class Impl>
68class MemDepUnit {
68class MemDepUnit
69{
70 protected:
71 std::string _name;
72
69 public:
70 typedef typename Impl::DynInstPtr DynInstPtr;
71
72 /** Empty constructor. Must call init() prior to using in this case. */
73 MemDepUnit();
74
75 /** Constructs a MemDepUnit with given parameters. */
76 MemDepUnit(DerivO3CPUParams *params);
77
78 /** Frees up any memory allocated. */
79 ~MemDepUnit();
80
81 /** Returns the name of the memory dependence unit. */
73 public:
74 typedef typename Impl::DynInstPtr DynInstPtr;
75
76 /** Empty constructor. Must call init() prior to using in this case. */
77 MemDepUnit();
78
79 /** Constructs a MemDepUnit with given parameters. */
80 MemDepUnit(DerivO3CPUParams *params);
81
82 /** Frees up any memory allocated. */
83 ~MemDepUnit();
84
85 /** Returns the name of the memory dependence unit. */
82 std::string name() const;
86 std::string name() const { return _name; }
83
84 /** Initializes the unit with parameters and a thread id. */
85 void init(DerivO3CPUParams *params, int tid);
86
87 /** Registers statistics. */
88 void regStats();
89
90 /** Switches out the memory dependence predictor. */

--- 175 unchanged lines hidden ---
87
88 /** Initializes the unit with parameters and a thread id. */
89 void init(DerivO3CPUParams *params, int tid);
90
91 /** Registers statistics. */
92 void regStats();
93
94 /** Switches out the memory dependence predictor. */

--- 175 unchanged lines hidden ---