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.
- Do Dr. Tarek Taha's assignment
2. I am interested in how
well the virtual UNIX system works (and the simulator software, of
course)
- Use the Nios II with timer project from
assignment 2. Write a C program to find the time required for
- multiplication of two integers
- division of two integers
- addition of two integers
- multiplication of two doubles
- division of two doubles
- addition of two doubles
- sqrt()
- 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.
- 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.
- 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