Download - Service, Support

Transcript
Programming and operating the FM 352-5
6.10 Operations in the FM 352-5 Library
6.10.30
Delete last value (LIFO16, LIFO32)
Description
The LIFO operation is available in two versions:as a 16-bit version (FB99) and as a 32-bit
version (FB98) defined by the data width. The LIFO shift register stores entries that are
written into the LIFO box and represents the stored data upon request. When the WRITE
and EN inputs are active, the data present at IN is written into the LIFO box. The newest
entry in the LIFO box is represented at OUT until it is discarded by activating READ_NEXT.
The next to newest entry then becomes the newest entry. If the LIFO box is full (256 entries),
then FULL becomes active. Any write operation that occurs while FULL is active will be
discarded. EMPTY signals that the LIFO box is empty (0 entries). OUT is indeterminate while
EMPTY is active. ENTRIES indicates the number of entries contained in the LIFO box. If EN
and RESET are active simultaneously then the LIFO box is cleared. All entries are reset to 0
and EMPTY is activated. The output value is retentive and uses one clock phase.
Note
The LIFO16 operation requires 1 RAM block. The LIFO32 operation requires 2 RAM blocks.
All bit shift registers, the LIFO, and FIFO operations require RAM blocks. The maximum
number of RAM blocks supported by the FM 352-5 module is 10.
Scan cycle n
IN
OUT
(256)
(255)
(254)
1
= FULL
ENTRIES
(3)
(2)
(1)
1) Entry
2
= EMPTY
Output conditions
Entry 1 = 5
Entry 2 = 100
Entry 3 = 125
Entry 4 = -1
ENTRIES = 4
FULL = 0
EMPTY = 0
OUT = -1
IN = 654
WRITE = 1
READ_NEXT = 0
Scan cycle n+1
Scan cycle n+2
Entry 1 = 5
Entry 2 = 100
Entry 3 = 125
Entry 4 = -1
Entry 5 = 654
Entry 1 = 5
Entry 2 = 100
Entry 3 = 125
Entry 4 = -1
ENTRIES = 5
FULL = 0
EMPTY = 0
OUT = 654
IN = 0
WRITE = 0
READ_NEXT = 1
ENTRIES = 4
FULL = 0
EMPTY = 0
OUT = -1
IN = 654
WRITE = 0
READ_NEXT = 0
2) No entry
FM 352-5 high-speed Boolean processor
166
Operating Manual, 05/2011, A5E00131318-04