EE 360N - Programming Assignment 2 Clarifications

  1. Do we need to implement the TRAP routines?

    No. Whenever a TRAP instruction is processed, after the last state, PC will be set to 0, if you implement the TRAP instruction correctly. The simulator halts whenever PC becomes 0.

  2. What could be the cause of "Warning: Extra bit(s) in control store file ucode."?

    This means that the ucode file has more than 35 columns. One reason why this can happen is if you've transferred the ucode file from Windows to Unix. Run dos2unix program on UNIX machines to remove the extra control characters inserted by Windows. You can do this by typing:

    dos2unix ucode ucode
    on any LRC SunOS or Linux machine. If this doesn't work, check to make sure that your ucode file has at most 35 columns.

  3. What is CYCLE_COUNT? Is this the counter for memory access?

    CYCLE_COUNT is a global variable used by the simulator to count the number of machine cycles elapsed since the program started execution. Do not change this variable. You will need to use another variable for simulating memory latency.

  4. How do we handle Memory Mapped I/O for this lab?

    You do not need to implement Memory Mapped I/O for this lab.

  5. You may assume that the code running on your simulator has been assembled correctly and that the instructions your simulator sees comply with the ISA specifications

  6. Added 8 October 2003
    For this lab do not worry about the problem with the state diagram changes for jsrr mentioned in class today, we will not be testing the JSRR R7 case. We will be updating this for the next assignment though.

  7. Added 8 October 2003
    In your code that you write for lab 2, do not assign the current latches to the next latches. This is already done in the shell code

  8. Added 8 October 2003
    I am getting values like xFFFFFFFF in my registers when they should be xFFFF instead, why is this?
    The variables in your c program are 32 bit values, so the nubmer -1 is xFFFFFFFF. You need to make sure that when you store values in a variable you mask them properly. For instance you would need to assign the var1 from var2 the statment var1 = var2 & 0xFFFF. This zeros out the top 16 bits before writing it into var1.