The EDLUT Engine brings the possibility to connect the EDLUT simulator to NRP-core.
The engine implementation is based on the Protobuf over gRPC communication protocol and it accepts two distinct Datapack types which are described below: EdlutDataSpikesDatapack and EdlutDataCurrentsDatapack.
By default there are two datapacks registered for data exchange with an EDLUT engine: "spikes_datapack" and "currents_datapack". "spikes_datapack" is of type EdlutDataSpikesDatapack and allows users to both inject spikes into the simulated Neural Network and read spikes from it. "currents_datapack" is of type EdlutDataCurrentsDatapack and can only be used for injecting currents into the simulated Neural Network. When "currents_datapack" is requested from the Engine, an empty datapack is returned.
When using the "spikes_datapack" to read spikes, which is done by using it as an input argument of a TF, the datapack contains all spike events that occurred in the EDLUT simulation during the last timestep. The "spikes_time" attribute of the datapack stores an array of spike times, while the "neuron_indexes" attribute contains an array with the indexes of the neurons that produced the spikes.
On the other hand, when the "spikes_datapack" is used to inject spikes into the simulated neural network, typically when it is returned from a TF, the "spikes_time" and "neuron_indexes" attributes must be used to precisely specify which neurons should spike and when the spike events should occur. It is important to note that the "spikes_time" values must be expressed in the global simulation timeframe, rather than being relative to the current simulation time. To achieve the desired behavior, the current simulation time and the length of the Engine timestep must be considered and taken into account when computing the values of the "spikes_time" array.
Similarly, the "currents_datapack" can be used to inject currents into the simulated neural network. In this case, there are also "spikes_time" and "neuron_indexes" attributes in the datapack, which still indicate which neurons should spike and when the event should occur. However, there is an additional attribute,"current_values", which specifies the amplitude of the spike, behaving the latter as a current.
This gRPC implementation uses Protobuf DataPacks. Below is shown the protobuf message definition used by the EDLUT Engine:
Attribute | Description | Python Type | C type |
---|---|---|---|
spikes_time | Spikes Firing Time | numpy.array(numpy.float32) | std::array<float> |
neuron_indexes | Neuron Indexes Firing | numpy.array(numpy.uint32) | std::array<uint32> |
Attribute | Description | Python Type | C type |
---|---|---|---|
time | Simulation Time | float | float |
spikes_time | Spikes Firing Time | numpy.array(numpy.float32) | std::array<float> |
neuron_indexes | Neuron Indexes Firing | numpy.array(numpy.uint32) | std::array<uint32> |
current_values | Current Values | numpy.array(numpy.float32) | std::array<float> |
Each of these attributes can be accessed under their respective names from the data attribute of both Edlut Datapack types.
This Engine type parameters are defined in EDLUT schema (listed here), which in turn is based on EngineBase and EngineGRPC schemas and thus inherits all parameters from them.
To use this engine in an experiment, set EngineType
to "edlut_grpc_engine".
Name | Description | Type | Default | Required | Array |
---|---|---|---|---|---|
EngineName | Name of the engine | string | X | ||
EngineType | Engine type. Used by EngineLauncherManager to select the correct engine launcher | string | X | ||
EngineProcCmd | Engine Process Launch command | string | |||
EngineProcStartParams | Engine Process Start Parameters | string | [] | X | |
EngineEnvParams | Engine Process Environment Parameters | string | [] | X | |
EngineLaunchCommand | LaunchCommand with parameters that will be used to launch the engine process | object | {"LaunchType":"BasicFork"} | ||
EngineTimestep | Engine Timestep in seconds | number | 0.01 | ||
EngineCommandTimeout | Engine Timeout (in seconds). It tells how long to wait for the completion of the engine runStep. 0 or negative values are interpreted as no timeout | number | 0.0 |
Name | Description | Type | Default | Required | Array |
---|---|---|---|---|---|
ServerAddress | gRPC Server address. Should this address already be in use, simulation initialization will fail | string | localhost:9004 |
Name | Description | Type | Default | Required | Array |
---|---|---|---|---|---|
NetworkFile | Path to the storage of file with the architecture of the network | string | X | ||
WeightsFile | Path to the storage of file containing initial weights of neurons | string | X | ||
NumThreads | Number of threads used for parallel computing | integer | 1 | ||
SensorialDelay | Sensorial delay needed by EDLUT to compensate delays in communication and compute future spikes | float | 0.00 | ||
SaveWeightsPeriod | Period of time to save synaptic weights in a file | float | 0.00 |
As explained above, the schema used by the EDLUT engine inherits from EngineBase and EngineGRPC schemas. A complete schema for the configuration of this engine is given below: