beautypg.com

Pm designer operation manual – B&B Electronics WOP-2121V-N4AE - Manual User Manual

Page 420

background image

4

14

PM Designer Operation Manual

14-11

CHAPTER 14 USING MACROS

Terminology

Definition

External variable

An address or a tag referring to an address of a space in the external memory.

External bit variable

An external variable that refers to a bit in the external memory.

For easy to read, we usually use “external variable” instead of “external bit variable” when
referring to a bit if there is no ambiguity.

External word
variable

An external variable that refers to a word in the external memory.

The variables can also be used to refer to a double-word, a block of bytes (byte array), a
block of words (word array), and a block of double-words (double-word array) if the access
unit of the associated addresses is word. If the access unit is double-word, you can only use
the variable to refer to a double-word or a block of memory space with a length of a multiple
of 4 (bytes).

For easy to read, we usually use “external variable” instead of “external word variable” when
referring to a word or a block of memory space if there is no ambiguity,

Expression

Type

Abbreviation

Description

Arithmetic
Expression

AE

Sequences of operators and parameters that are
used for computing a value from the parameters.

Comparison
Expression

CE

Sequences of operators and parameters that are
used for comparing value from the parameters.

PM Designer provides the following types of operators for macro expressions:

Operators

Name or Meaning

Grouping

Used for

( )

Parentheses

Left to right

AE/CE

*

Multiplication

Left to right

/

Division

Left to right

%

Modulus

Left to right

+

Addition

Left to right

-

Subtraction

Left to right

<<

Left shift

Left to right

>>

Right shift

Left to right

AE

<

Less than

Left to right

>

Greater than

Left to right

<=

Less than or equal to

Left to right

>=

Greater than or equal to

Left to right

==

Equality

Left to right

!=

Inequality

Left to right

CE

&

Bitwise AND

Left to right

^

Bitwise exclusive OR

Left to right

|

Bitwise inclusive OR

Left to right

AE

&&

Logical AND

Left to right

CE

||

Logical OR

Left to right

CE

=

Assignment

Right to left

AE/CE

Note: The above table lists the operators in order of precedence (from highest to lowest
precedence). Operators in the same segment of the table have equal precedence and are
evaluated in the given order in an expression unless explicitly forced by parentheses.