The base class (i.e. must not be instantiated) of neurer cores, implementing their general behavior.
The NeurerProcessor is actually built on top of NeurerCore (this is scGridPoint in its bottom layer) and uses the autonomous communication facilities implemented there. It has inter-core communication facilities and communicates autonomously with its immediate neighbors and cluster members. The generic processor functionality is implemented in the present top layer, both the computing-related and the morphing functionalities. All general processor-like functionalities may be redefined in subclasses; the processor-specific functionalities must be defined in the subclasses. The event handling is implemented is such a way, that the threads related to processor-like operation are implemented in a non processor-specific way, where the event handling threads use processor-specific virtual functions.
This class provides base for specific cores, such as the EMPA-aware cores Y86Core and RISCVCore in this package, but also a neuron-like behavior is subclassed from it.
* |GridPoint * |--/scGridPoint * |----/AbstractCore * |....../XXCore * |....../NeurerCore **
Public Member Functions | |
NeurerCore (sc_core::sc_module_name nm, NeurerProcessor *Proc, const GridPoint GP, bool StandAlone) | |
void | Reset (void) |
Directly HW-related functionality. | |
~NeurerCore (void) | |
![]() | |
AbstractCore (sc_core::sc_module_name nm, AbstractProcessor *Proc, const GridPoint GP, bool StandAlone) | |
string | CoreText_Get (void) |
Return the string form of the core address. More... | |
bool | doCanTerminate (SC_CORE_MASK_TYPE Address) |
Return true if the QT is ready to terminate. | |
bool | doExecuteInstruction (scHThread *H) |
bool | doFetchInstruction (scHThread *H) |
doFetchInstruction The actual fetching is done in the subclassed routine Here it imitates the action with a 10 ns wait | |
void | HandleEndOfWaiting (void) |
Handle if the core was in waiting state. | |
AbstractCore * | Parent_Get (void) |
< Return the parent of the core | |
void | PrepareNextInstruction (void) |
Prepare the execution of the next instruction, after fetching. | |
SC_WORD_TYPE | RegisterValue_Get (uint8_t R, bool Performance=true) |
Return the parent scGridPoint of the scGridPoint. More... | |
void | RegisterValue_Set (uint8_t R, SC_WORD_TYPE V, bool Performance=true) |
Set value of register R to V. | |
void | Reset (void) |
Directly HW-related functionality. | |
string | StringOfTime_Get (void) |
Return the time of the message. | |
~AbstractCore (void) | |
![]() | |
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. | |
scIGPMessage * | 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 More... | |
virtual void | CreateThreads (void) |
< Create threads for HThreads sharing this processing unit More... | |
virtual bool | doExecInstruction (scHThread *H) |
Send a message. | |
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 | |
scHThread * | HThreadExec_Get (void) |
< Return the executing thread | |
scHThread * | HThreadFetch_Get (void) |
< Return the fetching thread | |
scHThread * | HThreadReceive_Get (void) |
< Return the fetching thread | |
scHThread * | HThreadSend_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. | |
scGridPoint * | PreAllocateFor (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 | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
struct { | |
} | EVENT_CORE |
These events are handled at abstract processor level. | |
![]() | |
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. | |
![]() | |
scGPMessagefifo * | GPMessagefifo |
This stores the messages for this gridpoint. | |
scTimedIGPMessage_fifo * | TimedFIFO |
This stores the timed message for this gridpoint. | |
![]() | |
bool | doQTERM (void) |
void | HandleConventionalInstruction (void) |
< A helper function for NEXT_thread | |
void | TerminateExecution (void) |
< A helper function for NEXT_thread | |
![]() | |
scIGPMessage * | CreateMessageTo (scGridPoint *To, IGPMessageType Type, int Length) |
Create a message and put the addresses into the message. More... | |
![]() | |
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. | |
![]() | |
scHThread * | mHThreads [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. | |
scGridPoint * | msParent |
Parent gridpoint. | |
GridPointSignal_t | msSignal |
This aggregate comprises all signals shown to the outer world. | |
sc_time | msWaitBegin |
The beginning of the waiting period. | |
![]() | |
uint16_t | mBusPriority |
The bus priority when the scGridPoint is master. | |
scProcessor * | msProcessor |
Just remember where we were born. | |
NeurerCore::NeurerCore | ( | sc_core::sc_module_name | nm, |
NeurerProcessor * | Proc, | ||
const GridPoint | GP, | ||
bool | StandAlone | ||
) |
Construct a base neurer core. Implements Reset() and event handling.
nm | The SystemC module name | |
Proc | The processor the core belongs to | |
[in] | GP | the topological location of the module |
[in] | StandAlone | If the core implements some stand-alone functionalities |
The module implements all general-purpose functionality of an neuron-aware core. The general-purpose functionality is implemented in the form of event-handling scSynapse (HThreads), and the neurer core-specific functionality in virtual functions
NeurerCore::~NeurerCore | ( | void | ) |
Destruct an abstract core, including its data structures