Slide Set 10. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Similar documents
Slide Set 8. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Contents Slide Set 9. Final Notes on Textbook Chapter 7. Outline of Slide Set 9. More about skipped sections in Chapter 7. Outline of Slide Set 9

Unit 6 1.Random Access Memory (RAM) Chapter 3 Combinational Logic Design 2.Programmable Logic

Sense Amplifiers 6 T Cell. M PC is the precharge transistor whose purpose is to force the latch to operate at the unstable point.

Memories. Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu.

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng

Contents. Slide Set 1. About these slides. Outline of Slide Set 1. Typographical conventions: Italics. Typographical conventions. About these slides

Slide Set 5. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Slide Set 9. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

Memory. Outline. ECEN454 Digital Integrated Circuit Design. Memory Arrays. SRAM Architecture DRAM. Serial Access Memories ROM

Lecture 20: CAMs, ROMs, PLAs

Integer Multiplication and Division

CENG 4480 L09 Memory 3

Slide Set 1 (corrected)

Slide Set 5. for ENCM 501 in Winter Term, Steve Norman, PhD, PEng

UNIT V (PROGRAMMABLE LOGIC DEVICES)

Lecture 14: CAMs, ROMs, and PLAs

Slide Set 1. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

Chapter Two - SRAM 1. Introduction to Memories. Static Random Access Memory (SRAM)

Introduction to SRAM. Jasur Hanbaba

RTL Design (2) Memory Components (RAMs & ROMs)

CSEE 3827: Fundamentals of Computer Systems. Storage

Concept of Memory. The memory of computer is broadly categories into two categories:

Introduction to Semiconductor Memory Dr. Lynn Fuller Webpage:

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

Slides for Lecture 15

Memory and Programmable Logic

+1 (479)

Lecture 11 SRAM Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

MEMORY AND PROGRAMMABLE LOGIC

Introduction to CMOS VLSI Design Lecture 13: SRAM

Lecture 13: SRAM. Slides courtesy of Deming Chen. Slides based on the initial set from David Harris. 4th Ed.

Very Large Scale Integration (VLSI)

! Memory Overview. ! ROM Memories. ! RAM Memory " SRAM " DRAM. ! This is done because we can build. " large, slow memories OR

CMOS Logic Circuit Design Link( リンク ): センター教官講義ノートの下 CMOS 論理回路設計

SECTION-A

ECE 2300 Digital Logic & Computer Organization

10/24/2016. Let s Name Some Groups of Bits. ECE 120: Introduction to Computing. We Just Need a Few More. You Want to Use What as Names?!

Memory & Logic Array. Lecture # 23 & 24 By : Ali Mustafa

Digital Logic & Computer Design CS Professor Dan Moldovan Spring 2010

Memory and Programmable Logic

Memory Supplement for Section 3.6 of the textbook

SRAM. Introduction. Digital IC

Model EXAM Question Bank

ELCT 912: Advanced Embedded Systems

Slide Set 5. for ENCM 369 Winter 2014 Lecture Section 01. Steve Norman, PhD, PEng

Chapter 3. SEQUENTIAL Logic Design. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris.

Slide Set 2. for ENCM 335 in Fall Steve Norman, PhD, PEng

Internal Memory. Computer Architecture. Outline. Memory Hierarchy. Semiconductor Memory Types. Copyright 2000 N. AYDIN. All rights reserved.

Digital Integrated Circuits Lecture 13: SRAM

ENGR 303 Introduction to Logic Design Lecture 7. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

EECS150 Homework 2 Solutions Fall ) CLD2 problem 2.2. Page 1 of 15

Semiconductor Memory Classification

Chapter Operation Pinout Operation 35

Digital Systems Design with PLDs and FPGAs Kuruvilla Varghese Department of Electronic Systems Engineering Indian Institute of Science Bangalore

Code No: R Set No. 1

CHAPTER 12 ARRAY SUBSYSTEMS [ ] MANJARI S. KULKARNI

CS 320 February 2, 2018 Ch 5 Memory

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 13

