19#include "sparta/log/MessageSource.hpp"
20#include "sparta/log/categories/CategoryManager.hpp"
42 static constexpr const char * INFO_LOG =
"info";
43 static constexpr const char * WARN_LOG = log::categories::WARN_STR;
44 static constexpr const char * DEBUG_LOG = log::categories::DEBUG_STR;
91 auto_precedence_ = auto_p;
122 if(!auto_precedence_) {
129 if(!event_node->doesParticipateInAutoPrecedence()) {
171 bool auto_precedence_ =
true;
File that defines the EventSet class.
File that defines the PortSet class.
File that defines the Resource class. Consider using sparta::Unit instead.
#define sparta_assert(...)
Simple variadic assertion that will throw a sparta_exception if the condition fails.
File that defines the StatisticSet class.
Set of Events that a unit (or sparta::TreeNode, sparta::Resource) contains and are visible through a ...
EventsVector & getEvents(sparta::SchedulingPhase phase)
Base class for all InPort types.
void registerConsumerEvent(Scheduleable &consumer)
Add an event "listener" to this port.
Base class for all OutPort types.
void registerProducingEvent(Scheduleable &producer)
Add an event "producer" to this port.
A TreeNode that represents a set of ports used by a Resource.
RegisteredPortMap & getPorts(Port::Direction direction)
Get the ports in this PortSet for the given direction.
virtual bool doesParticipateInAutoPrecedence() const
Does this Port participate in auto-precedence establishment by sparta::Unit?
The is the base class for all types of resources used by the SPARTA framework.
std::string getName() const
Set of StatisticDef and CounterBase-derived objects for visiblility through a sparta Tree.
Node in a composite tree representing a sparta Tree item.
The is the base class for user defined blocks in simulation.
sparta::EventSet unit_event_set_
The Unit's event set.
Unit(TreeNode *rc)
Construct unit with a ResouceContainer.
log::MessageSource debug_logger_
Default debug logger.
log::MessageSource info_logger_
Default info logger.
Unit(TreeNode *rc, const std::string &name)
Construct unit with a ResouceContainer.
PortSet * getPortSet()
Return the port set.
log::MessageSource warn_logger_
Default warn logger.
sparta::StatisticSet unit_stat_set_
The Unit's statistic set.
virtual void onBindTreeLate_() override
Dump a dot.
virtual void onBindTreeEarly_() override
sparta::PortSet unit_port_set_
The Unit's Ports.
EventSet * getEventSet()
Return the event set.
void setAutoPrecedence(bool auto_p)
Turn off auto-precedence.
StatisticSet * getStatisticSet()
Return the stat set.
Message source object associated with a sparta TreeNode through which messages can be sent.
Macros for handling exponential backoff.
@ Tick
Most operations (combinational logic) occurs in this phase.