1 COMP541 Memories - I Montek Singh Feb 25, 2010.

Slides:



Advertisements
Similar presentations
Chapter 5 Internal Memory
Advertisements

Computer Organization and Architecture
Computer Organization and Architecture
+ CS 325: CS Hardware and Software Organization and Architecture Internal Memory.
COMP541 Memories - I Montek Singh Oct {8, 15}, 2014.
What is memory? Memory is used to store information within a computer, either programs or data. Programs and data cannot be used directly from a disk or.
Chapter 10. Memory, CPLDs, and FPGAs
1 Lecture 16B Memories. 2 Memories in General Computers have mostly RAM ROM (or equivalent) needed to boot ROM is in same class as Programmable Logic.
Overview Memory definitions Random Access Memory (RAM)
Registers  Flip-flops are available in a variety of configurations. A simple one with two independent D flip-flops with clear and preset signals is illustrated.
Computer Organization and Architecture
Chapter 5 Internal Memory
Spring 2002EECS150 - Lec19-memory Page 1 EECS150 - Digital Design Lecture 18 - Memory April 4, 2002 John Wawrzynek.
Memory Devices Wen-Hung Liao, Ph.D..
1 COMP541 VGA Character Terminal Montek Singh Mar 1, 2007.
1 Lecture 16B Memories. 2 Memories in General RAM - the predominant memory ROM (or equivalent) needed to boot ROM is in same class as Programmable Logic.
1 COMP541 Memories, Part I Montek Singh Feb 27, 2007.
MEMORY.
1 The 8051 Microcontroller and Embedded Systems CHAPTER INTERFACING TO EXTERNAL MEMORY.
CompE 460 Real-Time and Embedded Systems Lecture 5 – Memory Technologies.
Physical Memory By Gregory Marshall. MEMORY HIERARCHY.
Faculty of Information Technology Department of Computer Science Computer Organization and Assembly Language Chapter 5 Internal Memory.
Memory and Programmable Logic
Memory and Programmable Logic Dr. Ashraf Armoush © 2010 Dr. Ashraf Armoush.
University of Tehran 1 Interface Design Memory Modules Omid Fatemi
1 COMP541 Memories - I Montek Singh Feb 29, 2012.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL RAM Basics Anselmo Lastra.
Chapter 5 Internal Memory. Semiconductor Memory Types.
Memory and Programmable Logic Memory device: Device to which binary information is transferred for storage, and from which information is available for.
Chapter 8 Memory Interface
Memory and Storage Dr. Rebhi S. Baraka
Internal Memory.
Digital Logic Design Instructor: Kasım Sinan YILDIRIM
1 COMP541 Memories - I Montek Singh Oct 7, Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):
+ CS 325: CS Hardware and Software Organization and Architecture Memory Organization.
Chapter 6: Internal Memory Computer Architecture Chapter 6 : Internal Memory Memory Processor Input/Output.
Memory Cell Operation.
Computer Architecture Lecture 24 Fasih ur Rehman.
Semiconductor Memory Types
Digital Circuits Introduction Memory information storage a collection of cells store binary information RAM – Random-Access Memory read operation.
COMP541 Memories II: DRAMs
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 22 Memory Definitions Memory ─ A collection of storage cells together with the necessary.
1 Memory Hierarchy (I). 2 Outline Random-Access Memory (RAM) Nonvolatile Memory Disk Storage Suggested Reading: 6.1.
Computer Architecture Chapter (5): Internal Memory
1 COMP541 Memories - I Montek Singh Mar 21, 2016.
Memory and Programmable Logic
Chapter 5 Internal Memory
William Stallings Computer Organization and Architecture 7th Edition
COMP211 Computer Logic Design
COMP541 Memories - I Montek Singh Oct 10, 2016.
William Stallings Computer Organization and Architecture 7th Edition
William Stallings Computer Organization and Architecture 8th Edition
EE345: Introduction to Microcontrollers Memory
Subject Name: Embedded system Design Subject Code: 10EC74
William Stallings Computer Organization and Architecture 7th Edition
William Stallings Computer Organization and Architecture 8th Edition
MICROPROCESSOR MEMORY ORGANIZATION
William Stallings Computer Organization and Architecture 8th Edition
Presentation transcript:

