public class InstructionFactory
extends java.lang.Object
| Constructor and Description |
|---|
InstructionFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Computation |
newComputation(int clockCycles)
Create an instance of a
computation instruction |
static Loop |
newLoop(int numIterations,
InstructionList instructionList)
Create an instance of a
loop instruction |
static MemoryAccess |
newMemoryLoad(long address)
Create an instance of a
load instruction |
static MemoryAccess |
newMemoryStore(long address)
Create an instance of a
store instruction |
static SysCall |
newSysCall(java.lang.String sysCall,
int[] arguments)
Create an instance of a
syscall instruction |
public static Computation newComputation(int clockCycles)
computation instructionclockCycles - Clock cycles the computation takesconfigured computation classpublic static SysCall newSysCall(java.lang.String sysCall, int[] arguments) throws NoSuchSysCallException
syscall instructionsysCall - The number/identifier of the system callarguments - The arguments of the system callconfigured system call classNoSuchSysCallException - No such system call exceptionpublic static MemoryAccess newMemoryLoad(long address)
load instructionaddress - The source addressconfigured memory load classpublic static MemoryAccess newMemoryStore(long address)
store instructionaddress - The destination addressconfigured memory store classpublic static Loop newLoop(int numIterations, InstructionList instructionList)
loop instructionnumIterations - Number of iterationsinstructionList - The body of the loopclass