Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
scProcessor Class Reference

Detailed Description

Implements a module-name alias facility (i.e., user-provided names. Given that the basic units is scHThread class, the programmer has three ways to refers to a scHThread. (the scHThread is owned by an scGridPoint, so a hthread name is given as [Owner ID]/[HThread ID] The default one is just the sequence number or SystemC module name.

This is a processor class comprising communicating scGridPoint classes. Comprises and handles the scGridPoint modules in the grid points. This implements the gridpoint-to-gridpoint communication: The grid comprises cluster heads and members, and enjoys the advantages of the topological proximity.

See also
scHThread::StringOfDefaultName_Get
scHThread::StringOfClusterName_Get
scHThread::StringOfAliasName_Get
scHThread::StringOfName_Get

The internal array scProcessor::mAliases stores all possible names, so scHThread::StringOfName_Get with any form of name will return a pointer to the same scHThread. (it is the user's responsibility to NOT select system-conventional names)

The scProcessor class receives the signals from the scGridPoint modules through its input ports. The module stores the actual values of those signals in the corresponding SC_GRIDPOINT_MASK_TYPE, and receives signals TopologySignal_t through the TopologySignalPort_t array

Comprises scGridPoint modules, but no real calculational functionality

Parameters
nmThe SystemC name
Specialssome special scGridPoints (enables to handle heterogenous topologies)
StandAlonetrue if some part shall be executed here otherwise in the subclass
*  |AbstractTopology
*  |--/scProcessor
*  |----/AbstractProcessor
*  |....../XXProcessor (Y86, RISCV)
*  |....../NeurerProcessor (Y86, RISCV)
*  
+ Inheritance diagram for scProcessor:

Public Member Functions

bool Alias_Add (string A, scHThread *HT)
 
scGridPointByIndex_Get (const int X, const int Y)
 Get an scGridPoint by its indices.
 
scGridPointByPointer_Get (scGridPoint *GP)
 
virtual scGridPointChildAllocateFor (scGridPoint *Parent, CorePreference_t Pref=cpt_AnyCore)
 Allocate a core with preference.
 
scGridPointChildFindFor (scGridPoint *Parent, CorePreference_t CPT)
 find an scGridPoint for this parent
 
scGridPointChildPreAllocateFor (scGridPoint *Parent, CorePreference_t Pref=cpt_AnyCore)
 Allocate a core with preference.
 
virtual scGridPointdoQCREATE (scGridPoint *TheParent, scGridPoint *TheChild, SC_GRIDPOINT_MASK_TYPE CloneMask, SC_GRIDPOINT_MASK_TYPE BackLinkMask, CorePreference_t CPT)
 scGridPoint::doQCREATE Create a new QT for TheParent, allocate a core if TheChild is NULL More...
 
void HandleAliases (string FileName)
 HandleAliases() Handle the special case when aliases are to be read from a file.
 
void HandleAliasesPass (string FileName, bool Pass2)
 HandleAliasesPass In the first pass, only adds the alias name to the known names. In the second pass, initializes the aliased objects. More...
 
scHThreadHThreadFindFor (scHThread *Parent, HThreadPreference_t HPT)
 scProcessor::HThreadFindFor More...
 
void Populate (vector< scGridPoint * > &Specials)
 
virtual void ReadTheThreeLevels (QString MyGroup)
 ReadTheThreeLevels. More...
 
string RegisterName_Get (int Index)
 < A generic register name
 
bool StringOfAliasName_Set (string A, scHThread *H)
 
- Public Member Functions inherited from AbstractTopology
 AbstractTopology (void)
 AbstractTopology::AbstractTopology. More...
 
GridPointByClusterAddress_Get (ClusterAddress_t C)
 Get a GridPoint pointer given by its ClusterAddress_t C, a specialized integer (network-like address) More...
 
GridPointByClusterMember_Get (unsigned short int CN, ClusterNeighbor CM=cm_Head, ClusterNeighbor CP=cm_Head)
 
GridPointByClusterPointer_Get (GridPoint *P, ClusterNeighbor CM=cm_Head)
 Return the pointer corresponding to the in-cluster member CM of cluster. More...
 
GridPointByID_Get (const int N)
 Get a gridpoint by its absolute sequence number and thread.
 
GridPointByIndex_Get (const int X, const int Y)
 Get a gridpoint defined by its indices (!NOT position)
 
GridPointByPosition_Get (int X, int Y)
 Get a gridpoint by its topological position (NOT index!)
 
void Cluster_Create (GridPoint *P)
 Create a new cluster at GridPoint P. More...
 
void Cluster_Create (int X, int Y)
 Create a new cluster at coordinates X,Y. More...
 
ClusterAddress_t ClusterAddress_Get (GridPoint *P)
 Return the cluster address of the point P.
 
ClusterAddress_t ClusterAddressFromLinear_Get (int N)
 Return the cluster address of the Nth point.
 
GridPointClusterHead_Get (unsigned int N)
 Return pointer to the cluster head of the Nth cluster. More...
 
GridPointClusterHeadOfMember_Get (GridPoint *GP)
 Return the cluster head of GridPoint GP.
 
ClusterStatus ClusterStatus_Get (GridPoint *P, ClusterNeighbor N)
 Return status of neighbor N relative to GridPoint P.
 
void ClusterStatus_Set (GridPoint *P, ClusterNeighbor N, ClusterStatus S)
 Set cluster status upon creation. More...
 
void CreateClusters (void)
 Create clusters from the elements of the rectangular grid. This routine works perfectly ONLY for a 10*6 sized grid!!
 
string StringOfClusterAddress_Get (GridPoint *GP)
 Return the string describing GridPoint GP in its ClusterAddress_t form. More...
 

Public Attributes

scClusterBus * mClusterBus
 The of processor inter-cluster bus-related signals. More...
 
scClusterBusArbiter * mClusterBusArbiter
 Arbiter of the inter-cluster bus.
 
scClusterBusMemoryFastmClusterMemoryFast
 A register-like memory.
 

Protected Attributes

TopologyMask_t msMask [MAX_HTHREADS]
 Stores alias names of the gridpoints.
 
- Protected Attributes inherited from AbstractTopology
vector< GridPoint * > mClusters
 The clustered gridpoints are accessible through their clusters, too.
 
vector< vector< GridPoint * > > mGrid
 The gridpoints form a 2-dim grid, addressable by their index.
 
SC_ADDRESS_TYPE mProgramCounter
 The architecture itself has a global program counter.
 

Member Function Documentation

◆ Alias_Add()

bool scProcessor::Alias_Add ( string  A,
scHThread HT 
)
inline

Add an alias name A for scHThread HT

◆ ByPointer_Get()

scGridPoint* scProcessor::ByPointer_Get ( scGridPoint GP)
inline
Parameters
GPA kind of self-check: dynamic_cast will return NULL if wrong

◆ doQCREATE()

virtual scGridPoint* scProcessor::doQCREATE ( scGridPoint TheParent,
scGridPoint TheChild,
SC_GRIDPOINT_MASK_TYPE  CloneMask,
SC_GRIDPOINT_MASK_TYPE  BackLinkMask,
CorePreference_t  CPT 
)
virtual

scGridPoint::doQCREATE Create a new QT for TheParent, allocate a core if TheChild is NULL

Parameters
[in]TheParentthat needs a new child
[in]TheChildif NULL will be sought, else the scGrigPoint is already allocated
[in]CloneMaskthe mask describing the cloned register contents
[in]BackLinkMaskthe mask describing the expected backlinked register contents
[in]CPTWhich type of core is preferred
Returns
[in] the core of the created QT, maybe TheChild

◆ HandleAliasesPass()

void scProcessor::HandleAliasesPass ( string  FileName,
bool  Pass2 
)

HandleAliasesPass In the first pass, only adds the alias name to the known names. In the second pass, initializes the aliased objects.

Parameters
FileNamename of file where aliases are listed
Pass2if processing the second phase of handling

◆ HThreadFindFor()

scHThread* scProcessor::HThreadFindFor ( scHThread Parent,
HThreadPreference_t  HPT 
)

scProcessor::HThreadFindFor

Parameters
[in]Parentthe potential parent
[in]HPTthe preferred HThread (clustered) type
Returns
the requested HThread that can be allocated or NULL if not found

The core preferences can be: hpt_Head, hpt_GridPoint, hpt_Cluster, hpt_Any 1./ a thread from a cluster head (the most limited resource) 2./ a thread from the same scGridPoint (ordinary members first) 3./ a thread from the cluster where the scGridPoint is (ordinary members first) 4./ any available HThread

In the simplest form, get the next available core, with the lowest sequence number. Can be replaced by considering temperature, utilization, etc find an scHThread for this parent

◆ Populate()

void scProcessor::Populate ( vector< scGridPoint * > &  Specials)

Find a HThread by its string name, any kind

◆ ReadTheThreeLevels()

virtual void scProcessor::ReadTheThreeLevels ( QString  MyGroup)
virtual

ReadTheThreeLevels.

The group Neurons needs special handling: 'Neurons.ini' contains names of NeuroxX.ini files

Parameters
MyGroupthe name of the group (.INI file)

◆ StringOfAliasName_Set()

bool scProcessor::StringOfAliasName_Set ( string  A,
scHThread H 
)

Set a new alias name A for scHThread HT

Member Data Documentation

◆ mClusterBus

scClusterBus* scProcessor::mClusterBus

The of processor inter-cluster bus-related signals.

The inter-cluster bus


The documentation for this class was generated from the following file: