The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::app Namespace Reference

Sparta Application framework. More...

Classes

class  ArchNodeConfigFileApplicator
 Applies an architectural configuration (parameter defaults) to a virtual parameter tree. This does not support applying, only applyUnbound. More...
 
class  Backtrace
 Backtrace printer. Registers a handler for certain fatal signals and dumps the backtrace if they occur. More...
 
class  BacktraceData
 Backtrace without line information. Can be rendered out when needed because rendering is slow. More...
 
class  CommandLineSimulator
 Command line simulator front-end class with argument parsing Works in conjunction with sparta::app::Simulation. More...
 
class  ConfigApplicator
 Base class for applying parameters or configuration files to the simulator device tree. Contains a parameter or configuration file "action" to be applied to a tree. More...
 
class  DefaultValues
 Optional default values for the simulator which can be customized and provided by anyone instantiating the simulator at construction-time. More...
 
class  FeatureConfiguration
 Collection of named feature values. More...
 
class  LoggingTrigger
 Trigger for strating logging given a number of tap descriptors. More...
 
class  MetaTreeNode
 
class  MultiDetailOptions
 Class for containing multiple levels of boost program options. More...
 
class  named_value_parser
 Parser helper for named_value_type. More...
 
class  named_value_parser< int16_t >
 named_value_parser specialization for int16_t More...
 
class  named_value_parser< int32_t >
 named_value_parser specialization for int32_t More...
 
class  named_value_parser< int64_t >
 named_value_parser specialization for int64_t More...
 
class  named_value_parser< int8_t >
 named_value_parser specialization for int8_t More...
 
class  named_value_parser< uint16_t >
 named_value_parser specialization for uint16_t More...
 
class  named_value_parser< uint32_t >
 named_value_parser specialization for uint32_t More...
 
class  named_value_parser< uint64_t >
 named_value_parser specialization for uint64_t More...
 
class  named_value_parser< uint8_t >
 named_value_parser specialization for uint8_t More...
 
class  named_value_type
 Helper class for populating boost program options. More...
 
class  NodeConfigFileApplicator
 Applies a configuration file to a node pattern. More...
 
class  ParameterApplicator
 Applies a value to a parameter node pattern. More...
 
class  ParameterDefaultApplicator
 Applies a new default value to a parameter node pattern. More...
 
class  ParameterTemplate
 ParameterTemplate providing factory implementation for each data type. More...
 
class  PipelineTrigger
 Trigger used to enable/disable Pipeline colletion. More...
 
class  ReportConfiguration
 Configuration applicator class that is used for configuring a simulator's reports. Works in conjunction with sparta::app::ReportDescriptorCollection. More...
 
class  ReportDescriptor
 Describes one or more report to instantiate. More...
 
class  ReportDescriptorCollection
 This collection of ReportDescriptors is designed to never deallocate memory once it has been allocated. References returned by the 'getDescriptorByName()' method are guaranteed to be valid for the life of this collection object. More...
 
class  Simulation
 Simulator which builds a sparta DeviceTree. More...
 
class  SimulationConfiguration
 Configuration applicator class that is used for configuring a simulator. Works in conjunction with sparta::app::Simulation. More...
 

Typedefs

typedef std::vector< std::pair< std::string, std::string > > StringPairVec
 
typedef std::vector< std::unique_ptr< ConfigApplicator > > ConfigVec
 
typedef std::unordered_map< std::string, boost::any > NamedExtensions
 
typedef std::unordered_map< std::string, std::string > TriggerKeyValues
 
typedef std::unordered_map< std::string, std::string > MetaDataKeyValues
 
typedef std::vector< ReportDescriptorReportDescVec
 
typedef std::vector< std::pair< std::string, std::string > > ReportYamlReplacements
 

Functions

template<typename ArgT >
named_value_type< ArgT > * named_value (std::string const &name, ArgT *val=nullptr)
 Helper function for generating new named_value_type structs in the boost style.
 
template<typename ArgT >
named_value_type< ArgT > * named_value (std::string const &name, unsigned min, unsigned max, ArgT *val=nullptr)
 
ReportYamlReplacements createReplacementsFromYaml (const std::string &replacements_yaml)
 Parse a YAML file containing key-value pairs into a single ReportYamlReplacements data structure.
 
