We provide sample data files that help you test your program. They are available
from our ftp server.
Here, you will also find the source code of the programs we use in lecture.
For each assignment, you'll probably want to copy the appropriate files to an
empty directory on your system. There are a number of ways to copy the files
depending on your system.
Use your browser. For example,
from IE 6.0, go to the ftp server,
right click on the folder cycle, and select "Copy to Folder".
Use an ftp application. Enter ftp.cs.princeton.edu as the desired
site. Use the username anonymous and enter your email address for your
password.
From Unix, you can do this from the command line with a command like the
following:
scp -r userid@arizona.princeton.edu:/u/cs126/files/cycle .
On arizona, you can shorten it to
cp -r /u/cs126/files/cycle .
If you are struggling, here are some
hints on getting started.
If you aren't experiencing problems, then there's no need to look.
To test your code, run your program with the various parameters
used in the assignment or you can use the values in
these text files.
Also, you should run your program on different parameters of
your own choosing.
You can check your work by comparing your results with our reference
programs: trace126-sparc and cycle126-sparc for arizona;
trace126.exe and cycle126.exe for Windows.
The executables are available via
ftp://ftp.cs.princeton.edu/pub/cs126/cycle.
Submit the following files using the submission system from the course
web page: trace.c
, cycle.c
, and readme.txt
.
Don't forget to hit the Run Script button after you've sumbmitted all of
your files.
Be sure that you do the following in your
readme.txt file:
Write your name, login, and precept number.
Write which operating system, C compiler, and editor you used.
List whatever help (if any) that you received.
Describe any serious problems you encountered.
Do not exceed 80 characters per line.
Here is a
readme file template to get you started.
If you need pseudo-random numbers in real scientific
applications, we recommend the
Mersenne Twister.
For cryptographic applications, use only
pseudo-random numbers that are cryptographically secure
such as
Yarrow.
Kevin Wayne