COMP3221: Microprocessors and. and Embedded Systems. Overview. Lecture 23: Memory Systems (I)

Based on slides/material by. Topic 7-4. Memory and Array Circuits. Outline. Semiconductor Memory Classification

CMPE 415 Programmable Logic Devices FPGA Technology I

Embedded Systems Design: A Unified Hardware/Software Introduction. Outline. Chapter 5 Memory. Introduction. Memory: basic concepts

Embedded Systems Design: A Unified Hardware/Software Introduction. Chapter 5 Memory. Outline. Introduction

Memory Overview. Overview - Memory Types 2/17/16. Curtis Nelson Walla Walla University

PROGRAMMABLE LOGIC DEVICES

William Stallings Computer Organization and Architecture 6th Edition. Chapter 5 Internal Memory

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

Chapter 5 Internal Memory

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

Semiconductor Memories: RAMs and ROMs

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

Slide Set 5. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems

Memory and Programmable Logic

Digital Systems Design with PLDs and FPGAs Kuruvilla Varghese Department of Electronic Systems Engineering Indian Institute of Science Bangalore

Chapter 6 Selected Design Topics

Digital Systems. Semiconductor memories. Departamentul de Bazele Electronicii

ECE 341. Lecture # 16

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

Lecture 11: MOS Memory

Computer Organization and Assembly Language (CS-506)

FPGA. Logic Block. Plessey FPGA: basic building block here is 2-input NAND gate which is connected to each other to implement desired function.

Summer 2003 Lecture 18 07/09/03

Organization. 5.1 Semiconductor Main Memory. William Stallings Computer Organization and Architecture 6th Edition

Lecture 13: Memory and Programmable Logic

Memory, Latches, & Registers

Presentation 4: Programmable Combinational Devices

MEMORIES. Memories. EEC 116, B. Baas 3

The Memory Component

Memory, Latches, & Registers

(Advanced) Computer Organization & Architechture. Prof. Dr. Hasan Hüseyin BALIK (5 th Week)

Lecture (05) Boolean Algebra and Logic Gates

(Refer Slide Time 6:48)

Read and Write Cycles

Microcomputers. Outline. Number Systems and Digital Logic Review

CHAPTER 8. Array Subsystems. VLSI Design. Chih-Cheng Hsieh

Overview. Memory Classification Read-Only Memory (ROM) Random Access Memory (RAM) Functional Behavior of RAM. Implementing Static RAM

! Memory. " RAM Memory. " Serial Access Memories. ! Cell size accounts for most of memory array size. ! 6T SRAM Cell. " Used in most commercial chips

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

Transcription:

Slide Set 10 for ENEL 353 Fall 2017 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 2017

SN s ENEL 353 Fall 2017 Slide Set 10 slide 2/73 Contents Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 3/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 4/73 Important notes about exam topics Because there aren t very many hours of lecture left, not all of the material in this slide set will be tested on the final exam. Here are two topics that were tested on the Fall 2013 exam, but were not tested on the Fall 2014 Fall 2016 exams, and will not be tested on the Fall 2017 exam: shift registers PLAs The material on implementation of memory cells using transistors is also not a Fall 2017 exam topic.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 5/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 6/73 Counters (textbook Section 5.4.1) Counter is a name used for any kind of synchronous sequential circuit designed to move one step per clock cycle through some specified counting sequence. There is a huge variety of kinds of counters, such as N-bit binary counters, which count from 0 up to 2 N 1, then return to 0; decade counters, which count from 0 up to 9, then return to 0; down-counters, which go to some maximum value on reset, then count down to 0. We ve already seen lots of counters in lectures and Problem Set 5, so it s best to spend our remaining lecture time on other topics.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 7/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 8/73 Shift registers (textbook Section 5.4.2) Shift register is a name used for a synchronous sequential circuit made from a chain of flip-flops. In normal operation of a shift register, a typical D input to DFF is driven by the Q output of a neighbouring DFF. Although the name shift register hasn t been used, shift registers have already appeared a few times in ENEL 353. For example, the divide-by-3 counter with one-hot state encoding stores its state in a shift register. Two of the many practical applications of shift registers are parallel-to-serial conversion and serial-to-parallel conversion.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 9/73 serial and parallel N-bit parallel data communication uses N wires to transmit N bits at the same time. Most data communication within a computer processor circuit is parallel. Serial data communication transmits one bit per time interval. Often the time interval is one system clock period. An example of serial communication is the Universal Serial Bus (USB) system, which is very widely used to connect computers to peripherals such as printers, keyboards, and many kinds of external storage devices.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 10/73 Universal Serial Bus USB connections version 2.0 and earlier have 4 wires: 5V and ground for powering devices; two wires for serial communication a 1 or 0 is transmitted as a voltage difference between these two wires. (Public domain photo taken from Wikipedia article on USB.)

