base.cc (9608:e2b6b86fda03) base.cc (9647:5b6b315472e7)
1/*
2 * Copyright (c) 2011-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

148 if (p->max_insts_any_thread != 0) {
149 const char *cause = "a thread reached the max instruction count";
150 for (ThreadID tid = 0; tid < numThreads; ++tid) {
151 Event *event = new SimLoopExitEvent(cause, 0);
152 comInstEventQueue[tid]->schedule(event, p->max_insts_any_thread);
153 }
154 }
155
1/*
2 * Copyright (c) 2011-2012 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

148 if (p->max_insts_any_thread != 0) {
149 const char *cause = "a thread reached the max instruction count";
150 for (ThreadID tid = 0; tid < numThreads; ++tid) {
151 Event *event = new SimLoopExitEvent(cause, 0);
152 comInstEventQueue[tid]->schedule(event, p->max_insts_any_thread);
153 }
154 }
155
156 // Set up instruction-count-based termination events for SimPoints
157 // Typically, there are more than one action points.
158 // Simulation.py is responsible to take the necessary actions upon
159 // exitting the simulation loop.
160 if (!p->simpoint_start_insts.empty()) {
161 const char *cause = "simpoint starting point found";
162 for (size_t i = 0; i < p->simpoint_start_insts.size(); ++i) {
163 Event *event = new SimLoopExitEvent(cause, 0);
164 comInstEventQueue[0]->schedule(event, p->simpoint_start_insts[i]);
165 }
166 }
167
156 if (p->max_insts_all_threads != 0) {
157 const char *cause = "all threads reached the max instruction count";
158
159 // allocate & initialize shared downcounter: each event will
160 // decrement this when triggered; simulation will terminate
161 // when counter reaches 0
162 int *counter = new int;
163 *counter = numThreads;

--- 424 unchanged lines hidden ---
168 if (p->max_insts_all_threads != 0) {
169 const char *cause = "all threads reached the max instruction count";
170
171 // allocate & initialize shared downcounter: each event will
172 // decrement this when triggered; simulation will terminate
173 // when counter reaches 0
174 int *counter = new int;
175 *counter = numThreads;

--- 424 unchanged lines hidden ---