School of computer science

Georgia Institute of Technology

CS4803DGC, Spring 2009
Assignment #2
Due: Wednesday, Feb. 5, 5:55 pm
Hyesoon Kim, Instructor

  • How to use assembler?

    assembler.linux where source.asm is the input assembly language file, and output.obj is the output file that will contain the assembled code.
    E.g)
    assembler.linux add.asm add.hex
    The contents in add.asm

    .ORIG x3000
    ADD R0, R0, #0
    HALT
    .END
    
    The contents in add.hex
    0x3000
    0x1020
    0xF025
    

  • Are we to simulate the 5 cycle delay required to access main memory?

    Hw#1 is building a functional simulator (i.e., there is no timing information).
    The simulator processes one instruction at a time.
    Each cycle, it fetches one instruction, decodes, executes and updates NEXT_LATCHES.

  • Do we need to implement PSR?

    For this assignment, you do not need to worry about PSR.

  • Can I use c++?

    Please use C instead of C++. If we cannot compile your code using gcc, your assignment might not be graded.

  • How can I load a program into the memory? How can I set the first PC value?

    Please look at "load_program" function in the simulator. The simulator already handles that.

  • Do we need to implement a trap vector table?

    No, you do not need to implement a trap vector table.

  • How to access the memory?

    please look at "load_program". It has a good example of accessing the memory.

  • Are we implementing 14 instructions in Appendix A?

    You have to implement all the instructions in Figure A.3.

  • Do we need to generate any exceptions? such as STW or LDW?

    For this assignment, no you do not need to generate exceptions.