Deleted Added
sdiff udiff text old ( 2857:5f3e107e8f13 ) new ( 2860:843426871cbc )
full compact
1/*
2 * Copyright (c) 2002-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;

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

32#include "cpu/exetrace.hh"
33#include "cpu/simple/timing.hh"
34#include "mem/packet_impl.hh"
35#include "sim/builder.hh"
36
37using namespace std;
38using namespace TheISA;
39
40Port *
41TimingSimpleCPU::getPort(const std::string &if_name, int idx)
42{
43 if (if_name == "dcache_port")
44 return &dcachePort;
45 else if (if_name == "icache_port")
46 return &icachePort;
47 else
48 panic("No Such Port\n");
49}
50
51void
52TimingSimpleCPU::init()
53{
54 BaseCPU::init();
55#if FULL_SYSTEM
56 for (int i = 0; i < threadContexts.size(); ++i) {
57 ThreadContext *tc = threadContexts[i];
58
59 // initialize CPU, including PC
60 TheISA::initCPU(tc, tc->readCpuId());
61 }

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

114
115bool
116TimingSimpleCPU::drain(Event *drain_event)
117{
118 // TimingSimpleCPU is ready to drain if it's not waiting for
119 // an access to complete.
120 if (status() == Idle || status() == Running || status() == SwitchedOut) {
121 changeState(SimObject::DrainedTiming);
122 return false;
123 } else {
124 changeState(SimObject::Draining);
125 drainEvent = drain_event;
126 return true;
127 }
128}
129
130void
131TimingSimpleCPU::resume()
132{
133 if (_status != SwitchedOut && _status != Idle) {
134 Event *e =

--- 491 unchanged lines hidden ---