Project

General

Profile

NML Language Reference » History » Version 2

Andrei Tatarnikov, 06/17/2013 06:06 PM

1 1 Alexander Kamkin
h1. Sim-nML Language Reference
2
3 2 Andrei Tatarnikov
<pre>
4
5
Sim-nML is a mixed ADL that is used for creating various simulators and disassemblers [4]. It is a high-level formalism targeted for describing arbitrary
6
microprocessor architectures. Sim-nML works at the instruction set level hiding
7
implementation details of the microprocessor design. Sim-nML is based on
8
attribute grammar and represents a programmer’s model that includes the
9
following elements: register and memory definitions, supported addressing modes,
10
syntax and semantics of instructions.
11
</pre>
12
13
14
Sim-nML uses a hierarchical tree-like structure to describe an instruction set.
15
Such a structure facilitates grouping related instructions and sharing their common
16
parts. An instruction is described as a path in the tree from the root node to a leaf
17
node. The set of all possible paths represents an instruction set. A node describes a
18
primitive operation responsible for some task within an instruction. Nodes have
19
attributes that can be shared with their parents. Actions performed by instructions
20
are described as operations with registers and memory that represent bit vectors of
21
arbitrary size.
22
       A specification in Sim-nML starts with definitions of types and constants.
23
For example, a type definition for a 32-bit word looks as follows: