The circuit takes in a 4-bit number, with each bit of the input representing an input neuron. It then completes the forward pass for the network, while also calculating the loss function (MSE). Network consists of 4 input neurons, 8 hidden neurons, and 1 output neuron.
To physically test the circuit, input a 4 bit-number into ui_in[3:0]. Use ui_in[7] to start the forward pass. The final output calculation can be seen through the output pins {uio_out[1:0], uo_out[7:0]}. The current state can be seen through the output pins uio_out[7:5].
To simulate the circuit, change the input value of ui_un on line 30 of "test.py". Using the .vcd file, analyze the output of the circuit using any waveform viewer.
Use switches to connect to ui_in[3:0] (allowing for you to input a value). Connect a switch/button to ui_in[7] (allowing you to begin the forward pass).
# | Input | Output | Bidirectional |
---|---|---|---|
0 | Input bit [0] | Output Calculation [0] | |
1 | Input bit [1] | Output Calculation [1] | |
2 | Input bit [2] | Output Calculation [2] | |
3 | Input bit [3] | Output Calculation [3] | |
4 | Output Calculation [4] | ||
5 | Output Calculation [5] | ||
6 | Output Calculation [6] | ||
7 | Output Calculation [7] |