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

Macros for handling exponential backoff. More...

Namespaces

namespace  app
 Sparta Application framework.
 
namespace  exp_backoff
 Contains utilities and types of exponential backoff helpers.
 
namespace  log
 Diagnostic logging framework. This node generates logging messages of a specific category.
 
namespace  memory
 Namespace containing memory interfaces, types, and storage objects.
 
namespace  statistics
 Namespace containing methods for computing and generating statistical information using instrumentation extracted from sparta structures such as Counters.
 

Classes

class  __RegisterDefintionSet
 Type that holds a set of register definitions. More...
 
class  ArchData
 Contains a set of contiguous line of architectural data which can be referred to by any architected object model. When layout() is called, reserves space for each element in a registered set of ArchDataSegment instances at offsets within Lines within the ArchData. More...
 
class  ArchDataContainer
 Container class for any number of ArchData pointers owned externally. More...
 
class  ArchDataSegment
 
class  Array
 Array is essentially a fixed size vector, maintains a concept of validity of its indexes, and provides access via stl iteration and general get methods. More...
 
class  AssertContext
 Creates a helper traits class for determining whehther a type has a member named getClock. More...
 
class  AssignOnceObject
 Object which can only have it's value set once. Throws exception if being set more than once. More...
 
class  AsyncEvent
 In a multi-threaded sim environment, this event is used to schedule an event asynchronously. More...
 
class  Audience
 Class used maintain a list of sparta::Scheduleable objects; used by observation-type classes. More...
 
class  BasicHistogram
 
class  Baz
 
struct  bit_reference_to_bool
 Helper type for converting _Bit_reference types into bool types for the purpose of determining how to lexically cast a string into that type. More...
 
struct  bit_reference_to_bool< typename std::_Bit_reference >
 
class  BoolEnum
 The class responsible for handling State<bool> instances and converts bool instances into actual EnumTValueType instances to satisfy exisiting function signatures. More...
 
class  bounded_int
 Bounded integer type with range-checking. More...
 
class  Buffer
 A data structure allowing appending at the end, beginning, or middle, but erase anywhere with collapse. More...
 
class  Bus
 Class that defines a Bus type. More...
 
class  BusSet
 A TreeNode that represents a set of Buses. More...
 
class  CircularBuffer
 A data structure allowing appending at the end, beginning, or insert in the middle, but erase anywhere with collapse. More...
 
class  Clock
 A representation of simulated time. More...
 
class  ClockManager
 Manages building a clock tree. More...
 
class  ContextCounter
 A container type that allows a modeler to build, store, and charge counts to a specific context. More...
 
class  Counter
 Represents a counter of type counter_type (uint64_t). 2 and greater than 0 with a ceiling specified. A ceiling value that is a power of two is optimized to perform operations faster. More...
 
class  CounterBase
 The base class for all Counters. More...
 
class  CycleCounter
 Represents a cycle counter. More...
 
class  CycleHistogramBase
 CycleHistogramBase class for uint64_t values. More...
 
class  CycleHistogramStandalone
 CycleHistogramStandalone class for uint64_t values. More...
 
class  CycleHistogramTreeNode
 CycleHistogramTreeNode class for uint64_t values. More...
 
class  DAG
 
class  DataContainer
 Used by DataInPort and SyncInPort, this class holds received data from these ports and remembers the time in which the data was set. It also maintains the validity of the data. More...
 
class  DataInPort
 DataInPort receives data from sender using a DataOutPort. More...
 
class  DataOutPort
 DataOutPort is used for transferring any data to another module. More...
 
class  DataView
 View into a backend block of memory in an ArchData. More...
 
class  DynamicResourceTreeNode
 TreeNode subclass representing a node in the device tree which creates and owns a resource. This node is created at run-time and, although it takes a parameter set at construction, is not part of the SPARTA configuration phase and is not user configurable through any sparta::ParameterSet. More...
 
class  EnumCycleHistogram
 EnumCycleHistogram class for C++ Enum values. More...
 
class  EnumHistogram
 EnumHistogram class for sparta::utils::Enum. More...
 
class  Event
 Event is a simple class for scheduling random events on the Scheduler. More...
 
class  EventGroup
 Group a series of events together for precedence establishment. More...
 
class  EventNode
 EventNode is the base class for all event types in SPARTA. Not to be used by the modeler. Its main purpose is to look for a clock and scheduler for the event. More...
 
class  EventSet
 Set of Events that a unit (or sparta::TreeNode, sparta::Resource) contains and are visible through a sparta Tree. More...
 
class  ExportedPort
 Class that "exports" a port that's contained in the same ResourceTreeNode structure. More...
 
class  ExtensionDescriptor
 Descriptor class which provides basic information about an extended tree node: device tree location, extension name, and parameter name-values. More...
 
class  ExtensionsParamsOnly
 Helper class used to trivially extend TreeNode parameter sets (but not any additional functionality beyond that) More...
 
class  FrontArray
 a type of Array with special allocation policies to support writing to the front most valid entry in the Array, as well as reading the nth valid entry in the array. More...
 
class  FunctionManager
 Singleton Function Manager class. This class contains two maps and one constant string token. These maps contain a string as key and function pointers as value. The string key is the same as the name of the free functions as defined by the users and the keys are the function pointers to those methods. One map is dedicated for HistogramTreeNodes while the other is dedicated for CycleHistogramTreeNodes. This was necessary because these two classes do not share a common polymorphic base. More...
 
class  FutureStatisticRange
 Exception indicating that the range of a StatisticInstance starts or ends in the future (probably caused by to checkpointing) More...
 
class  GlobalEvent
 A type of "global" reusable event. More...
 
class  GlobalEventProxy
 A helper class of GlobalEvent. More...
 
class  GlobalOrderingPoint
 Used to set precedence between Scheduleable types across simulation. More...
 
class  GlobalTreeNode
 TreeNode which represents some "global" namespace of the device tree, containing only RootTreeNodes, for performing searches. More...
 
class  HistogramBase
 Histogram base class for uint64_t values. More...
 
class  HistogramStandalone
 
class  HistogramTreeNode
 
class  InPort
 Base class for all InPort types. More...
 
class  InstrumentationNode
 Base class requiring. More...
 
class  IntParameterSet
 
struct  is_sparta_enum
 Detect whether template parameter is sparta::utils::Enum type. More...
 
struct  is_sparta_enum< sparta::utils::Enum< T > >
 Detect whether template parameter is sparta::utils::Enum type. More...
 
struct  is_vector
 Templated for determining if ValueType is std::vector for use in metaprogramming constructs. This is intended to be be consumed by enable_if. More...
 
struct  is_vector< std::vector< T > >
 
class  KeyValue
 The type-to-type name map. Not really necessary, but useful. More...
 
class  LineStringStream
 Helper class for building a set of lines through an ostream-like interface. More...
 
class  MemoryProfiler
 Utility used to periodically collect heap usage statistics throughout a simulation. Supported phases for inspection include Build, Configure, Bind, and Simulate. More...
 
class  MirrorNotificationSource
 essentially a pass through notification source that is a placeholder in a shadow tree. More...
 
