DRAM Guide.docx
- 文档编号:6312743
- 上传时间:2023-05-09
- 格式:DOCX
- 页数:59
- 大小:635.94KB
DRAM Guide.docx
《DRAM Guide.docx》由会员分享,可在线阅读,更多相关《DRAM Guide.docx(59页珍藏版)》请在冰点文库上搜索。
DRAMGuide
PartIDRAMandSRAMBasics
Storagetheory
Attheriskofturningsomereadersoffbystartingoutontooelementaryofalevel,I'llbeginbystatingwhatwealreadyknow:
RAMiswhereyoustorecodeanddatasotheCPUcanworkwithit.Now,beforeyoumorehardcoretypeshitthenextpagelookingforsome"real"info,stopforasecondandthinkwhatthatsimplestatementimpliesaboutthekindsofthingsthatyouneedinordertostorestuff(code,data,boxes,widgets,etc.).Somebasicthinkingaboutthetaskofstoringstuffwillreallyhelpyouunderstandthemoreesotericpartsofatechnologythat'sdesignedwiththestorageofstuffasitsprimarygoal.
Firstoff,ifwe'restoringlotsofsmallthings(andwedefinitelyare),thenwecandividethestoragespaceupintosmallbinsandstickoneitemineachbin.Ofcourse,ifeachitemwe'restoringisunique(anditdefinitelyis)andwe'reevergoingtobeabletoretrieveaspecificitem,weneedanorganizationalschemetoorderthestoragespace.Stickingaunique,numericaladdressoneachbinworks,sothat'swhatwe'lldo.Theaddresseswillstartatsomenumberandincrementbyoneforeachbin.Thus,tous,thestoragespacelookslikeastraightlineofbins,eachwithadifferentaddress.Ifwewantedtosearchtheentirestoragespace,we'dstartwiththelowestaddressanditeratethrougheachsuccessiveoneuntilwegettothehigheraddress.Notethatifwecontractedthestoringofourstuffouttoa3rdparty,that3rdpartycouldlayoutthephysicalstoragespacehowevertheywant--arow,agrid,acube,etc.Allthatmattersiswhenwegivethemaseriesofaddresses,theycangettherightitemoutofeachlocationwithoutuseverhavingtoknowthephysicaldetailsofhowtheitemsarestored.
Now,oncewe'vegotthestoragespaceorganizedproperly,we'llneedawaytogettheitemsintoandoutofit.ForRAMstorage,thedatabusiswhatallowsustomovestuffintoandoutofstorage.Andofcourse,sincethestoragespaceisorganized,weneedawaytotelltheRAMexactlywhichlocationcontainstheexactdatathatweneed;thisisthejoboftheaddressbus.TotheCPU,theRAMlookslikeonelong,thinlineofstoragecells,eachwithauniqueaddress.IftheCPUwantsapieceofdatafromRAM,itfirstplacestheaddressofthelocationontheaddressbus.Itthenwaitsafewcyclesandlistensonthedatabusfortherequestedinformationtoshowup.CheckoutthefollowingconceptualpictureofhowRAMlookstoaCPU.
Thoselittleroundthingsinthemiddlearememorycells,andeachoneishookedintoauniqueaddressline.Theaddressdecodertakestheaddressoffoftheaddressbusandidentifieswhichcelltheaddressisreferringto.Itthenactivatesthatcell,andthedatainitdropsdownintothedatainterfacewhereit'splacedonthedatabusandsentbacktotheCPU.
TheCPUseesthosecellsasarowofaddressablestoragespacesthathold1byteeach,soitunderstandsmemoryasarowofbytes.Unlikewhatthepreviousexampleimplies,however,intherealworldtheCPUnevergrabsdataonebyteatatime.Itusuallygrabsitin32-bitor64-bitchunks,dependingonthewidthofthedatabus.Soifthedatabusis64-bitswideandtheCPUneedsoneparticularbyte,it'llgoaheadandgrabthebyteitneedsalongwiththe7bytesthatarenexttoit.Itgrabs8bytesatatimebecausea)itwantstofilluptheentiredatabuswithdataeverytimeitmakesarequestandb)it'llprobablyendupneedthoseother7bytesshortly.
Notaline,butagrid
JustbecausetheCPUseesRAMasonelong,thinlineofbytesdoesn'tmeanthatit'sactuallylaidoutthatway.Insteadoftryingtodesignandmanufactureachipthat'slongenoughtoaccommodateafewmillionbytesinarow,abetter,lessexpensive(andlessgoofylooking)waytoapproachtheproblemistoorganizethecellsinagridofindividualbitsandsplituptheaddressintorowsandcolumns,whichyoucanusetolocatetheindividualbitthatyouneed.Thisway,ifyouwantedtostore,say,1024bits,youcanusea32x32gridtodoso.Obviously,a32x32gridisamuchmorecompactdesignthanasinglerowof1024bits.Checkit:
Thegridschemeworksprettywell,andisinfactroughlyhowRAMchipsarelaidout.
Inasimple,idealizedsystemliketheoneabovewithonlyoneRAMchip,theCPU,inrequestingandindividualbitwouldplaceanaddressintheformofastringof22binarydigits(forthex86)ontheaddressbus.TheRAMinterfacewouldthenbreakthatstringofnumbersinhalf,anduseonehalfasan11digitrowaddressandonehalfasan11digitcolumnaddress.Therowdecoderwoulddecodetherowaddressandactivatetheproperrowlinesothatallthecellsonthatrowbecomeactive.Thenthecolumndecoderwoulddecodethecolumnaddressandactivatethepropercolumnline,selectingwhichparticularcellontheactiverowisgoingtohaveitsdatasentbackoutoverthedatabusbythedatainterface.Also,notethatthegriddoesnothavetobesquare,andinfactinreallifeit'susuallyarectanglewherethenumberofrowsislessthanthenumberofcolumns.(We'lldiscusswhythatiswhenwetalkaboutDRAM.)
TheaboveschemeroughlyreflectshowabasicSRAMchipworks.SRAMstandsfor"staticRAM,"andit'ssonamedbecauseoncedataisputinacellitjustsitsthereanddoesn'ttrickleout.(AsopposedtoDRAM,wherethedataleaksoutofthecelleveryfewmillisecondsunlessyourefreshit.Moreonthatinamoment,though).AnSRAMcellisusuallymadeupofabout4to6transistors,arrangedinaconfigurationthattrapseitherabinary1orabinary0inbetweenthemuntilthatvalueiseitherwrittenoverwithanewvalueorthepowergoesout.SRAMisveryfastandverypowerefficient,butthefactthatittakes4to6transistorstomakeonememorycell(vs.onetransistorforoneDRAMmemorycell)meansthatit'swayexpensivetoproduce.
RAMChips
Mydiagramsandexplanationssofarhavebeenfairlysimplifiedandabstracted,sonowit'stimetogetabitmoreconcrete.Specifically,nowthatyouunderstandtheverybasics,we'vegottotalkaboutoneofthemostimportantissuesinRAMtechnology:
packaging.You'veprobablyallheardabout30-pinSIMMS,72-pinSIMMS,DIMMS,RIMMs,etc.Thereasontherearesomanyvarietiesofpackagingisthatastransistorsshrinkinsizeandthenumberofcellsyoucancramonagridincreases,you'vegottochangethewayyoupackageandusethechipstotakeadvantageofnewcapabilities.Aswe'llseeinthenextfewsections,RAMisorganizedbygroupingtheindividualgridsdescribedaboveintoevermorenestedandcomplicatedconfigurations.Becauseofthis,I'mgoingtostartoutbybrieflycoveringthemostbasicunitofRAMorganization:
theRAMchip.
SRAMchips
EarlySRAMchipscamein20-pinandlargerDIPs(DualInlinePackages).Theyhadtohavealargenumberofpinsbecausetherehadtobe
∙apinforeachaddresssignal
∙aDataInpinandaDataOutpin
∙somecontrolpins(WriteEnable,ChipSelect)
∙GroundandPowerpins.
Attheriskofmakingyoureyesglazeover,I'mgoingtodroparealSRAMpin-outdescriptiononyourightnow.Fearnot,though,becausethenameandpurposeofeachpinisprettystraightforward,andinfactyou'vealreadymet16ofthe20pinsinthefollowing16Kx1-bitSRAM.
AsidefromVccandGND,thepurposesofwhichshouldbeobvious,theonlypinsintheabovepackagewehaven'tcoveredsofarare/CSand/WE.(Puttinga"/"infrontofthepinnameisthestandardtextwayofwritingitwithalineoverit.The"/"orlinesignifiesthatthepinisactivatedbyalowvoltage,orlogic0,butthatdoesn'treallymatterrightnowforourdiscussion).Let'sbreakthepins'functionsdownonebyone:
∙ChipSelect:
Inarealsystem,therecouldbeanynumberofSRAMchipsattachedtotheaddressanddatabuses,soyouusetheChipSelecttoselecttheparticularSRAMchipthatyouwanttowritetoorreadfrom.
∙WriteEnable:
WhenyougivetheSRAManaddress,you'vegottotellitwhetheryou'regoingtobewritingtoorreadingfromthataddress.The/WEpinletsyoutelltheSRAMthatyouintendtowritetotheaddressyoujustgaveit.
∙OutputEnable:
There'sonestandardpinthat'smissingfromtheaboveSRAM,afactthatmakesexplainingthestepsinitsreadandwritecyclesmorecomplicatedthanitshouldbe.ThatpinistheOutputEnablepin,anditsjobistolettheSRAMknowthatit'sbeingreadfromandnotwrittentoo.SincemostmodernSRAMsdon'thaveitanymoreIcouldn'tforthelifeofmefindadatasheetforax1-bitSRAMthatusesit.Thisbeingthecase,we'lljustpretendthattheaboveSRAMhasan/OEpin,andexplainthingsaccordingly.
Soreading1bitofdatafromtheDataOutpinwouldrequirethefollowingsteps
SRAMRead
1)Placetheaddressofthebittobereadontheaddresspinsviatheaddressbus.(MakesureWriteEnableisnotactivewhenthishappens,sothattheSRAMknowsit'snotbeingwrittento.)
2)ActivateChipSelecttoselecttheSRAMchip.
3)ActivatetheOutputEnablepinsothattheSRAMknowsit'sbeingreadfrom.
Afterthatlaststepiscomplete,thedatayouwantwillappearontheDataOutpinandmoveontothedatabus.Prettysimple,eh?
Thestepsforwriting1bitofdatatotheSRAMarealmostassimple.
SRAMWrite
1)Placetheaddressofthecelltobewrittentoontheaddresspinsviatheaddressbus.(Makesurethe
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- DRAM Guide