SN s ENEL 353 Fall 2017 Slide Set 10 slide 11/73 N-bit parallel-in-serial-out shift register N bits can be copied into the shift register in a single clock cycle. The bits come out one at a time over N clock cycles. Here s an example with N = 4. It should be pretty obvious how to redesign the circuit for some value of N that isn t 4... CLK A 0 A 1 A 2 A 3 Load 1 0 1 1 1 Y =Q 3 0 0 0 Q 0 Q 1 Q 2 When Load = 1, the DFFs do a parallel load, copying A N 1:0 on a rising edge of CLK. When Load = 0, the DFFs copy their neighbour s outputs: Q k = Q k 1 for 0 < k < N.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 12/73 CLK A 0 A 1 A 2 A 3 Load 1 0 1 1 1 Y =Q 3 0 0 0 Q 0 Q 1 Q 2 Suppose Q 3:0 = 0000 just before time t 0. Let s complete the timing diagram... CLK Load A 3:0 1101 Q 3:0 Y t 0

SN s ENEL 353 Fall 2017 Slide Set 10 slide 13/73 When is it time to load more parallel data? CLK A 0 A 1 A 2 A 3 Load 1 0 1 1 1 Y =Q 3 0 0 0 Q 0 Q 1 Q 2 Let s suppose we ve built the above circuit, but with N = 8 instead of N = 4. So there are 8 parallel inputs (A 7:0 ), 8 multiplexers, and 8 DFFs. What would be a useful companion circuit, that could request a new parallel load after all eight bits from the previous load have been copied out on Y?

SN s ENEL 353 Fall 2017 Slide Set 10 slide 14/73 N-bit serial-in-parallel-out shift register Here s an example with N = 4. Note the use of DFFs with enable inputs. CLK A Shift Q 0 Q 1 Q 2 Q 3 EN EN EN EN Y 0 Y 1 Y 2 Y 3 When Shift = 1, data arriving on A, one bit per clock cycle, gets copied into the shift register. When Shift = 0, the shift register is frozen, allowing a parallel transfer of the data on Y N 1:0. For the circuit to work correctly, what must be true about the signals A and CLK?

SN s ENEL 353 Fall 2017 Slide Set 10 slide 15/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 16/73 Memory arrays (textbook Section 5.5) A memory array is a digital circuit element connected to an N-bit address bus, an M-bit data bus, and most likely some other signals. Address N Array M Data The address bus is unidirectional it s always an input to the array. The data bus is bidirectional an input when the array is written to, an output when the array is read from. Inside the array there are 2 N M stored bits.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 17/73 Stored bits in a memory array Here is an example with N = 3 and M = 4. There are 2 N = 2 3 = 8 different possible addresses. At each address there is a stored 4-bit word. This example would be called an 8 4 array. In this example, 8 is the depth and 4 is the width. The width is sometimes called the word size. Address 111 110 101 100 011 010 001 000 4 columns 1 0 1 0 0 1 1 1 0 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 8 4-bit words in 8 rows Of course the 0 s and 1 s are not really stored as tiny pictures of the characters 0 and 1! Different kinds of memory arrays use different kinds of circuit elements to hold 0 s and 1 s.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 18/73 An example of a larger array Tiny arrays like the one on the previous slide are good for textbook and lecture examples, and there are also some practical uses for such small arrays. However, memory arrays can be much larger. Suppose N, the address size, is 16 bits, and M, the data size (word size) is 8 bits. What are the dimensions of the memory array? How many bits are stored in the array?

