![](http://datasheet.mmic.net.cn/380000/-PD98405_datasheet_16745025/-PD98405_156.png)
CHAPTER 5 SAR FUNCTION
156
(7) Algorithm operation
The cell rate is controlled by executing a dual leaky bucket algorithm operation for each shaper when
selected by the scheduler. The scheduler checks the variables and parameters of all the shapers once
every 36 system clocks and selects one shaper to transmit data. When a shaper is selected, it is said to be
in the "scan state." When it is not selected, it is said to be in the "non-scan state." These states are
indicated using the "S flag" in the scheduler register. If the S flag for a shaper is set to 1, the shaper
transmits the cells of the VC linked to it.
Figure 5-26. Status of Shaper
Selected by scheduler
Non-scan
Scan
Processes last VC in link list
A shaper is selected by the scheduler when it satisfies all the following conditions.
<1>
SE = 1 (GMR register)
All the shapers are enabled. The host sets the GMR register.
<2>
E bit = 1 (scheduler register)
The shaper is enabled. The host sets the scheduler register of the shaper to be used.
<3>
A = 1 (scheduler register)
An active VC to be transmitted is linked to the shaper. This is set by the
μ
PD98405.
<4>
c variable > 0 (scheduler register)
The
μ
PD98405 updates this variable according to the I, M, and C parameters specified by the user.
<5>
p variable = 0 (scheduler register)
The
μ
PD98405 updates this variable according to the P parameter specified by the user.
Conditions
<1>
through
<3>
indicate that the shaper is enabled and that a VC to be transmitted is linked to
the shaper, such that the transmission rate is not directly affected. The transmission rate is determined
under conditions
<4>
and
<5>
, that is, when the c parameter is incremented to 0 or greater, and the p
parameter becomes 0.
Condition
<4>
, under which the 8 bits of "c" of the scheduler register are incremented, is as follows:
(a) SE = 1
(b) E = 1
(c) x
≥
y
(d) c < C