public class SequencerSimulation extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
SequencerSimulation.FinalState
An object of this class can be obtained from the future returned by the
start method.
|
static interface |
SequencerSimulation.FunctionListener
A function listener is called any time a function is called.
|
static class |
SequencerSimulation.State |
static interface |
SequencerSimulation.StateListener
A state listener is called any time the sequencer state changes.
|
static interface |
SequencerSimulation.SubroutineListener
A subroutine listener is called any time a subroutine starts or ends
|
static interface |
SequencerSimulation.WaveformListener
A waveform listener is called any time an output transitions
|
| Constructor and Description |
|---|
SequencerSimulation(AddressSpace addressSpace)
Create a sequencer simulator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFunctionListener(SequencerSimulation.FunctionListener l)
Add a function listener.
|
void |
addStateListener(SequencerSimulation.StateListener l)
Add a state change listener.
|
void |
addSubroutineListener(SequencerSimulation.SubroutineListener l)
Add a subroutine listener.
|
void |
addWaveformListener(SequencerSimulation.WaveformListener l)
Add a waveform listener to listen to changes of the output waveforms.
|
int |
getMaxFunctionRepetitions()
The current maximum function repetition count.
|
int |
getMaxSubroutineRepetitions()
The current maximum subroutine repetition count.
|
int |
getRenormalization()
Get the number of times infinite loops will actually repeat.
|
SequencerSimulation.State |
getState()
Get the current state of the simulator.
|
void |
removeFunctionListener(SequencerSimulation.FunctionListener l)
Remove a function listener.
|
void |
removeStateListener(SequencerSimulation.StateListener l)
Remove a state change listener.
|
void |
removeSubroutineListener(SequencerSimulation.SubroutineListener l)
Remove a subroutine listener.
|
void |
removeWaveformListener(SequencerSimulation.WaveformListener l)
Remove a waveform listener.
|
void |
setMaxFunctionRepetitions(int maxFunctionRepetitions)
Allows the maximum repetition count for functions to be arbitrarily
limited.
|
void |
setMaxSubroutineRepetitions(int maxSubroutineRepetitions)
Allows the maximum repetition count for subroutines to be arbitrarily
limited.
|
void |
setRenormalization(int renormalization)
Limits how many times infinite loops will actually repeat.
|
void |
shutdown()
Shutdown the simulator, stopping any programs currently running.
|
Future<SequencerSimulation.FinalState> |
start()
Start the sequencer.
|
Future<SequencerSimulation.FinalState> |
trigger(int opcode)
Simulates use of the global proc method for starting or stopping the
sequencer using opcodes.
|
public SequencerSimulation(AddressSpace addressSpace)
addressSpace - The address space to which the sequencer will add its
registers.public Future<SequencerSimulation.FinalState> trigger(int opcode)
opcode - The opcode (0-31). Opcode 31 means step.null for opcode 31.public Future<SequencerSimulation.FinalState> start()
public void shutdown()
public SequencerSimulation.State getState()
public int getMaxSubroutineRepetitions()
0 if
unlimited.setMaxSubroutineRepetitions(int)public void setMaxSubroutineRepetitions(int maxSubroutineRepetitions)
maxSubroutineRepetitions - The maximum number of repetitions, or
0 to remove any limit.public int getMaxFunctionRepetitions()
0 if
unlimited.setMaxFunctionRepetitions(int)public void setMaxFunctionRepetitions(int maxFunctionRepetitions)
maxFunctionRepetitions - The maximum number of repetitions, or
0 to remove any limit.public int getRenormalization()
0 to indicate unlimited.setRenormalization(int)public void setRenormalization(int renormalization)
renormalization - The number of repetitions used for infinite loops,
or 0 to indicate no limit.public void addStateListener(SequencerSimulation.StateListener l)
l - The state change listenerpublic void removeStateListener(SequencerSimulation.StateListener l)
l - The state change listenerpublic void addSubroutineListener(SequencerSimulation.SubroutineListener l)
l - The subroutine listenerpublic void removeSubroutineListener(SequencerSimulation.SubroutineListener l)
l - The subroutine listener.public void addFunctionListener(SequencerSimulation.FunctionListener l)
l - The function listenerpublic void removeFunctionListener(SequencerSimulation.FunctionListener l)
l - The function listener.public void addWaveformListener(SequencerSimulation.WaveformListener l)
l - The waveform listener.public void removeWaveformListener(SequencerSimulation.WaveformListener l)
l - The waveform listener.Copyright © 2020 LSST. All rights reserved.