public class Computation extends java.lang.Object implements Instruction
Constructor and Description |
---|
Computation(int cpuClocks)
Construct a computation instruction
|
Modifier and Type | Method and Description |
---|---|
int |
getCPUClocks()
The number of the CPU clocks the instruction takes to execute
|
void |
run(CPUCore cpuCore)
The implementation of the instruction
|
java.lang.String |
toString() |
public Computation(int cpuClocks)
cpuClocks
- The number of CPU clock cycles the instruction takes to executepublic void run(CPUCore cpuCore)
Instruction
run
in interface Instruction
cpuCore
- The CPU core where the instruction is runningpublic int getCPUClocks()
Instruction
getCPUClocks
in interface Instruction
public java.lang.String toString()
toString
in class java.lang.Object