SN s ENEL 353 Fall 2017 Slide Set 10 slide 19/73 ROM and RAM: Names we re stuck with, part 1 These not-particularly-descriptive names have been around for decades, and are unlikely to change any time soon. ROM stands for read-only memory. It s true that ROM is read-only, when voltages between 0 and V DD are applied. (Some ROM circuits are writeable if voltages outside of the 0-to-V DD range are applied!) But it s also true and just as important that ROM is nonvolatile: In ROM, stored 0 s and 1 s are preserved when the power is off. A more descriptive name for ROM circuit would be NVMA: nonvolatile memory array.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 20/73 ROM and RAM: Names we re stuck with, part 2 RAM stands for random access memory. Random access means that access to any one word in an array is no faster and no slower than access to any other word. Mass storage devices such as magnetic disk drives, magnetic tape drives, and CD/DVD/Blu-ray drives do not have this random access property. But ROM circuits are random access, which makes RAM a silly name for something that is different in important ways from ROM!

SN s ENEL 353 Fall 2017 Slide Set 10 slide 21/73 ROM and RAM: Names we re stuck with, part 3 The key properties of a RAM array are: it is both readable and writeable, using voltages in the 0-to-V DD range; it is volatile all the stored 0 s and 1 s are lost when power is turned off. A very precise but somewhat unpronounceable name for RAM circuit would be VRWMA (volatile readable/writeable memory array). Your instructor seriously doubts that VRWMA will replace RAM circuit as a widely-used name any time in the near future!

SN s ENEL 353 Fall 2017 Slide Set 10 slide 22/73 ROM compared to RAM Address N 1-port ROM Array M Data Address WE other signals N? 1-port RAM Array M Data WE stands for write enable. WE = 1 tells RAM to write to the word specified by Address, and WE = 0 tells RAM to read from the word specified by Address. Which array is combinational logic and which is sequential? Is the sequential circuit synchronous or asynchronous?

SN s ENEL 353 Fall 2017 Slide Set 10 slide 23/73 How many ports? Address N 1-port ROM Array M Data Address WE other signals N? 1-port RAM Array M Data The circuits above are called 1-port because at any given time, the array can receive only one address and can support only one read or write operation. See Harris & Harris for an example of a 3-port memory array, which can support two read operations and one write operation all at one time, possibly involving three different addresses.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 24/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 25/73 Bit cells, wordlines, and bitlines Each bit stored within a memory array in stored in a tiny circuit element called a bit cell. Signalling to a bit cell is done through two wires: a wordline and a bitline. wordline stored bit Wordline: Each wordline is connected to all of the bits within a single word. Bitline: Each bitline is connected to all of the bits within a single column. If a memory array has an 8-bit address bus and a 9-bit data bus, how many wordlines are there? How many bitlines? bitline

SN s ENEL 353 Fall 2017 Slide Set 10 slide 26/73 More about wordlines wordline i bitline M 1 bitline 1 bitline 0 stored bit...... stored bit stored bit Each wordline is connected to all of the bits within a single word. Normally one wordline is ON and all the others are OFF, so that a single word is selected for reading or writing. What kind of circuit element is perfectly suited for converting an address input into the correct set of wordline signals?

