Siêu thị PDFTải ngay đi em, trời tối mất

Thư viện tri thức trực tuyến

Kho tài liệu với 50,000+ tài liệu học thuật

© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Validation of Communications Systems with SDL phần 2 pps
MIỄN PHÍ
Số trang
34
Kích thước
453.6 KB
Định dạng
PDF
Lượt xem
1788

Validation of Communications Systems with SDL phần 2 pps

Nội dung xem thử

Mô tả chi tiết

Quick Tutorial on SDL 15

process process1_1 DCL

n Integer;

TIMER

T607:= 10.0; n:= 0

SABME

SET (T607)

disc

Figure 2.12 Start transition

Figure 2.12 shows an example of start transition: n is set to 0, signal SABME is transmitted

and timer T607 is started before going to state disc.

2.3.3 States

States must be defined using a state symbol. A common mistake is to confuse the notions of

state and nextstate: Figure 2.12 is incorrect, because state disc is not defined; Figure 2.13 is

correct, because state disc is defined.

process DLC

disc This is a nextstate

disc This is a state

Figure 2.13 State disc defined

When the character “-” is entered in a nextstate, as in Figure 2.14, it means that after executing

the transition, the state will remain unchanged.

process process1_1

V76frame

disc

-

Figure 2.14 Dash nextstate

2.3.4 Input

Signals reaching a process instance are stored into its FIFO queue. When performing an input,

the first signal in the queue (the oldest one) is removed from the queue, and the values of the

signal parameters, if any, are assigned to the variables specified in the input symbol.

16 Validation of Communications Systems with SDL

Note, that if the first signal in the queue is not present in any input below the current process

state, the signal will be discarded (lost). This is called an implicit transition.

In Figure 2.15, left part, the FIFO queue of process display contains the signals blue, green

and red. Process display being in state idle, the signal blue is discarded (lost), and then green

is input, leading to state resizing. Signal red is now first in the queue.

block b2

ch1

sr1

red,

blue,

green

display

blue

green

red

process display

resizing

green

idle

block b2

ch1

sr1

red,

blue,

green

display

blue

red

state: idle state: resizing

Figure 2.15 The FIFO queue of one instance of process display

2.3.5 Save

To avoid losing signal blue as in Figure 2.15, we add a save symbol below state idle, as depicted

in Figure 2.16. When a signal is saved, it stays in the input queue at the same position, and the

next signals in the queue are examined to see if they can be input, saved or discarded.

process display

resizing

green

idle

blue

This is a

SAVE

s3

blue

resizing

blue

green

red

step 1

idle

inputgreen

blue

red

step 2

resizing

inputblue

red

step 3

s3

etc.

queue head

current state

action

Figure 2.16 Saving signal blue

Quick Tutorial on SDL 17

Reading the table in Figure 2.16 helps you understand how the save works:

1. From state idle, blue is first in the queue: it remains here because it is saved, and the next

signal in the queue, green, can be input, leading to state resizing.

2. From state resizing, blue is input, and we go to state s3.

2.3.6 Variables

Variables are used to store data in process instances. Variables cannot be declared in systems

or blocks: global variables do not exist in SDL.

Figure 2.17 shows an example of variable declaration and usage: the variable n of type

Integer is declared, set to 0 upon process instance start, and then incremented by 1 each time

a disc signal is input. We remind you that if, for example, two instances of process DLC are

created, each instance has its own variable n in its context.

process DLC DCL

n Integer;

n:= 0

disc

disc

DISC

n:= n+1

-

Figure 2.17 Example of variable

2.3.7 Stop

After executing a stop symbol, the process instance and its associated input queue and the

signals it contains are immediately destroyed. Figure 2.18 shows an example of stop.

process DLC

L_EstabReq

SABME

ready

Figure 2.18 Example of stop

2.3.8 Task

Figure 2.19 shows two task examples. The first one simply performs n := n + 1 and the second

one contains informal text (sometimes called informal task).

Tải ngay đi em, còn do dự, trời tối mất!