This week I’ve finished the second version of SPI. I basically adjusted the formatting of the code to be more professional, easier to read and interpret and better commented. My guide is the code for AEMB, it’s formatting, nomenclature and comments.
I’ve come across a bug in SPI. Apparantely the slave didn’t capture the last bit at modes where CPHA was 1. I’ve managed to solve this problem and verify both SPI devices in the 4 modes by simulation.
As for UART, it was very nice reading about UART from here and RS-232 from here and referring to this project on applying UART on FPGA. If you want more information about UART I came accross this rich HOW-TO guide and this presentation contains information about many serial protocols ( SPI, UART, I2C).
I’ve reformatted the UART code, fixed a few bugs in it and confirmed it’s operation via simulation. I’ve managed to confirm the operation of the Tx part of UART by sending data from the ATLYS board switches to the PC through Minicom software.
You can learn about Minicom from here and here and you can use the dmesg command on linux to figure out which bridge your UART is using. If you are really into it you can confirm the identity of your USD device that you are using to interface with the PC through this index. I managed to find both my vendor and device in it.
Nonetheless I’m stuck with the Rx. Somehow my Rx is not receiving anything from Minicom. Once this issue is resolved I just need to parametrize the various modes of UART and give proper names to its registers and then UART will be done.
I won’t be continuing my guidelines for verilog mode this week as I’ve to get this issue with Rx fixed ASAP. Will try my best to post more next week.