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

directory.  If the file does not exist, create it.  Type or paste the text exactly as below.  Make sure there is an end-of-line character at the end of each line.

    setenv MANPATH /afs/glue/class/enee/759c/dlx/man:$MANPATH

    setenv PATH /afs/glue/class/enee/759c/dlx/bin:$PATH

Logout and then login again so that you see the paths.

 

To use dlxsim:

More Details about dlxsim is found in dlxsim manual on the class website.  Please print out and view that document using Adobe acrobat reader.  Read that document carefully to learn about DLXSIM.  In that document, section 1 lists how to use the simulator including running a program, collecting statistics, and setting breakpoints.  You should try doing all of these tasks for an example program.  Section 1 also lists the command-line arguments and the assembly file format assumed.  Section 2 describes interactive sessions with DLXSIM on two dlx assembly programs.  Finally, section 3 lists some internals about DLXSIM implementation.  You will need to read all three sections carefully to be able to do this project.

 

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: 

You are now ready to modify DLX.  Make the modifications required by your project and recompile using the last two bullets above.