Note all files are testbenched
mnist_nn_small.sv
multiplier.sv
neuron.sv
relu.sv
neural_network.sv
iris_nn.sv
top_digits_1.sv
serial_version_2.sv (includes all 5 modules)
uart_read.sv
uart_write.sv
gather_weights.sv
(insert here)
send_data.py, arduino file
Send data using send_data.py (weights, biases, x)
Watch the final_output update in the ILA (or on seven_seg)!
#How to run the whole thing
- upload write_to_python_nov_11.ino to the arduino.
- generate bistream using top level: top_level_read_in.sv
- upload bitfile to fpga
- connect gnd on fpga to gnd on arduino; connect jb[0] to pin 2 on arduino.
- press btnc (tells fpga to get ready to receive weights. kind of hacky right now.)
- press btnd (wired to the nn's reset right now)
- run wso_example_weights.py. watch the seven seg update. the digits on the display are [bias 6, weight 14, x_in, final_output]. (also the digits only go up to f, so bias 6 shows up as 0 because it is 16.)
#Other notes
- wso.py has hardcoded weights right now. I ran them by doing 8 times the actual weight (bc we have 3 decimals). But I'm pretty sure the two's complement is done wrong for some of the negatives.
- x_in is hardcoded in the top level
project_1/project_1.srcs/sources_1/ has sources project_1/project_1.srcs/sim_1/ has testbenches