Pratyusha’s Status Report for 4/19/20

This week I had two objectives

  1. To get the USB Controller driver working
  2. To get the SDRAM NIOS test running on the board

For 1. as per last week’s meeting, the last approach I was going to attempt before switching over to USB/ps2 keyboards was to checkout into the linux kernel version of the angstrom distribution, specifically to the unofficial commit of the drivers, compile the module with the linux source tree of that version, figure out the special flags needed for compilation, and then port over that driver to the board, load it without conflict to existing linux code and drivers, and then attempt to identify the controller through the driver.

There was an initial conflict with compiling both joypad and hid-dr modules, but after realizing that we could make do with just hid-dr, I chose to stick with that, and it ran with the existing linux source code, and I was able to retrieve bytes form the controller.

To make the NES-controller….controller, I had to understand the event structures, types and linux/input.h, details linked here. I then composed code to handle multiple presses and releases of the controller inputs, where the button packets were of different lengths, so I implemented a variable length buffer to handle this.

All in all, the end result is as shown here. Each button press and release maps to the respective led being on and off.

2. The next goal was to get qsys running on the VM, and compile a basic program. The manual also had an example of an SDRAM test, with installation setups, unique to Windows, so after finding workarounds for the linux VM, I got the SDRAM NIOS2 test to work on the FPGA board. This means we can copy over information to the SDRAM from the SoC, and read back from it and compare the bytes, to check if they are the same. Still have to implement checking the sums being equal for the bytes on FPGA and SoC.

Thus, this weeks goals were achieved. The goal for this week is to read from USB storage, and write those bytes to SDRAM, read them back and store it on the USB flash. I expect working with Qsys to be non-trivial for the same :'(.  Using USB instead of micro SD card because currently the board boots from the micro SD card and I don’t want to mess with it.

 

Leave a Reply

Your email address will not be published. Required fields are marked *