SN s ENEL 353 Fall 2017 Slide Set 10 slide 27/73 Organization of a 4 3 memory array 2:4 Decoder bitline 2 bitline 1 bitline 0 Address 2 11 10 01 00 wordline 3 wordline 2 wordline 1 wordline 0 stored bit = 0 stored bit = 1 stored bit = 1 stored bit = 0 stored bit = 1 stored bit = 0 stored bit = 1 stored bit = 1 stored bit = 0 stored bit = 0 stored bit = 0 stored bit = 1 Data 2 Data 1 Data 0 Image is Figure 5.42 from Harris D. M. and Harris S. L., Digital Design and Computer Architecture, 2nd ed., c 2013, Elsevier, Inc.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 28/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 29/73 Dot notation for ROM circuits Often a ROM is drawn showing only its decoder, the wordlines and bitlines, and some dots. A dot at a wordline-bitline crossing point indicates a stored 1. No dot at a crossing point indicates a stored 0. Let s draw a dot-notation diagram for ROM with the contents of the table to the right. Address 111 110 101 100 011 010 001 000 4 columns 1 0 1 0 0 1 1 1 0 0 0 1 1 0 0 1 1 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 8 4-bit words in 8 rows

SN s ENEL 353 Fall 2017 Slide Set 10 slide 30/73 ROM-based implementation of logic functions A ROM circuit can be thought of as a truth table baked into silicon. This way of thinking about ROM leads to the conclusion that any combinational logic function can be implemented as a ROM circuit. N C L M can be implemented as N 2 N M ROM Address Data M

SN s ENEL 353 Fall 2017 Slide Set 10 slide 31/73 ROM-based logic: Examples Let s implement the following combinational elements using ROM circuits with appropriate dimensions. 1. F = A B; G = (A B); H = A + B. Let s do this one by using algebra to express each of F, G, and H as a sum of minterms. 2. E = ABC; F = A B; G = AB + AC + BC; H = A + B + C. Let s do this one by making a truth table.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 32/73 Why use ROMs for combinational logic? Why not? Using a ROM structure for N-input, M-output logic is sometimes a good design choice, and sometimes not. Custom solutions with logic gates tend to use less chip area and less power than ROM-based solutions, and can be much faster. However, the design effort needed for a ROM-based solution is close to zero, so it may be a good choice if area, power, and speed constraints are not pressing.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 33/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 34/73 NMOS transistors NMOS transistors are one of the two main kinds of building blocks for CMOS circuits. An NMOS transistor has the four terminals shown, but in CMOS the bulk is assumed to be connected to ground and is usually not shown in circuit diagrams. gate drain I DS source bulk The relationship of the current I DS to the voltages at the gate, drain and source is quite complex. (Electrical Engineers: See ENCM 467 in third year.) But a simple, crude model helps explain how bit cells work in memory arrays.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 35/73 NMOS transistor with V gate close to zero The first part of our simple, crude model is actually quite accurate. When the gate voltage is close to zero, the drain-to-source connection is like an open switch no current can flow. V gate 0 drain I DS? drain I DS = 0 source source

SN s ENEL 353 Fall 2017 Slide Set 10 slide 36/73 NMOS transistor with V gate close to V DD The second part of our simple, crude model is not very accurate, but good enough to get a qualitative feel for how bit cells work. When the gate voltage is close to the power supply voltage, the drain-to-source connection is somewhat like a small resistance in series with a closed switch current flows if V drain V source. V gate V DD drain I DS? source drain source If V drain V source, then I DS 0.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 37/73 A ROM circuit made with NMOS transistors A 2:4 decoder drives the wordlines, but is not shown here, to save space on this slide. What happens to the bitlines if wordline 2 is turned ON and the other three wordlines are OFF? What are the contents of this ROM array? V DD bit- line 2 wordline 2 wordline 3 wordline 1 wordline 0 R R R bit- line 1 bitline 0

