Memories I Montek Singh Oct 8 15 2014 Topics Lab 8 Briefly discuss RAM specification in Verilog Overview of Memory Types ReadOnly Memory ROM PROMs FLASH etc Random Access Memory RAM ID: 276115
Download Presentation The PPT/PDF document "1 COMP541" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
1
COMP541Memories - I
Montek Singh
Oct
{8, 15},
2014Slide2
TopicsLab 8Briefly discuss RAM specification in VerilogOverview of Memory TypesRead-Only Memory (ROM): PROMs, FLASH, etc.Random-Access Memory (RAM)Static todayDynamic next
2Slide3
Verilog for RAM (Lab 8)module ram_module #( parameter Abits = 4, // Number of bits in address parameter Dbits = 4, // Number of bits in data parameter Nloc = 16 // Number of memory locations)(
input clock, input wr,
//
WriteEnable
: if
wr
==1,
data is written into mem input [Abits-1 : 0] addr, // Address for specifying location input [Dbits-1 : 0] din, // Data for writing (if wr==1) output [Dbits-1 : 0] dout // Data read from memory (all the time) ); reg [Dbits-1 : 0] mem [Nloc-1 : 0]; // The actual registers where data is stored // Memory write: only when wr==1 and clock tick always @(posedge clock) if(wr) mem[addr] <= din; assign dout = mem[addr]; // Memory read all the time, no clock involvedendmodule
3Slide4
Types of MemoryMany dimensionsRead Only vs. Read/Write (or write seldom)Volatile vs. Non-VolatileRequires refresh or notLook at ROM first to examine interface
4Slide5
Non-Volatile Memory TechnologiesMask (old) ROMread-only memoryFuses (old) PROMprogrammable read-only memoryErasable EPROMerasable programmable read-only memoryElectrically erasable EEPROM
electrically-erasable programmable read-only memorytoday called FLASH!used everywhere!
5Slide6
Details of ROMMemory that is permanentk address lines2k itemsn bits
6Slide7
Notional View of Internals
7Slide8
Programmed Truth Table
8Slide9
Resulting Programming
9Slide10
Mask ROMsOldest technologyOriginally “mask” used as last step in manufacturingSpecify metal layer (connections)Used for volume applicationsLong turnaroundUsed for applications such as embedded systems and, in the old days, boot ROMbut cheap to mass produce!
10Slide11
Programmable ROM (PROM)Early ones had fusible linksHigh voltage would blow out linksFast to programSingle use
11Slide12
UV EPROMErasable PROMCommon technologies used UV light to erase complete deviceTook about 10 minutesHolds state as charge in very well insulated areas of the chipNonvolatile for several (10?) years
12Slide13
EEPROMElectrically Erasable PROMSimilar technology to UV EPROMErased in blocks by higher voltageProgramming is slower than readingToday’s flavor is called “flash memory”Digital cameras, MP3 players, BIOSLimited lifeSome support individual word write, some blockOur boards have it:A flash memory chip on our Nexys boardsHas a “boot block” that is carefully protectedWe will learn to use it in upcoming labs
13Slide14
How Flash WorksSpecial transistor with floating gateThis is part of device surrounded by insulationSo charge placed there can stay for yearsAside: some newer devices store multiple bits of info in a cellInterested in this? If so, we can cover in more detail w/ transistors
14Slide15
Read/Write MemoriesFlash is obviously writeableBut not meant to be written rapidly (say at CPU rates)And often writing must be by entire blocks (disk replacement)For frequent writing, use RAM
15Slide16
Random Access MemoriesSo called because it takes same amount of time to address any particular locationNot entirely true for modern DRAMs, but somewhat true…First look at asynchronous static RAMreading and writing typically controlled by “handshakes”clock may still be present, but actions controlled by handshake signals
16Slide17
Simple View of RAMTypical parameters:some word size nsome capacity 2kk bits of address lineNeed a line to specify reading or writingtypically only one wire neededsometimes two separate ones
17Slide18
Example: 1K x 16 memoryRAM comes in variety of sizesfrom 1-bit widemain issue is no. of pins available on chipMemory size often specified in bytesThis would be 2KB memory10 address lines (=1K locations)16 data lines (=2 bytes/location)
18Slide19
WritingSequence of stepsSet up address linesSet up data linesActivate write line (e.g., maybe a positive edge)
19Slide20
ReadingStepsSetup address linesActivate read lineData available soonfor asynchronous memory: after simply a specified amount of timefor synchronous memory: after a clock edge
20Slide21
Chip SelectEnable:Usually a line to enable the chipWhy?
21Slide22
Timing: Writing
22Slide23
Timing: Reading
23Slide24
Static vs. Dynamic RAMDifferent internal implementations: SRAM vs. DRAMDRAM:DRAM stores charge in capacitorDisappears after short period of timeMust be refreshedSmall sizeHigher storage density larger capacitiesSRAM:SRAM easier to useUses transistors (think of it as latch)FasterMore expensive per bit
Smaller sizes
24Slide25
Structure of SRAMInternally, each bit stored in a “latch”One memory cell per bitCell consists of a few transistorsNot really a latch made of NANDs/NORs, but logically equivalentBehaves like an SR latchControl logicalso need extra logic around the latch to make it work like a memory cell
25Slide26
Structure of SRAMSeveral optimized circuits often usedreplace a full-fledged SR latch with something simpler, smaller, faster…Not really a latch made of NANDs/NORs, but logically equivalentBehaves like an SR latche.g., a simpler 6-transistor memory cellwordline Select(bitline, bitline’) (B, B’) as well as (C, C’)
26Slide27
Example: A Simple OrganizationNote:In reality, more complexOnly one word-line is “on” at a time
27Slide28
Zoom in: A single bit sliceOperation:Cells connected to form 1 bit position (column)Word Select enables one latch from address linesonly this cell is writableonly this cell is readB (and B’) set by:Read/Write’Data InBit Select
28Slide29
Let’s look at a single bit cell
Example:
0
1
Z
ZSlide30
30
Bit Slices and ModulesEntire column of cells
called a bit slice
basically a 1-bit wide memory!
Module
module refers to a single chip of memory
1-bit wide memory chips are quite common!Slide31
Inside an SRAM Bit CellActual implementation does not use a real SR latch!a tinier approximation is usedlogically behaves very much like an SR latchbut much smaller and faster!Slide32
32
16 X 1 RAM “Chip”
Now shows
address decoder
selects appropriate locationSlide33
Row/Column LayoutFor larger RAMs:decoder becomes pretty bigalso run into chip layout issuesTypically:larger memories use “2D” matrix layoutsee next slide
33Slide34
34
16 X 1 RAM as 4 X 4 Array
Two decoders
Row
Column
Address just broken up
Not visible from outside on SRAMsSlide35
35
Not the same as 8
X 2
RAM!
Minor change in
logic and pins
Spot the difference!Slide36
Spot the difference!
36Slide37
Realistic SizesExample: 256Kb memory organized 32K X 8Single-column layout would need 15-bit decoder with 32K outputs!Better organization:A 2D (i.e., square) layout with:9-bit row and 6-bit column decoders
37Slide38
SRAM PerformanceLatency and Throughput importantCurrent ones have cycle times in low nanosecondssay 1-2ns (top-end ones even lower)Used as cache (typically on-chip or off-chip secondary cache)Sizes up to 8Mbit or so for fast chipsExpensive ones can go a bit biggerEnergy/powerSRAMs also better for low
power vs. DRAMs
38Slide39
Wider MemoryWhat if you don’t have enough bit width?use multiple chips and side-by-side39Slide40
Larger/Wider MemoriesMade up from sets of chipsConsider a 64K by 8 RAMour building block
40Slide41
LargerLet’s build a larger memory256K X 8Decoder for high-order 2 bitsSelects chipLook at selection logicAddress rangesTri-state outputs41Slide42
SummaryToday we looked at:Quick look at non-volatile memoryStatic RAMNext topic:Dynamic RAMComplex, largest, cheapMuch more design effort to useTalk about memories for lab42