event.cc (13187:ee28771420a6) event.cc (13206:c944ef4abb48)
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

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

140 SC_REPORT_ERROR("(E521) immediate notification is not allowed "
141 "during update phase or elaboration", "");
142 }
143
144 // An immediate notification overrides any pending delayed notification.
145 if (delayedNotify.scheduled())
146 scheduler.deschedule(&delayedNotify);
147
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

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

140 SC_REPORT_ERROR("(E521) immediate notification is not allowed "
141 "during update phase or elaboration", "");
142 }
143
144 // An immediate notification overrides any pending delayed notification.
145 if (delayedNotify.scheduled())
146 scheduler.deschedule(&delayedNotify);
147
148 auto local_sensitivities = sensitivities;
149 for (auto s: local_sensitivities)
148 for (auto s: staticSensitivities)
150 s->notify(this);
149 s->notify(this);
150 DynamicSensitivities &ds = dynamicSensitivities;
151 int size = ds.size();
152 int pos = 0;
153 while (pos < size) {
154 if (ds[pos]->notify(this))
155 ds[pos] = ds[--size];
156 else
157 pos++;
158 }
159 ds.resize(size);
151}
152
153void
154Event::notify(const sc_core::sc_time &t)
155{
156 if (delayedNotify.scheduled()) {
157 if (scheduler.delayed(t) >= delayedNotify.when())
158 return;

--- 34 unchanged lines hidden ---
160}
161
162void
163Event::notify(const sc_core::sc_time &t)
164{
165 if (delayedNotify.scheduled()) {
166 if (scheduler.delayed(t) >= delayedNotify.when())
167 return;

--- 34 unchanged lines hidden ---