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 --- 120 unchanged lines hidden (view full) --- 129 130sc_core::sc_object * 131Event::getParentObject() const 132{ 133 return parent; 134} 135 136void |
137Event::notify(StaticSensitivities &senses) 138{ 139 for (auto s: senses) 140 s->notify(this); 141} 142 143void 144Event::notify(DynamicSensitivities &senses) 145{ 146 int size = senses.size(); 147 int pos = 0; 148 while (pos < size) { 149 if (senses[pos]->notify(this)) 150 senses[pos] = senses[--size]; 151 else 152 pos++; 153 } 154 senses.resize(size); 155} 156 157void |
158Event::notify() 159{ 160 if (scheduler.inUpdate()) { 161 SC_REPORT_ERROR("(E521) immediate notification is not allowed " 162 "during update phase or elaboration", ""); 163 } 164 165 // An immediate notification overrides any pending delayed notification. 166 if (delayedNotify.scheduled()) 167 scheduler.deschedule(&delayedNotify); 168 |
169 notify(staticSenseMethod); 170 notify(dynamicSenseMethod); 171 notify(staticSenseThread); 172 notify(dynamicSenseThread); |
173} 174 175void 176Event::notify(const sc_core::sc_time &t) 177{ 178 if (delayedNotify.scheduled()) { 179 if (scheduler.delayed(t) >= delayedNotify.when()) 180 return; --- 34 unchanged lines hidden --- |