Feb. 26, 2001Systems Architecture I1 Systems Architecture I (CS 281-001) Lecture 12: State Elements, Registers, and Memory * Jeremy R. Johnson Mon. Feb.

Slides:



Advertisements
Similar presentations
Registers Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens A clock is a free-running signal with a cycle time. A clock may.
Advertisements

Prith Banerjee ECE C03 Advanced Digital Design Spring 1998
Computer Science 210 Computer Organization Clocks and Memory Elements.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /23/2013 Lecture 7: Computer Clock & Memory Elements Instructor: Ashraf Yaseen DEPARTMENT OF MATH &
COEN 180 DRAM. Dynamic Random Access Memory Dynamic: Periodically refresh information in a bit cell. Else it is lost. Small footprint: transistor + capacitor.
Memory (RAM) Organization Each location is addressable Addresses are binary numbers Addresses used at different granularities –each bit is possible, but.
Latches and Flip-Flops
CS.305 Computer Architecture Memory: Structures Adapted from Computer Organization and Design, Patterson & Hennessy, © 2005, and from slides kindly made.
Chapter 9 Memory Basics Henry Hexmoor1. 2 Memory Definitions  Memory ─ A collection of storage cells together with the necessary circuits to transfer.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
1 The Basic Memory Element - The Flip-Flop Up until know we have looked upon memory elements as black boxes. The basic memory element is called the flip-flop.
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
Overview Logic Combinational Logic Sequential Logic Storage Devices SR Flip-Flops D Flip Flops JK Flip Flops Registers Addressing Computer Memory.
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.
Lecture 4: Computer Memory
CS 151 Digital Systems Design Lecture 30 Random Access Memory (RAM)
Chapter Five The Processor: Datapath and Control.
Latches and Flip-Flops Discussion D4.1 Appendix J.
COMPUTER ARCHITECTURE & OPERATIONS I Instructor: Hao Ji.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
Contemporary Logic Design Sequential Case Studies © R.H. Katz Transparency No Chapter #7: Sequential Logic Case Studies 7.6 Random Access Memories.
CompE 460 Real-Time and Embedded Systems Lecture 5 – Memory Technologies.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 8 – Memory Basics Logic and Computer Design.
SYEN 3330 Digital SystemsJung H. Kim 1 SYEN 3330 Digital Systems Chapter 9 – Part 1.
FPGA-Based System Design: Chapter 3 Copyright  2004 Prentice Hall PTR Topics n Latches and flip-flops. n RAMs and ROMs.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Memory System Unit-IV 4/24/2017 Unit-4 : Memory System.
Memory Intro Computer Organization 1 Computer Science Dept Va Tech March 2006 ©2006 McQuain & Ribbens Built using D flip-flops: 4-Bit Register Clock input.
CPEN Digital System Design
Digital Logic Design Instructor: Kasım Sinan YILDIRIM
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /3/2013 Lecture 9: Memory Unit Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL.
COMP203/NWEN Memory Technologies 0 Plan for Memory Technologies Topic Static RAM (SRAM) Dynamic RAM (DRAM) Memory Hierarchy DRAM Accelerating Techniques.
CS/COE0447 Computer Organization & Assembly Language
VHDL Discussion Sequential Sytems. Memory Elements. Registers. Counters IAY 0600 Digital Systems Design Alexander Sudnitson Tallinn University of Technology.
Logic Design / Processor and Control Units Tony Diep.
Chapter 6 – Digital Electronics – Part 1 1.D (Data) Flip Flops 2.RS (Set-Reset) Flip Flops 3.T Flip Flops 4.JK Flip Flops 5.JKMS Flip Flops Information.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 8 – Memory Basics Logic and Computer Design.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 22 Memory Definitions Memory ─ A collection of storage cells together with the necessary.
July 2, 2001Systems Architecture I1 Systems Architecture II (CS 282) Lab 3: State Elements, Registers, and Memory * Jeremy R. Johnson Monday July 2, 2001.
07/11/2005 Register File Design and Memory Design Presentation E CSE : Introduction to Computer Architecture Slides by Gojko Babić.
Lecture 23: 11/26/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
CS35101 Computer Architecture Spring 2006 Lecture 18: Memory Hierarchy Paul Durand ( ) [Adapted from M Irwin (
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
RAM RAM - random access memory RAM (pronounced ramm) random access memory, a type of computer memory that can be accessed randomly;
Appendix B The Basics of Logic Design
Appendix B The Basics of Logic Design
Computer Science 210 Computer Organization
Lecture 3. Lateches, Flip Flops, and Memory
Computer Architecture & Operations I
Computer Architecture & Operations I
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Class Exercise 1B.
Computer Architecture & Operations I
Morgan Kaufmann Publishers
Appendix B The Basics of Logic Design
Computer Science 210 Computer Organization
Computer Architecture & Operations I
Latches and Flip-flops
Hakim Weatherspoon CS 3410 Computer Science Cornell University
Computer Science 210 Computer Organization
Systems Architecture II
Systems Architecture I
Sequential Logic.
4-Bit Register Built using D flip-flops:
Clocks A clock is a free-running signal with a cycle time.
(Sequential-Circuit Building Blocks)
Presentation transcript:

Feb. 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 12: State Elements, Registers, and Memory * Jeremy R. Johnson Mon. Feb. 26, 2001 *This lecture was derived from material in the text (Appendix B). All figures from Computer Organization and Design: The Hardware/Software Approach, Second Edition, by David Patterson and John Hennessy, are copyrighted material (COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC. ALL RIGHTS RESERVED).

Feb. 26, 2001Systems Architecture I2 Introduction Objective: Review sequential logic and use of a clock. To learn how to use flip flops to build register files, and latches to build memory. Topics –Sequential logic (elements with state) and timing (edge triggered) Latches and flip flops Registers –Memory SRAM DRAM

Feb. 26, 2001Systems Architecture I3 Timing Clocks used in synchronous logic – when should an element that contains state be updated? –All state elements must have the clock signal as an input Edge-triggered timing –All state elements are updated on the same clock edge cycle time rising edge falling edge

Feb. 26, 2001Systems Architecture I4 Edge Triggered Timing State updated at clock edge read contents of some state elements, send values through some combinational logic write results to one or more state elements Clock must have sufficiently long period for combinational logic to stabilize.

Feb. 26, 2001Systems Architecture I5 Edge Triggered Timing Allows a state element to be used as both an input and an output

Feb. 26, 2001Systems Architecture I6 S-R (set-reset) Latch Unclocked memory element The outputs Q and Qb represent the value of the stored element and its complement. When neither S or R is asserted the cross-coupled nor gates serve as inverters and store the previous values of Q and Qb If S is asserted Q will be asserted and Qb will be deasserted If R is asserted Qb will be asserted and Q will be deasserted Asserting both S and R can lead to incorrect behavior

Feb. 26, 2001Systems Architecture I7 D Latch Clocked memory unit (change of state triggered by clock) State is changed whenever inputs change and clock is asserted Transparent

Feb. 26, 2001Systems Architecture I8 D Flip-Flop Clocked memory unit (change of state triggered by clock) State is changed only on the clock edge (can be designed to use either the rising or falling edge) Since we use edge-triggered timing, flip-flops are used Not transparent Uses two D latches (master & slave)

Feb. 26, 2001Systems Architecture I9 Behavioral Model for D Flip-Flop Library IEEE; use IEEE.std_logic_1164.all; entity dff is port(D, Clk : in std_logic; Q, Qb : out std_logic); end dff; architecture behavorial of dff is begin output: process begin wait until (Clk’event and Clk = ‘0’); Q <= D after 5 ns; Qb <= not D after 5 ns; end process output; end behavorial;

Feb. 26, 2001Systems Architecture I10 Components for Simple Implementation Functional Units needed for each instruction

Feb. 26, 2001Systems Architecture I11 Register File A set of registers that can be read/written by supplying a register number to be accessed. Built using a decoder for each read and write port, and an array of D flip-flops. For the MIPS processor, the register file has two read ports and one write port. A write flag is used to indicate that the state should change, and a clock is needed to determine when to change state.

Feb. 26, 2001Systems Architecture I12 Implementation of Read Ports

Feb. 26, 2001Systems Architecture I13 Implementation of Write Ports

Feb. 26, 2001Systems Architecture I14 Memory Registers and register files provide the basic building blocks for small memories. Larger memories are built from SRAMs (Static Random Access Memories) and DRAMs (Dynamic Random Access Memories) SRAM –5 to 25 ns access time –largest SRAMs have over 4 Million bits –4 to 6 transistors per bit –value stored in cell kept on a pair of inverting gates and can be kept indefinitely DRAM –60 to 110 ns access time –1 transistor per bit –charge stored in capacitor, and needs periodic refreshing

Feb. 26, 2001Systems Architecture I15 SRAM Specification given in terms of number of addressable locations (height) and width of each location Example –256K  1 (18 address bits and 1 bit wide) –32K  8 (15 address bits and 8 bits wide) Control lines –chip select –output enable (for read) –write enable

Feb. 26, 2001Systems Architecture I16 Three-State Buffers With an SRAM with 32K or 256K address bits, using a multiplexor to select the output is out of the question. Large memories are implemented using a shared output line, called a bit line, which multiple cells in the memory array can assert. To allow multiple sources to drive a single line, a three- state buffer is used. –Output is asserted or deasserted if output enable is asserted –Otherwise is in a high-impedance state which allows another three-state buffer that is enabled to determine the output

Feb. 26, 2001Systems Architecture I17 Structure of a 4  2 SRAM

Feb. 26, 2001Systems Architecture I18 Two-Level Decoding A two-level decoding scheme is used (avoids large decoder or multiplexor)

Feb. 26, 2001Systems Architecture I19 DRAM Uses two-level decoder Row access followed by column access –Row access chooses an entire row which is copied to a to a set of latches (written back for refresh) –Column access selects from the column latches –One set of pins used –Row Access Strobe (RAS) and Column Access Strobe (CAS) signal DRAM that either a row or column address is being supplied

Feb. 26, 2001Systems Architecture I20 Recent Developments Synchronous SRAM and DRAM –provide ability to transfer a burst of data from a series of sequential addresses within an array or row. –Initial address and burst length provided –A clock is used to transfer successive bits in burst In a DRAM access all but one element of a row is thrown out. Page mode or static-column mode allow the column address to change with a fixed row address (difference is whether CAS must be reasserted) EDO RAM (Extended Data Out) is an example which provides access times at 25ns.

Feb. 26, 2001Systems Architecture I21 Behavioral Model for Memory library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all; entity memory is port(address, write_data : in std_logic_vector(31 downto 0); MemWrite, MemRead : in std_logic; read_data : out std_logic_vector(31 downto 0)); end memory;

Feb. 26, 2001Systems Architecture I22 Behavioral Model for Memory architecture behavorial of memory is type mem_array is array(0 to 7) of std_logic_vector (31 downto 0); begin mem_process: process(address, write_data) variable data_mem : mem_array := ( to_stdlogicvector(X” ”), --- initialize data memory to_stdlogicvector(X” ”), to_stdlogicvector(X” ”)); variable adddr : integer;

Feb. 26, 2001Systems Architecture I23 Behavioral Model of Memory begin addr := to_integer(address (2 downto 0)); if MemWrite = ‘1’ then data_mem(addr) := write_data; elsif MemRead = ‘1’ then read_data := data_mem(addr) after 10 ns; end if; end process mem_process; end behavorial;