The Sparta Modeling Framework
Loading...
Searching...
No Matches
Sparta API

Sparta Application APIs (sparta/app)

Class Brief Description
AppTriggers.hpp Set of classes used to trigger various behaviors
sparta::app::Backtrace Backtrace printer. Registers a handler for certain fatal signals and dumps the backtrace if they occur.  
sparta::app::CommandLineSimulator Command line simulator front-end class with argument parsing Works in conjunction with sparta::app::Simulation.  
ConfigApplicators.hpp Grouping of classes to apply configurations to sparta::ParameterSet, etc
sparta::app::FeatureConfiguration Collection of named feature values.  
sparta::app::MultiDetailOptions Class for containing multiple levels of boost program options.  
sparta::app::ReportDescriptor Describes one or more report to instantiate.  
sparta::app::Simulation Simulator which builds a sparta DeviceTree.  
sparta::app::SimulationConfiguration Configuration applicator class that is used for configuring a simulator. Works in conjunction with sparta::app::Simulation.  
sparta::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.  

Sparta Events API (sparta/events)

Class Brief Description
sparta::AsyncEvent In a multi-threaded sim environment, this event is used to schedule an event asynchronously.  
sparta::Event Event is a simple class for scheduling random events on the Scheduler.  
sparta::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.  
sparta::EventSet Set of Events that a unit (or sparta::TreeNode, sparta::Resource) contains and are visible through a sparta Tree.  
sparta::GlobalEvent A type of "global" reusable event.  
sparta::GlobalOrderingPoint Used to set precedence between Scheduleable types across simulation.    
sparta::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.  
sparta::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.  
sparta::PhasedSingleCycleUniqueEvent An event that can only be schedule one cycle into the future.  
sparta::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.  
Precedence A series of operator>> methods for event precedence.
sparta::Scheduleable A class that defines the basic scheduling interface to the Scheduler. Not intended to be used by modelers directly, but certainly can be.  
sparta::SchedulingPhase The SchedulingPhases used for events (Tick, Update, PortUpdate, etc)  
sparta::SingleCycleUniqueEvent An event that can only be schedule one cycle into the future.  
sparta::StartupEvent StartupEvent is a simple class for scheduling a starting event on the Scheduler. It does not support precedence.  
sparta::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.  

Sparta Resources (sparta/resources)

Class Brief Description
sparta::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.  
sparta::Buffer A data structure allowing appending at the end, beginning, or middle, but erase anywhere with collapse.  
sparta::CircularBuffer A data structure allowing appending at the end, beginning, or insert in the middle, but erase anywhere with collapse.  
sparta::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.  
sparta::Pipe A very simple pipe, not part of the DES paradigm.  
sparta::Pipeline A simple pipeline.  
sparta::PriorityQueue A data structure that allows pushing/emplacing into it with a given sorter.  
sparta::Queue A data structure that allows appending at the back and invalidating from the front.  
sparta::Scoreboard Class used to track operand dependencies (timed) between units.  
sparta::SharedData Class that allows the writing of data this cycle, but not visable until next cycle.  

Sparta Ports API (sparta/ports)

Class Brief Description
sparta::Bus Class that defines a Bus type.  
sparta::DataInPort DataInPort receives data from sender using a DataOutPort.  
sparta::DataOutPort DataOutPort is used for transferring any data to another module.  
sparta::ExportedPort Class that "exports" a port that's contained in the same ResourceTreeNode structure.  
sparta::Port The port interface used to bind port types together and defines a port behavior.  
sparta::PortSet A TreeNode that represents a set of ports used by a Resource.  
sparta::SignalInPort SignalInPort receives data from sender using a SignalOutPort.  
sparta::SignalOutPort SignalOutPort is used for transferring a simple signal to another module.  
sparta::SyncInPort Class that defines an synchronized input port on modules on two different clocks.  
sparta::SyncOutPort Class that defines a synchronized SyncOutPort for data writes on different clocks.  

Sparta Statistics/Counter API (sparta/statistics)

