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

Detailed Description

This class implements the autonomous grid point functionality: it is a communicating GridPoint. The communication interface is implemented in scIGPMessage_if.

It has its associated inter-gridpoint communication facilities and communicates autonomously with its immediate neighbors and cluster members via sending and receiving messages of form scIGPMessage.

An scGridPoint must implement both slave and master interfaces: the sending scGridPoint is the master, and the receiving scGridPoint is the slave. The messages are always 'write' scIGPMessage messages; the sender sends the message in 'burst' mode, and the slave reads it uninterrupted, and after reading makes the corresponding action.

*  |GridPoint
*  |--/scGridPoint
*  |..../AbstractCore
*  |....../XXCore
*  |..../NeurerCore
* 

The classes subclassed from scGridPoint comprise two cooperating layers. The top layer is responsible for the computing and morphing, implemented in subclasses (such as a processor core or a neurer, under the supervision of the processor) and this bottom layer is responsible for the communication between modules having interface scIGPMessage_if (and works in essentially unchanged form in the subclassed modules). The bottom layer can receive ready-made messages it can deliver to the destination using its own connections, it can recognize if a message is for its top layer, and it can prepare the message content in a buffer for the top layer and signal the arrival of the message. The two layers share the tasks as follows.

This bottom layer may receive packages (for one of its scHThread objects)

  • i) from its own top layer
  • ii) from one of its immediate neighbors
  • iii) through the inter-cluster bus from the external world

This bottom layer can send packages (for an scHThread object)

  • i) to its own top layer (if the own address is recognized)
  • ii) to one of its immediate neighbors
  • iii) through the inter-cluster bus to the external world

The top layer makes the payload work and can utilize the services provided by this bottom layer.

For efficiency,

  • i) only the cluster heads have access to the inter-cluster bus
  • ii) the "2nd neighbor" gridpoints can also be accessed directly, using 2 "hops" (independently of whether they belong to the same cluster)

The top layer receives a task (a stream of machine instructions) from the memory: it receives an instruction pointer and initates the execution of the instruction the instuction points to in the memory and for operating them typically needs memory data pointed out by a memory pointer. Accessing instruction/data may take some time, as well as the delivery of the returned information corresponding to instruction and/or data. As the excution of the next instruction is only possible when all previous instructions terminated (this status is or-ing the results status of the finished streams). Then a core picks a new pointer value from the instruction or data pointer unit. If all conditions are meet, that is i.e. the instruction is ready to proceed with execution and both data and instruction are available, the execution of a machine instruction begins and no action interrupts processing of the instruction.

See also
scIGPMessage
AbstractCore
AbstractNeuron
+ Inheritance diagram for scGridPoint:

Public Member Functions

void AddDefaultAliasNames (void)
 
void AddHThread (unsigned int H, scHThread *P)
 < Add a HW thread to the scGridPoint
 
core_cooperationmode_t CooperationMode_Get (void)
 Send a notification to the thread that the requested memory content is available.
 
scIGPMessageCreateQtCreateMessageTo (scGridPoint *To, SC_ADDRESS_TYPE PC, SC_GRIDPOINT_MASK_TYPE Mask, SC_GRIDPOINT_MASK_TYPE BackMask)
 scGridPoint::CreateQtCreateMessageTo It can be needed to pass a QT message for Q_CREATE and Q_KILL More...
 
virtual void CreateThreads (void)
 < Create threads for HThreads sharing this processing unit More...
 
virtual bool doExecInstruction (scHThread *H)
 Send a message.
 
virtual bool doFetchInstruction (scHThread *H)
 doFetchInstruction The actual fetching is done in the subclassed routine Here it imitates the action with a 10 ns wait
 
virtual void doSetQTAddresses (scGridPoint *Parent)
 doSetQTAddresses More...
 
void EXEC_thread ()
 EXEC_thread makes the actual "instruction exec".
 
void FETCH_thread ()
 FETCH_thread makes the actual "instruction fetch".
 
bool HThreadAllocatedBit_Get (SC_HTHREAD_ID_TYPE H)
 < Return if HThread is active
 
