event.cc (13206:c944ef4abb48) | event.cc (13208:6703cb024823) |
---|---|
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 | 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 |
|
137Event::notify() 138{ 139 if (scheduler.inUpdate()) { 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 | 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 |
148 for (auto s: staticSensitivities) 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); | 169 notify(staticSenseMethod); 170 notify(dynamicSenseMethod); 171 notify(staticSenseThread); 172 notify(dynamicSenseThread); |
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 --- | 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 --- |