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; --- 104 unchanged lines hidden (view full) --- 113 114bool 115TimingSimpleCPU::quiesce(Event *quiesce_event) 116{ 117 // TimingSimpleCPU is ready to quiesce if it's not waiting for 118 // an access to complete. 119 if (status() == Idle || status() == Running || status() == SwitchedOut) { 120 DPRINTF(Config, "Ready to quiesce\n"); |
121 return false; 122 } else { 123 DPRINTF(Config, "Waiting to quiesce\n"); 124 changeState(SimObject::Quiescing); 125 quiesceEvent = quiesce_event; 126 return true; 127 } 128} --- 73 unchanged lines hidden (view full) --- 202 203 204template <class T> 205Fault 206TimingSimpleCPU::read(Addr addr, T &data, unsigned flags) 207{ 208 // need to fill in CPU & thread IDs here 209 Request *data_read_req = new Request(); |
210 data_read_req->setThreadContext(0,0); //Need CPU/Thread IDS HERE |
211 data_read_req->setVirt(0, addr, sizeof(T), flags, thread->readPC()); 212 213 if (traceData) { 214 traceData->setAddr(data_read_req->getVaddr()); 215 } 216 217 // translate to physical address 218 Fault fault = thread->translateDataReadReq(data_read_req); --- 64 unchanged lines hidden (view full) --- 283 284 285template <class T> 286Fault 287TimingSimpleCPU::write(T data, Addr addr, unsigned flags, uint64_t *res) 288{ 289 // need to fill in CPU & thread IDs here 290 Request *data_write_req = new Request(); |
291 data_write_req->setThreadContext(0,0); //Need CPU/Thread IDS HERE |
292 data_write_req->setVirt(0, addr, sizeof(T), flags, thread->readPC()); 293 294 // translate to physical address 295 Fault fault = thread->translateDataWriteReq(data_write_req); 296 // Now do the access. 297 if (fault == NoFault) { 298 Packet *data_write_pkt = 299 new Packet(data_write_req, Packet::WriteReq, Packet::Broadcast); --- 67 unchanged lines hidden (view full) --- 367 368void 369TimingSimpleCPU::fetch() 370{ 371 checkForInterrupts(); 372 373 // need to fill in CPU & thread IDs here 374 Request *ifetch_req = new Request(); |
375 ifetch_req->setThreadContext(0,0); //Need CPU/Thread IDS HERE |
376 Fault fault = setupFetchRequest(ifetch_req); 377 378 ifetch_pkt = new Packet(ifetch_req, Packet::ReadReq, Packet::Broadcast); 379 ifetch_pkt->dataStatic(&inst); 380 381 if (fault == NoFault) { 382 if (!icachePort.sendTiming(ifetch_pkt)) { 383 // Need to wait for retry --- 242 unchanged lines hidden --- |