EE 360N - How to generate the dumpsim files for Programming Assignment 2

How to generate the dumpsim file:

  1. Run your simulator by issuing the command:

    lc2sim ucode log2.obj data.obj

    Where lc2sim is the executable of your simulator code, log2.obj is the log2 program that you wrote for Lab Assignment 1 and data.obj is a file that contains the value to be read into memory location 0x4000. data.obj should look like this:

    0x4000
    0x1234
    
    You can replace 1234 with any value you want to test on your swap program.
  2. Before you start simulating cycles, dump the contents of memory locations 0x4000-x4002 by typing:

    md 0x4000 0x4002

  3. Start your simulation by typing 'g'.
  4. After your simulator stops, dump the contents of memory location 0x4000-x4002 by typing
  5. md 0x4000 0x4002

  6. Enter 'q' to exit the simulator.
  7. Now, you have just created one of your dumpsim files. You can rename this file to dumpsim1 using the following command
  8. mv dumpsim dumpsim1

  9. You should create two other dumpsim files in a similar fashion using different data values in location x4000.