mem_dep_unit.hh (3500:8d5e32b3bc2e) | mem_dep_unit.hh (5529:9ae69b9cd7fd) |
---|---|
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; --- 34 unchanged lines hidden (view full) --- 43 size_t operator() (const InstSeqNum &seq_num) const { 44 unsigned a = (unsigned)seq_num; 45 unsigned hash = (((a >> 14) ^ ((a >> 2) & 0xffff))) & 0x7FFFFFFF; 46 47 return hash; 48 } 49}; 50 | 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; --- 34 unchanged lines hidden (view full) --- 43 size_t operator() (const InstSeqNum &seq_num) const { 44 unsigned a = (unsigned)seq_num; 45 unsigned hash = (((a >> 14) ^ ((a >> 2) & 0xffff))) & 0x7FFFFFFF; 46 47 return hash; 48 } 49}; 50 |
51class DerivO3CPUParams; 52 |
|
51template <class Impl> 52class InstructionQueue; 53 54/** 55 * Memory dependency unit class. This holds the memory dependence predictor. 56 * As memory operations are issued to the IQ, they are also issued to this 57 * unit, which then looks up the prediction as to what they are dependent 58 * upon. This unit must be checked prior to a memory operation being able 59 * to issue. Although this is templated, it's somewhat hard to make a generic 60 * memory dependence unit. This one is mostly for store sets; it will be 61 * quite limited in what other memory dependence predictions it can also 62 * utilize. Thus this class should be most likely be rewritten for other 63 * dependence prediction schemes. 64 */ 65template <class MemDepPred, class Impl> 66class MemDepUnit { 67 public: | 53template <class Impl> 54class InstructionQueue; 55 56/** 57 * Memory dependency unit class. This holds the memory dependence predictor. 58 * As memory operations are issued to the IQ, they are also issued to this 59 * unit, which then looks up the prediction as to what they are dependent 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 public: |
68 typedef typename Impl::Params Params; | |
69 typedef typename Impl::DynInstPtr DynInstPtr; 70 71 /** Empty constructor. Must call init() prior to using in this case. */ 72 MemDepUnit(); 73 74 /** Constructs a MemDepUnit with given parameters. */ | 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. */ |
75 MemDepUnit(Params *params); | 76 MemDepUnit(DerivO3CPUParams *params); |
76 77 /** Frees up any memory allocated. */ 78 ~MemDepUnit(); 79 80 /** Returns the name of the memory dependence unit. */ 81 std::string name() const; 82 83 /** Initializes the unit with parameters and a thread id. */ | 77 78 /** Frees up any memory allocated. */ 79 ~MemDepUnit(); 80 81 /** Returns the name of the memory dependence unit. */ 82 std::string name() const; 83 84 /** Initializes the unit with parameters and a thread id. */ |
84 void init(Params *params, int tid); | 85 void init(DerivO3CPUParams *params, int tid); |
85 86 /** Registers statistics. */ 87 void regStats(); 88 89 /** Switches out the memory dependence predictor. */ 90 void switchOut(); 91 92 /** Takes over from another CPU's thread. */ --- 172 unchanged lines hidden --- | 86 87 /** Registers statistics. */ 88 void regStats(); 89 90 /** Switches out the memory dependence predictor. */ 91 void switchOut(); 92 93 /** Takes over from another CPU's thread. */ --- 172 unchanged lines hidden --- |