Possibility of using Nengo FPGA with numpy alone

Hi,

This is Sai, a neuroscience student exploring Spiking Network for Machine learning applications.

I have a query regarding Nengo FPGA as below:

With the FPGA license and configuration provided by Nengo, is it possible to use numpy (without using exclusive nengo API) to perform any computations? For eg, I want to simulate a spiking network (written with pure NumPy) on FPGA without including nengo API references.

Regards,
Sai

Hello Sai, and welcome to the Nengo forums! :smiley:

Regarding your question, it is possible to use a NengoFPGA brainboard without using the Nengo API. In fact, with some work, all of the computation can be contained on the FPGA without needing any intervention from an external source.

The primary interface between the FPGA bitstream (the bitstream does the neural computation) and Nengo is this file (I’m using the DE1-SOC platform as an example, but it is similar on the PYNQ board). If you want to connect the board to your own (non-Nengo) process on your computer, you’ll need to adhere to the UDP socket messaging format to communicate with the board.

If you want to have all of the computation contained on the FPGA, you’ll need to make the appropriate function calls to pass information to and from the bitstream.

I should note that while it is possible to have all of the neural computation done entirely on the board, the brainboard bitstreams still perform computation using the NEF, which includes encoders and decoders for the inputs and outputs. Additionally, the parameters (gains, biases, encoders) are not computed on the board. Rather, they are generated by Nengo, saved to a file, and then copied to the board (over ssh). This means that your code will have to generate the same parameters (or you can use parameters generated by Nengo as a starting point). Another note is that while the NengoFPGA code base is not necessary, the NengoDE1 or NengoPYNQ (depending on your board) is still required to interface with the bitstream on the FPGA board.