ECE 595c Computer and Digital Design Assignment 3

  1. Program the mouse to send packets at the default rate by sending the command F4. Mouse packets contain X and Y motion data in twos-complement form. Start with an absolute cursor location of 320 x 240, and add each motion value to the current location. Display the current value on the seven-segment displays, using 4 digits per value. Map the mouse buttons to three green LEDS.

  2. Write a Verilog module to convert a binary number to BCD.

  3. Download the two programs from sys2_software.zip.

    1. Modify the programs to use your name instead of mine. Run nios2-elf-size from the IDE command window to determine the size of each program.

    2. Modify the C program to display the values of 32-bit words as 8 hex digits or as ASCII characters. Use a period for non-printing byte values.

    3. Modify the C++ program to instantiate three objects in global memory. Use your program to determine the order that the destructors are called (FIFO or FILO).

  4. Create a Verilog module to output the linear interpolation of two values. Let the interpolated value y be calculated as y = x1 (1-q) + x2 q where xi and y are 12-bit positive integers and q is an 8-bit binary fraction.


Maintained by John Loomis, last updated 21 June 2007