1 COMP541 Memories - I Montek Singh Feb 25, 2010

Topics  Midterm Test Thursday after Spring Break Thursday after Spring Break  Lab Preview: VGA character terminal  Overview of Memory Types ROMs: PROMs, FLASH, etc. ROMs: PROMs, FLASH, etc. RAMs RAMs  Random-Access Memory (RAM) Static today Static today Dynamic next Dynamic next 2

Lab: VGA Display Driver Architecture  No frame buffer  Character terminal 3

Character Memory  Dual ported Memory mapped Memory mapped CPU writes CPU writes Could read also Could read also  How many characters? 4

Bitmap Memory  What bitmap size? 5x7 at least 5x7 at least  Codes  Indexed by character memory So what code to store in character memory? So what code to store in character memory?  What size should memory be? 5

VGA driver  Just sends hsync, vsync  Track current row/column something the Timing Generator should provide the VGA Driver something the Timing Generator should provide the VGA Driver  Generates color When valid When valid Maybe smaller than VGA Maybe smaller than VGA  What character code? ASCII?  How many rows and columns? 6

Possibilities  Code color into some bits of character?  Other possibilities Sprites for games? Sprites for games?  Your own Nintendo Ideas? Ideas? 7

8 RAM on FPGA  Ours has 28 blocks, each 18Kb (bits, not bytes!) They call it block RAM They call it block RAM Block RAM: One or two ports, and several possible layouts Block RAM: One or two ports, and several possible layouts Often you’ll use it as a 16Kb RAM module Often you’ll use it as a 16Kb RAM module

