|
kiama 0.9.0 API
|
|
kiama/example/oberon0/machine/RISC.scala]
class
RISC(code : scala.Seq)
extends Machine| Type Summary | |
type
|
Word
Words are 32-bits long.
|
| Value Summary | |
lazy val
|
FP : Reg |
lazy val
|
LNK : Reg |
val
|
Mem
: State[scala.collection.immutable.Map[Int, Int]]
Byte addressed store of words.
|
val
|
N
: State[Boolean]
Condition code: less than.
|
lazy val
|
PC : Reg |
lazy val
|
R : scala.Array[Reg] |
lazy val
|
SP : Reg |
val
|
Z
: State[Boolean]
Condition code: zero.
|
val
|
halt
: State[java.lang.String]
Halt flag. Undefined until the machine is to stop executing.
|
| Values and Variables inherited from Machine | |
| name |
| Method Summary | |
def
|
arithmetic
(instr : Instr) : Unit
Execute arithmetic instructions.
|
def
|
control
(instr : Instr) : Unit
Execute control instructions, including default control step.
|
override def
|
debug
: Boolean
Debug flag. Set this to true in sub-classes or objects to obtain
tracing information during execution of the machine.
|
def
|
execute
(instr : Instr) : Unit
Execute a single instruction.
|
def
|
init
: Unit
Initialise the machine.
|
def
|
inputoutput
(instr : Instr) : Unit
Execute input/output instructions.
|
def
|
main
: Unit
The main rule of this machine.
|
def
|
memory
(instr : Instr) : Unit
Execute memory instructions.
|
| Methods inherited from Machine | |
| stateTToT, step, steps, run |
| Methods inherited from AnyRef | |
| getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
| Methods inherited from Any | |
| ==, !=, isInstanceOf, asInstanceOf |
| Class Summary | |
case class
|
Reg
(val name : java.lang.String) extends State[Int]
A named register.
|
| Type Details |
| Value Details |
lazy val
R : scala.Array[Reg]
lazy val
PC : Reg
lazy val
FP : Reg
lazy val
SP : Reg
lazy val
LNK : Reg
val
Mem : State[scala.collection.immutable.Map[Int, Int]]
val
halt : State[java.lang.String]
| Method Details |
override
def
debug : Boolean
def
init : Unit
def
main : Unit
|
kiama 0.9.0 API
|
|