scoreboard.cc (2689:dbf969c18a65) | scoreboard.cc (4642:d7b2de2d72f1) |
---|---|
1/* 2 * Copyright (c) 2005-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; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Korey Sewell 29 * Kevin Lim 30 */ 31 | 1/* 2 * Copyright (c) 2005-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; --- 15 unchanged lines hidden (view full) --- 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Korey Sewell 29 * Kevin Lim 30 */ 31 |
32#include "arch/isa_specific.hh" |
|
32#include "cpu/o3/scoreboard.hh" 33 34Scoreboard::Scoreboard(unsigned activeThreads, 35 unsigned _numLogicalIntRegs, 36 unsigned _numPhysicalIntRegs, 37 unsigned _numLogicalFloatRegs, 38 unsigned _numPhysicalFloatRegs, 39 unsigned _numMiscRegs, --- 34 unchanged lines hidden (view full) --- 74Scoreboard::name() const 75{ 76 return "cpu.scoreboard"; 77} 78 79bool 80Scoreboard::getReg(PhysRegIndex phys_reg) 81{ | 33#include "cpu/o3/scoreboard.hh" 34 35Scoreboard::Scoreboard(unsigned activeThreads, 36 unsigned _numLogicalIntRegs, 37 unsigned _numPhysicalIntRegs, 38 unsigned _numLogicalFloatRegs, 39 unsigned _numPhysicalFloatRegs, 40 unsigned _numMiscRegs, --- 34 unchanged lines hidden (view full) --- 75Scoreboard::name() const 76{ 77 return "cpu.scoreboard"; 78} 79 80bool 81Scoreboard::getReg(PhysRegIndex phys_reg) 82{ |
83#if THE_ISA == ALPHA_ISA |
|
82 // Always ready if int or fp zero reg. 83 if (phys_reg == zeroRegIdx || 84 phys_reg == (zeroRegIdx + numPhysicalIntRegs)) { 85 return 1; 86 } | 84 // Always ready if int or fp zero reg. 85 if (phys_reg == zeroRegIdx || 86 phys_reg == (zeroRegIdx + numPhysicalIntRegs)) { 87 return 1; 88 } |
89#else 90 // Always ready if int zero reg. 91 if (phys_reg == zeroRegIdx) { 92 return 1; 93 } 94#endif |
|
87 88 return regScoreBoard[phys_reg]; 89} 90 91void 92Scoreboard::setReg(PhysRegIndex phys_reg) 93{ 94 DPRINTF(Scoreboard, "Setting reg %i as ready\n", phys_reg); 95 96 regScoreBoard[phys_reg] = 1; 97} 98 99void 100Scoreboard::unsetReg(PhysRegIndex ready_reg) 101{ | 95 96 return regScoreBoard[phys_reg]; 97} 98 99void 100Scoreboard::setReg(PhysRegIndex phys_reg) 101{ 102 DPRINTF(Scoreboard, "Setting reg %i as ready\n", phys_reg); 103 104 regScoreBoard[phys_reg] = 1; 105} 106 107void 108Scoreboard::unsetReg(PhysRegIndex ready_reg) 109{ |
110#if THE_ISA == ALPHA_ISA |
|
102 if (ready_reg == zeroRegIdx || 103 ready_reg == (zeroRegIdx + numPhysicalIntRegs)) { 104 // Don't do anything if int or fp zero reg. 105 return; 106 } | 111 if (ready_reg == zeroRegIdx || 112 ready_reg == (zeroRegIdx + numPhysicalIntRegs)) { 113 // Don't do anything if int or fp zero reg. 114 return; 115 } |
116#else 117 if (ready_reg == zeroRegIdx) { 118 // Don't do anything if int zero reg. 119 return; 120 } 121#endif |
|
107 108 regScoreBoard[ready_reg] = 0; 109} | 122 123 regScoreBoard[ready_reg] = 0; 124} |