SpineML / SpineML_2_BRAHMS

Code generation scripts to run a SpineML neural model using BRAHMS on standard CPUs
http://spineml.github.io/simulators/BRAHMS/
4 stars 3 forks source link

A projection can't have an impulse input #34

Open sebjameswml opened 7 years ago

sebjameswml commented 7 years ago

If you create a weight update component with in impulse input, rather than an event input, then you can't put it into a projection - the compilation fails:

[seb@seb-T460s 08:39:37 0]$ ./build 
component.cpp: In member function ‘virtual brahms::Symbol dev_spineml_wu_ConnectionListImpulseWeight_0::event(brahms::Event*)’:
component.cpp:659:7: error: ‘delayedImpulseVals’ was not declared in this scope
       delayedImpulseVals[(delayBufferIndex+delayForConn[DATAin[i_BRAHMS_LOOP][j
       ^
component.cpp:681:23: error: ‘delayedImpulseVals’ was not declared in this scope
      in[num_BRAHMS] = delayedImpulseVals[delayBufferIndex][i_BRAHMS];
                       ^
component.cpp:707:5: error: ‘delayedImpulseVals’ was not declared in this scope
     delayedImpulseVals[delayBufferIndex].clear();
     ^

Assuming an impulse input to a weight update component is permitted by SpineML, then this should be fairly easy to resolve.

sebjameswml commented 7 years ago

A weight update component with an impulse as input IS permitted by the SpineML schema - I checked this.

sebjameswml commented 7 years ago

First commit towards this issue is d96924a

The code compiles with this commit. I've still got to make it possible to log impulse outputs so that I can make sure that this code produces the right output.