com.cmpware.cmp
Class MpMon

java.lang.Object
  extended by com.cmpware.cmp.MpMon

public class MpMon
extends java.lang.Object

This class implements a Multiprocessor Monitor interface. A simple stand-alone text-based interface is also provided.

Copyright (c) 2004 Cmpware, Inc. All Rights Reserved.

Author:
SAG

Field Summary
static java.lang.String copyright
          Copyright string
static java.lang.String[] help
          The help string(s)
static java.lang.String linkClassName
          The link class
static java.lang.String networkClassName
          The network class
static java.lang.String prompt
          The prompt string
static boolean quit
          The 'quit' flag
static java.lang.String systemMemoryClassName
          The link class
static java.lang.String usage
          The Usage string
 
Constructor Summary
MpMon()
           
 
Method Summary
static java.lang.String command(java.lang.String cmd, Multiprocessor mp)
          This method takes in a command string and returns a string containing the result output.
static java.lang.String dasm(Processor p, int addr, int n)
          This method returns a text representation of a disassembly of multiple instructions.
static java.lang.String dumpMemoryMap(Processor p)
          This method returns a string representation of the memory map.
static java.lang.String dumpMemoryProfile(MemoryInterface m)
          This method returns a string representation of the memory profile table.
static java.lang.String dumpMemoryProfile(Processor p)
          This method returns a string representation of the memory profile table.
static java.lang.String dumpRegisters(Processor p)
          This method returns a string representing the General Purpose Registers and their current values.
static java.lang.String dumpSpecialRegisters(Processor p)
          This method returns a string representing the Special Purpose Registers and their current values.
static void fill(Processor p, byte a, int addr, int size)
          This method fills a section of memory of 'size' bytes starting at address 'addr' with the value 'a'.
static java.lang.String getPrompt(Multiprocessor mp)
          This method returns the prompt string.
static void main(java.lang.String[] args)
          This main method is used to bring up a single stand-alone monitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
Copyright string

See Also:
Constant Field Values

help

public static final java.lang.String[] help
The help string(s)


networkClassName

public static java.lang.String networkClassName
The network class


linkClassName

public static java.lang.String linkClassName
The link class


systemMemoryClassName

public static java.lang.String systemMemoryClassName
The link class


prompt

public static java.lang.String prompt
The prompt string


usage

public static final java.lang.String usage
The Usage string

See Also:
Constant Field Values

quit

public static boolean quit
The 'quit' flag

Constructor Detail

MpMon

public MpMon()
Method Detail

main

public static void main(java.lang.String[] args)
This main method is used to bring up a single stand-alone monitor.

Parameters:
args - The parameters passed to the main method. See "usage" for more information on the expected parameters.

command

public static java.lang.String command(java.lang.String cmd,
                                       Multiprocessor mp)
This method takes in a command string and returns a string containing the result output.

Parameters:
cmd - The input command.
mp - The Multiprocessor object.
Returns:
The string output of the command is returned.

getPrompt

public static java.lang.String getPrompt(Multiprocessor mp)
This method returns the prompt string.

Parameters:
mp - The multiprocessor.
Returns:
This method returns the prompt string.

dasm

public static java.lang.String dasm(Processor p,
                                    int addr,
                                    int n)
This method returns a text representation of a disassembly of multiple instructions. It takes breakpoints into account and returns the instruction at the breakpoint, not the actual data in memory at that address.

Parameters:
addr - The address at which to start disassembly.
n - the number of instructions to disassemble.
Returns:
This method returns a text representation of a disassembly of multiple instructions.

dumpRegisters

public static java.lang.String dumpRegisters(Processor p)
This method returns a string representing the General Purpose Registers and their current values. This string is formatted across multiple lines and should be suitable for display in a text-based monitor-style interface.

Parameters:
p - The processor
Returns:
This method returns a string representing the General Purpose Registers and their current values.

dumpSpecialRegisters

public static java.lang.String dumpSpecialRegisters(Processor p)
This method returns a string representing the Special Purpose Registers and their current values. This string is formatted across multiple lines and should be suitable for display in a text-based monitor-style interface.

Parameters:
p - The processor
Returns:
This method returns a string representing the General Purpose Registers and their current values.

dumpMemoryMap

public static java.lang.String dumpMemoryMap(Processor p)
This method returns a string representation of the memory map.

Parameters:
p - The processor.
Returns:
This method returns a string representation of the memory map.

dumpMemoryProfile

public static java.lang.String dumpMemoryProfile(Processor p)
This method returns a string representation of the memory profile table.

Parameters:
p - The processor.
Returns:
This method returns a string representation of the memory profile table.

dumpMemoryProfile

public static java.lang.String dumpMemoryProfile(MemoryInterface m)
This method returns a string representation of the memory profile table.

Parameters:
m - The memory.
Returns:
This method returns a string representation of the memory profile table.

fill

public static void fill(Processor p,
                        byte a,
                        int addr,
                        int size)
                 throws MemoryAccessException
This method fills a section of memory of 'size' bytes starting at address 'addr' with the value 'a'.

Parameters:
a - The value to fill the memory with.
addr - The start address of the memory to be filled.
size - The number of bytes to fill.
Throws:
MemoryAccessException - if an illegal memory address is encountered.