Instructions for DLX Software on Glue
DLX is the name of a simple RISC ISA. It is a simplified version of the MIPS architecture, and is quite similar to it. While the architecture is simple, it accurately portrays many aspects of many modern RISC ISAs. The DLX instruction set is summarized in a one-page pdf file also found on the course website.
You will need use a simulator for DLX called dlxsim. dlxsim has been installed in a publicly-visible directory in glue, so all of you should be able to use it.
To have access to DLX software:
Make a link to DLX by typing the following in your home directory in glue:
ln -s /afs/glue/class/enee/759c/dlx dlx
Subsequently you should be able to go to the above dlx directory by directly typing 'cd dlx' in your home directory.
To set your execution and man paths correctly, put in the following two lines in a file called .cshrc.mine in your home
setenv PATH /afs/glue/class/enee/759c/dlx/bin:$PATH
Logout and then login again so that you see the paths.
To use dlxsim:
Example DLX Assembly Language Programs:
There is an example program under the directory ~/dlx/test/dummy.s and many other examples in order to help you get acquainted with dlx assembly language. Each also has an associated C file from which the assembly file was produced using the DLX compiler, DLXCC. For example, dummy.s was produced by compiling dummy.c in the same directory.
Dummy.s: This program calculates the average of two float numbers 3.5 and 5.0. It consists of a _main function that calls a function average. Execution in dlxsim always starts at _main when invoked as 'go _main'. Look at the program to see how it works, first in its .c form, and then in its .s form.
Try simulating dummy.s in dlxsim using the directions above, and see the result. Try setting some breakpoints using the instructions in the dlxsim manual. This will help you get familiar with breakpoints. View the values of some registers using the appropriate dlxsim commands. View some statistics as well.
To modify the DLX simulator:
Copy the directory ~/dlx/dlxsim/ and all
its contents into a separate folder under your home directory. Call it whatever
you want like mydlxsim.
Before making any modification to DLXSIM:
Delete dlxsim by typing "rm dlxsim" in mydlxsim directory.
Type "gmake" to recompile everything and create dlxsim again in your directory.
Run your version of dlxsim and make sure it works as it should. (To make sure that you are running your version, use the full path to your directory. Otherwise you are probably running the dlxsim the instructor provided. If you are not sure, type "which dlxsim" on a glue prompt to find out the path to what you are running. You can modify the PATH to look in your directory first if you want to, for convenience, to avoid typing the full path to your version of DLXSIM every time)
You are now ready to modify DLX. Make the modifications required by your project and recompile using the last two bullets above.