sc_main.cc (13083:dcd7f038f7ff) sc_main.cc (13084:383ac3b9b4ff)
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

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

189
190void
191sc_start(const sc_time &time, sc_starvation_policy p)
192{
193 if (time.value() == 0) {
194 ::sc_gem5::scheduler.oneCycle();
195 } else {
196 Tick now = ::sc_gem5::scheduler.getCurTick();
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

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

189
190void
191sc_start(const sc_time &time, sc_starvation_policy p)
192{
193 if (time.value() == 0) {
194 ::sc_gem5::scheduler.oneCycle();
195 } else {
196 Tick now = ::sc_gem5::scheduler.getCurTick();
197 if (MaxTick - now < time.value()) {
198 SC_REPORT_ERROR("(E544) simulation time value overflow, "
199 "simulation aborted", "");
200 }
197 ::sc_gem5::scheduler.start(now + time.value(), p == SC_RUN_TO_TIME);
198 }
199}
200
201void
202sc_set_stop_mode(sc_stop_mode mode)
203{
204 if (sc_is_running()) {

--- 143 unchanged lines hidden ---
201 ::sc_gem5::scheduler.start(now + time.value(), p == SC_RUN_TO_TIME);
202 }
203}
204
205void
206sc_set_stop_mode(sc_stop_mode mode)
207{
208 if (sc_is_running()) {

--- 143 unchanged lines hidden ---