Class Brief Description
sparta::ContextCounter A container type that allows a modeler to build, store, and charge counts to a specific context.  
sparta::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.  
sparta::CounterBase The base class for all Counters.  
sparta::CycleCounter Represents a cycle counter.  
sparta::CycleHistogramTreeNode Also known as sparta::CycleHistogram: CycleHistogramTreeNode class for uint64_t values.  
sparta::EnumCycleHistogram EnumCycleHistogram class for C++ Enum values.  
sparta::EnumHistogram EnumHistogram class for sparta::utils::Enum.  
sparta::statistics::expression::Expression Expression container/builder. Contains a single ExpressionNode representing the root of an expression tree. This is the object on which the parser operates to build an expression incrementally through basic operators.  
sparta::HistogramTreeNode Also known as a sparta::Histogram,  
sparta::InstrumentationNode Base class requiring.  
sparta::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.  
sparta::StateHistogram StateHistogram class for uint64_t values.  
sparta::StatisticDef Contains a statistic definition (some useful information which can be computed)  
sparta::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.  
sparta::StatisticSet Set of StatisticDef and CounterBase-derived objects for visiblility through a sparta Tree.  

Sparta Collection APIs (sparta/collection)

These classes are used to collect pipeline information for Argos consumption.

Class Brief Description
sparta::collection::Collectable Class used to either manually or auto-collect an Annotation String object in a pipeline database.  
sparta::collection::CollectableTreeNode An abstract type of TreeNode that has virtual calls to start collection on this node, and stop collection on this node.  
sparta::collection::Collector A non-templated base class that all Collectors should inherit from.  
sparta::collection::DelayedCollectable Class used to record data in pipeline collection, but recorded in a delayed fashion.  
sparta::collection::IterableCollector A collector of any iterable type (std::vector, std::list, sparta::Buffer, etc)  
sparta::collection::PipelineCollector A class that facilitates all universal pipeline collection operations such as outputting finalized records, generating unique transaction Id's, maintaining heartbeat functionality, writing the location file, writing the clock file.  

Sparta for Functional Modeling (sparta/functional)

Class Brief Description
sparta::ArchDataContainer Container class for any number of ArchData pointers owned externally.  
sparta::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.  
sparta::DataView View into a backend block of memory in an ArchData.  
sparta::RegisterBankTable Container of register banks as a helper for RegisterSet. Instances of this class will be owned by a single RegisterSet.  
sparta::RegisterDefinitionSet  
sparta::Register An implementation of a RegisterBase.  
sparta::RegisterSet Holds and can create a set of Register objects having various names and groups.  

Sparta Memory Interface APIs (sparta/memory)

Class Brief Description
sparta::memory::BlockingMemoryIF Pure-virtual memory interface which represents a simple, immediately accessible (blocking) address-space with meaningful read and write accees support. Partially implements DebugMemoryIF, which adds peek and poke support as well as access addr and size validation.  
sparta::memory::BlockingMemoryIFNode Pure-virtual memory interface that builds on the BlockingMemoryIF, acting as a TreeNode in the SPARTA device tree through which clients such as tools and UIs can discover and interact with the interface. Includes SPARTA Tree notification support, and sparta::Counter representation of access statistics.  
sparta::memory::DMIBlockingMemoryIF Class that provides a BlockingMemoryIF over a raw pointer.  
sparta::memory::DebugMemoryIF Memory interface which represents a simple, immediately accessible (blocking) address-space with support for peek and poke acceeses having no side effects other than changing the desired memory.  
MemoryExceptions sparta::memory::MemoryTranslationError, sparta::memory::MemoryAccessError, sparta::memory::MemoryReadError, sparta::memory::MemoryWriteError, sparta::memory::MemoryPeekError, sparta::memory::MemoryPokeError
sparta::memory::MemoryObject Memory object with sparse storage for large memory representations. Has direct read/write interface within blocks. Checkpointable.  
sparta::memory::SimpleMemoryMap Memory mapping object which maps addresses onto block-aligned destinations, each of which is a BlockingMemoryIF object. This method does not actually support memory accesses, only mapping and querying.  
sparta::memory::SimpleMemoryMapNode Memory mapping object which implements BlockingMemoryIFNode. Supports a simple mapping of incoming addresses to addresses within a set of destination BlockingMemoryIFs.  
sparta::memory::Translation An older class used to help in encapsulate read/virtual addresses.  
sparta::memory::TranslationIF Blocking translation interface with 1:1 translation unless subclassed.  
sparta::memory::TranslationIFNode TranslationIF extension that builds on TranslastionIF, acting as a TreeNode in the SPARTA device tree through which clients such as tools and UIs can discover and interact with the interface.  