void HThreadAllocatedBit_Set (SC_HTHREAD_ID_TYPE H, bool B)
 < Set thread H either active or inactive
 
scHThreadHThreadExec_Get (void)
 < Return the executing thread
 
scHThreadHThreadFetch_Get (void)
 < Return the fetching thread
 
scHThreadHThreadReceive_Get (void)
 < Return the fetching thread
 
scHThreadHThreadSend_Get (void)
 < Return the fetching thread
 
SC_GRIDPOINT_ID_TYPE ID_Get ()
 < Return the unique ID of the scGridPoint
 
SC_GRIDPOINT_MASK_TYPE IDMask_Get (void)
 < Return the mask form of the ID
 
scIGPCB * IGPCB_Get (ClusterNeighbor index)
 < Get address of the communication block
 
string Name_Get (void)
 < Return the SC name of the module
 
void ObservedHThreadBit_Set (SC_HTHREAD_MASK_TYPE M, bool B)
 Set if HThread M is observed. More...
 
void PreAllocatedMaskBit_Set (scGridPoint *C, bool V=true)
 Get the mask of allocating cores.
 
scGridPointPreAllocateFor (scGridPoint *Parent)
 Allocate this core for running a QT.
 
 scGridPoint (sc_core::sc_module_name nm, scProcessor *Processor, const GridPoint GP, bool StandAlone)
 scGridPoint Creates an GP for Processor scGridPoint at position, with name nm More...
 
void SEND_thread ()
 SEND_thread Send the actual message.
 
void SIGNAL_method (void)
 ClusterHead_Get. More...
 
string StringOfClusterAddress_Get (void)
 
string StringOfMemoryAddress_Get (void)
 ! Removed temporarily, until NEXT in AbstractCore fully implemented
 
- Public Member Functions inherited from GridPoint
ClusterAddress_t ClusterAddress_Get (void)
 < Return the cluster address of the gridpoint, stored in the matrix
 
void ClusterAddress_Set (ClusterAddress_t CA)
 Set the cluster address of the gridpoint.
 
void ClusterAddressHThread_Set (int H)
 Set the cluster address of the gridpoint.
 
ClusterStatus ClusterStatus_Get (void)
 Return the status of the gridpoint.
 
void ClusterStatus_Set (ClusterStatus CS)
 Set the cstatus of the gridpoint.
 
bool Is2ndNeighborOf (GridPoint *GP)
 Return true if we are a second neighbor of GP. More...
 
bool IsInTheSameClusterAs (GridPoint *GP)
 Return true if we and GridPoint GP are in the same cluster. More...
 
bool IsNeighborOf (GridPoint *GP)
 Return true if we are an immediate neighbor of GP. More...
 
bool IsTheSameAs (GridPoint *GP)
 Return true if GridPoint GP is identical with us. More...
 
string StringOfClusterAddressName_Get (void)
 Return the string form of our cluster address. More...
 
string StringOfThread_Get ()
 Return the string describing the actual thread. More...
 

Protected Member Functions

scIGPMessageCreateMessageTo (scGridPoint *To, IGPMessageType Type, int Length)
 Create a message and put the addresses into the message. More...
 
- Protected Member Functions inherited from scIGPMessage_if
void ReceiveMessage_thread (void)
 This thread receives a message from outside, from any the scGridPoint.
 
void ReceiveTimedMessage_thread (void)
 ReceiveTimedMessage_thread The message can be received form any other scGricPoint.
 

Protected Attributes

scHThreadmHThreads [MAX_HTHREADS]
 Stores the address of HThreads.
 
SC_HTHREAD_MASK_TYPE mObservedHThreads
 The observed HThreads of this scGridPoint.
 
core_cooperationmode_t msCooperationMode
 
SC_GRIDPOINT_ID_TYPE msID
 ID if the scGridPoint.
 
GridPointMask_t msMask
 This aggregate comprises all masks belonging to the GridPoint.
 
scGridPointmsParent
 Parent gridpoint.
 
GridPointSignal_t msSignal
 This aggregate comprises all signals shown to the outer world.
 
sc_time msWaitBegin
 The beginning of the waiting period.
 
