Here is a bunch of code from my undergraduate days presented here for reference only. Please do not turn this code in as your own work. You will get caught.
NAME | DESCRIPTION | SOURCE |
MIPS Datapath | A VHDL implementation of a MIPS datapath. Done as an assignment for cs161, Fall '01. | datapath.vhd components.vhd |
MIPS CONTROL | The datapath above, with a control unit added. Again, done as an assignment for cs161, Fall '01. | alucontrol.vhd components.vhd control.vhd datapath.vhd mips.vhd |
CACHE SIMULATOR | A C++ cache simulator. Takes an input file that contains memory addresses seperated by returns and outputs hit rate for various cache sizes and associativities. Done as an assignment for cs161, Fall '01. | block.cc block.h main.cc |
PRIME TESTER | Takes an integer and uses Erastothenes' Sieve to determine if it is prime or not. Written in LC-2 assembly, which only has sixteen instructions and lacks an XOR instruction, among other things. Done for cs61, Spring '01. | as1.asm |
ODD/EVEN CHECK | Takes an integer and determines if it is odd or even. Really easy, right?? Just check the least significant bit?? But remember, this is LC-2, where easy things are hard and hard things are impossible. 204 lines of code...what a waste. Assignment for cs61, Spring '01. | as2.asm |
LINUX SHELL | This is a simple Linux shell I did for cs153. It supports redirection, piping, and history commands. | shell.c |
LINUX EDF SCHEDULING | This is a modification of the Linux kernel scheduler file to support EDF scheduling. I use the GID process field to keep track of deadlines. I also have a few test files. |
sched.c test.c test2.c test3.c |
MSDOS FLOPPY FILE SYSTEM API | Here I implemented a bunch of functions to access files in an MSDOS floppy file system. The floppy image is read from tmp.img. Also included are test files. |
floppy.h floppy.c main1.c main2.c main3.c |