Using from Verilog  It’s a primitive  Instantiate a block (here called R1) RAMB16_S1 R1( RAMB16_S1 R1(.DO(out), // 1-bit Data Output.DO(out), // 1-bit Data Output.ADDR(addr), // 14-bit Address Input.ADDR(addr), // 14-bit Address Input.CLK(clk), // Clock.CLK(clk), // Clock.DI(in), // 1-bit Data Input.DI(in), // 1-bit Data Input.EN(ena), // RAM Enable Input.EN(ena), // RAM Enable Input.SSR(1’b0), // Synchronous Set/Reset Input.SSR(1’b0), // Synchronous Set/Reset Input.WE(we) // Write Enable Input.WE(we) // Write Enable Input ); ); 9

4-Wide Block RAMB16_S4 RAMB16_S4_inst (.DO(DO), // 4-bit Data Output.DO(DO), // 4-bit Data Output.ADDR(ADDR), // 12-bit Address Input.ADDR(ADDR), // 12-bit Address Input.CLK(CLK), // Clock.CLK(CLK), // Clock.DI(DI), // 4-bit Data Input.DI(DI), // 4-bit Data Input.EN(EN), // RAM Enable Input.EN(EN), // RAM Enable Input.SSR(SSR), // Synchronous Set/Reset Input.SSR(SSR), // Synchronous Set/Reset Input.WE(WE) // Write Enable Input.WE(WE) // Write Enable Input ); ); 10

Wider Have Parity RAMB16_S18 RAMB16_S18_inst (.DO(DO), // 16-bit Data Output.DO(DO), // 16-bit Data Output.DOP(DOP), // 2-bit parity Output.DOP(DOP), // 2-bit parity Output.ADDR(ADDR), // 10-bit Address Input.ADDR(ADDR), // 10-bit Address Input.CLK(CLK), // Clock.CLK(CLK), // Clock.DI(DI), // 16-bit Data Input.DI(DI), // 16-bit Data Input.DIP(DIP), // 2-bit parity Input.DIP(DIP), // 2-bit parity Input.EN(EN), // RAM Enable Input.EN(EN), // RAM Enable Input.SSR(SSR), // Synchronous Set/Reset Input.SSR(SSR), // Synchronous Set/Reset Input.WE(WE) // Write Enable Input.WE(WE) // Write Enable Input ); ); 11

Can Initialize Block RAM RAMB16_S1 #( RAMB16_S1 #(.INIT(1'b0), // Value of output RAM registers at startup.INIT(1'b0), // Value of output RAM registers at startup.SRVAL(1'b0), // Output value upon SSR assertion.SRVAL(1'b0), // Output value upon SSR assertion.WRITE_MODE("WRITE_FIRST"), // WRITE_FIRST, READ_FIRST or NO_CHANGE.WRITE_MODE("WRITE_FIRST"), // WRITE_FIRST, READ_FIRST or NO_CHANGE // The following INIT_xx declarations specify the initial contents of the RAM // The following INIT_xx declarations specify the initial contents of the RAM // Address 0 to 4095 // Address 0 to 4095.INIT_00(256'h F1F),.INIT_00(256'h F1F),.INIT_01(256'h ),.INIT_01(256'h ),….INIT_3E(256'h ),.INIT_3E(256'h ),.INIT_3F(256'h ).INIT_3F(256'h ) ) RAMB16_S1_inst ( ) RAMB16_S1_inst (.DO(data), // 1-bit Data Output.DO(data), // 1-bit Data Output.ADDR(addr), // 14-bit Address Input.ADDR(addr), // 14-bit Address Input.CLK(clk), // Clock.CLK(clk), // Clock.DI(DI), // 1-bit Data Input.DI(DI), // 1-bit Data Input.EN(EN), // RAM Enable Input.EN(EN), // RAM Enable Input.SSR(SSR), // Synchronous Set/Reset Input.SSR(SSR), // Synchronous Set/Reset Input.WE(WE) // Write Enable Input.WE(WE) // Write Enable Input ); ); 12 Note that addresses go right to left, top to bottom

Synthesizer Can Also Infer  Careful how you specify (see XST manual). module inferRAM(clk, addr, data, we); input clk; input [8:0] addr;// 512 locations output [7:0] data;// by 8 bits input we; reg [7:0] mem [511:0]; reg [8:0] ra; (posedge clk) beginif(we) mem[addr] <= data; ra <= addr; end assign data = mem[ra]; endmodule 13

14 Look at Test Code  RAM testing example I’ll post online for tomorrow’s lab I’ll post online for tomorrow’s lab  Note how memory values are specified Addresses go right-to-left, top-to-bottom Addresses go right-to-left, top-to-bottom See the Constraints Guide and Library manuals in Xilinx docs See the Constraints Guide and Library manuals in Xilinx docs

Today’s lecture 15

Types of Memory  Many dimensions Read Only vs Read/Write (or write seldom) Read Only vs Read/Write (or write seldom) Volatile vs Non-Volatile Volatile vs Non-Volatile Requires refresh or not Requires refresh or not  Look at ROM first to examine interface 16

Non-Volatile Memory Technologies  Mask (old)  Fuses (old)  Electrically erasable 17

Details of ROM  Memory that is permanent  k address lines  2 k items  n bits 18

Notional View of Internals 19

Programmed Truth Table 20

Resulting Programming 21  In truth, they’re laid out in 2D (row, col)

Mask ROMs  Oldest technology  Originally “mask” used as last step in manufacturing Specify metal layer (connections) Specify metal layer (connections) Used for volume applications Used for volume applications Long turnaround Long turnaround Used for applications such as embedded systems and, in the old days, boot ROM Used for applications such as embedded systems and, in the old days, boot ROM 22

Programmable ROM (PROM)  First ones had fusible links  High voltage would blow out links  Fast to program  Single use 23

UV EPROM  Erasable PROM  Common technologies used UV light to erase complete device Took about 10 minutes Took about 10 minutes  Holds state as charge in very well insulated areas of the chip  Nonvolatile for several (10?) years 24

EEPROM  Electrically Erasable PROM  Similar technology to UV EPROM  Erased in blocks by higher voltage  Programming is slower than reading  Some called flash memory Digital cameras, MP3 players, BIOS Digital cameras, MP3 players, BIOS Limited life Limited life Some support individual word write, some block Some support individual word write, some block One on Xess board has 5 blocks One on Xess board has 5 blocks Has a boot block that is carefully protected Has a boot block that is carefully protected 25

How Flash Works  Special transistor with floating gate  This is part of device surrounded by insulation So charge placed there can stay for years So charge placed there can stay for years Aside: some newer devices store multiple bits of info in a cell Aside: some newer devices store multiple bits of info in a cell  Interested in this? If so, we can cover in more detail w/ transistors 26

Read/Write Memories  Flash is obviously writeable  But not meant to be written rapidly (say at CPU rates) And often by blocks (disk replacement) And often by blocks (disk replacement)  On to RAM 27

Random Access Memories  So called because it takes same amount of time to address any particular location Not quite true for modern DRAMs Not quite true for modern DRAMs  First look at asynchronous static RAM Ones on Xilinx chip synchronous Ones on Xilinx chip synchronous  Data available at clock edges, like registers One on board can be both One on board can be both 28

Simple View of RAM  Of some word size n  Some capacity 2 k  k bits of address line  Maybe have read line Strictly speaking may not need Strictly speaking may not need  Have a write line 29

1K x 16 memory  Variety of sizes From 1-bit wide From 1-bit wide  Issue is no. of pins  Memory size often specified in bytes This would be 2KB memory This would be 2KB memory  10 address lines and 16 data lines 30

Writing  Sequence of steps Setup address lines Setup address lines Setup data lines Setup data lines Activate write line (maybe a pos edge) Activate write line (maybe a pos edge) 31

Reading  Steps Setup address lines Setup address lines Activate read line Activate read line Data available after specified amt of time Data available after specified amt of time  For async  Synchronous memories use a clock 32

Chip Select  Usually a line to enable the chip  Why? 33

Writing 34

Reading 35

Static vs Dynamic RAM  SRAM vs DRAM  DRAM stores charge in capacitor Disappears after short period of time Disappears after short period of time Must be refreshed Must be refreshed  SRAM easier to use Uses transistors (think of it as latch) Uses transistors (think of it as latch) Faster Faster More expensive per bit More expensive per bit Smaller sizes Smaller sizes 36

Structure of SRAM  Control logic  One memory cell per bit Cell consists of one or more transistors Cell consists of one or more transistors Not really a latch made of NANDs/NORs, but logically equivalent Not really a latch made of NANDs/NORs, but logically equivalent 37

Simple Organization  In reality, more complex  Note that only one wordline H at a time 38

Bit Slice  Cells connected to form 1 bit position  Word Select gates one latch from address lines  Note it selects Reads also  B (and B’) set by R/W, Data In and BitSelect  Funny thing here when you write. What is it? 39

Bit Cells Example: 0 1 Z Z

41 Bit Slice can Become Module  Basically bit slice is a X1 memory  Next

SRAM Bit Cell

43 16 X 1 RAM “Chip”  Now shows decoder

Row/Column  If RAM gets large, there is a large decoder  Also run into chip layout issues  Larger memories usually “2D” in a matrix layout  Next Slide 44

45 16 X 1 RAM as 4 X 4 Array  Two decoders Row Row Column Column  Address just broken up  Not visible from outside on SRAMs

46 Change to 8 X 2 RAM  Minor change in logic  Also pinouts  What’s different?

Realistic Sizes  Imagine 256K memory as 32K X 8  One column layout would need 15-bit decoder with 32K outputs!  Can make a square layout with 9-bit row and 6-bit column decoders 47

SRAM Performance  Current ones have cycle times in low nanoseconds (say 2.5ns)  Used as cache (typically on-chip or off-chip secondary cache)  Sizes up to 8Mbit or so for fast chips  SRAMs also common for low power 48

Wider Memory  What if you don’t have enough bit width? 49

Larger/Wider Memories  Made up from sets of chips  Consider a 64K by 8 RAM 50

Larger  256K X 8  Decoder for high- order 2 bits Selects chip Selects chip Look at selection logic Look at selection logic Address ranges Address ranges  Tri-state outputs 51

Deeper Memory  Adding chips to increase storage, but keep same width  Need decoder 52

Today  Fast look at non-volatile memory  Static RAM  Next: Dynamic RAM Complex, largest, cheap Complex, largest, cheap Much more design effort to use Much more design effort to use 53