EE 360N - Programming Assignment 3 Clarifications
Make sure you change the name of the function "cycle_memory"
in the shell code of Lab 4
to "cycle_memory_io" (what you have been using).
This is a mistake in the shell code.
How to generate the dumpsim file.
Dump the memory locations containing the page table entries once before
the 300th cycle i.e. do the dump when cycle count is 300 since this dumps state at the end of cycle 299.
When checking for exceptions, we specify that you check for the protection
exception first and then for the page fault exception.
However, when you check for protection exceptions, you should check if the
PTE is valid also. That is, if the PTE is 0x0000, you should take a page
fault instead of a protection exception since the PTE is not even valid.
Only when the PTE is valid can a protection exception be taken.
The order of checking exception should remain the same.
The correction can be made by adding a simple logic operation in the state
where you check for protection exceptions.
- Do NOT make the above correction.
Initializing all PTE entries for user space(0x3000-0xFFFF) with the appropriate protection bit will solve the problem.
All PTEs of user space pages that are invalid should have a value of 0x0008.(Protection bit set)
Protection exceptions are checked first, and then page fault exceptions are checked.
- The "add" program you write should generate a protection exception
instead of a page fault. This was an error in the description