Hakim&Weatherspoon&CS&3410,&Spring&2011&Computer)Science)Cornell)University)Memory!See:)P&H)Appendix)C.8,)C.9)2)Announcements!HW1)due)today))HW2$available$later$today$HW2)due)in)one)week)and)a)half)Work)alone)Use)your)resources)• FAQ,)class)notes,)book,)SecIons,)office)hours,)newsgroup,)CSUGLab))Make)sure)you)• Registered)for)class,)can)access)CMS,)have)a)SecIon,)and)have)a)project)partner)• Check)online)syllabus/schedule,)review)slides)and)lecture)notes,)Office)Hours,)early)homework)and)programming)assignments))3)Announcements!Prelims:)Evening)of)Thursday,)March)10)and)April)28th))Late)Policy)1))Each)person)has)a)total)of)four)“slip)days”)2))For)projects,)slip)days)are)deducted)from)all)partners))3))10%)deducted)per)day)late)a[er)slip)days)are)exhausted)4)Critical Path!Which)operaIon)is)the)criIcal)path?)• A))AND)• B))OR)• C))ADD/SUB)• D))LT)5)Critical Path!What)is)the)length)of)the)criIcal)path)(in)gates)?)• A))3)• B))5)• C))8)• D))11)6)Critical Path!What)is)the)length)of)the)criIcal)path)for)a)32dbit)ALU)(in)gates)?)• A))11)• B))32)• C))64)• D))70)7)Multiplexor!8)Multiplexor!9)Goals for today!Review)• SR)Latches,)D)Latches,)D)Flip)Flips,)and)Registers)Memory)• Register)Files)• Tridstate)devices)• SRAM)(StaIc)RAM—random)access)memory))• DRAM)(Dynamic)RAM))Bistable Devices!A B A Simple Device • Stable and unstable equilibria?!Bistable Devices!• In stable state, A = B!• How do we change the state?!A B A B 1 A B 1 0 0 A Simple Device • Stable and unstable equilibria?!12)SR Latch!S)R)Q)Q)13)SR Latch!S) R) Q) Q)0) 0)0) 1)1) 0)1) 1)S)R)Q)Q)SetdReset)(SR))Latch))Stores)a)value)Q)and)its)complement)Q))14)SR Latch!SetdReset)(SR))Latch))Stores)a)value)Q)and)its)complement)Q))S) R) Q) Q)0) 0)Q) Q)0) 1)0) 1)1) 0)1) 0)1) 1)forbidden)S)R)Q)Q)S)R)Q)Q)15)Unclocked D Latch!Data)(D))Latch)D) Q) Q)0)1)S)R)D)Q)Q)16)Unclocked D Latch!Data)(D))Latch)D) Q) Q)0) 0)1)1) 1)0)S)R)D)Q)Q)Data)Latch)• Easier)to)use)than)an)SR)latch)• No)possibility)of)entering)an)undefined)state)When)D)changes,)Q)changes)– …)immediately)(a[er)a)delay)of)2)Ors)and)2)NOTs))Need)to)control)when)the)output)changes)17)D Latch with Clock!S)R)D)clk)Q)Q)Level)SensiIve)D)Latch)Clock)high:))))set/reset)(according)to)D))Clock)low:))))keep)state)(ignore)D))D) Q) Q)0) 0)1)1) 1)0)18)D Latch with Clock!S)R)D)clk)Q)Q)S) R) Q) Q)0) 0)Q) Q)0) 1)0) 1)1) 0)1) 0)1) 1)forbidden)D) Q) Q)0) 0)1)1) 1)0)clk) D) Q) Q)0) 0)Q) Q)0) 1)Q) Q)1) 0)0) 1)1) 1)1) 0)19)D Latch with Clock!S)R)D)clk)Q)Q)D) Q) Q)0) 0)1)1) 1)0)clk) D) Q) Q)0) 0)Q) Q)0) 1)Q) Q)1) 0)0) 1)1) 1)1) 0)clk)D)Q)20)Edge-Triggered D Flip-Flop!D)FlipdFlop)• EdgedTriggered))• Data)is)captured)when)clock)is)high)• Outputs)change)only)on)falling)edges)D) Q)Q)D) Q)Q)c)F)L) L)clk)D)F)Q)c)Q)Q)D)clk)21)Registers!Register)• D)flipdflops)in)parallel))• shared)clock)• extra)clocked)inputs:)write_enable,)reset,)…)clk)D0)D3)D1)D2)4)4)4dbit)reg)22)Voting Machine!mux)32)...®)detect)enc)3decoder)(3dtod8))32) 32)32)LED)dec)3E)+1)reg)E)reg)E)reg)E)mux)23)Goals for today!Review)• SR)Latches,)D)Latches,)D)Flip)Flips,)and)Registers)Memory)• Register)Files)• Tridstate)devices)• SRAM)(StaIc)RAM—random)access)memory))• DRAM)(Dynamic)RAM))24)Register File!Register)File)• N)read/write)registers)• Indexed)by))register)number)ImplementaIon:)• D)flip)flops)to)store)bits)• Decoder)for)each)write)port)• Mux)for)each)read)port))DualdReaddPort)SingledWritedPort)32)x)32))Register)File)QA)QB)DW)RW)RA)RB)W)32)32)32)1) 5) 5) 5)25)Register File!Register)File)• N)read/write)registers)• Indexed)by))register)number)ImplementaIon:)• D)flip)flops)to)store)bits)• Decoder)for)each)write)port)• Mux)for)each)read)port))DualdReaddPort)SingledWritedPort)32)x)32))Register)File)QA)QB)DW)RW)RA)RB)W)32)32)32)1) 5) 5) 5)26)Register File!Register)File)• N)read/write)registers)• Indexed)by))register)number)ImplementaIon:)• D)flip)flops)to)store)bits)• Decoder)for)each)write)port)• Mux)for)each)read)port))DualdReaddPort)SingledWritedPort)32)x)32))Register)File)QA)QB)DW)RW)RA)RB)W)32)32)32)1) 5) 5) 5)27)Tradeoffs!Register)File)tradeoffs)+)Very)fast)(a)few)gate)delays)for)both)read)and)write))+)Adding)extra)ports)is)straighporward)–))Doesn’t)scale)28)Building Large Memories!Need)a)shared)bus)(or)shared)bit)line))• Many)FFs/outputs/etc.)connected)to)single)wire)• Only)one)output)drives)the)bus)at)a)Ime))29)Tri-State Devices!D)Q)E)E)Vdd)Gnd)E) D) Q)0) 0)z)0)) 1)z)1) 0)0)1) 1)1)D) Q)D)TridState)Buffers)30)Tri-State Devices!D)Q)E)E)Vdd)Gnd)E) D) Q)0) 0)z)0)) 1)z)1) 0)0)1) 1)1)D) Q)D)TridState)Buffers)31)Shared Bus!S0)D0)shared)line)S1)D1)S2)D2)S3)D3)S1023)D1023)32)SRAM!StaIc)RAM)(SRAM))• EssenIally)just)SR)Latches)+)tridstates)buffers)33)SRAM Chip!34)SRAM Chip!row)decoder)A21d10)column)selector,)sense)amp,)and)I/O)circuits)A9d0)CS)R/W)Shared)Data)Bus)35)SRAM Cell!Typical)SRAM)Cell)B)B)word)line)bit)line)Each)cell)stores)one)bit,)and)requires)4)–)8)transistors)(6)is)typical))Read:)• predcharge)B)and)B)to)Vdd/2)• pull)word)line)high)• cell)pulls)B)or)B)low,)sense)amp)detects)voltage)difference)Write:)• pull)word)line)high)• drive)B)and)B)to)flip)cell)36)SRAM Modules and Arrays!A21d0)Bank)2)Bank)3)Bank)4)1M&x&4&SRAM&1M&x&4&SRAM&1M&x&4&SRAM&1M&x&4&SRAM&R/W)msb)lsb)CS)CS)CS)CS)37)SRAM)• A)few)transistors)(~6))per)cell)• Used)for)working)memory)(caches))• But)for)even)higher)density…)SRAM Summary!38)Dynamic RAM: DRAM!DynamicdRAM)(DRAM))• Data)values)require)constant)refresh))Gnd)word)line)bit)line)Capacitor)39)Single)transistor)vs.)many)gates)• Denser,)cheaper)($30/1GB)vs.)$30/2MB))• But)more)complicated,)and)has)analog)sensing)Also)needs) ref resh)• Read)and)write)back…)• …every)few)milliseconds)• Organized)in)2D)grid,)so)can)do)rows)at)a)Ime)• Chip)can)do)refresh)internally))Hence…)slower)and)energy)inefficient)DRAM vs. SRAM!40)Memory!Register)File)tradeoffs)+ )Very)fast)(a)few)gate)delays)for)both)read)and)write))+ )Adding)extra)ports)is)straighporward)–))Expensive,)doesn’t)scale)–))VolaIle))VolaIle)Memory)alternaIves:)SRAM,)DRAM,)…)–))Slower)+ )Cheaper,)and)scales)well)–))VolaIle))NondVolaIle)Memory)(NVdRAM):)Flash,)EEPROM,)…)+
View Full Document