User`s guide
Stack
5-413
5Stack
Purpose Store inputs into a LIFO register.
Library Signal Management / Buffers
Description The Stack block stores a sequence of input samples in a LIFO (last in, first out) 
register. The register capacity is set by the 
Stack depth parameter, and inputs 
can be scalars, vectors, or matrices. 
The block pushes the input at the 
In port onto the top of the stack when a 
trigger event is received at the 
Push port. When a trigger event is received at 
the 
Pop port, the block pops the top element off the stack and holds the Out port 
at that value. The last input to be pushed onto the stack is always the first to 
be popped off. 
A trigger event at the optional 
Clr port (enabled by the Clear input check box) 
empties the stack contents. If 
Clear output port on reset is selected, then a 
trigger event at the 
Clr port empties the stack and sets the value at the Out 
port to zero. This setting also applies when a disabled subsystem containing 
the Stack block is re-enabled; the 
Out port value is only reset to zero in this case 
if 
Clear output port on reset is selected.
0101
0000
1001
1111
1101
empty
empty
empty
1100
stack depth
0101
0000
1001
1111
1101
empty
empty
empty
1100
oldest 
input
Pus
h
ing t
h
e stac
k
Popping t
h
e stac
k
last in first out
0101
0000
1001
1111
1101
empty
empty
1100










