13.07.2015 Views

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

ModuleWare Reference Guide - Hornad

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Memory PartsStack (stack)The reset operations do not change the values stored inside the internal registers but reset theaddress counter to 0. After a reset operation, further read operations are disabled (until after thenext write) because the LIFO is empty.The mode of the reset is controlled by the enumerated parameter rst_type (SyncActiveHigh,AsyncActiveHigh, SyncActiveLow, AsyncActiveLow). Do not change the value of theparameter rst_type if the rst port is not used. If input ports clk and rst (for asynchronousbehavior) are not enabled, the internal register retains its value.This part is equivalent to a stack. This part has n *(stack_size+1) flip-flops, the address counterand the control logic (where n is the width of the output port sout). Not using certain operations(not connecting scalar output port full or not connecting scalar output port empty) affects thefinal gate count and the delay. Leave the clock enable port clk_en unconnected if it is notrequired. If clk_en is not connected, the HDL code for the unused port is optimized away.The performance of the stack can be accurately estimated from the parameterized state.Functioncnt is the internal address counter, creg is the internal register.If reset is synchronous:At every enabled clk trigger (rising edge if clk_type = Rising; falling edge if clk_type = Falling):cnt = 0= cnt + 1= cnt - 1= cntif rst is activated, elseif scalar input port push is activated and count < stack_size, elseif scalar input port pop is activated and count > 0, elseotherwiseIf reset is asynchronous:cnt = 0 if input port rst is active (irrespective of the clk trigger), elseat every enabled clk trigger (rising edge if clk_type = Rising; falling edge if clk_type = Falling):cnt = cnt + 1= cnt - 1= cntif scalar input port push is activated and count < stack_size, elseif scalar input port pop is activated and count > 0, elseotherwiseFor a push operation (if cnt < stack_size; and push is enabled)creg(1)sout= sin= creg(0)222<strong>ModuleWare</strong> <strong>Reference</strong> Manual, Library Version 1.9September 18, 2008

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!