User`s manual
Rabbit 4000 Designer’s Handbook rabbit.com 47
6.5.1.2 Origin Declaration Syntax
Following is an EBNF (Extended Backus Naur Form) representation of the origin grammar facets:
declarations, actions, and macros. Angle brackets (“<” and “>”) indicate non-terminals while terminals are
represented literally with these exceptions: the “|” symbol represents a disjunction, the “::=” represents a
definition, and the “[” and “]” symbols are used to enclose optional synatx.
<decl> ::= #orgdef <type> <name> [in <name>] <vector> <size> [locate
<int>]
<type> ::= <phy_org> | <log_org> | wcodorg | resvorg
<phy_org> ::= flashorg | bbramorg | fastramorg | xconorg | xcodorg |
xvarorg | xmemorg
<log_org> ::= rconorg | rcodorg | rvarorg
<vector> ::= below <offset> | above <offset>
<offset> ::= <position> [ log <int>] | <name> [ log <int> ]
<position> ::= phy <int> | start | end
<size> ::= size <int> | to <offset>
//
Origin declaration start and end syntax
<start> ::= #orgstart
<end> ::= #orgend
//
Origin application syntax
<orguse> ::= orgact <name> <action>
<action> ::= apply | resume
// Origin macro declaration syntax
<macdef> ::= #orgmac <define>
<define> ::= <name> = <orgval>
<orgval> ::= <name> [ <int> ] [ <boundary> ] <aspect>
<aspect> ::= <quality> <position> | size | fragments
<quality> ::= physical | logical | segment
<position> ::= start | end
6.5.1.3 Origin Declaration Semantics
The formal semantics of the origin declaration syntax are explained in this section.
<decl>
The non-terminal “decl” represents an origin declaration. All origin declarations begin with “#orgdef”.
<type>
The non-terminal “type” represents two subcategories of origins: physical origins and logical origins.
Physical origins do not require a logical beginning and ending address because they are not accessed
through logical addresses, or if they are, then through the xmem window, which is fixed. This distinction
has no obvious effect on the grammar as it is written, but influences a semantic restriction discussed later.
Physical origins are represented by the phy_org non-terminal and logical origins by log_org. The origin
types “wcodorg” and “resvorg” are exceptional because they may be either physical or logical.