scheduler.hh (13245:c666c5d4996b) scheduler.hh (13257:c59a22cb44d7)
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

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

213 void setEventQueue(EventQueue *_eq) { eq = _eq; }
214
215 // Get the current time according to gem5.
216 Tick getCurTick() { return eq ? eq->getCurTick() : 0; }
217
218 Tick
219 delayed(const ::sc_core::sc_time &delay)
220 {
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

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

213 void setEventQueue(EventQueue *_eq) { eq = _eq; }
214
215 // Get the current time according to gem5.
216 Tick getCurTick() { return eq ? eq->getCurTick() : 0; }
217
218 Tick
219 delayed(const ::sc_core::sc_time &delay)
220 {
221 //XXX We're assuming the systemc time resolution is in ps.
222 return getCurTick() + delay.value() * SimClock::Int::ps;
221 return getCurTick() + delay.value();
223 }
224
225 // For scheduling delayed/timed notifications/timeouts.
226 void
227 schedule(ScEvent *event, const ::sc_core::sc_time &delay)
228 {
229 Tick tick = delayed(delay);
230 if (tick < getCurTick())

--- 278 unchanged lines hidden ---
222 }
223
224 // For scheduling delayed/timed notifications/timeouts.
225 void
226 schedule(ScEvent *event, const ::sc_core::sc_time &delay)
227 {
228 Tick tick = delayed(delay);
229 if (tick < getCurTick())

--- 278 unchanged lines hidden ---