SN s ENEL 353 Fall 2017 Slide Set 10 slide 38/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 39/73 Programmable ROM circuits The ROM circuit on the previous slide can only be made in a semiconductor fab, which is a fancy name for chip factory. It s obviously useful to have circuits that have the essential ROM properties contents not lost when power is turned off, contents won t change when normal digital logic voltages are applied but are also programmable. A programmable ROM is a ROM circuit into which 1 s and 0 s can be written after the circuit is fabricated. See Figure 5.51 and related discussion in Harris & Harris for explanation of one-time-programmable ROM circuits based on fuses that are either blown or intact.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 40/73 Much cooler than a ROM circuit that can be programmed only once is a ROM circuit that can programmed, then erased, and then re-programmed, many, many times. Production of this kind of erasable, programmable ROM circuit is a huge industry, based on one key electronic device: the floating-gate transistor. Some of the many products that depend utterly on floating-gate transistors are... USB thumb drives SD cards and related storage techologies solid-state drives in laptop and desktop computers smartphones and tablet computers Some slides at the end of this slide set give a brief explanation of floating-gate transistor behaviour.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 41/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 42/73 How RAM and EEPROM circuits work Slides 43 57 try to briefly explain how RAM circuits and EEPROM (electrically-erasable programmable ROM) circuits work, and do not contain examinable material.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 43/73 How writes and read work in RAM circuits The next few slides attempt to give a rough explanation of how data is written into and read out of bits cells in a RAM array. It s hard to give a really detailed explanation without referring to ideas about transistors and circuit theory that come later than Fall Term of Year 2 in the ENEL degree program.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 44/73 The next slide shows a hypothetical 4 3 RAM array. Keep in mind that practical RAM circuits are usually much, much larger, with thousands, millions, or even billions of bit cells. A lot of the circuit design issues have to with the fact that bit cells are tiny, not-very-powerful circuits, while bitlines are relatively lengthy pieces of metal. It s not possible for a single bit cell to quickly drive the voltage on a bitline all the way from LOW to HIGH or HIGH to LOW.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 45/73 4 3 RAM array A 1 A 0 WE other signals EN 2:4 decoder with enable 11 10 01 00 read / write control wordline 3 wordline 2 wordline 1 wordline 0 bit cell bit cell bit cell bit cell bitline 2 bit cell bit cell bit cell bit cell bitline 1 bit cell bit cell bit cell bit cell bitline drivers and sense amplifier circuits bitline 0 D 2 D 1 D 0

SN s ENEL 353 Fall 2017 Slide Set 10 slide 46/73 A write in the 4 3 RAM array, part 1 The EN input of the decoder is normally OFF, so that all wordlines are normally LOW. The read/write control circuit sees that WE = 1, and one of its other signals tells the circuit that the address A 1:0 and the input data D 2:0 are ready. Bitline drivers quickly change the voltage levels of the bitlines to match D 2:0. EN is turned ON, which turns on the wordline corresponding to the bit pattern on A 1:0.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 47/73 A write in the 4 3 RAM array, part 2 Bit cells in the selected word copy voltages from the bitlines. There will be contention (also called fighting) in cells where a 0 is replacing a 1, or a 1 is replacing a 0. The bitline drivers win all the fights, because the bitline drivers are much stronger than the bit cells. EN is turned off.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 48/73 A read in the 4 3 RAM array, part 1 An other signals input to the read/write control circuit indicates that a read is requested and that the address A 1:0 is ready. The bitline drivers precharge the bitlines to a voltage V PRE about halfway between LOW and HIGH, then leave the bitlines floating. The voltage of V PRE will stay on the bitlines briefly because they act like capacitors.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 49/73 A read in the 4 3 RAM array, part 2 EN is turned ON, which turns on the wordline corresponding to A 1:0. Bit cells containing 0 s drive their bitlines slightly lower than V PRE. Bit cells containing 1 s drive their bitlines slightly higher than V PRE. Each small voltage change on a bitline is detected by a sense amplifier circuit at the end of the bitline, and converted to a solid LOW or HIGH voltage suitable for a data output wire. EN is turned off.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 50/73 Warning about oversimplification I have tried to keep the story told on the last few slides short and simple, and to convey ideas that are common to the operation of both SRAM and DRAM circuits. To do that I have had to be imprecise, leaving out important details, and somewhat inaccurate, suggesting some things that aren t really true. I m not going to try to be more precise and accurate about DRAM, because that just takes too much time. But on the next two slides I ll clear some things up about SRAM.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 51/73 Writing to an SRAM cell An SRAM cell is made from a pair of inverters connected in a bistable configuration, and a pair of NMOS transistors. bitline wordline stored bit bitline Every column in an SRAM array has two wires, called bitline and bitline. On a write, bitline and bitline are driven to opposite levels. Whichever line is LOW will do most of the work in changing the state of the cell, because NMOS transistors pass 0 s better than they pass 1 s. Image is Figure 5.46 from Harris D. M. and Harris S. L., Digital Design and Computer Architecture, 2nd ed., c 2013, Elsevier, Inc.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 52/73 Reading from an SRAM cell bitline wordline stored bit bitline On a read, bitline and bitline are precharged to equal V PRE levels before the wordline is turned ON. The bistable pair of inverters will pull one of the bitline and bitline voltages up slightly and the other voltage down slightly. A sense amplifier at the end of the bitline-bitline pair will detect a voltage difference and decide whether the cell contains a 1 or a 0.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 53/73 Floating-gate transistors, part 1 The floating gate in a floating-gate transistor is surrounded by insulating material. Electrons trapped on a floating gate will stay there for many, many years. control gate floating gate drain I DS bulk source If the charge on the floating gate is neutral and voltages applied are all in the 0 to V DD range, then the circuit acts like an NMOS transistor the voltage on the control gate will decide whether current can flow from drain to source.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 54/73 Floating-gate transistors, part 2 drain I DS control gate bulk floating gate source If the charge on the floating gate is significantly negative and voltages applied are again all in the 0 to V DD range, then I DS = 0 regardless of the control gate voltage there is effectively no electrical connection between drain and source.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 55/73 Floating-gate transistors as bit cells in memory arrays, part 1 Memory arrays can be built with floating-gate transistors at every wordline-bitline crossing point. wordline bitline If you understand the basic operation of the ROM circuit presented many slides back, it should be clear that a floating-gate transistor bit cell holds either a 0 or a 1 depending on the charge on its floating gate.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 56/73 Floating-gate transistors as bit cells in memory arrays, part 2 add electrons to floating gate stored 0 wordline bitline stored 1 wordline bitline remove electrons from floating gate

