cpu.hh (4988:5b26eba4283f) | cpu.hh (4997:e7380529bd2d) |
---|---|
1/* 2 * Copyright (c) 2004-2005 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; --- 99 unchanged lines hidden (view full) --- 108 enum Status { 109 Running, 110 Idle, 111 Halted, 112 Blocked, 113 SwitchedOut 114 }; 115 | 1/* 2 * Copyright (c) 2004-2005 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; --- 99 unchanged lines hidden (view full) --- 108 enum Status { 109 Running, 110 Idle, 111 Halted, 112 Blocked, 113 SwitchedOut 114 }; 115 |
116#if FULL_SYSTEM | |
117 TheISA::ITB * itb; 118 TheISA::DTB * dtb; | 116 TheISA::ITB * itb; 117 TheISA::DTB * dtb; |
119#endif | |
120 121 /** Overall CPU status. */ 122 Status _status; 123 124 /** Per-thread status in CPU, used for SMT. */ 125 Status _threadStatus[Impl::MaxThreads]; 126 127 private: --- 132 unchanged lines hidden (view full) --- 260 /** Constructs a CPU with the given parameters. */ 261 FullO3CPU(O3CPU *o3_cpu, Params *params); 262 /** Destructor. */ 263 ~FullO3CPU(); 264 265 /** Registers statistics. */ 266 void fullCPURegStats(); 267 | 118 119 /** Overall CPU status. */ 120 Status _status; 121 122 /** Per-thread status in CPU, used for SMT. */ 123 Status _threadStatus[Impl::MaxThreads]; 124 125 private: --- 132 unchanged lines hidden (view full) --- 258 /** Constructs a CPU with the given parameters. */ 259 FullO3CPU(O3CPU *o3_cpu, Params *params); 260 /** Destructor. */ 261 ~FullO3CPU(); 262 263 /** Registers statistics. */ 264 void fullCPURegStats(); 265 |
268#if FULL_SYSTEM | |
269 /** Translates instruction requestion. */ 270 Fault translateInstReq(RequestPtr &req, Thread *thread) 271 { 272 return this->itb->translate(req, thread->getTC()); 273 } 274 275 /** Translates data read request. */ 276 Fault translateDataReadReq(RequestPtr &req, Thread *thread) 277 { 278 return this->dtb->translate(req, thread->getTC(), false); 279 } 280 281 /** Translates data write request. */ 282 Fault translateDataWriteReq(RequestPtr &req, Thread *thread) 283 { 284 return this->dtb->translate(req, thread->getTC(), true); 285 } 286 | 266 /** Translates instruction requestion. */ 267 Fault translateInstReq(RequestPtr &req, Thread *thread) 268 { 269 return this->itb->translate(req, thread->getTC()); 270 } 271 272 /** Translates data read request. */ 273 Fault translateDataReadReq(RequestPtr &req, Thread *thread) 274 { 275 return this->dtb->translate(req, thread->getTC(), false); 276 } 277 278 /** Translates data write request. */ 279 Fault translateDataWriteReq(RequestPtr &req, Thread *thread) 280 { 281 return this->dtb->translate(req, thread->getTC(), true); 282 } 283 |
287#else 288 /** Translates instruction requestion in syscall emulation mode. */ 289 Fault translateInstReq(RequestPtr &req, Thread *thread) 290 { 291 return thread->getProcessPtr()->pTable->translate(req); 292 } 293 294 /** Translates data read request in syscall emulation mode. */ 295 Fault translateDataReadReq(RequestPtr &req, Thread *thread) 296 { 297 return thread->getProcessPtr()->pTable->translate(req); 298 } 299 300 /** Translates data write request in syscall emulation mode. */ 301 Fault translateDataWriteReq(RequestPtr &req, Thread *thread) 302 { 303 return thread->getProcessPtr()->pTable->translate(req); 304 } 305 306#endif 307 | |
308 /** Returns a specific port. */ 309 Port *getPort(const std::string &if_name, int idx); 310 311 /** Ticks CPU, calling tick() on each stage, and checking the overall 312 * activity to see if the CPU should deschedule itself. 313 */ 314 void tick(); 315 --- 424 unchanged lines hidden --- | 284 /** Returns a specific port. */ 285 Port *getPort(const std::string &if_name, int idx); 286 287 /** Ticks CPU, calling tick() on each stage, and checking the overall 288 * activity to see if the CPU should deschedule itself. 289 */ 290 void tick(); 291 --- 424 unchanged lines hidden --- |