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 69{ 70 protected: 71 std::string _name; 72 |
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. */ |
86 std::string name() const { return _name; } |
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 --- |