cpu.hh (2876:a862ab9f93f8) | cpu.hh (2880:a48d5059cd35) |
---|---|
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, | 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 Drained, | |
115 SwitchedOut 116 }; 117 118 /** Overall CPU status. */ 119 Status _status; 120 121 /** Per-thread status in CPU, used for SMT. */ 122 Status _threadStatus[Impl::MaxThreads]; --- 124 unchanged lines hidden (view full) --- 247 /** Constructs a CPU with the given parameters. */ 248 FullO3CPU(Params *params); 249 /** Destructor. */ 250 ~FullO3CPU(); 251 252 /** Registers statistics. */ 253 void fullCPURegStats(); 254 | 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 |
|
255 /** Ticks CPU, calling tick() on each stage, and checking the overall 256 * activity to see if the CPU should deschedule itself. 257 */ 258 void tick(); 259 260 /** Initialize the CPU */ 261 void init(); 262 --- 44 unchanged lines hidden (view full) --- 307 void activateWhenReady(int tid); 308 309 /** Add or Remove a Thread Context in the CPU. */ 310 void doContextSwitch(); 311 312 /** Update The Order In Which We Process Threads. */ 313 void updateThreadPriority(); 314 | 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: |
|
315 /** Executes a syscall on this cycle. 316 * --------------------------------------- 317 * Note: this is a virtual function. CPU-Specific 318 * functionality defined in derived classes 319 */ 320 virtual void syscall(int tid) { panic("Unimplemented!"); } 321 322 /** Starts draining the CPU's pipeline of all instructions in --- 343 unchanged lines hidden --- | 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 --- |