decode.hh (9184:a1a8f137b796) | decode.hh (9444:ab47fe7f03f0) |
---|---|
1/* | 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 * |
|
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; 9 * redistributions in binary form must reproduce the above copyright --- 74 unchanged lines hidden (view full) --- 84 85 /** Per-thread status. */ 86 ThreadStatus decodeStatus[Impl::MaxThreads]; 87 88 public: 89 /** DefaultDecode constructor. */ 90 DefaultDecode(O3CPU *_cpu, DerivO3CPUParams *params); 91 | 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 |
|
92 /** Returns the name of decode. */ 93 std::string name() const; 94 95 /** Registers statistics. */ 96 void regStats(); 97 98 /** Sets the main backwards communication time buffer pointer. */ 99 void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr); 100 101 /** Sets pointer to time buffer used to communicate to the next stage. */ 102 void setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr); 103 104 /** Sets pointer to time buffer coming from fetch. */ 105 void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr); 106 107 /** Sets pointer to list of active threads. */ 108 void setActiveThreads(std::list<ThreadID> *at_ptr); 109 | 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 |
110 /** Drains the decode stage. */ 111 bool drain(); | 125 /** Perform sanity checks after a drain. */ 126 void drainSanityCheck() const; |
112 | 127 |
113 /** Resumes execution after a drain. */ 114 void resume() { } | 128 /** Has the stage drained? */ 129 bool isDrained() const { return true; } |
115 | 130 |
116 /** Switches out the decode stage. */ 117 void switchOut() { } 118 | |
119 /** Takes over from another CPU's thread. */ | 131 /** Takes over from another CPU's thread. */ |
120 void takeOverFrom(); | 132 void takeOverFrom() { resetStage(); } |
121 122 /** Ticks decode, processing all input signals and decoding as many 123 * instructions as possible. 124 */ 125 void tick(); 126 127 /** Determines what to do based on decode's current status. 128 * @param status_change decode() sets this variable if there was a status --- 134 unchanged lines hidden (view full) --- 263 unsigned toRenameIndex; 264 265 /** number of Active Threads*/ 266 ThreadID numThreads; 267 268 /** List of active thread ids */ 269 std::list<ThreadID> *activeThreads; 270 | 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 |
271 /** Number of branches in flight. */ 272 unsigned branchCount[Impl::MaxThreads]; 273 | |
274 /** Maximum size of the skid buffer. */ 275 unsigned skidBufferMax; 276 277 /** SeqNum of Squashing Branch Delay Instruction (used for MIPS)*/ 278 Addr bdelayDoneSeqNum[Impl::MaxThreads]; 279 280 /** Instruction used for squashing branch (used for MIPS)*/ 281 DynInstPtr squashInst[Impl::MaxThreads]; --- 33 unchanged lines hidden --- | 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 --- |