cpu.hh (5358:e9acb84bbafb) cpu.hh (5529:9ae69b9cd7fd)
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;

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

48#include "cpu/simple_thread.hh"
49#include "cpu/o3/comm.hh"
50#include "cpu/o3/cpu_policy.hh"
51#include "cpu/o3/scoreboard.hh"
52#include "cpu/o3/thread_state.hh"
53//#include "cpu/o3/thread_context.hh"
54#include "sim/process.hh"
55
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;

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

48#include "cpu/simple_thread.hh"
49#include "cpu/o3/comm.hh"
50#include "cpu/o3/cpu_policy.hh"
51#include "cpu/o3/scoreboard.hh"
52#include "cpu/o3/thread_state.hh"
53//#include "cpu/o3/thread_context.hh"
54#include "sim/process.hh"
55
56#include "params/DerivO3CPU.hh"
57
56template <class>
57class Checker;
58class ThreadContext;
59template <class>
60class O3ThreadContext;
61
62class Checkpoint;
63class MemObject;
64class Process;
65
58template <class>
59class Checker;
60class ThreadContext;
61template <class>
62class O3ThreadContext;
63
64class Checkpoint;
65class MemObject;
66class Process;
67
68class BaseCPUParams;
69
66class BaseO3CPU : public BaseCPU
67{
68 //Stuff that's pretty ISA independent will go here.
69 public:
70class BaseO3CPU : public BaseCPU
71{
72 //Stuff that's pretty ISA independent will go here.
73 public:
70 typedef BaseCPU::Params Params;
74 BaseO3CPU(BaseCPUParams *params);
71
75
72 BaseO3CPU(Params *params);
73
74 void regStats();
75
76 /** Sets this CPU's ID. */
77 void setCpuId(int id) { cpu_id = id; }
78
79 /** Reads this CPU's ID. */
80 int readCpuId() { return cpu_id; }
81

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

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::DynInstPtr DynInstPtr;
98 typedef typename Impl::O3CPU O3CPU;
76 void regStats();
77
78 /** Sets this CPU's ID. */
79 void setCpuId(int id) { cpu_id = id; }
80
81 /** Reads this CPU's ID. */
82 int readCpuId() { return cpu_id; }
83

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

93template <class Impl>
94class FullO3CPU : public BaseO3CPU
95{
96 public:
97 // Typedefs from the Impl here.
98 typedef typename Impl::CPUPol CPUPolicy;
99 typedef typename Impl::DynInstPtr DynInstPtr;
100 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:

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

251 deallocateContextEvent[tid].squash();
252 }
253
254 /** The tick event used for scheduling CPU ticks. */
255 DeallocateContextEvent deallocateContextEvent[Impl::MaxThreads];
256
257 public:
258 /** Constructs a CPU with the given parameters. */
101
102 typedef O3ThreadState<Impl> Thread;
103
104 typedef typename std::list<DynInstPtr>::iterator ListIt;
105
106 friend class O3ThreadContext<Impl>;
107
108 public:

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

252 deallocateContextEvent[tid].squash();
253 }
254
255 /** The tick event used for scheduling CPU ticks. */
256 DeallocateContextEvent deallocateContextEvent[Impl::MaxThreads];
257
258 public:
259 /** Constructs a CPU with the given parameters. */
259 FullO3CPU(O3CPU *o3_cpu, Params *params);
260 FullO3CPU(O3CPU *o3_cpu, DerivO3CPUParams *params);
260 /** Destructor. */
261 ~FullO3CPU();
262
263 /** Registers statistics. */
264 void fullCPURegStats();
265
266 void demapPage(Addr vaddr, uint64_t asn)
267 {

--- 464 unchanged lines hidden ---
261 /** Destructor. */
262 ~FullO3CPU();
263
264 /** Registers statistics. */
265 void fullCPURegStats();
266
267 void demapPage(Addr vaddr, uint64_t asn)
268 {

--- 464 unchanged lines hidden ---