class  NotificationSource
 A TreeNode that generates a specific type of notification which propagates up a tree of TreeNodes (using the NotificationPropagator base class. More...
 
class  NotificationSourceBase
 A TreeNode that generates a single specific type of notification which propagates up a tree of TreeNodes using TreeNode's builtin functionality. More...
 
class  ObjectAllocator
 
class  OneWayBool
 Boolean with a default capable of being changed to the opposite value only. it can never set to the default even if already at the default value. More...
 
class  OutPort
 Base class for all OutPort types. More...
 
class  Parameter
 Parameter instance, templated to contain only a specific type. More...
 
class  ParameterBase
 Non-templated base class for generic parameter access and iteration. More...
 
class  ParameterException
 Exception indicating a misconfigured Parameter or invalid Parameter access. More...
 
class  ParameterSet
 Generic container of Parameters. More...
 
class  ParameterTree
 Virtual Parameter Tree. This represents a tree of parameters read from some source but does not necessarily correspond to the parameters in the simulation itself or even to the simulation tree. This is meant to provide a hierarchical view into simulation parameters before they are actually applied to a real TreeNode tree. More...
 
class  PayloadEvent
 Class to schedule a Scheduleable in the future with a payload, typed on both the data type and the scheduling phase. This is the preferred class to use in simulation, but the main API is found in sparta::PhasedPayloadEvent. More...
 
class  PhasedObject
 Object having a specific phase in the sparta construction paradigm. More...
 
class  PhasedPayloadEvent
 Class to schedule a Scheduleable in the future with a payload, but the class itself is not typed on the phase, but is constructed with one. The preference, however, is for the modeler to use sparta::PayloadEvent instead. More...
 
class  PhasedSingleCycleUniqueEvent
 An event that can only be schedule one cycle into the future. More...
 
class  PhasedUniqueEvent
 A type of Event that uniquely schedules itself on the schedule within a single time quantum. This UniqueEvent is not typed on the SchedulingPhase. It is discouraged to use this class – use UniqueEvent templatized on the SchedulingPhase. More...
 
class  Pipe
 A very simple pipe, not part of the DES paradigm. More...
 
class  Pipeline
 A simple pipeline. More...
 
class  Port
 The port interface used to bind port types together and defines a port behavior. More...
 
class  PortSet
 A TreeNode that represents a set of ports used by a Resource. More...
 
class  PostRunValidationInfo
 Information describing the type of validation being done. More...
 
class  PriorityQueue
 A data structure that allows pushing/emplacing into it with a given sorter. More...
 
struct  ptr_to_const_obj_ptr
 Template type helper that removes a pointer, adds a const, and then re-adds the pointer. This is useful to turn "T" [T=U*] into "U const *" in places where simply using "const T" results in "U* const". More...
 
class  Queue
 A data structure that allows appending at the back and invalidating from the front. More...
 
class  ReadOnlyCounter
 Represents a non-writable and non-observable counter with a very similar interface to sparta::Counter. The value of this counter In most cases, a normal counter should be used. However, if a value must be stored as an integer outside of counter for any reason, a ReadOnly counter can be used to wrap that value and expose it to sparta Report and statistics infrastructure. More...
 
class  Register
 An implementation of a RegisterBase. More...
 
class  RegisterBankTable
 Container of register banks as a helper for RegisterSet. Instances of this class will be owned by a single RegisterSet. More...
 
class  RegisterBase
 Base class to represents an architected register of any size that is a power of 2 and greater than 0 with a ceiling specified. More...
 
class  RegisterBits
 
class  RegisterProxy
 Represents an interface to a pseudo-"Register" of a fixed size which indirectly references other registers (having the same group num, group idx, and size) depending on simulator state. Essentially, this hides banking and register aliasing (shared data) information from the client of this interface which is useful for presenting debugginer-visible and software-visible registers without regard for the underlying banking or aliasing. More...
 
class  RegisterProxyBase
 
class  RegisterSet
 Holds and can create a set of Register objects having various names and groups. More...
 
class  Resource
 The is the base class for all types of resources used by the SPARTA framework. More...
 
class  ResourceContainer
 PhasedObject which can hold 0 or 1 Resource pointers to an associatedresource. Contains logic for setting and getting the associated Resource. More...
 
class  ResourceFactory
 Templated ResourceFactoryBase implementation which can be used to trivially define Resource Factories. More...
 
class  ResourceFactoryBase
 Factory which can create Resources as well as the Parameter sets that can be modified before actually instantiating the resources themselves. Packages providing resources to the simulator implement this interface. More...
 
class  ResourceSet
 Set of published ResourceFactories which can be referenced by name. More...
 
class  ResourceTreeNode
 TreeNode subclass representing a node in the device tree which contains a single ResourceFactory and a sparta::ParameterSet. A ResourceTreeNode is also associated with a clock. More...
 
class  ReversedStatisticRange
 Exception indicating that the range of a StatisticInstance was reversed when it was accessed (probably caused by checkpointing) More...
 
class  RootTreeNode
 TreeNode which represents the root ("top") of a device tree. More...
 
class  Scheduleable
 A class that defines the basic scheduling interface to the Scheduler. Not intended to be used by modelers directly, but certainly can be. More...
 
class  ScheduleableHandle
 A light-weight reference counting handle for Scheduleables – DOES NOT delete. More...
 
class  Scheduler
 A class that lets you schedule events now and in the future. More...
 
class  Scoreboard
 Class used to track operand dependencies (timed) between units. More...
 
class  ScoreboardView
 A ScoreboardView is a view into the master Scoreboard for operand readiness. More...
 
class  SharedData
 Class that allows the writing of data this cycle, but not visable until next cycle. More...
 
class  SignalInPort
 SignalInPort receives data from sender using a SignalOutPort. More...
 
class  SignalOutPort
 SignalOutPort is used for transferring a simple signal to another module. More...
 
class  SimulationInfo
 Contains information describing the simulation instance for the purpose of identifying the simulation and possible recreating it. This information should be written to all log files, reports, cmdline, etc. More...
 
class  SingleCycleUniqueEvent
 An event that can only be schedule one cycle into the future. More...
 
class  SpartaCriticalError
 Indicates something went seriously wrong and likely indicates corruption in simulator runtime state. More...
 
class  SpartaException
 Used to construct and throw a standard C++ exception. Inherits from std::exception. More...
 
class  SpartaFatalError
 Indicates something went seriously wrong and likely indicates unrecoverable corruption in simulator runtime state or misuse. This is the only exception that should ever be generated by a destructor since its semantics are that the simulation should terminate. More...
 
class  SpartaSharedPointer
 Used for garbage collection, will delete the object it points to when all objects are finished using it. More...
 
class  SpartaSharedPointerAllocator
 A memory allocator complementing SpartaSharedPointer that reuses old memory. More...
 
class  SpartaStaticInitializer
 Static-initialization order controller. More...
 
class  SpartaTester
 A simple testing class. More...
 
class  SpartaWeakPointer
 Like in STL, create a weak pointer to a SpartaSharedPointer. More...
 
class  StartupEvent
 StartupEvent is a simple class for scheduling a starting event on the Scheduler. It does not support precedence. More...
 
class  State
 The State class for watching transition between enum states. More...
 
class  State< T, typename std::enable_if< std::is_same< T, PhasedObject::TreePhase >::value >::type >
 
class  StateHistogram
 StateHistogram class for uint64_t values. More...
 
class  StateTimerUnit
 A high level wrapper contains the StateTimerPool and StateTimerHistogram. More...
 
class  StatInstCalculator
 
class  StatisticDef
 Contains a statistic definition (some useful information which can be computed) More...
 
class  StatisticInstance
 Instance of either a StatisticDef or CounterBase or an Expression. Has a sample window (simulator ticks) over which it will compute the value of the contained expression/counter for that range. More...
 
class  StatisticSet
 Set of StatisticDef and CounterBase-derived objects for visiblility through a sparta Tree. More...
 
class  StringManager
 Manages string internment for SPARTA. This allows strings to be compared by pointer once interned. More...
 
class  SyncInPort
 Class that defines an synchronized input port on modules on two different clocks. More...
 
class  SyncOutPort
 Class that defines a synchronized SyncOutPort for data writes on different clocks. More...
 
class  SysCSpartaSchedulerAdapter
 Class that "connects" Sparta to SystemC. More...
 
class  Tag
 Tag(): Simple class to provide nested sequence numbering. More...
 
class  TieredMap
 N-Tier lookup map for sparse-representation of large memory spaces. This is essentially a M-Tree where the child lookup at each node is a simple offset computed by a rshift and mask. More...
 
class  TimeManager
 Singleton which manages wall-clock time for simulations in SPARTA This is not a "timer" manager, but rather an information service and could possible become a timing interval manager. More...
 
class  TreeNode
 Node in a composite tree representing a sparta Tree item. More...
 
class  TreeNodePrivateAttorney
 
class  UniqueEvent
 A type of Event that uniquely schedules itself on the schedule within a single time quantum. This class is typed on the SchedulingPhase and is the preferred type to use for UniqueEvent use, but the main API is found in PhasedUniqueEvent. More...
 
class  Unit
 The is the base class for user defined blocks in simulation. More...
 
class  ValidationCheckCallback
 Delegate for Parameter validation. More...
 
class  VirtualGlobalTreeNode
 Virtual global node for all device trees in a single simulation. This node acts a potential notification observation point for every node in the simulation regardless hierarchy. More...
 
class  WeightedContextCounter
 This is an example context counter subclass used to show how users may supply their own "aggregated value calculation" method via the REGISTER_CONTEXT_COUNTER_AGGREGATE_FCN macro. More...
 

Typedefs

using RegisterDefinitionSet = __RegisterDefintionSet< sparta::RegisterBase >
 
using ProxyDefinitionSet = __RegisterDefintionSet< sparta::RegisterProxyBase >
 
typedef std::shared_ptr< std::unordered_map< uint32_t, std::vector< sparta::Clock::Cycle > * > > StateTimerDataContainerPtr
 
typedef std::vector< std::unique_ptr< ExtensionDescriptor > > ExtensionDescriptorVec
 
using CycleHistogram = CycleHistogramTreeNode
 
typedef HistogramTreeNode Histogram
 
template<typename T >
using HistStatCalcFcn = double(*)(const T *)
 

Enumerations

enum class  SchedulingPhase {
  Update , PortUpdate , Flush , Collection ,
  Tick , PostTick
}
 The SchedulingPhases used for events (Tick, Update, PortUpdate, etc) More...
 
enum class  ArrayType { NORMAL , AGED }
 Defines how a sparta::Array should behave. The array will have different features depending on the type. More...
 
enum  ByteOrder { LE = 0 , BE = 1 }
 Byte order enum for read/write methods. More...
 

Functions

template<typename T >
std::enable_if< std::is_same< T, app::FeatureConfiguration >::value, bool >::type IsFeatureValueEqualTo (const T &cfg, const std::string &feature_name, const unsigned int feature_value)
 
template<typename T >
std::enable_if< MetaStruct::is_any_pointer< T >::value, bool >::type IsFeatureValueEqualTo (const T &cfg, const std::string &feature_name, const unsigned int feature_value)
 
template<typename T >
std::enable_if< std::is_same< T, app::FeatureConfiguration >::value, bool >::type IsFeatureValueEnabled (const T &cfg, const std::string &feature_name)
 
template<typename T >
std::enable_if< MetaStruct::is_any_pointer< T >::value, bool >::type IsFeatureValueEnabled (const T &cfg, const std::string &feature_name)
 
template<typename T >
std::enable_if< std::is_same< T, app::FeatureConfiguration >::value, constapp::FeatureConfiguration::FeatureOptions * >::type GetFeatureOptions (const T &cfg, const std::string &feature_name)
 
template<typename T >
std::enable_if< MetaStruct::is_any_pointer< T >::value, constapp::FeatureConfiguration::FeatureOptions * >::type GetFeatureOptions (const T &cfg, const std::string &feature_name)
 
std::ostream & operator<< (std::ostream &o, const SimulationInfo &info)
 ostream insertion operator for SimulationInfo
 
template<class ScheduleableTypeA >
std::enable_if< std::is_base_of< EventNode, ScheduleableTypeA >::value, constGlobalOrderingPoint >::type & operator>> (ScheduleableTypeA &producer, const GlobalOrderingPoint &consumer)
 Place a precedence between a Scheduleable object and a GlobalOrderingPoint.
 
template<class ScheduleableTypeA >
std::enable_if< std::is_base_of< EventNode, ScheduleableTypeA >::value, ScheduleableTypeA >::type & operator>> (const GlobalOrderingPoint &producer, ScheduleableTypeA &consumer)
 Place a precedence between a Scheduleable object and a GlobalOrderingPoint.
 
InPortoperator>> (const GlobalOrderingPoint &producer, InPort &consumer)
 Place a precedence between a GlobalOrderingPoint and an InPort.
 
const GlobalOrderingPointoperator>> (InPort &producer, const GlobalOrderingPoint &consumer)
 Place a precedence between a Scheduleable object and a GlobalOrderingPoint.
 
template<class DataT1 , SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & operator>> (PayloadEvent< DataT1, PayloadPhaseT1 > &producer, PayloadEvent< DataT2, PayloadPhaseT2 > &consumer)
 Place a precedence between a PayloadEvent and another PayloadEvent.
 
template<class DataT1 , SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
UniqueEvent< PayloadPhaseT2 > & operator>> (PayloadEvent< DataT1, PayloadPhaseT1 > &producer, UniqueEvent< PayloadPhaseT2 > &consumer)
 Place a precedence between a PayloadEvent and UniqueEvent.
 
template<class DataT1 , SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
SingleCycleUniqueEvent< PayloadPhaseT2 > & operator>> (PayloadEvent< DataT1, PayloadPhaseT1 > &producer, SingleCycleUniqueEvent< PayloadPhaseT2 > &consumer)
 Place a precedence between a PayloadEvent and SingleCycleUniqueEvent.
 
template<class DataT1 , SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
Event< PayloadPhaseT2 > & operator>> (PayloadEvent< DataT1, PayloadPhaseT1 > &producer, Event< PayloadPhaseT2 > &consumer)
 Place a precedence between a PayloadEvent and an Event.
 
template<SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & operator>> (UniqueEvent< PayloadPhaseT1 > &producer, PayloadEvent< DataT2, PayloadPhaseT2 > &consumer)
 Place a precedence between a PayloadEvent and an UniqueEvent.
 
template<SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & operator>> (SingleCycleUniqueEvent< PayloadPhaseT1 > &producer, PayloadEvent< DataT2, PayloadPhaseT2 > &consumer)
 Place a precedence between a PayloadEvent and an SingleCycleUniqueEvent.
 
template<SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & operator>> (Event< PayloadPhaseT1 > &producer, PayloadEvent< DataT2, PayloadPhaseT2 > &consumer)
 Place a precedence between a Event and an PayloadEvent.
 
template<SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
UniqueEvent< PayloadPhaseT2 > & operator>> (UniqueEvent< PayloadPhaseT1 > &producer, UniqueEvent< PayloadPhaseT2 > &consumer)
 Place a precedence between a UniqueEvent and an UniqueEvent.
 
template<SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
SingleCycleUniqueEvent< PayloadPhaseT2 > & operator>> (UniqueEvent< PayloadPhaseT1 > &producer, SingleCycleUniqueEvent< PayloadPhaseT2 > &consumer)
 Place a precedence between a UniqueEvent and an SingleCycleUniqueEvent.
 
template<SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
UniqueEvent< PayloadPhaseT2 > & operator>> (SingleCycleUniqueEvent< PayloadPhaseT1 > &producer, UniqueEvent< PayloadPhaseT2 > &consumer)
 Place a precedence between a SingleCycleUniqueEvent and an UniqueEvent.
 
template<SchedulingPhase PhaseT1, SchedulingPhase PhaseT2>
SingleCycleUniqueEvent< PhaseT2 > & operator>> (SingleCycleUniqueEvent< PhaseT1 > &producer, SingleCycleUniqueEvent< PhaseT2 > &consumer)
 Place a precedence between a SingleCycleUniqueEvent and a SingleCycleUniqueEvent.
 
template<SchedulingPhase PhaseT1, SchedulingPhase PhaseT2>
Event< PhaseT2 > & operator>> (Event< PhaseT1 > &producer, Event< PhaseT2 > &consumer)
 Place a precedence between a Event and another Event.
 
template<class EventT1 , class EventT2 >
std::unique_ptr< EventT2 > & operator>> (std::unique_ptr< EventT1 > &producer, std::unique_ptr< EventT2 > &consumer)
 Place a precedence between a std::unique_ptr<EventT1> and another std::unique_ptr<EventT2>
 
template<class EventT1 , class EventT2 >
std::unique_ptr< EventT2 > & operator>> (EventT1 &producer, std::unique_ptr< EventT2 > &consumer)
 Place a precedence between an EventT1 and std::unique_ptr<EventT2>
 
template<class EventT1 , class EventT2 >
EventT2 & operator>> (std::unique_ptr< EventT1 > &producer, EventT2 &consumer)
 Place a precedence between a std::unique_ptr<EventT1> and EventT2.
 
template<class DataT2 , SchedulingPhase phase>
PayloadEvent< DataT2, phase > & operator>> (Scheduleable &producer, PayloadEvent< DataT2, phase > &consumer)
 Place a precedence between a Scheduleable and a PayloadEvent.
 
template<class DataT1 , SchedulingPhase phase>
Scheduleableoperator>> (PayloadEvent< DataT1, phase > &producer, Scheduleable &consumer)
 Place a precedence between a PayloadEvent and a Scheduleable.
 
template<class ScheduleableType >
std::enable_if< std::is_base_of< Scheduleable, ScheduleableType >::value, Bus >::type & operator>> (ScheduleableType &producer, Bus &consumer)
 Place a precedence between a Scheduleable and a Bus.
 
template<class ScheduleableType >
std::enable_if< std::is_base_of< Scheduleable, ScheduleableType >::value, ScheduleableType >::type & operator>> (Bus &producer, ScheduleableType &consumer)
 Place a precedence between a Bus and a Scheduleable.
 
template<class ScheduleableTypeB >
ScheduleableTypeB & operator>> (const EventGroup &producers, ScheduleableTypeB &consumer)
 
template<class ScheduleableTypeA >
const EventGroupoperator>> (ScheduleableTypeA &producer, const EventGroup &consumers)
 
const EventGroupoperator>> (const EventGroup &producers, const EventGroup &consumers)
 
Scheduleableoperator>> (Scheduleable &producer, Scheduleable &consumer)
 
std::ostream & operator<< (std::ostream &os, const SchedulingPhase &phase)
 Print the SchedulingPhase.
 
bool operator== (const RegisterBase::Definition &a, const RegisterBase::Definition &b)
 
bool operator!= (const RegisterBase::Definition &a, const RegisterBase::Definition &b)
 
bool operator== (const RegisterProxyBase::Definition &a, const RegisterProxyBase::Definition &b)
 
bool operator!= (const RegisterProxyBase::Definition &a, const RegisterProxyBase::Definition &b)
 
std::ostream & operator<< (std::ostream &os, const DAG &d)
 
std::ostream & operator<< (std::ostream &os, const DAG *d)
 
std::ostream & operator<< (std::ostream &o, const NotificationSourceBase::ObservationStateCallback &osc)
 
std::ostream & operator<< (std::ostream &o, const NotificationSourceBase::ObservationStateCallback *osc)
 
void bind (Bus *p1, Bus *p2)
 Bind two buses together.
 
void bind (Bus &p1, Bus &p2)
 Bind two buses together.
 
void bind (Bus *p1, Bus &p2)
 Bind two buses together.
 
void bind (Bus &p1, Bus *p2)
 Bind two buses together.
 
void bind (Port *p1, Port *p2)
 Bind two ports together.
 
void bind (Port &p1, Port &p2)
 Bind two ports together.
 
void bind (Port *p1, Port &p2)
 Bind two ports together.
 
void bind (Port &p1, Port *p2)
 Bind two ports together.
 
std::string printBitSet (const Scoreboard::RegisterBitMask &bits)
 
std::ostream & operator<< (std::ostream &os, const sparta::Clock &clk)
 
Scheduler::Tick calculateClockCrossingDelay (Scheduler::Tick src_delay, const Clock *src_clk, Scheduler::Tick dst_delay, const Clock *dst_clk)
 
Scheduler::Tick calculateReverseClockCrossingDelay (Scheduler::Tick dst_arrival_tick, Scheduler::Tick src_delay, const Clock *src_clk, Scheduler::Tick dst_delay, const Clock *dst_clk)
 
std::ostream & operator<< (std::ostream &os, const ClockManager &m)
 
template<typename T >
smartLexicalCast (const ParameterBase *p, const std::string &s, size_t &end_pos, bool allow_recursion=true, bool allow_prefix=true)
 smartLexicalCast wrapper with parameter information added to exceptions
 
std::ostream & operator<< (std::ostream &o, const ParameterTree::Node &n)
 
std::ostream & operator<< (std::ostream &o, const ParameterTree::Node *n)
 
template<class Ch , class Tr >
std::basic_ostream< Ch, Tr > & operator<< (std::basic_ostream< Ch, Tr > &out, sparta::TreeNode const &tn)
 TreeNode stream operator.
 
std::ostream & operator<< (std::ostream &out, sparta::TreeNode const *tn)
 TreeNode stream operator.
 
ExtensionDescriptorVec createExtensionDescriptorsFromFile (const std::string &def_file, TreeNode *context)
 Given a tree node extension YAML file, parse it out into individual descriptors, one for each extension defined in the file.
 
ExtensionDescriptorVec createExtensionDescriptorsFromDefinitionString (const std::string &def_string, TreeNode *context)
 Given a tree node extension definition string, parse it out into individual descriptors.
 
template<typename U >
MetaStruct::enable_if_t< not sparta::is_sparta_enum< U >::value and sparta::utils::has_ostream_operator< U >::value, void > getHumanReadableHistogramBinNames (std::vector< std::string > &enum_name_strings)
 Given an enum class type, this method figures out the string.
 
template<typename U >
MetaStruct::enable_if_t< not sparta::is_sparta_enum< U >::value and not sparta::utils::has_ostream_operator< U >::value, void > getHumanReadableHistogramBinNames (std::vector< std::string > &)
 Given an enum class type, this method figures out the string.
 
template<typename U >
MetaStruct::enable_if_t< sparta::is_sparta_enum< U >::value, void > getHumanReadableHistogramBinNames (std::vector< std::string > &enum_name_strings)
 Given an enum class type, this method figures out the string.
 
std::ostream & operator<< (std::ostream &out, sparta::StatisticInstance const &si)
 StatisticInstance stream operator.
 
std::ostream & operator<< (std::ostream &out, sparta::StatisticInstance const *si)
 TreeNode stream operator.
 
template<typename T >
std::enable_if< std::is_integral< T >::value, T >::type byte_swap (T val)
 Swaps the order of bytes for various types.
 
template<>
uint8_t byte_swap (uint8_t val)
 
template<>
int8_t byte_swap (int8_t val)
 
template<>
uint16_t byte_swap (uint16_t val)
 
template<>
int16_t byte_swap (int16_t val)
 
template<>
uint32_t byte_swap (uint32_t val)
 
template<>
int32_t byte_swap (int32_t val)
 
template<>
uint64_t byte_swap (uint64_t val)
 
template<>
int64_t byte_swap (int64_t val)
 
template<typename T , enum ByteOrder BO>
std::enable_if< std::is_same< boost::mpl::int_< BO >, boost::mpl::int_< BE > >::value, T >::type reorder (const T &t)
 
template<typename T , enum ByteOrder BO>
std::enable_if< std::is_same< boost::mpl::int_< BO >, boost::mpl::int_< LE > >::value, T >::type reorder (const T &t)
 
template<class T >
lexicalCast (const std::string &str, uint32_t base=10)
 
template<class T >
MetaStruct::enable_if_t< MetaStruct::is_stl< T >::value and std::is_same< typename T::value_type, bool >::value, T > lexicalCast (const std::string &str, uint32_t base=10)=delete
 
template<>
std::string lexicalCast (const std::string &str, uint32_t base)
 
template<>
bool lexicalCast (const std::string &str, uint32_t base)
 
template<>
uint64_t lexicalCast (const std::string &str, uint32_t base)
 
template<>
int64_t lexicalCast (const std::string &str, uint32_t base)
 
template<>
uint32_t lexicalCast (const std::string &str, uint32_t base)
 
template<>
int32_t lexicalCast (const std::string &str, uint32_t base)
 
uint32_t numDecDigits (uint32_t val)
 Gets number of decimal digits in a uint32_t.
 
template<typename PtrT , typename Ptr2 >
bool operator== (const SpartaSharedPointer< PtrT > &ptr1, const SpartaSharedPointer< Ptr2 > &ptr2) noexcept
 
template<typename PtrT >
bool operator== (const SpartaSharedPointer< PtrT > &ptr1, std::nullptr_t) noexcept
 
template<typename PtrT >
bool operator== (std::nullptr_t, const SpartaSharedPointer< PtrT > &ptr1) noexcept
 
template<typename PtrT , typename Ptr2 >
bool operator!= (const SpartaSharedPointer< PtrT > &ptr1, const SpartaSharedPointer< Ptr2 > &ptr2) noexcept
 
template<typename PtrT >
bool operator!= (const SpartaSharedPointer< PtrT > &ptr1, std::nullptr_t) noexcept
 
template<typename PtrT >
bool operator!= (std::nullptr_t, const SpartaSharedPointer< PtrT > &ptr1) noexcept
 
template<typename PtrT >
std::ostream & operator<< (std::ostream &os, const SpartaSharedPointer< PtrT > &p)
 
template<typename PointerT , typename... Args>
SpartaSharedPointer< PointerT > allocate_sparta_shared_pointer (SpartaSharedPointerAllocator< PointerT > &alloc, Args &&...args)
 Allocate a SpartaSharedPointer.
 
std::ostream & operator<< (std::ostream &os, const Tag &tag)
 <<(): Stream insertion operator
 
std::ostream & operator<< (std::ostream &os, const Tag *tag)
 <<(): Stream insertion operator (for Tag pointers)
 
template<typename K , typename V , typename... Args, template< typename... > class MapType>
MapType< V, K > flipMap (const MapType< K, V, Args... > &map)
 Function to invert a maps or an unordered_map, or any type of class that has key/value semantics. The variadic template argument is necessary 'cause map/unordered_map don't have just two template parameters.
 
bool isPowerOf2 (uint64_t x)
 Determines if input is 0 or a power of 2.
 
template<typename T >
computeMask (T size, T &lsb_pos)
 Computes a maks and the lsb-position given a block size. The mask generated can be AND-ed with any number to get a value rounded down to the nearest multiple of size.
 
template<typename T >
computeMaskShift (T size)
 Convenience wrapper around computeMask to get the shift value.
 
std::string demangle (const std::string &name) noexcept
 Demangles a C++ symbol.
 
template<typename T >
T * notNull (T *p)
 Ensures that a pointer is not null.
 
uint32_t replaceSubstring (std::string &s, const std::string &from, const std::string &to)
 Replaces within a string 's' all instances of some string 'from' with 'to'.
 
std::string copyWithReplace (const std::string &s, char from, const std::string &to)
 Copies from 1 string to another with replacement of a single character with a string.
 
std::string convertCPPStringToPython (const std::string &s)
 Take all of the C++-isms out of a string (like parens, angle brackets, colons, etc) and replace them with an '_'.
 
void writeNChars (std::ostream &out, uint32_t num, char chr=' ')
 Insert a number of some character into an ostream.
 
std::string toLower (const std::string &s)
 Makes a copy of an input string s in lower-case.
 
template<typename T >
std::ostream & operator<< (std::ostream &o, const AssignOnceObject< T > &v)
 

Variables

const uint32_t NUM_SCHEDULING_PHASES
 The number of phases.
 
static class sparta::SpartaStaticInitializer _SpartaStaticInitializer
 

Detailed Description

Macros for handling exponential backoff.

Typedef Documentation

◆ CycleHistogram

Definition at line 796 of file CycleHistogram.hpp.

◆ ExtensionDescriptorVec

typedef std::vector<std::unique_ptr<ExtensionDescriptor> > sparta::ExtensionDescriptorVec

Definition at line 180 of file TreeNode.hpp.

◆ Histogram

Definition at line 526 of file Histogram.hpp.

◆ HistStatCalcFcn

template<typename T >
using sparta::HistStatCalcFcn = typedef double (*)(const T*)

Definition at line 75 of file HistogramFunctionManager.hpp.

◆ ProxyDefinitionSet

◆ RegisterDefinitionSet

◆ StateTimerDataContainerPtr

typedef std::shared_ptr<std::unordered_map<uint32_t, std::vector<sparta::Clock::Cycle> *> > sparta::StateTimerDataContainerPtr

Definition at line 24 of file StateTimerUnit.hpp.

Enumeration Type Documentation

◆ ArrayType

enum class sparta::ArrayType
strong

Defines how a sparta::Array should behave. The array will have different features depending on the type.

Enumerator
NORMAL 

The array does NOT allow access or maintain information about age.

AGED 

The array allows fuctions that require a concept of age in each entry

Definition at line 27 of file Array.hpp.

◆ ByteOrder

Byte order enum for read/write methods.

Example 32 Byte register layout which can be accessed as smaller types by index. Layout in memory is unaware of byte-order. Read/Write methods dictate the storage.

The following shows how the value index offset and access sizes map to some data in memory.

* MEMORY   addr: 0x 0     2     4     6     8     a     c     e     10    12    14    16    18    1a    1c    1e    20
*                   [- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 32 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- )
*                   [- -- -- -- -- -- -- -- 16 -- -- -- -- -- -- -- )                       ,                       ,
*                   [- -- -- -- 8- -- -- -- )                                                                       ,
*                   [- -- 4- -- )           ,                       ,                       ,                       ,
*                   [- 2- )                                                                                         ,
*                   [- )        .           ,           .           ,           .           ,           .           ,
*          val: 0x  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ,
*
* Little (LE)       ,                                               ,                                               ,
*                   LSB                                             ,                                            MSB,
*  type      idx    ,                                               ,                                               ,
*  uint64_t  0      [- -- -- -- -- -- -- -]                         ,                                               , => 0x0706050403020100
*  uint64_t  3      ,                                               ,                       [- -- -- -- -- -- -- -] , => 0x1f1e1d1c1b1a1918
*  uint32_t  0      [- -- -- -]                                     ,                                               , => 0x03020100
*  uint32_t  1      ,           [- -- -- -]                         ,                                               , => 0x07060504
*  uint8_t   1      ,  []                                           ,                                               , => 0x01
*
* Big (BE)          ,                                               ,                                               ,
*                   MSB                                             ,                                            LSB,
*  uint64_t  0      [- -- -- -- -- -- -- -]                         ,                                               , => 0x0001020304050607
*  uint64_t  3      ,                                               ,                       [- -- -- -- -- -- -- -] m => 0x18191a1b1c1d1e1f
*  uint8_t   1      ,  []                                           ,                                               , => 0x01
*
* Bitfield (LE)     ,                                               ,                                               ,
*  07-00            []                                              ,                                               , => 0x00
*  15-08            ,  []                                           ,                                               , => 0x01
*  23-16            ,     []                                        ,                                               , => 0x02
*  31-24            ,        []                                     ,                                               , => 0x03
*
* 
Enumerator
BE 

Little endian.

Definition at line 73 of file ByteOrder.hpp.

◆ SchedulingPhase

enum class sparta::SchedulingPhase
strong

The SchedulingPhases used for events (Tick, Update, PortUpdate, etc)

SchedulingPhase are phases within the SPARTA framework that allow a user to "categorize" events, ports, collection, and updatables into groups for auto-precedence establishment.

The current organization of this framework is UPCaT (Updateables, Ports, Collection, and Tick [incl PostTick]) or more specifically:

  1. Updatables are ordered first (sparta::SchedulingPhase::Update)
  2. Ports, N-Cycle where N > 0, that transfer/append to resources (like pipes, buffers) are updated next (specifically, registered handlers are called) (sparta::SchedulingPhase::PortUpdate)
  3. Collection for pipeline viewing (sparta::SchedulingPhase::Collection)
  4. Tickables, or simulation components that operate on data from updatables and ports. (sparta::SchedulingPhase::Tick)
  5. Post-tickables, or events fired after all Tick events (sparta::SchedulingPhase::PostTick)

What happens in the framework is that all Scheduleable objects that are in the SchedulingPhase::Update phase will be organized on the Scheduler before SchedulingPhase::PortUpdate Scheduleable events, which are before SchedulingPhase::Collection Scheduleable objects, and so on. Within a specific phase, a modeler can order events as well. For example, two events in the SchedulingPhase::Tick can be ordered using the ">>" operator. See Precedence.h for more information.

For 0-cycle Ports, SchedulingPhase::PortUpdate events occur in the SchedulingPhase::Tick scheduling phase and are ordered with other events also in the SchedulingPhase::Tick scheduling phase. This only happens, however, when precedence is established between the Port and that subsequent events. This precedence is established by calling Port::registerConsumerEvent or Port::registerProducingEvent (depending on the sparta::Port::Direction).

Enumerator
Update 

Resources are updated in this phase.

PortUpdate 

N-cycle Ports are updated in this phase.

Flush 

Phase where flushing of pipelines, etc can occur.

Collection 

Pipeline collection occurs here.

Tick 

Most operations (combinational logic) occurs in this phase.

PostTick 

Operations such as post-tick pipeline collection occur here.

Definition at line 57 of file SchedulingPhases.hpp.

Function Documentation

◆ allocate_sparta_shared_pointer()

template<typename PointerT , typename... Args>
SpartaSharedPointer< PointerT > sparta::allocate_sparta_shared_pointer ( SpartaSharedPointerAllocator< PointerT > &  alloc,
Args &&...  args 
)

Allocate a SpartaSharedPointer.

Template Parameters
PointerTThe pointer type to allocate
Parameters
argsArguments to the class being instantiated
Returns
sparta::SpartaSharedPointer type

Allocate a SpartaSharedPointer using the SpartaSharedPointerAllocator instance found in the PointerT.

See SpartaSharedPointerAllocator for example usage

Definition at line 488 of file SpartaSharedPointerAllocator.hpp.

◆ bind() [1/8]

void sparta::bind ( Bus p1,
Bus p2 
)
inline

Bind two buses together.

Parameters
p1First bus to bind to
p2Second bus to bind to

This method will bi-directionally bind two buses together

Definition at line 346 of file Bus.hpp.

Here is the call graph for this function:

◆ bind() [2/8]

void sparta::bind ( Bus p1,
Bus p2 
)
inline

Bind two buses together.

Parameters
p1First bus to bind to
p2Second bus to bind to

This method will bi-directionally bind two buses together

Definition at line 369 of file Bus.hpp.

Here is the call graph for this function:

◆ bind() [3/8]

void sparta::bind ( Bus p1,
Bus p2 
)
inline

Bind two buses together.

Parameters
p1First bus to bind to
p2Second bus to bind to

This method will bi-directionally bind two buses together

Definition at line 357 of file Bus.hpp.

Here is the call graph for this function:

◆ bind() [4/8]

void sparta::bind ( Bus p1,
Bus p2 
)
inline

Bind two buses together.

Parameters
p1First bus to bind to
p2Second bus to bind to

This method will bi-directionally bind two buses together

Definition at line 333 of file Bus.hpp.

Here is the call graph for this function:

◆ bind() [5/8]

void sparta::bind ( Port p1,
Port p2 
)
inline

Bind two ports together.

Parameters
p1First port to bind to
p2Second port to bind to

This method will bi-directionally bind two ports together

Definition at line 680 of file Port.hpp.

Here is the call graph for this function:

◆ bind() [6/8]

void sparta::bind ( Port p1,
Port p2 
)
inline

Bind two ports together.

Parameters
p1First port to bind to
p2Second port to bind to

This method will bi-directionally bind two ports together

Definition at line 703 of file Port.hpp.

Here is the call graph for this function:

◆ bind() [7/8]

void sparta::bind ( Port p1,
Port p2 
)
inline

Bind two ports together.

Parameters
p1First port to bind to
p2Second port to bind to

This method will bi-directionally bind two ports together

Definition at line 691 of file Port.hpp.

Here is the call graph for this function:

◆ bind() [8/8]

void sparta::bind ( Port p1,
Port p2 
)
inline

Bind two ports together.

Parameters
p1First port to bind to
p2Second port to bind to

This method will bi-directionally bind two ports together

Definition at line 667 of file Port.hpp.

Here is the call graph for this function:

◆ byte_swap() [1/9]

template<>
int16_t sparta::byte_swap ( int16_t  val)
inline

Definition at line 109 of file ByteOrder.hpp.

◆ byte_swap() [2/9]

template<>
int32_t sparta::byte_swap ( int32_t  val)
inline

Definition at line 121 of file ByteOrder.hpp.

◆ byte_swap() [3/9]

template<>
int64_t sparta::byte_swap ( int64_t  val)
inline

Definition at line 133 of file ByteOrder.hpp.

◆ byte_swap() [4/9]

template<>
int8_t sparta::byte_swap ( int8_t  val)
inline

Definition at line 97 of file ByteOrder.hpp.

◆ byte_swap() [5/9]

template<typename T >
sparta::byte_swap ( val)
inline

Swaps the order of bytes for various types.

Definition at line 83 of file ByteOrder.hpp.

◆ byte_swap() [6/9]

template<>
uint16_t sparta::byte_swap ( uint16_t  val)
inline

Definition at line 103 of file ByteOrder.hpp.

◆ byte_swap() [7/9]

template<>
uint32_t sparta::byte_swap ( uint32_t  val)
inline

Definition at line 115 of file ByteOrder.hpp.

◆ byte_swap() [8/9]

template<>
uint64_t sparta::byte_swap ( uint64_t  val)
inline

Definition at line 127 of file ByteOrder.hpp.

◆ byte_swap() [9/9]

template<>
uint8_t sparta::byte_swap ( uint8_t  val)
inline

Definition at line 91 of file ByteOrder.hpp.

◆ calculateClockCrossingDelay()

Scheduler::Tick sparta::calculateClockCrossingDelay ( Scheduler::Tick  src_delay,
const Clock src_clk,
Scheduler::Tick  dst_delay,
const Clock dst_clk 
)
inline

Definition at line 395 of file Clock.hpp.

◆ calculateReverseClockCrossingDelay()

Scheduler::Tick sparta::calculateReverseClockCrossingDelay ( Scheduler::Tick  dst_arrival_tick,
Scheduler::Tick  src_delay,
const Clock src_clk,
Scheduler::Tick  dst_delay,
const Clock dst_clk 
)
inline

Definition at line 454 of file Clock.hpp.

◆ computeMask()

template<typename T >
T sparta::computeMask ( size,
T &  lsb_pos 
)
inline

Computes a maks and the lsb-position given a block size. The mask generated can be AND-ed with any number to get a value rounded down to the nearest multiple of size.

Template Parameters
TType of value to compute mask for. Expected to be uint[XX]_t.
Parameters
sizeSize for which the mask and lsbshould be computed.
lsb_posBit position of lsb in mask. A value can be shifted right by this amount to effectively get a "block index" which is the mask / size.
Returns
Mask computed as described

If size = 0, lsb_pos is number of bits in T and mask returned is 0.

Definition at line 160 of file Utils.hpp.

◆ computeMaskShift()

template<typename T >
T sparta::computeMaskShift ( size)
inline

Convenience wrapper around computeMask to get the shift value.

See also
computeMask

This exists so that the shift can be computed in a constructor initialization list.

Definition at line 187 of file Utils.hpp.

Here is the call graph for this function:

◆ convertCPPStringToPython()

std::string sparta::convertCPPStringToPython ( const std::string &  s)
inline

Take all of the C++-isms out of a string (like parens, angle brackets, colons, etc) and replace them with an '_'.

Parameters
sThe string to clean up
Returns
The cleaned up string

Definition at line 307 of file Utils.hpp.

◆ copyWithReplace()

std::string sparta::copyWithReplace ( const std::string &  s,
char  from,
const std::string &  to 
)
inline

Copies from 1 string to another with replacement of a single character with a string.

Result should be moved if possible

Definition at line 282 of file Utils.hpp.

◆ demangle()

std::string sparta::demangle ( const std::string &  name)
inlinenoexcept

Demangles a C++ symbol.

Parameters
NameSymbol name to demangle
Returns
Demangled name if successful. If failed, returns the input name. Note that demangled names may match input name.
Note
Demangling is limited by DEMANGLE_BUF_LENGTH. results may be truncated or fail for very symbols. Change this value to support longer symbol names.

Definition at line 203 of file Utils.hpp.

◆ flipMap()

template<typename K , typename V , typename... Args, template< typename... > class MapType>
MapType< V, K > sparta::flipMap ( const MapType< K, V, Args... > &  map)

Function to invert a maps or an unordered_map, or any type of class that has key/value semantics. The variadic template argument is necessary 'cause map/unordered_map don't have just two template parameters.

Definition at line 93 of file Utils.hpp.

◆ GetFeatureOptions() [1/2]

template<typename T >
std::enable_if< std::is_same< T, app::FeatureConfiguration >::value, constapp::FeatureConfiguration::FeatureOptions * >::type sparta::GetFeatureOptions ( const T &  cfg,
const std::string &  feature_name 
)

Utility in the sparta namespace that gets the named FeatureOptions object from a FeatureConfiguration set

Definition at line 308 of file FeatureConfiguration.hpp.

◆ GetFeatureOptions() [2/2]

template<typename T >
std::enable_if< MetaStruct::is_any_pointer< T >::value, constapp::FeatureConfiguration::FeatureOptions * >::type sparta::GetFeatureOptions ( const T &  cfg,
const std::string &  feature_name 
)

Utility in the sparta namespace which gets the named FeatureOptions object from a FeatureConfiguration which may be null

Definition at line 320 of file FeatureConfiguration.hpp.

Here is the call graph for this function:

◆ getHumanReadableHistogramBinNames() [1/3]

template<typename U >
MetaStruct::enable_if_t< not sparta::is_sparta_enum< U >::value and not sparta::utils::has_ostream_operator< U >::value, void > sparta::getHumanReadableHistogramBinNames ( std::vector< std::string > &  )

Given an enum class type, this method figures out the string.

Definition at line 72 of file EnumCycleHistogram.hpp.

◆ getHumanReadableHistogramBinNames() [2/3]

template<typename U >
MetaStruct::enable_if_t< not sparta::is_sparta_enum< U >::value and sparta::utils::has_ostream_operator< U >::value, void > sparta::getHumanReadableHistogramBinNames ( std::vector< std::string > &  enum_name_strings)

Given an enum class type, this method figures out the string.

Definition at line 49 of file EnumCycleHistogram.hpp.

◆ getHumanReadableHistogramBinNames() [3/3]

template<typename U >
MetaStruct::enable_if_t< sparta::is_sparta_enum< U >::value, void > sparta::getHumanReadableHistogramBinNames ( std::vector< std::string > &  enum_name_strings)

Given an enum class type, this method figures out the string.

Definition at line 79 of file EnumCycleHistogram.hpp.

◆ IsFeatureValueEnabled() [1/2]

template<typename T >
std::enable_if< std::is_same< T, app::FeatureConfiguration >::value, bool >::type sparta::IsFeatureValueEnabled ( const T &  cfg,
const std::string &  feature_name 
)

Utility in the sparta namespace that checks if a feature value has been set to any positive number (0=disabled, >0=enabled)

Definition at line 281 of file FeatureConfiguration.hpp.

◆ IsFeatureValueEnabled() [2/2]

template<typename T >
std::enable_if< MetaStruct::is_any_pointer< T >::value, bool >::type sparta::IsFeatureValueEnabled ( const T &  cfg,
const std::string &  feature_name 
)

Utility in the sparta namespace that asks a FeatureConfiguration if the provided feature is enabled, for a FeatureConfiguration that may be null

Definition at line 295 of file FeatureConfiguration.hpp.

Here is the call graph for this function:

◆ IsFeatureValueEqualTo() [1/2]

template<typename T >
std::enable_if< std::is_same< T, app::FeatureConfiguration >::value, bool >::type sparta::IsFeatureValueEqualTo ( const T &  cfg,
const std::string &  feature_name,
const unsigned int  feature_value 
)

Utility in the sparta namespace that checks a FeatureConfiguration for a specific feature's current value (typically 1=enabled, and 0=disabled, but there could be more feature values too)

Definition at line 253 of file FeatureConfiguration.hpp.

◆ IsFeatureValueEqualTo() [2/2]

template<typename T >
std::enable_if< MetaStruct::is_any_pointer< T >::value, bool >::type sparta::IsFeatureValueEqualTo ( const T &  cfg,
const std::string &  feature_name,
const unsigned int  feature_value 
)

Utility in the sparta namespace that checks for a FeatureConfiguration value, with a FeatureConfiguration that may be null

Definition at line 267 of file FeatureConfiguration.hpp.

Here is the call graph for this function:

◆ isPowerOf2()

bool sparta::isPowerOf2 ( uint64_t  x)
inline

Determines if input is 0 or a power of 2.

Returns
true if number is 0 or a power of 2
Note
Counting set bits is likely the fastest way to do this, though it probably doesn't make a difference if this is just used for checking register sizes during initialization. \warn Do not use this method in performance-critical code until it is faster.

Definition at line 142 of file Utils.hpp.

◆ lexicalCast() [1/8]

template<>
std::string sparta::lexicalCast ( const std::string &  str,
uint32_t  base 
)
inline

Definition at line 100 of file LexicalCast.hpp.

◆ lexicalCast() [2/8]

template<>
bool sparta::lexicalCast ( const std::string &  str,
uint32_t  base 
)
inline

Definition at line 106 of file LexicalCast.hpp.

◆ lexicalCast() [3/8]

template<>
uint64_t sparta::lexicalCast ( const std::string &  str,
uint32_t  base 
)
inline

Definition at line 130 of file LexicalCast.hpp.

◆ lexicalCast() [4/8]

template<>
int64_t sparta::lexicalCast ( const std::string &  str,
uint32_t  base 
)
inline

Definition at line 144 of file LexicalCast.hpp.

◆ lexicalCast() [5/8]

template<>
uint32_t sparta::lexicalCast ( const std::string &  str,
uint32_t  base 
)
inline

Definition at line 158 of file LexicalCast.hpp.

◆ lexicalCast() [6/8]

template<>
int32_t sparta::lexicalCast ( const std::string &  str,
uint32_t  base 
)
inline

Definition at line 176 of file LexicalCast.hpp.

◆ lexicalCast() [7/8]

template<class T >
T sparta::lexicalCast ( const std::string &  str,
uint32_t  base = 10 
)
inlinedelete

Cast string to T where T is either ValueType or (if ValueType is a vector) a vector's value_type.

boost::lexical_cast and ios_base::operator>> fail to determine type of an integer literal. For example, 0xdeadbeef is blindly interpreted as 0 with leftover characters. 070 is interpreted as decimal 70.

This attempts to interpret hex and octal in addition to decimal, and string values.

Exceptions
SpartaExceptionif cast fails.

Definition at line 79 of file LexicalCast.hpp.

◆ lexicalCast() [8/8]

template<class T >
MetaStruct::enable_if_t< MetaStruct::is_stl< T >::value and std::is_same< typename T::value_type, bool >::value, T > sparta::lexicalCast ( const std::string &  str,
uint32_t  base = 10 
)
inlinedelete

Cast string to T where T is either ValueType or (if ValueType is a vector) a vector's value_type.

boost::lexical_cast and ios_base::operator>> fail to determine type of an integer literal. For example, 0xdeadbeef is blindly interpreted as 0 with leftover characters. 070 is interpreted as decimal 70.

This attempts to interpret hex and octal in addition to decimal, and string values.

Exceptions
SpartaExceptionif cast fails.

Definition at line 79 of file LexicalCast.hpp.

◆ notNull()

template<typename T >
T * sparta::notNull ( T *  p)
inline

Ensures that a pointer is not null.

Parameters
pPointer to check
Returns
p unless exception is thrown
Exceptions
SpartaExceptionif pointer is null.

Useful for checking for null in constructor initializer lists which refer to members through object pointers.

Definition at line 224 of file Utils.hpp.

Here is the call graph for this function:

◆ numDecDigits()

uint32_t sparta::numDecDigits ( uint32_t  val)
inline

Gets number of decimal digits in a uint32_t.

Definition at line 190 of file LexicalCast.hpp.

◆ operator!=() [1/5]

bool sparta::operator!= ( const RegisterBase::Definition a,
const RegisterBase::Definition b 
)
inline

Definition at line 1491 of file Register.hpp.

◆ operator!=() [2/5]

bool sparta::operator!= ( const RegisterProxyBase::Definition a,
const RegisterProxyBase::Definition b 
)
inline

Definition at line 126 of file RegisterSet.hpp.

◆ operator!=() [3/5]

template<typename PtrT , typename Ptr2 >
bool sparta::operator!= ( const SpartaSharedPointer< PtrT > &  ptr1,
const SpartaSharedPointer< Ptr2 > &  ptr2 
)
noexcept

Definition at line 539 of file SpartaSharedPointer.hpp.

◆ operator!=() [4/5]

template<typename PtrT >
bool sparta::operator!= ( const SpartaSharedPointer< PtrT > &  ptr1,
std::nullptr_t   
)
noexcept

Definition at line 543 of file SpartaSharedPointer.hpp.

◆ operator!=() [5/5]

template<typename PtrT >
bool sparta::operator!= ( std::nullptr_t  ,
const SpartaSharedPointer< PtrT > &  ptr1 
)
noexcept

Definition at line 547 of file SpartaSharedPointer.hpp.

◆ operator<<() [1/17]

template<class Ch , class Tr >
std::basic_ostream< Ch, Tr > & sparta::operator<< ( std::basic_ostream< Ch, Tr > &  out,
sparta::TreeNode const &  tn 
)
inline

TreeNode stream operator.

Definition at line 180 of file TreeNode.hpp.

◆ operator<<() [2/17]

template<typename T >
std::ostream & sparta::operator<< ( std::ostream &  o,
const AssignOnceObject< T > &  v 
)
inline

Definition at line 567 of file Utils.hpp.

◆ operator<<() [3/17]

std::ostream & sparta::operator<< ( std::ostream &  o,
const NotificationSourceBase::ObservationStateCallback osc 
)
inline

Definition at line 1216 of file NotificationSource.hpp.

◆ operator<<() [4/17]

std::ostream & sparta::operator<< ( std::ostream &  o,
const NotificationSourceBase::ObservationStateCallback osc 
)
inline

Definition at line 1222 of file NotificationSource.hpp.

◆ operator<<() [5/17]

std::ostream & sparta::operator<< ( std::ostream &  o,
const ParameterTree::Node n 
)
inline

Definition at line 1310 of file ParameterTree.hpp.

◆ operator<<() [6/17]

std::ostream & sparta::operator<< ( std::ostream &  o,
const ParameterTree::Node n 
)
inline

Definition at line 1315 of file ParameterTree.hpp.

◆ operator<<() [7/17]

std::ostream & sparta::operator<< ( std::ostream &  o,
const SimulationInfo info 
)
inline

ostream insertion operator for SimulationInfo

Definition at line 492 of file SimulationInfo.hpp.

Here is the call graph for this function:

◆ operator<<() [8/17]

std::ostream & sparta::operator<< ( std::ostream &  os,
const DAG d 
)
inline

Definition at line 228 of file DAG.hpp.

◆ operator<<() [9/17]

std::ostream & sparta::operator<< ( std::ostream &  os,
const DAG d 
)
inline

Definition at line 234 of file DAG.hpp.

◆ operator<<() [10/17]

std::ostream & sparta::operator<< ( std::ostream &  os,
const SchedulingPhase phase 
)
inline

Print the SchedulingPhase.

Parameters
osostream to print to
phaseThe SchedulingPhase to print out
Returns
The ostream

Definition at line 84 of file SchedulingPhases.hpp.

◆ operator<<() [11/17]

std::ostream & sparta::operator<< ( std::ostream &  os,
const sparta::Clock clk 
)
inline

Definition at line 372 of file Clock.hpp.

◆ operator<<() [12/17]

template<typename PtrT >
std::ostream & sparta::operator<< ( std::ostream &  os,
const SpartaSharedPointer< PtrT > &  p 
)

Definition at line 551 of file SpartaSharedPointer.hpp.

◆ operator<<() [13/17]

std::ostream & sparta::operator<< ( std::ostream &  os,
const Tag tag 
)
inline

<<(): Stream insertion operator

Parameters
osOutput stream
tagTag to output
Returns
std::ostream&

Definition at line 166 of file Tag.hpp.

◆ operator<<() [14/17]

std::ostream & sparta::operator<< ( std::ostream &  os,
const Tag tag 
)
inline

<<(): Stream insertion operator (for Tag pointers)

Parameters
osOutput stream
tagTag pointer to de-reference and output
Returns
std::ostream&

Definition at line 180 of file Tag.hpp.

◆ operator<<() [15/17]

std::ostream & sparta::operator<< ( std::ostream &  out,
sparta::StatisticInstance const &  si 
)
inline

StatisticInstance stream operator.

Definition at line 719 of file StatisticInstance.hpp.

Here is the call graph for this function:

◆ operator<<() [16/17]

std::ostream & sparta::operator<< ( std::ostream &  out,
sparta::StatisticInstance const *  si 
)
inline

TreeNode stream operator.

Definition at line 726 of file StatisticInstance.hpp.

Here is the call graph for this function:

◆ operator<<() [17/17]

std::ostream & sparta::operator<< ( std::ostream &  out,
sparta::TreeNode const *  tn 
)
inline

TreeNode stream operator.

Definition at line 4548 of file TreeNode.hpp.

Here is the call graph for this function:

◆ operator==() [1/5]

bool sparta::operator== ( const RegisterBase::Definition a,
const RegisterBase::Definition b 
)
inline

Definition at line 1432 of file Register.hpp.

◆ operator==() [2/5]

bool sparta::operator== ( const RegisterProxyBase::Definition a,
const RegisterProxyBase::Definition b 
)
inline

Definition at line 101 of file RegisterSet.hpp.

◆ operator==() [3/5]

template<typename PtrT , typename Ptr2 >
bool sparta::operator== ( const SpartaSharedPointer< PtrT > &  ptr1,
const SpartaSharedPointer< Ptr2 > &  ptr2 
)
noexcept

Definition at line 527 of file SpartaSharedPointer.hpp.

◆ operator==() [4/5]

template<typename PtrT >
bool sparta::operator== ( const SpartaSharedPointer< PtrT > &  ptr1,
std::nullptr_t   
)
noexcept

Definition at line 531 of file SpartaSharedPointer.hpp.

◆ operator==() [5/5]

template<typename PtrT >
bool sparta::operator== ( std::nullptr_t  ,
const SpartaSharedPointer< PtrT > &  ptr1 
)
noexcept

Definition at line 535 of file SpartaSharedPointer.hpp.

◆ operator>>() [1/27]

template<class ScheduleableType >
std::enable_if< std::is_base_of< Scheduleable, ScheduleableType >::value, ScheduleableType >::type & sparta::operator>> ( Bus producer,
ScheduleableType &  consumer 
)

Place a precedence between a Bus and a Scheduleable.

Parameters
producerThe Bus to succeed a Scheduleable
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

my_outgoing_bus >> ev_tick;

Definition at line 995 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [2/27]

const EventGroup & sparta::operator>> ( const EventGroup producers,
const EventGroup consumers 
)
inline

This template supports the following:

Parameters
producersGroup of Scheduleables that must come before each of the consumers in the EventGroup
consumersGroup of Scheduleables that must come after each of the producers in the EventGroup
sparta::EventGroup( ProdEvent1, ProdEvent2, ProdEvent3, ... )
>> sparta::EventGroup( ConsEvent1, ConsEvent2, ConsEvent3, ... );
Group a series of events together for precedence establishment.

Where each consuming event is preceded by each producing event. The consuming and producing events are still independent of each other.

Definition at line 1188 of file Precedence.hpp.

◆ operator>>() [3/27]

template<class ScheduleableTypeB >
ScheduleableTypeB & sparta::operator>> ( const EventGroup producers,
ScheduleableTypeB &  consumer 
)

This template supports the following:

Parameters
producersGroup of Scheduleables that must come before the given consumer
consumerThe Scheduleable that succeed each of the Scheduleables in the EventGroup
sparta::EventGroup(ProEvent1, ProEvent2, ProEvent3, ...) >> ConsEvent;

Where the consuming event is preceded by each producing event. The producing events are still independent.

Definition at line 1144 of file Precedence.hpp.

◆ operator>>() [4/27]

InPort & sparta::operator>> ( const GlobalOrderingPoint producer,
InPort consumer 
)
inline

Place a precedence between a GlobalOrderingPoint and an InPort.

Methods used for precedence have access to the internal scheduleable.

Parameters
producerThe GlobalOrderingPoint to succeed the ScheduleableType
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a GlobalOrderingPoint on the LHS preceding a InPort and ensures the two events are within the same phase.

GlobalOrderingPoint(node, "gop") >> InPort
Used to set precedence between Scheduleable types across simulation.
Base class for all InPort types.
Definition Port.hpp:297

Definition at line 206 of file Precedence.hpp.

◆ operator>>() [5/27]

template<class ScheduleableTypeA >
std::enable_if< std::is_base_of< EventNode, ScheduleableTypeA >::value, ScheduleableTypeA >::type & sparta::operator>> ( const GlobalOrderingPoint producer,
ScheduleableTypeA &  consumer 
)

Place a precedence between a Scheduleable object and a GlobalOrderingPoint.

Parameters
producerThe GlobalOrderingPoint to succeed the ScheduleableType
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a GlobalOrderingPoint on the LHS preceding a Scheduleable type and ensures the two events are within the same phase.

Event is a simple class for scheduling random events on the Scheduler.
Definition Event.hpp:42
Class to schedule a Scheduleable in the future with a payload, typed on both the data type and the sc...
An event that can only be schedule one cycle into the future.
A type of Event that uniquely schedules itself on the schedule within a single time quantum....

Definition at line 173 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [6/27]

template<SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & sparta::operator>> ( Event< PayloadPhaseT1 > &  producer,
PayloadEvent< DataT2, PayloadPhaseT2 > &  consumer 
)

Place a precedence between a Event and an PayloadEvent.

Parameters
producerThe Event to succeed a PayloadEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 523 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [7/27]

template<SchedulingPhase PhaseT1, SchedulingPhase PhaseT2>
Event< PhaseT2 > & sparta::operator>> ( Event< PhaseT1 > &  producer,
Event< PhaseT2 > &  consumer 
)

Place a precedence between a Event and another Event.

Parameters
producerThe Event to succeed a Event
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 720 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [8/27]

template<class EventT1 , class EventT2 >
std::unique_ptr< EventT2 > & sparta::operator>> ( EventT1 &  producer,
std::unique_ptr< EventT2 > &  consumer 
)

Place a precedence between an EventT1 and std::unique_ptr<EventT2>

Parameters
producerThe EventT1 to succeed a EventT2
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

EventT1 >> std::unique_ptr<EventT2>;

Definition at line 798 of file Precedence.hpp.

◆ operator>>() [9/27]

const GlobalOrderingPoint & sparta::operator>> ( InPort producer,
const GlobalOrderingPoint consumer 
)
inline

Place a precedence between a Scheduleable object and a GlobalOrderingPoint.

Parameters
producerThe GlobalOrderingPoint to succeed the ScheduleableType
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a InPort on the LHS preceding a GlobalOrderingPoint (which is a Vertex type) and ensures the two events are within the same phase.

InPort >> GlobalOrderingPoint(node, "gop");

Definition at line 238 of file Precedence.hpp.

◆ operator>>() [10/27]

template<class DataT1 , SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
Event< PayloadPhaseT2 > & sparta::operator>> ( PayloadEvent< DataT1, PayloadPhaseT1 > &  producer,
Event< PayloadPhaseT2 > &  consumer 
)

Place a precedence between a PayloadEvent and an Event.

Parameters
producerThe PayloadEvent to succeed an Event
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 409 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [11/27]

template<class DataT1 , SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & sparta::operator>> ( PayloadEvent< DataT1, PayloadPhaseT1 > &  producer,
PayloadEvent< DataT2, PayloadPhaseT2 > &  consumer 
)

Place a precedence between a PayloadEvent and another PayloadEvent.

Parameters
producerThe PayloadEvent to succeed another PayloadEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 295 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [12/27]

template<class DataT1 , SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
SingleCycleUniqueEvent< PayloadPhaseT2 > & sparta::operator>> ( PayloadEvent< DataT1, PayloadPhaseT1 > &  producer,
SingleCycleUniqueEvent< PayloadPhaseT2 > &  consumer 
)

Place a precedence between a PayloadEvent and SingleCycleUniqueEvent.

Parameters
producerThe PayloadEvent to succeed SingleCycleUniqueEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 371 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [13/27]

template<class DataT1 , SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
UniqueEvent< PayloadPhaseT2 > & sparta::operator>> ( PayloadEvent< DataT1, PayloadPhaseT1 > &  producer,
UniqueEvent< PayloadPhaseT2 > &  consumer 
)

Place a precedence between a PayloadEvent and UniqueEvent.

Parameters
producerThe PayloadEvent to succeed UniqueEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 333 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [14/27]

template<class DataT1 , SchedulingPhase phase>
Scheduleable & sparta::operator>> ( PayloadEvent< DataT1, phase > &  producer,
Scheduleable consumer 
)

Place a precedence between a PayloadEvent and a Scheduleable.

Parameters
producerThe PayloadEvent to succeed a Scheduleable
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

A class that defines the basic scheduling interface to the Scheduler. Not intended to be used by mode...

Definition at line 907 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [15/27]

template<class DataT2 , SchedulingPhase phase>
PayloadEvent< DataT2, phase > & sparta::operator>> ( Scheduleable producer,
PayloadEvent< DataT2, phase > &  consumer 
)

Place a precedence between a Scheduleable and a PayloadEvent.

Parameters
producerThe Scheduleable to succeed the PayloadEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 870 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [16/27]

Scheduleable & sparta::operator>> ( Scheduleable producer,
Scheduleable consumer 
)
inline

Definition at line 625 of file Scheduleable.hpp.

◆ operator>>() [17/27]

template<class ScheduleableType >
std::enable_if< std::is_base_of< Scheduleable, ScheduleableType >::value, Bus >::type & sparta::operator>> ( ScheduleableType &  producer,
Bus consumer 
)

Place a precedence between a Scheduleable and a Bus.

Parameters
producerThe Scheduleable to succeed a Bus
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

ev_tick >> my_outgoing_bus;

Definition at line 953 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [18/27]

template<class ScheduleableTypeA >
const EventGroup & sparta::operator>> ( ScheduleableTypeA &  producer,
const EventGroup consumers 
)

This template supports the following:

Parameters
producerThe Scheduleable that precedes each of the Scheduleables in the EventGroup
consumerGroup of Scheduleables that must come after the given producer
ProEvent1 >> sparta::EventGroup(ConsEvent1, ConsEvent2, ConsEvent3, ... );

Where each consuming event is preceded by the single producing event. The consuming events are still independent.

Definition at line 1165 of file Precedence.hpp.

◆ operator>>() [19/27]

template<class ScheduleableTypeA >
std::enable_if< std::is_base_of< EventNode, ScheduleableTypeA >::value, constGlobalOrderingPoint >::type & sparta::operator>> ( ScheduleableTypeA &  producer,
const GlobalOrderingPoint consumer 
)

Place a precedence between a Scheduleable object and a GlobalOrderingPoint.

Parameters
producerThe producer (LHS) must come before consumer (RHS)
consumerThe GlobalOrderingPoint (Vertex type) to succeed the ScheduleableType
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable on the LHS preceding a GlobalOrderingPoint point and ensures the two events are within the same phase.

Definition at line 138 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [20/27]

template<SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & sparta::operator>> ( SingleCycleUniqueEvent< PayloadPhaseT1 > &  producer,
PayloadEvent< DataT2, PayloadPhaseT2 > &  consumer 
)

Place a precedence between a PayloadEvent and an SingleCycleUniqueEvent.

Parameters
producerThe SingleCycleUniqueEvent to succeed a PayloadEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 485 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [21/27]

template<SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
UniqueEvent< PayloadPhaseT2 > & sparta::operator>> ( SingleCycleUniqueEvent< PayloadPhaseT1 > &  producer,
UniqueEvent< PayloadPhaseT2 > &  consumer 
)

Place a precedence between a SingleCycleUniqueEvent and an UniqueEvent.

Parameters
producerThe SingleCycleUniqueEvent to succeed an UniqueEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 642 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [22/27]

template<SchedulingPhase PhaseT1, SchedulingPhase PhaseT2>
SingleCycleUniqueEvent< PhaseT2 > & sparta::operator>> ( SingleCycleUniqueEvent< PhaseT1 > &  producer,
SingleCycleUniqueEvent< PhaseT2 > &  consumer 
)

Place a precedence between a SingleCycleUniqueEvent and a SingleCycleUniqueEvent.

Parameters
producerThe SingleCycleUniqueEvent to succeed a SingleCycleUniqueEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 681 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [23/27]

template<class EventT1 , class EventT2 >
EventT2 & sparta::operator>> ( std::unique_ptr< EventT1 > &  producer,
EventT2 &  consumer 
)

Place a precedence between a std::unique_ptr<EventT1> and EventT2.

Parameters
producerThe EventT1 to succeed a EventT2
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

std::unique_ptr<EventT1> >> EventT2;

Definition at line 832 of file Precedence.hpp.

◆ operator>>() [24/27]

template<class EventT1 , class EventT2 >
std::unique_ptr< EventT2 > & sparta::operator>> ( std::unique_ptr< EventT1 > &  producer,
std::unique_ptr< EventT2 > &  consumer 
)

Place a precedence between a std::unique_ptr<EventT1> and another std::unique_ptr<EventT2>

Parameters
producerThe EventT1 to succeed a EventT2
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

std::unique_ptr<EventT1> >> std::unique_ptr<EventT2>;

Definition at line 763 of file Precedence.hpp.

◆ operator>>() [25/27]

template<SchedulingPhase PayloadPhaseT1, class DataT2 , SchedulingPhase PayloadPhaseT2>
PayloadEvent< DataT2, PayloadPhaseT2 > & sparta::operator>> ( UniqueEvent< PayloadPhaseT1 > &  producer,
PayloadEvent< DataT2, PayloadPhaseT2 > &  consumer 
)

Place a precedence between a PayloadEvent and an UniqueEvent.

Parameters
producerThe UniqueEvent to succeed a PayloadEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 447 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [26/27]

template<SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
SingleCycleUniqueEvent< PayloadPhaseT2 > & sparta::operator>> ( UniqueEvent< PayloadPhaseT1 > &  producer,
SingleCycleUniqueEvent< PayloadPhaseT2 > &  consumer 
)

Place a precedence between a UniqueEvent and an SingleCycleUniqueEvent.

Parameters
producerThe UniqueEvent to succeed a SingleCycleUniqueEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 605 of file Precedence.hpp.

Here is the call graph for this function:

◆ operator>>() [27/27]

template<SchedulingPhase PayloadPhaseT1, SchedulingPhase PayloadPhaseT2>
UniqueEvent< PayloadPhaseT2 > & sparta::operator>> ( UniqueEvent< PayloadPhaseT1 > &  producer,
UniqueEvent< PayloadPhaseT2 > &  consumer 
)

Place a precedence between a UniqueEvent and an UniqueEvent.

Parameters
producerThe UniqueEvent to succeed a UniqueEvent
consumerThe producer (LHS) must come before consumer (RHS)
Returns
The consumer
Note
This function returns the consumer (RHS) of the operation instead of the producer (LHS). This is opposite of typical behavior of >> operators.

Place a precedence on a producer to the consumer. The consumer is returned, not the producer. This is to allow chaining:

my_producer_event_ >> my_consumer_event_ >> my_event_following_consumption_;

This implementation of the precedence operator catches a Scheduleable/EventNode on the LHS preceding another and ensures the two events are within the same phase.

Definition at line 568 of file Precedence.hpp.

Here is the call graph for this function:

◆ reorder() [1/2]

template<typename T , enum ByteOrder BO>
std::enable_if< std::is_same< boost::mpl::int_< BO >, boost::mpl::int_< BE > >::value, T >::type sparta::reorder ( const T &  t)
inline

Takes a value of type T from native byte order to the designed byte order Specialization for Big-Endian

Definition at line 143 of file ByteOrder.hpp.

◆ reorder() [2/2]

template<typename T , enum ByteOrder BO>
std::enable_if< std::is_same< boost::mpl::int_< BO >, boost::mpl::int_< LE > >::value, T >::type sparta::reorder ( const T &  t)
inline

Takes a value of type T from native byte order to the designed byte order Specialization for Little-Endian

Definition at line 152 of file ByteOrder.hpp.

◆ replaceSubstring()

uint32_t sparta::replaceSubstring ( std::string &  s,
const std::string &  from,
const std::string &  to 
)
inline

Replaces within a string 's' all instances of some string 'from' with 'to'.

Parameters
sString to perform replacement on
fromString to replace with <to>
toString to replace all instances of <from> with.
Returns
Number of replacements
Note
This can resize the string if from and to are different lengths.

Replaces based on found instances of <from> starting from position 0. After replacing, the loop advances to the end of the replaced text and continues there. Characters inserted from <to> will never be matched as part of a <from>

Definition at line 265 of file Utils.hpp.

◆ smartLexicalCast()

template<typename T >
T sparta::smartLexicalCast ( const ParameterBase p,
const std::string &  s,
size_t &  end_pos,
bool  allow_recursion = true,
bool  allow_prefix = true 
)
inline

smartLexicalCast wrapper with parameter information added to exceptions

Definition at line 2551 of file Parameter.hpp.

Here is the call graph for this function:

◆ toLower()

std::string sparta::toLower ( const std::string &  s)
inline

Makes a copy of an input string s in lower-case.

Definition at line 341 of file Utils.hpp.

◆ writeNChars()

void sparta::writeNChars ( std::ostream &  out,
uint32_t  num,
char  chr = ' ' 
)
inline

Insert a number of some character into an ostream.

Definition at line 332 of file Utils.hpp.

Variable Documentation

◆ NUM_SCHEDULING_PHASES

const uint32_t sparta::NUM_SCHEDULING_PHASES
Initial value:
=
static_cast<uint32_t>(SchedulingPhase::__last_scheduling_phase)

The number of phases.

Definition at line 75 of file SchedulingPhases.hpp.