ReportDescVec createDescriptorsFromFile (const std::string &def_file, TreeNode *context)
 Given a multi-report definition YAML file, parse it out into individual descriptors, one for each report defined in the file.
 
ReportDescVec createDescriptorsFromFileWithPlaceholderReplacements (const std::string &def_file, TreeNode *context, const ReportYamlReplacements &placeholder_key_value_pairs)
 This method is similar to "createDescriptorsFromFile()", except that it can be used for report yaml files that have one or more placeholders in them, like this:
 
ReportDescVec createDescriptorsFromDefinitionString (const std::string &def_string, TreeNode *context)
 Given a multi-report definition string, parse it out into individual descriptors.
 

Variables

const constexpr char DefaultHeartbeat [] = "0"
 
constexpr char NoPipelineCollectionStr [] = "NOPREFIX_"
 

Detailed Description

Sparta Application framework.

Typedef Documentation

◆ ConfigVec

typedef std::vector<std::unique_ptr<ConfigApplicator> > sparta::app::ConfigVec

Definition at line 680 of file ConfigApplicators.hpp.

◆ MetaDataKeyValues

typedef std::unordered_map<std::string, std::string> sparta::app::MetaDataKeyValues

Definition at line 83 of file ReportDescriptor.hpp.

◆ NamedExtensions

typedef std::unordered_map<std::string, boost::any> sparta::app::NamedExtensions

Definition at line 81 of file ReportDescriptor.hpp.

◆ ReportDescVec

typedef std::vector<ReportDescriptor> sparta::app::ReportDescVec

Definition at line 635 of file ReportDescriptor.hpp.

◆ ReportYamlReplacements

typedef std::vector<std::pair<std::string, std::string> > sparta::app::ReportYamlReplacements

Definition at line 636 of file ReportDescriptor.hpp.

◆ StringPairVec

typedef std::vector<std::pair<std::string, std::string> > sparta::app::StringPairVec

Definition at line 679 of file ConfigApplicators.hpp.

◆ TriggerKeyValues

typedef std::unordered_map<std::string, std::string> sparta::app::TriggerKeyValues

Definition at line 82 of file ReportDescriptor.hpp.

Function Documentation

◆ createDescriptorsFromFileWithPlaceholderReplacements()

ReportDescVec sparta::app::createDescriptorsFromFileWithPlaceholderReplacements ( const std::string &  def_file,
TreeNode context,
const ReportYamlReplacements &  placeholder_key_value_pairs 
)

This method is similar to "createDescriptorsFromFile()", except that it can be used for report yaml files that have one or more placeholders in them, like this:

content:
  report:
    pattern:   _global
    def_file:  simple_stats.yaml
    dest_file: %TRACENAME%.stats.json
    format:    json_reduced
    ...

Where the TRACENAME placeholder is given its value at the command prompt instead of hard-coded in the yaml file itself.

This can be beneficial for users who have auto-generated template yaml files that have placeholders like TRACENAME%, which they can reuse many times and just supply different placeholder values at the command prompt. This will save disk space in those use cases (one yaml definition file versus many thousands).

◆ named_value() [1/2]

template<typename ArgT >
named_value_type< ArgT > * sparta::app::named_value ( std::string const &  name,
ArgT *  val = nullptr 
)
inline

Helper function for generating new named_value_type structs in the boost style.

Definition at line 280 of file MultiDetailOptions.hpp.

◆ named_value() [2/2]

template<typename ArgT >
named_value_type< ArgT > * sparta::app::named_value ( std::string const &  name,
unsigned  min,
unsigned  max,
ArgT *  val = nullptr 
)
inline

Definition at line 285 of file MultiDetailOptions.hpp.

Variable Documentation

◆ DefaultHeartbeat

const constexpr char sparta::app::DefaultHeartbeat[] = "0"
constexpr

Definition at line 58 of file CommandLineSimulator.hpp.

◆ NoPipelineCollectionStr

constexpr char sparta::app::NoPipelineCollectionStr[] = "NOPREFIX_"
constexpr

Definition at line 33 of file SimulationConfiguration.hpp.