Labs
Lab 1: FPGA and MCU Setup and Testing
Assembled the development board for the course and verified the MCU and FPGA’s respective functionalities. Programmed the FPGA with behavioral Verilog to blink on-board LEDs according to slide-switch positions and interface a 7-segment display, such that it would display hexadecimal digits 0x0 through 0xF.
Lab 2: Multiplexed 7-Segment Display
Implemented a time-multiplexing scheme to switch between displaying hexadecimal digits 0x0 through 0xF on two separate 7-segment displays, at such a frequency that the switch would be imperceptible to the human eye. Utilized transistors to drive large currents from the FPGA pins to the two 7-segment displays. Interfaced the FPGA with five external LEDs, such that they would display the sum of the two hexadecimal digits at any given point in time.
Lab 3: Keypad Scanner
Designed and implemented a circuit to interface the FPGA with a 4x4 matrix keypad, such that it would accurately read the pressed buttons and subsequently output the two most recent digits on two 7-segment displays. Effectively dealt with switch bouncing. Ensured that any combination of asynchronous user inputs — including, but not limited to, pressing multiple buttons at once and holding buttons for extended periods of time — did not result in erratic, undesirable behavior.
Lab 4: Digital Audio
Built a circuit to drive a speaker with the development board’s MCU — via GPIO pin toggling — and ultimately play music. Wrote own C libraries from scratch to enable and interface the MCU clock and timers. Generated square waves of specified frequencies for specified durations with the MCU timers.
Lab 5: Interrupts
Implemented a multi-interrupt routine on the MCU to detect pulses from a given motor’s quadrature encoder and convert that information into a value for angular velocity. Used the built-in Debug mode in Segger to display said motor velocity and direction in the terminal, with an update rate of at least 1 Hz.
Lab 6: The Internet of Things and Serial Peripheral Interface
Interfaced the MCU with both a DS1722 temperature sensor and an ESP8266 WiFi development board using the SPI and UART peripherals, respectively, in order to build a simple Internet of Things device. Programmed a simple HTML webpage to display the temperature (in Celsius) recorded by the DS1722 sensor — with this value updating every time the site is refreshed — allow a user to set its resolution by hand (to any integer value between eight and 12), toggle an on-board LED, and display the status of said LED accordingly. Used an oscilloscope’s Logic Analyzer function to capture proof of proper SPI transactions occurring.
Lab 7: The Advanced Encryption Standard
Implemented the AES algorithm on an FPGA and such that ciphertext was generated in response to key and plaintext inputs; additionally, built this nontrivial system in such a way that the architecture would actually fit on the FPGA chip. Interfaced the FPGA and MCU to communicate these encrypted messages over SPI, with the latter acting as a core and the former as an accelerator. Used an oscilloscope’s Logic Analyzer function to capture proof of proper SPI transactions occurring.