|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.actions.Action
avrora.actions.SimAction
The SimAction is an abstract class that collects many of the options common to single node and
multiple-node simulations into one place.
| Field Summary | |
Option.Str |
CHIP
|
Option.Long |
ICOUNT
|
protected java.util.LinkedList |
monitorFactoryList
|
protected java.util.HashMap |
monitorListMap
|
protected ClassMap |
monitorMap
|
Option.List |
MONITORS
|
Option.Str |
PLATFORM
|
Option.Bool |
REPORT_SECONDS
|
Option.Double |
SECONDS
|
Option.Long |
SECONDS_PRECISION
|
Option.Long |
TIMEOUT
|
Option.Str |
VISUAL
|
| Fields inherited from class avrora.actions.Action |
help, options, shortName |
| Constructor Summary | |
protected |
SimAction(java.lang.String sn,
java.lang.String h)
|
| Method Summary | |
static java.util.List |
getLocationList(Program program,
java.util.List v)
The getLocationList() method is to used to parse a list of program locations and turn them
into a list of Main.Location instances. |
protected MicrocontrollerFactory |
getMicrocontroller()
The getMicrocontroller() method is used to get the current microcontroller from the
library of implemented ones, based on the command line option that was specified (-chip=xyz). |
protected PlatformFactory |
getPlatform()
The getPlatform() method is used to get the current platform from the library of
implemented ones, based on the command line option that was specified (-platform=xyz). |
protected boolean |
hasMonitors(Simulator s)
|
protected void |
initializeSimulatorStatics()
The initializeSimulatorStatics() method simply checks a few command line
parameters and initializes the Simulator class's static variables that relate
to reporting time, etc. |
protected Simulator |
newSimulator(InterpreterFactory factory,
Program p)
The newSimulator() method is a simple utility used by actions deriving from this
class that creates a new Simulator with the correct configuration, with the specified
program, and then applies timeouts, breakpoints, and monitors to it. |
protected Simulator |
newSimulator(Program p)
The newSimulator() method is used by subclasses of this action to create a new instance of
a simulator with the correct platform. |
protected void |
printSeparator()
|
protected void |
printSimHeader()
The printSimHeader() method simply prints the first line of output that names
the columns for the events outputted by the rest of the simulation. |
protected void |
processMonitorList()
The processMonitorList() method builds a list of MonitorFactory instances
from the list of strings given as an option at the command line. |
protected void |
processTimeout(Simulator s)
The processTimeout() method simply checks the command line arguments that
correspond to timeouts (such as clock cycles, seconds, or instructions) and inserts
the appropriate probes into the simulator. |
protected void |
reportMonitors(Simulator s)
The reportMonitors() method gets a list of Monitor instances attached to the
simulator and calls each of their report() methods. |
protected void |
reportQuantity(java.lang.String name,
float val,
java.lang.String units)
The reportQuantity() method is a simply utility to print out a quantity's name
(such as "Number of instructions executed", the value (such as 2002), and the units (such as
cycles) in a colorized and standardized way. |
protected void |
reportQuantity(java.lang.String name,
long val,
java.lang.String units)
The reportQuantity() method is a simply utility to print out a quantity's name
(such as "Number of instructions executed", the value (such as 2002), and the units (such as
cycles) in a colorized and standardized way. |
protected void |
reportQuantity(java.lang.String name,
java.lang.String val,
java.lang.String units)
The reportQuantity() method is a simply utility to print out a quantity's name
(such as "Number of instructions executed", the value (such as 2002), and the units (such as
cycles) in a colorized and standardized way. |
| Methods inherited from class avrora.actions.Action |
getHelp, getShortName, newOption, newOption, newOption, newOption, newOption, newOptionList, run |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final Option.Long ICOUNT
public final Option.Double SECONDS
public final Option.Long TIMEOUT
public final Option.Str CHIP
public final Option.Str PLATFORM
public final Option.List MONITORS
public final Option.Bool REPORT_SECONDS
public final Option.Long SECONDS_PRECISION
public final Option.Str VISUAL
protected ClassMap monitorMap
protected java.util.LinkedList monitorFactoryList
protected java.util.HashMap monitorListMap
| Constructor Detail |
protected SimAction(java.lang.String sn,
java.lang.String h)
| Method Detail |
protected MicrocontrollerFactory getMicrocontroller()
getMicrocontroller() method is used to get the current microcontroller from the
library of implemented ones, based on the command line option that was specified (-chip=xyz).
MicrocontrollerFactory for the microcontroller specified on the
command line.protected PlatformFactory getPlatform()
getPlatform() method is used to get the current platform from the library of
implemented ones, based on the command line option that was specified (-platform=xyz).
PlatformFactory for the platform specified on the command line
protected void reportQuantity(java.lang.String name,
long val,
java.lang.String units)
reportQuantity() method is a simply utility to print out a quantity's name
(such as "Number of instructions executed", the value (such as 2002), and the units (such as
cycles) in a colorized and standardized way.
name - the name of the quantity as a stringval - the value of the quantity as a long integerunits - the name of the units as a string
protected void reportQuantity(java.lang.String name,
float val,
java.lang.String units)
reportQuantity() method is a simply utility to print out a quantity's name
(such as "Number of instructions executed", the value (such as 2002), and the units (such as
cycles) in a colorized and standardized way.
name - the name of the quantity as a stringval - the value of the quantity as a floating point numberunits - the name of the units as a string
protected void reportQuantity(java.lang.String name,
java.lang.String val,
java.lang.String units)
reportQuantity() method is a simply utility to print out a quantity's name
(such as "Number of instructions executed", the value (such as 2002), and the units (such as
cycles) in a colorized and standardized way.
name - the name of the quantity as a stringval - the value of the quantity as a stringunits - the name of the units as a stringprotected void processMonitorList()
processMonitorList() method builds a list of MonitorFactory instances
from the list of strings given as an option at the command line. The list of
MonitorFactory instances is used to create monitors for each simulator as it is created.
protected Simulator newSimulator(Program p)
newSimulator() method is used by subclasses of this action to create a new instance of
a simulator with the correct platform. This method also creates monitors for the simulator instance as
specified from the command line.
p - the program to load onto the simulator
Simulator class that has the specified programs loaded onto it
and has monitors attached to as specified on the command line
protected Simulator newSimulator(InterpreterFactory factory,
Program p)
newSimulator() method is a simple utility used by actions deriving from this
class that creates a new Simulator with the correct configuration, with the specified
program, and then applies timeouts, breakpoints, and monitors to it.
factory - the factory that creates the interpreter for the simulatorp - the program to load onto the simulator
Simulator instanceprotected void processTimeout(Simulator s)
processTimeout() method simply checks the command line arguments that
correspond to timeouts (such as clock cycles, seconds, or instructions) and inserts
the appropriate probes into the simulator.
s - protected void reportMonitors(Simulator s)
reportMonitors() method gets a list of Monitor instances attached to the
simulator and calls each of their report() methods.
s - the simulator for which to report all the monitorsprotected boolean hasMonitors(Simulator s)
public static java.util.List getLocationList(Program program,
java.util.List v)
getLocationList() method is to used to parse a list of program locations and turn them
into a list of Main.Location instances.
program - the program to look up labels inv - the list of strings that are program locations
protected void printSimHeader()
printSimHeader() method simply prints the first line of output that names
the columns for the events outputted by the rest of the simulation.
protected void printSeparator()
protected void initializeSimulatorStatics()
initializeSimulatorStatics() method simply checks a few command line
parameters and initializes the Simulator class's static variables that relate
to reporting time, etc.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||