Eighth week. Slow. I did not manage to implement HOTP nor SSL. My cryptography knowledge is weak. I had a ton of studying to do and even more still. As for SSL, with some slight troubleshooting it should work soon, but its not a priority at the moment. Flash code is also not finished and for what I’ve written I haven’t confirmed the functionality.
I found out I was not receiving and writing the bitstream properly over the network and onto the FPGA. I was basically writing garbage to the FPGA which it seemed quite happy with as DONE pin would go high. First I had to make sure that I am receiving the bitstream correctly. For the curl command, “–trace” was useful in finding out what exactly was being transmitted.
curl -i -X PUT –trace dump.txt –data-binary @filename.bin
You will be able to see the data in hex/ascii in the file “dump.txt”. It should contain the network header and the .bin file contents. Using
hexdump -C filename.bin (hex output)
or
xxd -b filename.bin (binary output)
allows you to compare the contents of the local .bin file with what was sent.
Next was writing the received bitstream to the FPGA. The file is sent in packets. First we read the data on the RX buffer, write that data to the FPGA, receive more data, write to the FPGA etc.. till it is finished. When the upload starts, curl will give a “100-continue”, the ethernet link LED should blink during the upload, and when its complete, you should see “We are completely uploaded and fine” on the terminal.
0 Comments