The Sparta Modeling Framework
Loading...
Searching...
No Matches
GlobalOrderingPoint.hpp
1// <GlobalOrderingPoint.hpp> -*- C++ -*-
2
3#pragma once
4
5#include "sparta/utils/Utils.hpp"
9#include <string>
10
11namespace sparta
12{
61 {
62 public:
72 const std::string & name) :
73 name_(name)
74 {
75 auto scheduler = notNull(node)->getScheduler();
76 dag_ = notNull(scheduler)->getDAG();
77 gordering_point_ = notNull(dag_)->getGOPoint(name);
78 sparta_assert(nullptr != gordering_point_, "Issues trying to get GOPoint " << name);
79 }
80
85 const std::string & getName() const {
86 return name_;
87 }
88
93 DAG::GOPoint * getGOPoint() const {
94 return gordering_point_;
95 }
96
97 private:
98 DAG * dag_ = nullptr;
99 DAG::GOPoint * gordering_point_ = nullptr;
100 const std::string name_;
101 };
102}
Used internally by the sparta::Scheduler to set event ordering.
A simple time-based, event precedence based scheduler.
#define sparta_assert(...)
Simple variadic assertion that will throw a sparta_exception if the condition fails.
Basic Node framework in sparta device tree composite pattern.
Used to set precedence between Scheduleable types across simulation.
const std::string & getName() const
Handy method for debug.
GlobalOrderingPoint(sparta::TreeNode *node, const std::string &name)
Construction a GlobalOrderingPoint.
DAG::GOPoint * getGOPoint() const
Used by the precedence rules.
Node in a composite tree representing a sparta Tree item.
Definition TreeNode.hpp:205
Macros for handling exponential backoff.
T * notNull(T *p)
Ensures that a pointer is not null.
Definition Utils.hpp:224