SN s ENEL 353 Fall 2017 Slide Set 10 slide 57/73 Floating-gate transistors and EEPROM arrays EEPROM: Electrically-erasable programmable ROM. An EEPROM array has circuitry that can move electrons on to or off of the floating gates in its bit cells. The key to this circuitry is that by applying voltages significantly outside the 0 to V DD range, it s possible to get electrons to move through the insulation surrounding a floating gate. Erasing: Restoring neutral charge to all floating gates. Programming: Selectively injecting electrons on to some floating gates, so that an EEPROM array contains some desired pattern of 0 s and 1 s.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 58/73 Outline of Slide Set 10 Important notes about exam topics Counters Shift registers Memory arrays Bit cells, wordlines, and bitlines ROM circuits: dot notation, ROM-based logic Implementation of ROM with NMOS transistors Programmable ROM circuits How RAM and EEPROM circuits work PLAs: Programmable logic arrays

SN s ENEL 353 Fall 2017 Slide Set 10 slide 59/73 PLAs: Programmable logic arrays (text Section 5.6.1) As explained previously, any combinational logic function can be implemented as a ROM circuit with the appropriate numbers of address inputs and data outputs. However, ROM implementation of combinational logic has some drawbacks: The size of the decoder grows exponentially with the number of input bits. Propagation delays may be lengthy due to relatively slow voltage changes on long bitlines. A PLA programmable logic array is a structure that allows SOP-based implementation of combinational logic in a way that may be more efficient than a ROM array.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 60/73 Review of terminology related to SOP expressions Literal: Either an input variable or its complement. If the input variables are A, B, C, then the available literals are A, A, B, B, C, C. Product: Either a literal, or two or more literals ANDed together. Minterm: A product that includes literals from all of the input variables. Implicant: A product is an implicant of Y if it can be included in a sum-of-products (SOP) expression for Y.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 61/73 What products are available? Let s look at the example of a 3-input system with inputs A, B, C. All of the literals are products: A, A, B, B, C, C. All of the minterms are products: A B C, A B C, A B C, A B C, A B C, A B C, A B C, A B C. There are a lot of products that are neither literals nor minterms: A B, A B, A B, A B, A C, A C, A C, A C, B C, B C, B C, B C. As the number of input variables goes from 3 to 4 to 5 and beyond, the number of literals, minterms, and non-literalnon-minterm products gets very big, very fast. A key aspect of PLAs is the ability to select products with whatever number of literals makes sense.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 62/73 A generic M N P PLA inputs M AND array implicants N OR array P outputs The AND array generates all the products (implicants) that are needed in SOP expressions for the outputs. The OR array does the work of ORing together implicants to generate outputs.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 63/73 Dot notation for PLAs (and ROM arrays) In diagrams for PLAs and ROMs, a dot on a pair of crossing wires never indicates simple electrical connection of the two wires! Review: What does a dot indicate in a ROM diagram? Let s write down what dots mean in PLA diagrams.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 64/73 An example PLA, shown with dot notation Note the use of inverters to generate complements of the input variables. A B C n3 n2 n1 n0 OR array AND array Y 1 Y 0 What are the dimensions M, N, and P? Give algebraic expressions for Y 1 and Y 0.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 65/73 PLA design example #1 Let s implement the given truth table using a 3 3 2 PLA. The solution is not unique. What are two different SOP expressions that work for Y 1? A B C Y 1 Y 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 1 1 1 0 0

