ECE 449 Computer Systems Engineering Assignment 3

Write a description of how you implemented each of the following projects, including Verilog files. Demonstrate the working projects to the instructor.

  1. Do Dr. Tarek Taha's assignment 2. I am interested in how well the virtual UNIX system works (and the simulator software, of course)

  2. Use the Nios II with timer project from assignment 2. Write a C program to find the time required for
    1. multiplication of two integers
    2. division of two integers
    3. addition of two integers
    4. multiplication of two doubles
    5. division of two doubles
    6. addition of two doubles
    7. sqrt()
    8. sin()

    You will need to "fool" the compiler into thinking you really want the results (maybe by saving them to an array that you then sum, or passing the results as the return argument of a function). Otherwise the compiler may "optimize" them away and never do the calculation.

  3. Use the Nios II with timer project to calibrate the usleep routine. Measure the time required to call usleep as a function of the argument passed to usleep. Choose a range of 1000 to 10,000 in steps of 1000 and 100,000 to 1,000,000 in steps of 100,000. (or devise a better test). Plot the measured time (from timer) vs. the argument value and verify linearity. Use this data to determine the actual time per millisecond requested.

  4. Use the debugger to step into usleep. Extract the source code at the heart of the function (which may be alt_sleep. Discuss how the code acts as a timing function. Those of you further ahead should rebuild sys2 WITH a timer module (default timing). Does this new system use a different system utility for usleep?


Maintained by John Loomis, last updated 18 February 2010