|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--CPU
The CPU class simulates the central processing unit of a computer. In reality, this class just provides timekeeping and reporting services.
It defines the following constants for use by other classes:
Field Summary | |
static int |
ADDRESS_BIT_COUNT
CPU.ADDRESS_BIT_COUNT is the number of bits in a CPU address. |
static int |
LOGICAL_SIZE
CPU.LOGICAL_SIZE is the number of bytes in the logical address space of the CPU. |
static int |
PAGE_COUNT
CPU.PAGE_COUNT is the number of pages in a task's logical address space. |
Method Summary | |
static int |
getCurrentTime()
CPU.getCurrentTime() returns the amount of time that the CPU has been running. |
static void |
report(java.lang.String msg)
CPU.report(msg) issues a report with content msg. |
static void |
tick()
CPU.tick() simulates a CPU clock cycle, adding 1 to the current time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ADDRESS_BIT_COUNT
public static final int LOGICAL_SIZE
This definition should not be changed. To change the address size, change the ADDRESS_BIT_COUNT definition.
public static final int PAGE_COUNT
This definition should not be changed. To change the number of pages, change the LOGICAL_SIZE definition or the MMU.PAGE_SIZE definition.
Method Detail |
public static int getCurrentTime()
public static void tick()
public static void report(java.lang.String msg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |