|
sys-sage
|
#include <Component.hpp>
Public Member Functions | |
| Cache (int _id=0, int _cache_level=0, long long _cache_size=-1, int _associativity=-1, int _cache_line_size=-1) | |
| Cache (Component *parent, int _id, string _cache_type, long long _cache_size=0, int _associativity=-1, int _cache_line_size=-1) | |
| Cache (Component *parent, int _id=0, int _cache_level=0, long long _cache_size=-1, int _associativity=-1, int _cache_line_size=-1) | |
| int | GetCacheLevel () |
| void | SetCacheLevel (int _cache_level) |
| string | GetCacheName () |
| void | SetCacheName (string _name) |
| long long | GetCacheSize () |
| void | SetCacheSize (long long _cache_size) |
| int | GetCacheAssociativityWays () |
| void | SetCacheAssociativityWays (int _associativity) |
| int | GetCacheLineSize () |
| void | SetCacheLineSize (int _cache_line_size) |
| long long | GetMIGSize (string uuid="") |
Public Member Functions inherited from Component | |
| Component (int _id=0, string _name="unknown", int _componentType=SYS_SAGE_COMPONENT_NONE) | |
| Component (Component *parent, int _id=0, string _name="unknown", int _componentType=SYS_SAGE_COMPONENT_NONE) | |
| void | InsertChild (Component *child) |
| int | InsertBetweenParentAndChild (Component *parent, Component *child, bool alreadyParentsChild) |
| int | InsertBetweenParentAndChildren (Component *parent, vector< Component * > children, bool alreadyParentsChild) |
| int | RemoveChild (Component *child) |
| void | SetParent (Component *parent) |
| void | PrintSubtree () |
| void | PrintAllDataPathsInSubtree () |
| string | GetName () |
| void | SetName (string _name) |
| int | GetId () |
| int | GetComponentType () |
| string | GetComponentTypeStr () |
| vector< Component * > * | GetChildren () |
| Component * | GetParent () |
| Component * | GetChild (int _id) |
| Component * | GetChildById (int _id) |
| Component * | GetChildByType (int _componentType) |
| vector< Component * > | GetAllChildrenByType (int _componentType) |
| void | GetAllChildrenByType (vector< Component * > *_outArray, int _componentType) |
| Component * | FindSubcomponentById (int _id, int _componentType) |
| Component * | GetSubcomponentById (int _id, int _componentType) |
| void | GetAllSubcomponentsByType (vector< Component * > *outArray, int _componentType) |
| vector< Component * > | GetAllSubcomponentsByType (int _componentType) |
| int | CountAllSubcomponents () |
| int | CountAllSubcomponentsByType (int _componentType) |
| int | CountAllChildrenByType (int _componentType) |
| Component * | GetAncestorByType (int _componentType) |
| int | GetNumThreads () |
| int | GetSubtreeDepth () |
| Component * | GetNthAncestor (int n) |
| void | GetNthDescendents (vector< Component * > *outArray, int depth) |
| vector< Component * > | GetNthDescendents (int depth) |
| void | GetSubcomponentsByType (vector< Component * > *outArray, int componentType) |
| vector< Component * > | GetSubcomponentsByType (int _componentType) |
| void | GetComponentsInSubtree (vector< Component * > *outArray) |
| vector< Component * > | GetComponentsInSubtree () |
| vector< DataPath * > * | GetDataPaths (int orientation) |
| DataPath * | GetDataPathByType (int dp_type, int orientation) |
| void | GetAllDataPathsByType (vector< DataPath * > *outDpArr, int dp_type, int orientation) |
| vector< DataPath * > | GetAllDataPathsByType (int dp_type, int orientation) |
| int | CheckComponentTreeConsistency () |
| Checks the consistency of the component tree starting from this component. | |
| int | GetTopologySize (unsigned *out_component_size, unsigned *out_dataPathSize) |
| int | GetDepth (bool refresh) |
| void | DeleteDataPath (DataPath *dp) |
| void | DeleteAllDataPaths () |
| void | DeleteSubtree () |
| void | Delete (bool withSubtree=true) |
Additional Inherited Members | |
Public Attributes inherited from Component | |
| std::map< std::string, void * > | attrib |
Protected Attributes inherited from Component | |
| int | id |
| int | depth |
| string | name |
| int | count {-1} |
| const int | componentType |
| vector< Component * > | children |
| Component * | parent { nullptr } |
| vector< DataPath * > | dp_incoming |
| vector< DataPath * > | dp_outgoing |
Class Cache - represents a data cache memories in the system (of different levels/purposes).
This class is a child of Component class, therefore inherits its attributes and methods.
| Cache::Cache | ( | int | _id = 0, |
| int | _cache_level = 0, | ||
| long long | _cache_size = -1, | ||
| int | _associativity = -1, | ||
| int | _cache_line_size = -1 ) |
Cache constructor (no automatic insertion in the Component Tree). Sets:
| _id | = id, default 0 |
| _cache_level | - (int) cache level (1=L1, 2=L2, ...), default 0. This value is represented as a cahce_type, i.e. either one of int cache_level or string cache_type can be used. |
| _cache_size | - size of the cache (Bytes), default 0 |
| _associativity | - number of cache associativity ways, default -1 |
| _cache_line_size | - size of a cache line (Bytes), default -1 |
| componentType=>SYS_SAGE_COMPONENT_CACHE |
| Cache::Cache | ( | Component * | parent, |
| int | _id, | ||
| string | _cache_type, | ||
| long long | _cache_size = 0, | ||
| int | _associativity = -1, | ||
| int | _cache_line_size = -1 ) |
Cache constructor with insertion into the Component Tree as the parent 's child (as long as parent is an existing Component). Sets:
| parent | = the parent |
| _id | = id, default 0 |
| _cache_type | - (string) name/type of the cache (constant, textture, L1, ...). Only one of (int) cache_level or (string) cache_type can be used. |
| _cache_size | - size of the cache (Bytes), default 0 |
| _associativity | - number of cache associativity ways, default -1 |
| _cache_line_size | - size of a cache line (Bytes), default -1 |
| componentType=>SYS_SAGE_COMPONENT_CACHE |
| Cache::Cache | ( | Component * | parent, |
| int | _id = 0, | ||
| int | _cache_level = 0, | ||
| long long | _cache_size = -1, | ||
| int | _associativity = -1, | ||
| int | _cache_line_size = -1 ) |
Cache constructor with insertion into the Component Tree as the parent 's child (as long as parent is an existing Component). Sets:
| parent | = the parent |
| _id | = id, default 0 |
| _cache_level | - (int) cache level (1=L1, 2=L2, ...), default 0. This value is represented as a cahce_type, i.e. either one of int cache_level or string cache_type can be used. |
| _cache_size | - size of the cache (Bytes), default 0 |
| _associativity | - number of cache associativity ways, default -1 |
| _cache_line_size | - size of a cache line (Bytes), default -1 |
| componentType=>SYS_SAGE_COMPONENT_CACHE |
| int Cache::GetCacheAssociativityWays | ( | ) |
| int Cache::GetCacheLevel | ( | ) |
| int Cache::GetCacheLineSize | ( | ) |
| string Cache::GetCacheName | ( | ) |
Retrieves cache name of this cache (e.g. "L1", "texture")
| long long Cache::GetCacheSize | ( | ) |
Retrieves size/capacity of the cache
| long long Cache::GetMIGSize | ( | string | uuid = "" | ) |
Gets the MIG size of the cache element.
| void Cache::SetCacheAssociativityWays | ( | int | _associativity | ) |
Sets cache associativity ways of this cache
| _associativity | - value for cache_associativity_ways |
| void Cache::SetCacheLevel | ( | int | _cache_level | ) |
Sets cache level of this cache using integer value (For e.g. "1" for "L1", etc.)
| _cache_level | - value for cache_type |
| void Cache::SetCacheLineSize | ( | int | _cache_line_size | ) |
Sets the size of a cache line of this cache
| _cache_line_size | = cache_line_size |
| void Cache::SetCacheName | ( | string | _name | ) |
Sets cache name of this cache (e.g. "L1", "texture")
| _cache_name | - value for cache_type |
| void Cache::SetCacheSize | ( | long long | _cache_size | ) |
Sets size/capacity of the cache
| _size | = size |