Sparta PEvents (Performance Events) (sparta/pevents)

Class Brief Description
sparta::pevents::PeventCollector Class that is capable of recording pevents as key value pairs, where a PairDefinition has been defined with the key values, and function pointers to where to get the data for the pairs.  

Sparta Utilities/Tools APIs (sparta/utils)

Utility Brief Description
sparta::utils::BoundedValue This class allows a developer to bound a value within an upper and lower value.  
sparta::utils::BitArray Class for fast bit manipulation.  
Bits.hpp Some "count leading 1s" tools
sparta::utils::BoundedValue This class allows a developer to bound a value within an upper and lower value.  
ByteOrder.hpp Tools to help with LE vs BE machines
Colors.hpp, sparta::color::ColorScheme Handy #defines for colors. Accessor methods for obtaining color code strings.  
sparta::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.  
DetectMemberUtils.hpp Compile-time SFINAE techniques to detect presence of operators, member-fields and methods by name in any class
sparta::utils::Enum Class that wraps a C++ class enum and allows conversion between POD and the enum type. Also provides strings for them.  
File.hpp Utilities for File I/O
sparta::KeyValue The type-to-type name map. Not really necessary, but useful.  
LexicalCast.hpp Methods for fancy casting operations
sparta::utils::LifeTracker A class that will track the lifetime of the object it points to.  
sparta::utils::LockedValue Provides a wrapper around a value to ensure that once the value is frozen or locked, it cannot be overwritten again.  
LogUtils.hpp Set of macros to simplify printing to sparta:Unit loggers
MathUtils.hpp Lots and lots and lots of math utils for use.
MetaStructs.hpp Structs to extend C++ meta-tools like enable_if and what-not
MetaTypeList.hpp Types to extend c++ meta-types
Printing.hpp Handy utils for printing std::vector etc
sparta::utils::Rational Class to represent a Rational number.  
SmartLexicalCast.hpp Smart lexical casting supporting prefixes, separator ignoring, and suffixes.
SpartaAssert.hpp Set of macros for Sparta assertions. Caught by the framework
sparta::SpartaException Used to construct and throw a standard C++ exception. Inherits from std::exception.  
SpartaExpBackoff.hpp Macros for handling exponential backoff
sparta::SpartaSharedPointer Used for garbage collection, will delete the object it points to when all objects are finished using it.  
sparta::SpartaWeakPointer Like in STL, create a weak pointer to a SpartaSharedPointer.  
sparta::SpartaSharedPointerAllocator A memory allocator complementing SpartaSharedPointer that reuses old memory.  
sparta::SpartaTester A simple testing class.  
sparta::StringManager Manages string internment for SPARTA. This allows strings to be compared by pointer once interned.  
StringUtils.hpp Set of handy functions for string manipulations.
sparta::SysCSpartaSchedulerAdapter Class that "connects" Sparta to SystemC.  
sparta::Tag Tag(): Simple class to provide nested sequence numbering.  
sparta::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.  
sparta::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.  
Traits.hpp File that defines compile-time queries on data types. Extends c++11+'s trait types
TupleHashCompute.hpp Extends map's hashing to include tuples
Utils.hpp Lots and lots of utilities (I know, not helpful)
sparta::utils::ValidValue Provides a wrapper around a value to ensure that the value is assigned.  
VectorUtils.hpp Lots of vector utils to extend vector