Beruflich Dokumente
Kultur Dokumente
Abstract..5 1. Introduction6 2. Design of STACK..7 2.1 Working of STACK. !. "eri#og Source code...11 $. S%nt&esi'ing t&e design.. ....1! 5.(enerating Test benc&
ABSTRACT
1.INTRODUCTION:
MTech VLSI & S!" SIT!BS# "age $
!.DESI"N O# STACK:
clk pop
count;1<=>
tos;?<=> empty
full
reset
I$%l&$&ntin' a (I#O s)oul* +& %r&tt, $u-) t)& sa$& as i$%l&$&ntin' a #I#O. .ou )a/& a r&a* %oint&r an* a 0rit& %oint&r an* a *ual %ort RA1. H&r& is a fi'ur& of a (I#O 0it) t0o &ntri&s.
Aou can see *e *ill read from location 2 if necessary and *e *ill *rite to location ?. -o*ever, unlike a FIF , a pop operation *ill affect t"e *rite pointer, and *orse yet, it *ill affect t"e *rite pointer %efore t"e *rite takes place. In t"is e3ample, if *e *ere to perform a pop and pus" operation simultaneously, t"en *e *ould need to *rite to location t*o after doing t"e read. After*ards, t"e read and *rite pointers *ould "ave t"e same values as %efore. Anot)&r t)in' to t)in2 a+out is t)at it s&&$s 0ast&ful to us& a *ual %ort RA1 )&r&. W& -oul* us& a sin'l& %ort RA1 if it 0&r&n3t for t)& %&s2, -as& of si$ultan&ous %us)&s an* %o%s. Ho0&/&r4 0)&n 0& *o a si$ultan&ous %us) an* %o%4 t)& %oint&rs *on3t -)an'&. W& onl, r&a* an* 0rit& t)& lo-ation %oint&* to +, t)& r&a* %oint&r4 ta2in' -ar& to *o t)& r&a* o%&ration +&for& t)& 0rit& o%&ration. Also4 if ,ou t)in2 a+out it4 0& *on3t n&&* t0o %oint&rs &it)&r. T)&, r&all, n&&* to $o/& in lo-2 st&% 0it) &a-) ot)&r. T)& 0rit& %oint&r is al0a,s t)& r&a* %oint&r if ,ou ar& %us)in' an* %o%%in'4 an* t)& r&a* %oint&r %lus on& if ,ou ar& 5ust %us)in'. A +&tt&r a%%roa-):
MTech VLSI & S!" SIT!BS# "age &
Figure ?<A stack *it" t*o entries using a top of stack register
are t"e usual clock and reset. 4e "ave status outputs empty and full as
*ell as a count of t"e num%er of data items in t"e LIF . #"en *e "ave a signal indicating a push *it" its associated data, and anot"er indicating a pop. A top of stack value rounds out t"e ports. 0e3t *e use a flag to tell *"en *e are 0ritin'. #"at is *"en *e are asked to pus" and *e "ave room for t"e data. #"is means t"at eit"er *e are not full, or if *e are full, *e are also
MTech VLSI & S!" SIT!BS# "age '
DI0 0AB1
&IAH0AL #AD1
I0.I'A#I 0
it is a C7%it data input into &#A'(. *rite into &#A'( signal read from &#A'( signal indicates num%er of values stored. signal indicating t"at &#A'( is full. signal indicating t"at &#A'( is empty. indicates t"e last value stored onto &#A'(.
"age )
alwa s 5(posedge clk) full )= ne4t_count == depth& // ,s is empt alwa s 5(posedge clk) empt )= ne4t_count == $& // :his is the read/write pointer2 /f we are writing we use the count 9alue2 // 1therwise we read from one location -efore2 'ire !log2_depth"1#$% ptr = writing ; count !log2_depth"1#$% # (count !log2_depth"1#$%)"1& // <ere=s the 3,> that holds the data reg !width"1#$% mem !depth"1#$%&
"age *
"age +
1erforming bidirectional port resol#tion2 0 nt(esi)ing 3nit $lifo%. Related so#rce file is stack2.v. 4o#nd 5657bit single7port R'" $"ram-mem% for signal $mem%. 8'R&9&::;st < 1ropert #se-dsp5= is not applicable for t(is tec(nolog . 8'R&9&::;st < 1ropert #se-dsp5= is not applicable for t(is tec(nolog . 4o#nd 27bit register for signal $co#nt%. 4o#nd ,7bit register for signal $empt %. 4o#nd 57bit register for signal $mem-rd%. 4o#nd 27bit adder for signal $ne6t-co#nt>adds#b++++% created at line .5. 4o#nd 27bit s#btractor for signal $ne6t-co#nt>s#b++++% created at line .?. 4o#nd 27bit comparator greater for signal $reading>cmp-gt++++% created at line 2?. 4o#nd 57bit register for signal $tos-s(ado!%. 4o#nd ,7bit register for signal $#se-mem-rd%. 0#mmar : inferred , R'"@sA. inferred ,2 D7t pe flip7flop@sA. inferred 2 'dderB0#btractor@sA. inferred , Comparator@sA. 3nit $lifo% s nt(esi)ed.
HDL 0 nt(esis Report "acro 0tatistics C R'"s 5657bit single7port R'" C 'ddersB0#btractors 27bit adder 27bit s#btractor C Registers ,7bit register 27bit register 57bit register C Comparators 27bit comparator greater * :, :, :2 :, :, :D :2 :, :2 :, :, *
"age ,-
Hptimi)ing #nit $lifo% 2 "apping all eL#ations2 M#ilding and optimi)ing final netlist 2 4o#nd area constraint ratio of ,++ @N DA on block lifoJ act#al ratio is +. 4inal "acro 1rocessing 2 4inal Register Report "acro 0tatistics C Registers 4lip74lops * 1artition Report : ,2 : ,2 *
4inal Report
"age ,,
"age ,$
DESI"N SU11AR.:
"age ,%
"age ,&
"age ,'
"age ,(
"age ,)
=.A66(ICATIONS:
1.&tack structures in computing are e3tremely fundamental and important. It is fair to say t"at *it"out t"e a%ility to organi)e data %y order rearrangement, including links to e3ecuta%le code, computers *ould not %e t"e fle3i%le tools t"ey are today, and e3ist solely as e3pensive special purpose calculators like t"e 10IA' of 4orld 4ar II "aving limited a%ilities and scope of application. 2.In suc" *ata or*&rin's, t"e stack is used as a dynamic memory element *"erein an a%stract conceptMa mac"ine dependent &tack frame is used to contain copies of data records or parts t"ereofM%e t"ey actual memory addresses of a data element (&ee parameters pass7 %y7reference!, or a copy of t"e data (pass7%y7value!. In list processing, t"e most common need is sorting (alp"a%etically, greatest to smallest, etcetera.! *"ere t"e mac"ine is limited to comparing only t*o elements at a time, out of a list t"at likely "olds millions of mem%ers. ,arious strategies (computer algorit"ms! e3ist *"ic" optimi)e particular types of data sorting, %ut in implementation all *ill resort to a su%7program and or su%7routines t"at generally call t"emselves or a part of t"eir code recursively in eac" call adding to t"e list temporarily reordered in stack frames. It is for t"is reason, stacks and recursion are usually introduced in parallel in data structures coursesMt"ey are interdependent.;I> ?.Sat-2 fra$&s<It is t"roug" t"e fle3i%ility of t"is access to data %y stack7frames *it" t"eir data re7groupings (in a%stract a LIF organi)ed %lock of data *"ic" seems only to allo* data some improvement on ordering fle3i%ility! t"at su%7programs and su%7routines receive t"eir input, do t"e task t"ey are optimi)ed to perform, and pass information %ack to t"e program segment currently in c"arge.;?> #"e stack frame in actual cases includes t"e address of t"e ne3t instruction of t"e calling program segment, *"ic" ordinarily t"en does somet"ing *it" t"e data "ans*er" processed %y t"e su%routines or su%program. In a recursive call, t"is is generally an instruction to c"eck t"e ne3t list element versus t"e returned "ans*er" (e.g. largest of t"e last t*o compared!, until t"e list is e3"austed. C.Auto$ati- /aria+l&s: may %e allocated in t"e stack frame of t"e procedure in *"ic" t"ey are declared8 t"is "as t"e useful effect of allo*ing recursion and re7entrancy. (For efficiency, t"e optimi)er*ill try to allocate some of t"ese varia%les in processor registers.! #"e term #oca# *ariab#e is usually synonymous *it" automatic varia%le, since t"ese are t"e same t"ing in many programming languages, %ut local is more general N most local varia%les are
MTech VLSI & S!" SIT!BS# "age ,*
K.Sta-2 $a-)in&< In computer engineering and in programming language implementations, a stack mac"ine is a real or emulated computer t"at uses a pus"do*n stack rat"er t"an individual mac"ine registers to evaluate eac" su%7e3pression in t"e program. A stack computer is programmed *it" a reverse Dolis" notation instruction set. #"e common
"age ,+
"age $-
>.CONC(USION:
#"e main o%$ective of t"e pro$ect *as to "ave a *orking LIF memory %lock t"at functions correctly as per it5s specification O intent, t"e same *as ac"ieved simulating t"e LIF design using /ILI0/ I&1 2.1i # %y designing and L&.#"is design *as verified for it5s
correct functionality %y providing test%enc" *aveforms, simulating O analy)ing t"e response against e3pected one from simulation *aveforms.
"age $,
?.RE#ERENCES:
1. "ttp<66en.*ikipedia.org6*iki6Bemory@leak 2. "ttp<66***.cs.$cu.edu.au6&u%$ects6cp2==?6122K6foils6"eapAnd&tack6"eapAnd&tack."t ml ?. "ttp<66en.*ikipedia.org6*iki6&tack@%uffer@overflo* C. "ttp<66stackoverflo*.com6:uestions6K222?6*"at7and7*"ere7are7t"e7stack7and7 "eap6121??J=P121??J= I. "ttp<66stackoverflo*.com6:uestions6K222?6*"at7and7*"ere7are7t"e7stack7and7 "eap6K22LLPK22LL J. "ttp<66stackoverflo*.com6:uestions6K222?6*"at7and7*"ere7are7t"e7stack7and7 "eap6JJ2KL?PJJ2KL? K. "ttp<66en.*ikipedia.org6*iki6&tack7%ased@memory@allocation L. "ttp<66en.*ikipedia.org6*iki6'all@stack 2. "ttp<66stackoverflo*.com6:uestions6K222?6*"at7and7*"ere7are7t"e7stack7and7 "eap6L=11?PL=11? 1=. "ttp<66122.1=K.I2.K6cseI?1K6notes6node??."tml 11. "ttp<66***.%oundsc"eck.com6kno*ledge7%ase6c7cpp6memory7layout7in7c6?C26
"age $$