amiq-consulting / CNN-using-HLS

Convolutional Neural Network Using High Level Synthesis
Apache License 2.0
80 stars 32 forks source link

C simulation error #6

Open sumitdiware opened 3 years ago

sumitdiware commented 3 years ago

Hi Sergiu,

I get the following error on running c simulation for nnet.cpp in Vivado HLS (windows 10) if I use the testbench directly.: Couldn't open ref/fc_layer3_py.out@E Simulation failed: Function 'main' returns nonzero value '1'.

However, c simulation is successful if I change the relative path to the absolute path in the testbench for .out file.

Can you please help me with this? Also, please let me know how to generate the .out files in all the /ref folders when I change the CNN structure (layers and their specifications).

amiq-consulting commented 3 years ago

Hi,

The relative path is based on how the project is generated in an Ubuntu environment. I haven't tested how the path should look like on Windows. Indeed a fix for this is to set the absolute path.

When you change the CNN structure, you need to re-train the neural network and get new weights for all the layers. The python code that trained this neural network is here: https://github.com/amiq-consulting/CNN-using-HLS/blob/master/py/get_params.py

Regards, Sergiu