82d81
< virtual void finalize() = 0;
127c126
< * Sensitivity to events, which can be static or dynamic.
---
> * Sensitivity to an event or events, which can be static or dynamic.
140d138
< void finalize() override { addToEvent(event); }
143a142,145
> class SensitivityEvents : virtual public Sensitivity
> {
> protected:
> std::set<const ::sc_core::sc_event *> events;
144a147,169
> SensitivityEvents(Process *p) : Sensitivity(p) {}
> SensitivityEvents(
> Process *p, const std::set<const ::sc_core::sc_event *> &s) :
> Sensitivity(p), events(s)
> {}
>
> public:
> void
> clear() override
> {
> for (auto event: events)
> delFromEvent(event);
> }
>
> void
> addEvent(const ::sc_core::sc_event *event)
> {
> events.insert(event);
> addToEvent(event);
> }
> };
>
>
148a174,182
> void newStaticSensitivityEvent(Process *p, const sc_core::sc_event *e);
> void newStaticSensitivityInterface(Process *p, const sc_core::sc_interface *i);
> void newStaticSensitivityPort(Process *p, const sc_core::sc_port_base *pb);
> void newStaticSensitivityExport(
> Process *p, const sc_core::sc_export_base *exp);
> void newStaticSensitivityFinder(
> Process *p, const sc_core::sc_event_finder *f);
>
>
152c186,189
< public:
---
> friend void newStaticSensitivityEvent(
> Process *p, const sc_core::sc_event *e);
>
> protected:
161,169c198,201
< private:
< const sc_core::sc_interface *interface;
<
< public:
< StaticSensitivityInterface(Process *p, const sc_core::sc_interface *i) :
< Sensitivity(p), StaticSensitivity(p), SensitivityEvent(p), interface(i)
< {}
<
< void finalize() override;
---
> friend void newStaticSensitivityInterface(
> Process *p, const sc_core::sc_interface *i);
> protected:
> StaticSensitivityInterface(Process *p, const sc_core::sc_interface *i);
172c204,205
< class StaticSensitivityPort : public StaticSensitivity
---
> class StaticSensitivityPort :
> public StaticSensitivity, public SensitivityEvents
174,176c207,208
< private:
< const ::sc_core::sc_port_base *port;
< std::set<const ::sc_core::sc_event *> events;
---
> friend void newStaticSensitivityPort(
> Process *p, const sc_core::sc_port_base *pb);
178,180c210,212
< public:
< StaticSensitivityPort(Process *p, const sc_core::sc_port_base *pb) :
< Sensitivity(p), StaticSensitivity(p), port(pb)
---
> protected:
> StaticSensitivityPort(Process *p) :
> Sensitivity(p), StaticSensitivity(p), SensitivityEvents(p)
182,190d213
<
< void finalize() override;
<
< void
< clear() override
< {
< for (auto event: events)
< delFromEvent(event);
< }
197c220,221
< const sc_core::sc_export_base *exp;
---
> friend void newStaticSensitivityExport(
> Process *p, const sc_core::sc_export_base *exp);
199,204c223
< public:
< StaticSensitivityExport(Process *p, const sc_core::sc_export_base *exp) :
< Sensitivity(p), StaticSensitivity(p), SensitivityEvent(p), exp(exp)
< {}
<
< void finalize() override;
---
> StaticSensitivityExport(Process *p, const sc_core::sc_export_base *exp);
207c226,228
< class StaticSensitivityFinder : public StaticSensitivity
---
>
> class StaticSensitivityFinder :
> public StaticSensitivity, public SensitivityEvents
210,211c231
< const ::sc_core::sc_event_finder *finder;
< std::set<const ::sc_core::sc_event *> events;
---
> const sc_core::sc_event_finder *finder;
213c233,235
< public:
---
> friend void newStaticSensitivityFinder(
> Process *p, const sc_core::sc_event_finder *f);
>
215c237
< Sensitivity(p), StaticSensitivity(p), finder(f)
---
> Sensitivity(p), StaticSensitivity(p), SensitivityEvents(p), finder(f)
218,225c240,241
< void finalize() override;
<
< void
< clear() override
< {
< for (auto event: events)
< delFromEvent(event);
< }
---
> public:
> const ::sc_core::sc_event &find(::sc_core::sc_interface *i);
232a249,254
> void newDynamicSensitivityEvent(Process *p, const sc_core::sc_event *e);
> void newDynamicSensitivityEventOrList(
> Process *p, const sc_core::sc_event_or_list *eol);
> void newDynamicSensitivityEventAndList(
> Process *p, const sc_core::sc_event_and_list *eal);
>
236c258,261
< public:
---
> private:
> friend void newDynamicSensitivityEvent(
> Process *p, const sc_core::sc_event *e);
>
242c267,268
< class DynamicSensitivityEventOrList : public DynamicSensitivity
---
> class DynamicSensitivityEventOrList :
> public DynamicSensitivity, public SensitivityEvents
245c271,272
< std::set<const ::sc_core::sc_event *> events;
---
> friend void newDynamicSensitivityEventOrList(
> Process *p, const sc_core::sc_event_or_list *eol);
247,250d273
< protected:
< bool notifyWork(Event *e) override;
<
< public:
254,255c277
< void finalize() override;
< void clear() override;
---
> bool notifyWork(Event *e) override;
261c283,284
< class DynamicSensitivityEventAndList : public DynamicSensitivity
---
> class DynamicSensitivityEventAndList :
> public DynamicSensitivity, public SensitivityEvents
264c287,288
< std::set<const ::sc_core::sc_event *> events;
---
> friend void newDynamicSensitivityEventAndList(
> Process *p, const sc_core::sc_event_and_list *eal);
266,269d289
< protected:
< bool notifyWork(Event *e) override;
<
< public:
273,274c293
< void finalize() override;
< void clear() override;
---
> bool notifyWork(Event *e) override;