Class that is capable of recording pevents as key value pairs, where a PairDefinition has been defined with the key values, and function pointers to where to get the data for the pairs. More...
#include <PeventCollector.hpp>
Public Member Functions | |
PeventCollector (const std::string &event_name, sparta::TreeNode *parent, const Clock *clk, const bool verbosity=false) | |
template<typename... Targs> | |
void | collect (const typename CollectedEntityType::TypeCollected &obj, const Targs &... pos_args) |
Actually collect the object, and write out a pevent. We ovverride the collect method to ensure the the generateCollectionString is always called, even when there is not a change. | |
virtual const std::string & | eventName () override |
Return the ev name. | |
void | adjustSkew (const int32_t &skew_amount) |
virtual bool | addTap (const std::string &type, const std::string &file, const bool verbose) override final |
Mark this pevent with a tap to output the pevent's data to a file. | |
virtual void | turnOff (const std::string &type) override final |
virtual void | go () override final |
This method should be called on all pevent collectors when the trigger either manually fires to start or the trigger is reached. | |
![]() | |
PeventCollectorTreeNode (sparta::TreeNode *parent, const std::string &name) | |
Protected Member Functions | |
virtual void | generateCollectionString_ () override |
Override the generateCollectionString_() of the bases PairCollector, In this method, we use the pair_cache owned by PairCache. | |
Protected Attributes | |
const std::string | event_name_ |
log::MessageSource | message_src_ |
std::vector< std::unique_ptr< log::Tap > > | taps_ |
const Clock * | clk_ |
std::function< uint64_t(const uint64_t &, const uint32_t &)> | f_skew_ |
uint32_t | skew_ |
bool | verbosity_ |
bool | running_ = false |
Class that is capable of recording pevents as key value pairs, where a PairDefinition has been defined with the key values, and function pointers to where to get the data for the pairs.
the | Type of PairDefinition that we want to capture a pevent from. |
Example usage:
Definition at line 60 of file PeventCollector.hpp.
|
inline |
Definition at line 71 of file PeventCollector.hpp.
|
inlinevirtual |
Definition at line 85 of file PeventCollector.hpp.
|
inlinefinaloverridevirtual |
Mark this pevent with a tap to output the pevent's data to a file.
type | the type of pevent being tapped. This is necessary since pevent's are tapped via a traversal of the tree, we would like to only create the tap if this pevent is of the same type. |
file | the output file path we'd like the tap to write too |
verbose | are we trying to tap a verbose pevent or normal pevent. |
Implements sparta::pevents::PeventCollectorTreeNode.
Definition at line 127 of file PeventCollector.hpp.
|
inline |
Definition at line 110 of file PeventCollector.hpp.
|
inline |
Actually collect the object, and write out a pevent. We ovverride the collect method to ensure the the generateCollectionString is always called, even when there is not a change.
Definition at line 93 of file PeventCollector.hpp.
|
inlineoverridevirtual |
Return the ev name.
Implements sparta::pevents::PeventCollectorTreeNode.
Definition at line 105 of file PeventCollector.hpp.
|
inlineoverrideprotectedvirtual |
Override the generateCollectionString_() of the bases PairCollector, In this method, we use the pair_cache owned by PairCache.
Definition at line 212 of file PeventCollector.hpp.
|
inlinefinaloverridevirtual |
This method should be called on all pevent collectors when the trigger either manually fires to start or the trigger is reached.
Implements sparta::pevents::PeventCollectorTreeNode.
Definition at line 192 of file PeventCollector.hpp.
|
inlinefinaloverridevirtual |
Implements sparta::pevents::PeventCollectorTreeNode.
Definition at line 174 of file PeventCollector.hpp.
|
protected |
Definition at line 238 of file PeventCollector.hpp.
|
protected |
Definition at line 232 of file PeventCollector.hpp.
|
protected |
Definition at line 239 of file PeventCollector.hpp.
|
protected |
Definition at line 234 of file PeventCollector.hpp.
|
protected |
Definition at line 242 of file PeventCollector.hpp.
|
protected |
Definition at line 240 of file PeventCollector.hpp.
|
protected |
Definition at line 236 of file PeventCollector.hpp.
|
protected |
Definition at line 241 of file PeventCollector.hpp.