process.cc (13182:9e030f636a8c) process.cc (13189:057566bc8fd6)
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

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

83}
84
85void
86SensitivityEventAndList::notifyWork(Event *e)
87{
88 e->delSensitivity(this);
89 count++;
90 if (count == list->events.size())
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

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

83}
84
85void
86SensitivityEventAndList::notifyWork(Event *e)
87{
88 e->delSensitivity(this);
89 count++;
90 if (count == list->events.size())
91 process->satisfySensitivity(this);
91 satisfy();
92}
93
94SensitivityEventOrList::SensitivityEventOrList(
95 Process *p, const ::sc_core::sc_event_or_list *list) :
96 Sensitivity(p), list(list)
97{
98 for (auto e: list->events)
99 Event::getFromScEvent(e)->addSensitivity(this);

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

108void
109SensitivityTimeoutAndEventAndList::notifyWork(Event *e)
110{
111 if (e) {
112 // An event went off which must be part of the sc_event_and_list.
113 SensitivityEventAndList::notifyWork(e);
114 } else {
115 // There's no inciting event, so this must be a timeout.
92}
93
94SensitivityEventOrList::SensitivityEventOrList(
95 Process *p, const ::sc_core::sc_event_or_list *list) :
96 Sensitivity(p), list(list)
97{
98 for (auto e: list->events)
99 Event::getFromScEvent(e)->addSensitivity(this);

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

108void
109SensitivityTimeoutAndEventAndList::notifyWork(Event *e)
110{
111 if (e) {
112 // An event went off which must be part of the sc_event_and_list.
113 SensitivityEventAndList::notifyWork(e);
114 } else {
115 // There's no inciting event, so this must be a timeout.
116 SensitivityTimeout::notifyWork(e);
116 satisfy(true);
117 }
118}
119
120
121class UnwindExceptionReset : public ::sc_core::sc_unwind_exception
122{
123 public:
124 UnwindExceptionReset() { _isReset = true; }

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

395 _lastReport = nullptr;
396 }
397}
398
399::sc_core::sc_report *Process::lastReport() const { return _lastReport.get(); }
400
401Process::Process(const char *name, ProcessFuncWrapper *func, bool internal) :
402 ::sc_core::sc_process_b(name), excWrapper(nullptr), func(func),
117 }
118}
119
120
121class UnwindExceptionReset : public ::sc_core::sc_unwind_exception
122{
123 public:
124 UnwindExceptionReset() { _isReset = true; }

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

395 _lastReport = nullptr;
396 }
397}
398
399::sc_core::sc_report *Process::lastReport() const { return _lastReport.get(); }
400
401Process::Process(const char *name, ProcessFuncWrapper *func, bool internal) :
402 ::sc_core::sc_process_b(name), excWrapper(nullptr), func(func),
403 _internal(internal), _needsStart(true), _isUnwinding(false),
404 _terminated(false), _suspended(false), _disabled(false), _syncReset(false),
405 refCount(0), stackSize(::Fiber::DefaultStackSize),
406 dynamicSensitivity(nullptr)
403 _internal(internal), _timedOut(false), _needsStart(true),
404 _isUnwinding(false), _terminated(false), _suspended(false),
405 _disabled(false), _syncReset(false), refCount(0),
406 stackSize(::Fiber::DefaultStackSize), dynamicSensitivity(nullptr)
407{
408 _dynamic =
409 (::sc_core::sc_get_status() >
410 ::sc_core::SC_BEFORE_END_OF_ELABORATION);
411 _newest = this;
412}
413
414void

--- 24 unchanged lines hidden ---
407{
408 _dynamic =
409 (::sc_core::sc_get_status() >
410 ::sc_core::SC_BEFORE_END_OF_ELABORATION);
411 _newest = this;
412}
413
414void

--- 24 unchanged lines hidden ---