1/* |
2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated 11 * unmodified and in its entirety in all distributions of the software, 12 * modified or unmodified, in source code or in binary form. 13 * |
14 * Copyright (c) 2004-2006 The Regents of The University of Michigan 15 * All rights reserved. 16 * 17 * Redistribution and use in source and binary forms, with or without 18 * modification, are permitted provided that the following conditions are 19 * met: redistributions of source code must retain the above copyright 20 * notice, this list of conditions and the following disclaimer; 21 * redistributions in binary form must reproduce the above copyright --- 74 unchanged lines hidden (view full) --- 96 97 /** Per-thread status. */ 98 ThreadStatus decodeStatus[Impl::MaxThreads]; 99 100 public: 101 /** DefaultDecode constructor. */ 102 DefaultDecode(O3CPU *_cpu, DerivO3CPUParams *params); 103 |
104 void startupStage(); 105 void resetStage(); 106 |
107 /** Returns the name of decode. */ 108 std::string name() const; 109 110 /** Registers statistics. */ 111 void regStats(); 112 113 /** Sets the main backwards communication time buffer pointer. */ 114 void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr); 115 116 /** Sets pointer to time buffer used to communicate to the next stage. */ 117 void setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr); 118 119 /** Sets pointer to time buffer coming from fetch. */ 120 void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr); 121 122 /** Sets pointer to list of active threads. */ 123 void setActiveThreads(std::list<ThreadID> *at_ptr); 124 |
125 /** Perform sanity checks after a drain. */ 126 void drainSanityCheck() const; |
127 |
128 /** Has the stage drained? */ 129 bool isDrained() const { return true; } |
130 |
131 /** Takes over from another CPU's thread. */ |
132 void takeOverFrom() { resetStage(); } |
133 134 /** Ticks decode, processing all input signals and decoding as many 135 * instructions as possible. 136 */ 137 void tick(); 138 139 /** Determines what to do based on decode's current status. 140 * @param status_change decode() sets this variable if there was a status --- 134 unchanged lines hidden (view full) --- 275 unsigned toRenameIndex; 276 277 /** number of Active Threads*/ 278 ThreadID numThreads; 279 280 /** List of active thread ids */ 281 std::list<ThreadID> *activeThreads; 282 |
283 /** Maximum size of the skid buffer. */ 284 unsigned skidBufferMax; 285 286 /** SeqNum of Squashing Branch Delay Instruction (used for MIPS)*/ 287 Addr bdelayDoneSeqNum[Impl::MaxThreads]; 288 289 /** Instruction used for squashing branch (used for MIPS)*/ 290 DynInstPtr squashInst[Impl::MaxThreads]; --- 33 unchanged lines hidden --- |