Manages building a clock tree.
More...
#include <ClockManager.hpp>
|
| | ClockManager (Scheduler *scheduler) |
| |
| Clock::Handle | makeRoot (RootTreeNode *parent=nullptr, const std::string &name="Root") |
| | Construct a root clock.
|
| |
| Clock::Handle | getRoot () const |
| |
| Clock::Handle | makeClock (const std::string &name, const Clock::Handle &parent, const uint32_t &p_rat, const uint32_t &c_rat) |
| | Create a new clock with a given ratio to a parent clock.
|
| |
| Clock::Handle | makeClock (const std::string &name, const Clock::Handle &parent) |
| | Create a new clock with a 1:1 ratio to a parent clock.
|
| |
| Clock::Handle | makeClock (const std::string &name, const Clock::Handle &parent, double frequency_mhz) |
| | Create a new clock with a given frequency.
|
| |
| uint32_t | normalize () |
| |
| void | print (std::ostream &os) const |
| |
Manages building a clock tree.
Definition at line 28 of file ClockManager.hpp.
◆ ClockManager()
| sparta::ClockManager::ClockManager |
( |
Scheduler * | scheduler | ) |
|
|
inline |
◆ ~ClockManager()
| sparta::ClockManager::~ClockManager |
( |
| ) |
|
|
inline |
◆ getClockPeriodFromFrequencyMhz()
| static uint64_t sparta::ClockManager::getClockPeriodFromFrequencyMhz |
( |
double | frequency_mhz | ) |
|
|
inlinestatic |
Return the clock period given a frequency.
- Parameters
-
| frequency_mhz | - Frequency in MHz to find the period for |
Ideally this is the only location that a timebase is used, but I don't know if that's reality throught sparta.
Definition at line 144 of file ClockManager.hpp.
◆ getRoot()
| Clock::Handle sparta::ClockManager::getRoot |
( |
| ) |
const |
|
inline |
◆ makeClock() [1/3]
| Clock::Handle sparta::ClockManager::makeClock |
( |
const std::string & | name, |
|
|
const Clock::Handle & | parent ) |
|
inline |
Create a new clock with a 1:1 ratio to a parent clock.
Definition at line 86 of file ClockManager.hpp.
◆ makeClock() [2/3]
| Clock::Handle sparta::ClockManager::makeClock |
( |
const std::string & | name, |
|
|
const Clock::Handle & | parent, |
|
|
const uint32_t & | p_rat, |
|
|
const uint32_t & | c_rat ) |
|
inline |
Create a new clock with a given ratio to a parent clock.
Definition at line 75 of file ClockManager.hpp.
◆ makeClock() [3/3]
| Clock::Handle sparta::ClockManager::makeClock |
( |
const std::string & | name, |
|
|
const Clock::Handle & | parent, |
|
|
double | frequency_mhz ) |
|
inline |
Create a new clock with a given frequency.
Definition at line 94 of file ClockManager.hpp.
◆ makeRoot()
| Clock::Handle sparta::ClockManager::makeRoot |
( |
RootTreeNode * | parent = nullptr, |
|
|
const std::string & | name = "Root" ) |
|
inline |
Construct a root clock.
- Parameters
-
| parent | A root object representing the top of the clock tree. Because Clock is not a RootTreeNode, it must be attached to existing tree |
| name | Name of the root clock |
- Precondition
- Must not have already called makeRoot
- Note
- Clock must be part of a tree to allow sparta clients access to its instrumentation.
- Todo
- Implement special case for RootClock that avoids this extra level
Definition at line 58 of file ClockManager.hpp.
◆ normalize()
| uint32_t sparta::ClockManager::normalize |
( |
| ) |
|
|
inline |
◆ print()
| void sparta::ClockManager::print |
( |
std::ostream & | os | ) |
const |
|
inline |
The documentation for this class was generated from the following file: