sc_main.cc (13182:9e030f636a8c) sc_main.cc (13212:4729f211fbae)
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

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

221sc_get_stop_mode()
222{
223 return _stop_mode;
224}
225
226void
227sc_stop()
228{
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

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

221sc_get_stop_mode()
222{
223 return _stop_mode;
224}
225
226void
227sc_stop()
228{
229 static bool stop_called = false;
230 if (stop_called) {
231 static bool stop_warned = false;
232 if (!stop_warned)
233 SC_REPORT_WARNING("(W545) sc_stop has already been called", "");
234 stop_warned = true;
235 return;
236 }
237 stop_called = true;
238
229 if (::sc_gem5::Kernel::status() == SC_STOPPED)
230 return;
231
232 if ((sc_get_status() & SC_RUNNING)) {
233 bool finish_delta = (_stop_mode == SC_STOP_FINISH_DELTA);
234 ::sc_gem5::scheduler.scheduleStop(finish_delta);
235 } else {
236 ::sc_gem5::Kernel::stop();

--- 119 unchanged lines hidden ---
239 if (::sc_gem5::Kernel::status() == SC_STOPPED)
240 return;
241
242 if ((sc_get_status() & SC_RUNNING)) {
243 bool finish_delta = (_stop_mode == SC_STOP_FINISH_DELTA);
244 ::sc_gem5::scheduler.scheduleStop(finish_delta);
245 } else {
246 ::sc_gem5::Kernel::stop();

--- 119 unchanged lines hidden ---