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; --- 97 unchanged lines hidden (view full) --- 106 friend class O3ThreadContext<Impl>; 107 108 public: 109 enum Status { 110 Running, 111 Idle, 112 Halted, 113 Blocked, |
114 SwitchedOut 115 }; 116 117 /** Overall CPU status. */ 118 Status _status; 119 120 /** Per-thread status in CPU, used for SMT. */ 121 Status _threadStatus[Impl::MaxThreads]; --- 124 unchanged lines hidden (view full) --- 246 /** Constructs a CPU with the given parameters. */ 247 FullO3CPU(Params *params); 248 /** Destructor. */ 249 ~FullO3CPU(); 250 251 /** Registers statistics. */ 252 void fullCPURegStats(); 253 |
254 /** Returns a specific port. */ 255 Port *getPort(const std::string &if_name, int idx); 256 |
257 /** Ticks CPU, calling tick() on each stage, and checking the overall 258 * activity to see if the CPU should deschedule itself. 259 */ 260 void tick(); 261 262 /** Initialize the CPU */ 263 void init(); 264 --- 44 unchanged lines hidden (view full) --- 309 void activateWhenReady(int tid); 310 311 /** Add or Remove a Thread Context in the CPU. */ 312 void doContextSwitch(); 313 314 /** Update The Order In Which We Process Threads. */ 315 void updateThreadPriority(); 316 |
317 /** Serialize state. */ 318 virtual void serialize(std::ostream &os); 319 320 /** Unserialize from a checkpoint. */ 321 virtual void unserialize(Checkpoint *cp, const std::string §ion); 322 323 public: |
324 /** Executes a syscall on this cycle. 325 * --------------------------------------- 326 * Note: this is a virtual function. CPU-Specific 327 * functionality defined in derived classes 328 */ 329 virtual void syscall(int tid) { panic("Unimplemented!"); } 330 331 /** Starts draining the CPU's pipeline of all instructions in --- 343 unchanged lines hidden --- |