Download Rabbit 4000 Microprocessor Designer`s Handbook

Transcript
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
<macdef>
::=
<define>
::=
<orgval>
::=
<aspect>
::=
<quality>
::=
<position> ::=
declaration syntax
#orgmac <define>
<name> = <orgval>
<name> [ <int> ] [ <boundary> ] <aspect>
<quality> <position> | size | fragments
physical | logical | segment
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.
Rabbit 4000 Designer’s Handbook
rabbit.com
41