cpu.hh (4656:dbfa364feec8) cpu.hh (4988:5b26eba4283f)
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;

--- 80 unchanged lines hidden (view full) ---

89 * tick() function for the CPU is defined here.
90 */
91template <class Impl>
92class FullO3CPU : public BaseO3CPU
93{
94 public:
95 // Typedefs from the Impl here.
96 typedef typename Impl::CPUPol CPUPolicy;
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;

--- 80 unchanged lines hidden (view full) ---

89 * tick() function for the CPU is defined here.
90 */
91template <class Impl>
92class FullO3CPU : public BaseO3CPU
93{
94 public:
95 // Typedefs from the Impl here.
96 typedef typename Impl::CPUPol CPUPolicy;
97 typedef typename Impl::Params Params;
98 typedef typename Impl::DynInstPtr DynInstPtr;
99 typedef typename Impl::O3CPU O3CPU;
97 typedef typename Impl::DynInstPtr DynInstPtr;
98 typedef typename Impl::O3CPU O3CPU;
99 typedef typename Impl::Params Params;
100
101 typedef O3ThreadState<Impl> Thread;
102
103 typedef typename std::list<DynInstPtr>::iterator ListIt;
104
105 friend class O3ThreadContext<Impl>;
106
107 public:

--- 152 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
100
101 typedef O3ThreadState<Impl> Thread;
102
103 typedef typename std::list<DynInstPtr>::iterator ListIt;
104
105 friend class O3ThreadContext<Impl>;
106
107 public:

--- 152 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
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
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
268 /** Returns a specific port. */
269 Port *getPort(const std::string &if_name, int idx);
270
271 /** Ticks CPU, calling tick() on each stage, and checking the overall
272 * activity to see if the CPU should deschedule itself.
273 */
274 void tick();
275

--- 424 unchanged lines hidden ---
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 ---