commit_impl.hh (12110:c24ee249b8ba) | commit_impl.hh (12127:4207df055b0d) |
---|---|
1/* 2 * Copyright 2014 Google, Inc. 3 * Copyright (c) 2010-2014 ARM Limited 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 57 unchanged lines hidden (view full) --- 66#include "debug/O3PipeView.hh" 67#include "params/DerivO3CPU.hh" 68#include "sim/faults.hh" 69#include "sim/full_system.hh" 70 71using namespace std; 72 73template <class Impl> | 1/* 2 * Copyright 2014 Google, Inc. 3 * Copyright (c) 2010-2014 ARM Limited 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating --- 57 unchanged lines hidden (view full) --- 66#include "debug/O3PipeView.hh" 67#include "params/DerivO3CPU.hh" 68#include "sim/faults.hh" 69#include "sim/full_system.hh" 70 71using namespace std; 72 73template <class Impl> |
74DefaultCommit<Impl>::TrapEvent::TrapEvent(DefaultCommit<Impl> *_commit, 75 ThreadID _tid) 76 : Event(CPU_Tick_Pri, AutoDelete), commit(_commit), tid(_tid) 77{ 78} 79 80template <class Impl> | |
81void | 74void |
82DefaultCommit<Impl>::TrapEvent::process() | 75DefaultCommit<Impl>::processTrapEvent(ThreadID tid) |
83{ 84 // This will get reset by commit if it was switched out at the 85 // time of this event processing. | 76{ 77 // This will get reset by commit if it was switched out at the 78 // time of this event processing. |
86 commit->trapSquash[tid] = true; | 79 trapSquash[tid] = true; |
87} 88 89template <class Impl> | 80} 81 82template <class Impl> |
90const char * 91DefaultCommit<Impl>::TrapEvent::description() const 92{ 93 return "Trap"; 94} 95 96template <class Impl> | |
97DefaultCommit<Impl>::DefaultCommit(O3CPU *_cpu, DerivO3CPUParams *params) 98 : cpu(_cpu), 99 iewToCommitDelay(params->iewToCommitDelay), 100 commitToIEWDelay(params->commitToIEWDelay), 101 renameToROBDelay(params->renameToROBDelay), 102 fetchToCommitDelay(params->commitToFetchDelay), 103 renameWidth(params->renameWidth), 104 commitWidth(params->commitWidth), --- 427 unchanged lines hidden (view full) --- 532} 533 534template <class Impl> 535void 536DefaultCommit<Impl>::generateTrapEvent(ThreadID tid, Fault inst_fault) 537{ 538 DPRINTF(Commit, "Generating trap event for [tid:%i]\n", tid); 539 | 83DefaultCommit<Impl>::DefaultCommit(O3CPU *_cpu, DerivO3CPUParams *params) 84 : cpu(_cpu), 85 iewToCommitDelay(params->iewToCommitDelay), 86 commitToIEWDelay(params->commitToIEWDelay), 87 renameToROBDelay(params->renameToROBDelay), 88 fetchToCommitDelay(params->commitToFetchDelay), 89 renameWidth(params->renameWidth), 90 commitWidth(params->commitWidth), --- 427 unchanged lines hidden (view full) --- 518} 519 520template <class Impl> 521void 522DefaultCommit<Impl>::generateTrapEvent(ThreadID tid, Fault inst_fault) 523{ 524 DPRINTF(Commit, "Generating trap event for [tid:%i]\n", tid); 525 |
540 TrapEvent *trap = new TrapEvent(this, tid); | 526 EventFunctionWrapper *trap = new EventFunctionWrapper( 527 [this, tid]{ processTrapEvent(tid); }, 528 "Trap", true, Event::CPU_Tick_Pri); |
541 542 Cycles latency = dynamic_pointer_cast<SyscallRetryFault>(inst_fault) ? 543 cpu->syscallRetryLatency : trapLatency; 544 545 cpu->schedule(trap, cpu->clockEdge(latency)); 546 trapInFlight[tid] = true; 547 thread[tid]->trapPending = true; 548} --- 984 unchanged lines hidden --- | 529 530 Cycles latency = dynamic_pointer_cast<SyscallRetryFault>(inst_fault) ? 531 cpu->syscallRetryLatency : trapLatency; 532 533 cpu->schedule(trap, cpu->clockEdge(latency)); 534 trapInFlight[tid] = true; 535 thread[tid]->trapPending = true; 536} --- 984 unchanged lines hidden --- |