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

Detailed Description

AbstractTopology is a simple math class that deals with the topological relations of the modules. The modules are arranged in a 2-d surface, in a square grid, that can be considered also as a hexa grid. Note that 'index' refers to the rectangular view, 'positions' to the hexagonal view

A basic idea is that the electronic modules are arranged to form a two-dimensional topology that has physical scGridPoint modules as its nodes. The geometrical properties of the nodes are described by GridPoint. The gridpoints are electronically connected to each other and can communicate autonomously, using a special, hierarchical bus system scClusterBus. Although the bus is fully functional, to speed up simulation its clocking is switched off (to enable faster simulation). However, the simulation imitates the temporal behavior by adjusting the simulated time properly even if the clocking is switched off.

+ Inheritance diagram for AbstractTopology:

Public Member Functions

 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...
 

Protected Attributes

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.
 

Constructor & Destructor Documentation

◆ AbstractTopology()

AbstractTopology::AbstractTopology ( void  )

AbstractTopology::AbstractTopology.

Creates the topology of GridPoint modules of a time aware electronic processor (serves as a base of core scProcessor, Abstract or Neuerprocessor for brain simulator). This is purely math, has nothing to do with higher level operations. Just creates a two-dimensional either rectangular or hexagonal grid. The rectangular grid comprises individual grid points, without neighbors; but the points are organized into clusters, the clusters into chips, etc. The grids comprise cluster heads and members, and enjoy the advantages of the topological proximity.

The hexagonal grid enables to implement a special storage: the grid points are arranged in a way that enables to consider the grid points as hexagons, having common boundaries and enable to communicate with each other through the boundaries. These 7 cores constitue a cluster. The central core is the Head, and the other 6 Member cores can only be reached through the Head. The members of the cluster can only be reached through the cluster head.

The access functions return nullptr is the parametrization is wrong.

See also
ClusterNeighbor

Member Function Documentation

◆ ByClusterAddress_Get()

GridPoint* AbstractTopology::ByClusterAddress_Get ( ClusterAddress_t  C)

Get a GridPoint pointer given by its ClusterAddress_t C, a specialized integer (network-like address)

Parameters
[in]Cthe ClusterAddress_t address of the GridPoint
Returns
pointer to the GridPoint

◆ ByClusterMember_Get()

GridPoint* AbstractTopology::ByClusterMember_Get ( unsigned short int  CN,
ClusterNeighbor  CM = cm_Head,
ClusterNeighbor  CP = cm_Head 
)

Return the pointer to the gridpoint described by cluster member parameters

Parameters
[in]CNthe sequence number of the cluster
[in]CMthe member requested (if any)
[in]CPthe proxy (if any)
Returns
the pointer to the gridpoint

◆ ByClusterPointer_Get()

GridPoint* AbstractTopology::ByClusterPointer_Get ( GridPoint P,
ClusterNeighbor  CM = cm_Head 
)

Return the pointer corresponding to the in-cluster member CM of cluster.

Parameters
[in]PThe actual GridPoint
[in]CMThe actual member
Returns

◆ Cluster_Create() [1/2]

void AbstractTopology::Cluster_Create ( GridPoint P)

Create a new cluster at GridPoint P.

Parameters
[in]Pthe GridPoint that will be the cluster head

◆ Cluster_Create() [2/2]

void AbstractTopology::Cluster_Create ( int  X,
int  Y 
)

Create a new cluster at coordinates X,Y.

It may also be a phantom (the head is outside, some members inside): the members of these phantom clusters are attached to a real cluster as external member. If the cluster head is a phantom, create an external member using an alias the member is attached to a real cluster head, using a proxy

Parameters
[in]Xposition if the cluster head
[in]Yposition if the cluster head

◆ ClusterHead_Get()

GridPoint* AbstractTopology::ClusterHead_Get ( unsigned int  N)
inline

Return pointer to the cluster head of the Nth cluster.

Parameters
Nthe sequence number of the cluster
Returns
the cluster head grid point

◆ ClusterStatus_Set()

void AbstractTopology::ClusterStatus_Set ( GridPoint P,
ClusterNeighbor  N,
ClusterStatus  S 
)

Set cluster status upon creation.

Parameters
Pthe actual GridPoint
Nmember code inside the cluster
Sstatus to set Set status to S of neighbor N relative to GridPoint P

◆ StringOfClusterAddress_Get()

string AbstractTopology::StringOfClusterAddress_Get ( GridPoint GP)

Return the string describing GridPoint GP in its ClusterAddress_t form.

Parameters
GPthe cluster address of GridPoint
Returns
the string corresponding to GP Return the string describing the cluster address of GP

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