Project

General

Profile

NML Language Reference » History » Revision 3

Revision 2 (Andrei Tatarnikov, 06/17/2013 06:06 PM) → Revision 3/84 (Andrei Tatarnikov, 06/17/2013 06:10 PM)

h1. Sim-nML Language Reference 


 p. 

 <pre> 

 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 
 microprocessor architectures that architectures. Sim-nML works at the instruction set level hiding 
 implementation details of the microprocessor design. Sim-nML is based on 
 attribute grammar and represents a programmer’s model that includes the 
 following elements: register and memory definitions, supported addressing modes, 
 syntax and semantics of instructions. 

 p. 
 </pre> 


 Sim-nML uses a hierarchical tree-like structure to describe an instruction set. 
 Such a structure facilitates grouping related instructions and sharing their common 
 parts. An instruction is described as a path in the tree from the root node to a leaf 
 node. The set of all possible paths represents an instruction set. A node describes a 
 primitive operation responsible for some task within an instruction. Nodes have 
 attributes that can be shared with their parents. Actions performed by instructions 
 are described as operations with registers and memory that represent bit vectors of 
 arbitrary size. 

 p. 
        A specification in Sim-nML starts with definitions of types and constants. 
 For example, a type definition for a 32-bit word looks as follows: 

 *let* WORD_SIZE = 32 
 *type* word = *card*(WORD_SIZE)