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)Truth TableThere are stack_size + 1 internal registers creg (each has a width of input sin). The addresscount is stored in the register cnt. This table is for asynchronous high reset and positivepolarities. For negative polarities, invert the values.Table 9-8. Stack Truth Table — Asynchronous High Reset, Positive Polaritiesclk_en clk rst push pop cnt creg- - 1 - - 0 creg0 - 0 - - cnt creg1 Posedge 0 1 - if (cnt < stack_size)cnt+11 Posedge 0 0 1 if (cnt not equal to 0)cnt -1if (cnt < stack_size)creg[1] = sinif (cnt not equal to 0)creg[cnt] = creg[cnt-1]This table is for synchronous high reset and positive polarities. For negative polarities, invertthe values.Table 9-9. Stack Truth Table — Synchronous High Reset, Positive Polaritiesclk_en clk rst push pop cnt creg0 - - - - cnt creg1 Posedge 1 - - 0 creg-1 Posedge 0 1 - if (cnt < stack_size)cnt+11 Posedge 0 0 1 if (cnt not equal to 0)cnt -1sout = creg[0]empty = (cnt = 0)full = (cnt = stack_size)if (cnt < stack_size)creg[1] = sinif (cnt not equal to 0)creg[cnt] = reg[cnt-1]<strong>ModuleWare</strong> <strong>Reference</strong> Manual, Library Version 1.9 223September 18, 2008

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

Saved successfully!

Ooh no, something went wrong!