SN s ENEL 353 Fall 2017 Slide Set 10 slide 66/73 How many implicant wires should a PLA have? Typically N, the number of implicant wires, is significantly less than 2 M, where M is the number of inputs. Why would it make no sense at all to have N > 2 M?

SN s ENEL 353 Fall 2017 Slide Set 10 slide 67/73 PLA design example #2 Suppose you have these K-maps and have been asked to implement the logic using a 3 3 2 PLA. Y 1 A B 00 01 11 10 C 0 1 Y 0 A B 00 01 11 10 C 0 1 1 1 1 1 1 1 What goes wrong if you use the K-maps to find separate minimal SOP expressions for Y 1 and Y 0? By looking at the K-maps again, let s find SOP expressions that will work for the PLA.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 68/73 PLA implementation with NMOS transistors Y 1 = AB + BC and Y 0 = AB in this 3 2 2 PLA. You can tell from the dots! But why does this circuit work? A B C OR array R R n1 n0 R R AND array Y 1 Y 0

SN s ENEL 353 Fall 2017 Slide Set 10 slide 69/73 How does the AND array work? For example, why is it that n1 = AB? A B C OR array R R n1 n0 R R AND array Y 1 Y 0

SN s ENEL 353 Fall 2017 Slide Set 10 slide 70/73 How does the OR array work? For example, why is it that Y 1 = n1 + n0? A B C OR array R n1 R R R AND array n0 n3 n2 Y 1 Y 0

SN s ENEL 353 Fall 2017 Slide Set 10 slide 71/73 The textbook on ROM and PLA implementations with NMOS transistors Section 5.6.3 in Harris & Harris covers this topic. Unfortunately, Figure 5.63 has a couple of confusing typographical errors, which are not hard to spot if you compare it to Figure 5.55... There is a missing dot in the AND array. The implicant labeled as AB should be labeled A B.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 72/73 PLA implemented with floating-gate transistors A B C OR array R R R R AND array Y 1 Y 0 Put neutral charge on floating gates wherever an NMOS transistor would be needed. Put negative charge on floating gates wherever the absence of an NMOS transistor would be needed.

SN s ENEL 353 Fall 2017 Slide Set 10 slide 73/73 Why study PLAs in a course like ENEL 353? The idea that a chip that is just a single PLA could be commercially viable has been obsolete for decades. (Tens of years, not tens of clock cycles!) A typical programmable logic chip in 2016 is much more powerful and much faster than a PLA. So why study PLAs? PLA design provides an excellent review of some fundamental concepts in combinational logic design. Use of PLA-like structures within a larger digital integrated circuit design still makes sense.