robotology / blockfactory

A tiny framework to wrap algorithms for dataflow programming
https://robotology.github.io/blockfactory
GNU Lesser General Public License v2.1
40 stars 16 forks source link

In Simulink allow to export S-Function Blocks that support to run as Co-Simulation on Multiple Cores #52

Open traversaro opened 4 years ago

traversaro commented 4 years ago

As documented in https://it.mathworks.com/help/simulink/ug/run-co-simulation-components-on-multiple-cores.html, in Simulink it is possible to run the update of different blocks in different threads, if the block respect some conditions for which they can be consider Co-Simulation slaves, the requirements, listed in https://it.mathworks.com/help/simulink/ug/run-co-simulation-components-on-multiple-cores.html under "S-Function Block Limitations", are:

Some of them are not dictated by BlockFactory itself, so we should find a way to be configurable from the developer develoing BlockFactory blocks. Furthermore, this mode seems to support natively FMI, so an alternative way to achieve this could be to work on https://github.com/robotology/blockfactory/issues/5 .

traversaro commented 4 years ago

The simulation runs on a single thread for accelerator and rapid accelerator modes.

If I understood correctly this sentence in https://it.mathworks.com/help/simulink/ug/run-co-simulation-components-on-multiple-cores.html, this may mean that https://github.com/robotology/blockfactory/issues/53 is a prerequisite for this.