ModMultiSim help v3.07 - 5. ModMultiSim Language
Download manual: HTML
The ModMultiSim language is used to create a statement for a register, or environment property, and this is used by ModMultiSim to calculate the value of a register or an environment property.
When running the slave simulation (the Run Interval, which can be changed (see section Edit Run Interval for how to enter a new time for the Run Interval).
button on the toolbar is highlighted), the values of registers and environment properties are calculated periodically. The 'period' is the value ofA statement may be entered when first adding a register or property via the Add Register and Add Property). Once the register or environment property is added, it can be edited from the panels described in the sections Edit Register Statement and Edit Property Statement. (The latter two panels can also be accessed by clicking the checkbox of the Statement column of the register, or property, in ModMultiSim's main window.)
→ dialog (Initially, you might prefer to look at some examples of the language use in a simulation by going to the section of that name Programming Simulations.
The ModMultiSim language for entering a statement is a small subset of a normal programming language. A summary of the syntax is provided in Syntax Summary. The first section, Lexical Structure, describes the symbols used and how they are combined to form fundamental units. In the Phrase Structure section, larger components of the language are described.
In the description of the language, the notation is as follows:
italic represents the syntactic groups that describe the language
A colon following a syntactic group indicates the definition (in terms of other groups or terminal symbols) to follow.
A | symbol or a newline indicates an alternative syntactic definition.
A ? symbol indicates an optional entity.
A * symbol after a syntactic group within braces {...}* indicates zero or more of the group.
indicates a terminal symbol (i.e. the symbol used in a program not the description of it). (The bold may not show clearly for all characters in the fonts installed on your system.)
In the following illustration of the notation, the unary_sign is optional; the term_expr is obligatory, and there may be zero or more {binary_sign term_expr} expressions. The { and } here indicate the group to which the '*' applies.
numeric_expr :
unary_sign? term_expr {binary_sign term_expr}*
In this illustration of the notation, the identifier, constant, , , and left_parenth numeric_expr right_parenth are all alternative definitions of a primary_expr. Note the bold type of the terminal symbols and .
primary_expr:
identifier
constant
left_parenth bitwise_expr right_parenth
The following shows the use of the | symbol (rather than a new line) to separate the alternative terminal symbols
:multiplier : | |