ECE 449 Assignment 4

  1. Add an external timer to our second NiosII system for the purpose of measuring interrupt latency. Have one of the switches start the timer, and let the NiosII system stop the timer. The number of cycles should be displayed on the 7-segment displays and available for input to the NiosII system (via PIO interface). Use this system to measure the interrupt latency - from the time the switch is toggled until the NiosII system is able to stop the timer.

  2. We have previously noted that the library strlen function is optimized to process 32-bit words rather than 8-bit bytes. Write a test program in C and use the debugger to step through the code for strings of different lengths and determine how the algorithm in strlen works. You may also extract the strlen code, export it to another environment (e.g. Microsoft Visual C) and test the code there.

  3. Add a volume control capability to the current Verilog code that controls the audio codec chip. An I2C serial interface is used to send commands to the audio and video chips. You should be able to append additional commands to the current look-up tablr used to initialize the peripherals.

  4. Modify the audio program to do "Karoke" by making the output equal to the difference of the two input channels. This will often eliminate the vocal track (depending on the recording). You could improve on simple subtraction by adjusting the relative contribution of each channel, using the process developed in the last assignment.

  5. Run the project that reads scan codes from a PS-2 keyboard. Write a look-up table to convert scan codes to ASCII characters. Design a technique to map non-ASCII characters to something reasonable. You may investigate how Microsoft (or Java) handles keyboard processing.


Maintained by John Loomis, last updated 26 March 2009