Hardware Reference
In-Depth Information
sequence
s_arg_dirs(
1
local input byte
l_s_i,
2
local inout byte
l_s_io,
3
local output byte
l_s_o
4
);
5
... // l_s_o must be assigned in the body
6
endsequence
7
8
9
property
p_arg_dirs;
byte
l_p_io, l_p_o;
10
(start, l_p_io = e_io)
11
|-> s_arg_dirs(e_i, l_p_io, l_p_o)
12
|-> results_ok(l_p_io, l_p_o);
13
endproperty
14
Fig. 16.3
Sequence with argument local variables of all directions
its initial value from
l_p_io
, which is assigned the value of
e_io
in Line
11
.
l_s_o
gets no initial value. Whenever
s_arg_dirs
matches, the values of
l_s_io
and
l_s_o
are output to
l_p_io
and
l_p_o
, respectively, and these values are used in
the check of
results_ok
in Line
13
. Further details on
output
and
inout
argument
local variables will be discussed in Sect.
16.5
.
The following rules apply in declaration of argument local variables: If a
direction is specified for an argument, then the keyword
local
must also be
specified, and if the keyword
local
is specified, then the data type must be explicitly
specified, including any packed dimensions. Unpacked dimensions may also be
specified. Since the arguments of
s_arg_dirs
have distinct directions, they must
each specify the keyword
local
and therefore must also repeat the data type
byte
.
It is allowed to specify the keyword
local
without a direction, and in this
case the direction
input
is understood. Thus, the following variant is semantically
equivalent to
s_arg_dirs
:
sequence
s_arg_dirs_v2(
local byte
l_s_i,
local inout byte
l_s_io,
local output byte
l_s_o
);
...
endsequence
Consecutive declarations of argument local variables can share the same specifi-
cations of the keyword
local
, the direction, and the data type (including any packed
dimensions), but only if the following conditions are satisfied:
1. The first of the declarations specifies
local
, specifies the direction either
explicitly or implicitly, explicitly specifies the data type (including any packed
dimensions), and does not specify any unpacked dimensions.
2. Subsequent declarations specify only the formal argument identifier. No
packed or unpacked dimensions may be specified together with the subsequent
identifiers.
Search WWH ::
Custom Search