- Protected Attributes inherited from scIGPMessage_if
uint16_t mBusPriority
 The bus priority when the scGridPoint is master.
 
scProcessormsProcessor
 Just remember where we were born.
 

Additional Inherited Members

- Public Attributes inherited from GridPoint
ClusterAddress_t mClusterAddress
 The ClusterAddress_t address of the gridpoint.
 
int8_t X
 The X index of the gridpont.
 
int8_t Y
 The Y index of the gridpont.
 
- Public Attributes inherited from scIGPMessage_if
scGPMessagefifoGPMessagefifo
 This stores the messages for this gridpoint.
 
scTimedIGPMessage_fifoTimedFIFO
 This stores the timed message for this gridpoint.
 

Constructor & Destructor Documentation

◆ scGridPoint()

scGridPoint::scGridPoint ( sc_core::sc_module_name  nm,
scProcessor Processor,
const GridPoint  GP,
bool  StandAlone 
)

scGridPoint Creates an GP for Processor scGridPoint at position, with name nm

Parameters
[in]nmThe SystemC name
[in]Processorthe owner
[in]GPposition
[in]StandAloneif the gridpoint shall be used as a stand-alone object

Member Function Documentation

◆ AddDefaultAliasNames()

void scGridPoint::AddDefaultAliasNames ( void  )

! Add scHthread alias names to the default maps. Both default and cluster address name stringf are added The first schThread is added in both "x" and "x/0" suffix, to enable using both forms in mappig

◆ CreateMessageTo()

scIGPMessage* scGridPoint::CreateMessageTo ( scGridPoint To,
IGPMessageType  Type,
int  Length 
)
protected

Create a message and put the addresses into the message.

Parameters
[in]ToThe addressed scGridPoint (the destination of the message)
[in]TypeThe type of the message
[in]LengthThe length of the message (in 32-bit words)
Returns
the prepared message, with only partially filled buffer

◆ CreateQtCreateMessageTo()

scIGPMessage* scGridPoint::CreateQtCreateMessageTo ( scGridPoint To,
SC_ADDRESS_TYPE  PC,
SC_GRIDPOINT_MASK_TYPE  Mask,
SC_GRIDPOINT_MASK_TYPE  BackMask 
)

scGridPoint::CreateQtCreateMessageTo It can be needed to pass a QT message for Q_CREATE and Q_KILL

Parameters
[in]Tothe destination gridpoint
[in]PCthe program counter where the fragment will start
[in]MaskThe mask describing the registers to be passed
[in]BackMaskthe mask describing the expected backlinked register contents
Returns
The prepared message

◆ CreateThreads()

virtual void scGridPoint::CreateThreads ( void  )
virtual

< Create threads for HThreads sharing this processing unit

When creating (subclassed) scGridPoint objects, it creates scHThreads (subclassed object) as configured. scHTreds are fully configured and their names are put in the aliases map

◆ doSetQTAddresses()

virtual void scGridPoint::doSetQTAddresses ( scGridPoint Parent)
inlinevirtual

doSetQTAddresses

Parameters
Parentcore of the gridpoint

Presently has no real fuctionality, the QTs appear only in AbstractCore

◆ ObservedHThreadBit_Set()

void scGridPoint::ObservedHThreadBit_Set ( SC_HTHREAD_MASK_TYPE  M,
bool  B 
)

Set if HThread M is observed.

Parameters
MMask type
Btrue if observed

◆ SIGNAL_method()

void scGridPoint::SIGNAL_method ( void  )

ClusterHead_Get.

Returns
the address of the cluster head of the point

◆ StringOfClusterAddress_Get()

scGridPoint::StringOfClusterAddress_Get ( void  )
virtual
Returns
the string form of the complete cluster address of the gridpoint

Implements scIGPMessage_if.

Member Data Documentation

◆ msCooperationMode

core_cooperationmode_t scGridPoint::msCooperationMode
protected

This memory buffer storage is the link between the top layer and the bottom layer: one party places the content here, notifies the other party via EVENT_GRID.MemoryContentArrived[MAX_HTHREADS_LIMIT].notify Only ony of the possible two directions can be used at a time All HTreads have their own buffer;


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