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)
Instructionrun in interface InstructioncpuCore - The CPU core where the instruction is runningpublic int getCPUClocks()
InstructiongetCPUClocks in interface Instructionpublic java.lang.String toString()
toString in class java.lang.Object