Charles Weems

Lecture 15

Monday, March 23, 2020 10:35 AM

Starting our online meetings today. Please send me your questions from the reading either as plain text email or as a shared Google doc that I can at least respond to by commenting on. I haven’t heard from the grader yet about the midterms, but will remind her to send me that information. Unfortunately, we don’t have a good way to return them to you. 

We looked at how to write assemblers, which you will need to do for your simulators. Note that you don’t have to make the assembler use a symbol table if you are comfortable with manually calculating and inserting address values and offsets into your code. However, it does make debugging much, much easier. And it is very useful to be able to import the symbol table into your simulator so that your GUI can identify memory locations symbolically, which makes it much easier to know where to set breakpoints, or just to follow what is happening as you single-step through the program. 

Our next demo will be on Wednesday of next week. This is where you should be able to show a program running with and without cache and pipeline, but only needing to use a bare minimum of instructions. As stated in the project handout:

For the demonstration, you just need to have enough instructions working to show that all of the major operation types (load, store, ALU, branch) are working. The simulator should be able to load a binary program, and then single-step execute it. The program must at least demonstrate loading and storing values between memory and registers, register-to-register arithmetic, and a conditional branch. A good demonstration is the equivalent of a for loop that reads a series of pairs of values from memory, adds them, stores the results back to memory, and exits when the loop control counter reaches the termination condition.

The simulator should keep and display a count of the execution cycles, and it should be possible to run both with and without a cache, and in a mode where the pipeline is disabled (each instruction goes all the way through before the next one starts). 

The user interface at this stage should support viewing the registers (including PC, status, etc.) and memory (main and cache) in hexadecimal, loading a program from a file, and stepping through it to see how the state changes. At this point, you will have all of the major components of the simulator working.

In addition to assemblers, we returned to the subject of virutal memory, moving from the basic overview we saw last time into more realistic systems that deal with large virtual addrss spaces, superpages, and multicores with sharing. These included radix page tables, hashed page tables, and translation lookaside buffers, as well as the placement of the translation and dealing with synonyms that arise as a result of having virtually mapped caches. 

Slides are here

CmpSci 535