Copyright © 2001 Stephen A. Edwards All rights reserved Busses  Wires sometimes used as shared communication medium  Think “party-line telephone”  Bus.

Slides:



Advertisements
Similar presentations
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Advertisements

Give qualifications of instructors: DAP
CS 151 Digital Systems Design Lecture 19 Sequential Circuits: Latches.
EE2420 – Digital Logic Summer II 2013
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
1 Lecture 20 Sequential Circuits: Latches. 2 Overview °Circuits require memory to store intermediate data °Sequential circuits use a periodic signal to.
Copyright © 2001 Stephen A. Edwards All rights reserved Review of Digital Logic Prof. Stephen A. Edwards.
Circuits require memory to store intermediate data
LOGIC GATES ADDERS FLIP-FLOPS REGISTERS Digital Electronics Mark Neil - Microprocessor Course 1.
Sequential Circuits A Basic sequential circuit is nothing but a combinational circuit with some feedback paths between its output and input terminals.
Processor System Architecture
Henry Hexmoor1 Chapter 7 Henry Hexmoor Registers and RTL.
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits.
Recap: Registers A register is a single byte (or word) memory element. Once written to (clocked) it remembers the input byte and outputs the same number.
Lecture 4: Computer Memory
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
CS61C L15 Synchronous Digital Systems (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
Introduction to Registers Being just logic, ALUs require all the inputs to be present at once. They have no memory. ALU AB FS.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
Counters and Registers
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Test #2 Combinational Circuits – MUX Sequential Circuits – Latches – Flip-flops – Clocked Sequential Circuits – Registers/Shift Register – Counters – Memory.
Some Useful Circuits Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University.
COE 202: Digital Logic Design Sequential Circuits Part 1
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Rabie A. Ramadan Lecture 3
CS1Q Computer Systems Lecture 11 Simon Gay. Lecture 11CS1Q Computer Systems - Simon Gay2 The D FlipFlop A 1-bit register is called a D flipflop. When.
Lecture 9. MIPS Processor Design – Instruction Fetch Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education &
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
ENG241 Digital Design Week #8 Registers and Counters.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits II.
Chapter 3 Digital Logic Structures. 3-2 Combinational vs. Sequential Combinational Circuit always gives the same output for a given set of inputs  ex:
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2012.
Registers Page 1. Page 2 What is a Register?  A Register is a collection of flip-flops with some common function or characteristic  Control signals.
SEQUENTIAL LOGIC By Tom Fitch. Types of Circuits Combinational: Gates Combinational: Gates Sequential: Flip-Flops Sequential: Flip-Flops.
Introduction to Microprocessors
IT253: Computer Organization Lecture 9: Making a Processor: Single-Cycle Processor Design Tonga Institute of Higher Education.
Lecture 21: Registers and Counters (1)
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
MicroComputer Engineering DigitalCircuits slide 1 Combinational circuits Changes at inputs propagate at logic speed to outputs Not clocked No internal.
Microarchitecture. Outline Architecture vs. Microarchitecture Components MIPS Datapath 1.
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.
Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
CO5023 Latches, Flip-Flops and Decoders. Sequential Circuit What does this do? The OUTPUT of a sequential circuit is determined by the current output.
How does the CPU work? CPU’s program counter (PC) register has address i of the first instruction Control circuits “fetch” the contents of the location.
ECE 545—Digital System Design with VHDL Lecture 1
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Latches, Flip Flops, and Memory ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin – Madison.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ read/write and clock inputs Sequence of control signal combinations.
Class Exercise 1B.
REGISTER TRANSFER LANGUAGE (RTL)
Chapter #6: Sequential Logic Design
Introduction to Registers
Appendix B The Basics of Logic Design
ECE Digital logic Lecture 16: Synchronous Sequential Logic
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
How does the CPU work? CPU’s program counter (PC) register has address i of the first instruction Control circuits “fetch” the contents of the location.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
CSE 370 – Winter Sequential Logic - 1
The Processor Lecture 3.1: Introduction & Logic Design Conventions
ECE 352 Digital System Fundamentals
Digital Circuits and Logic
Computer Operation 6/22/2019.
Presentation transcript:

Copyright © 2001 Stephen A. Edwards All rights reserved Busses  Wires sometimes used as shared communication medium  Think “party-line telephone”  Bus drivers may elect to set the value on a wire or let some other driver set that value  Electrically disastrous if two drivers “fight” over the value on the bus

Copyright © 2001 Stephen A. Edwards All rights reserved Implementing Busses  Basic trick is to use a “tri-state” driver  Data input and output enable OE D Q Shared bus  When driver wants to send values on the bus, OE = 1 and D contains the data  When driver wants to listen and let some other driver set the value, OE = 0 and Q returns the value

Copyright © 2001 Stephen A. Edwards All rights reserved Four-Valued Simulation  Wires in digital logic often modeled with four values 0, 1, X, Z  X represents an unknown state State of a latch or flip-flop when circuit powers up Result of two gates trying to drive wire to 0 and 1 simultaneously Output of flip-flop when setup or hold time violated Output of a gate reading an “X” or “Z”  Z represents an undriven state Value on a shared bus when no driver is output- enabled

Copyright © 2001 Stephen A. Edwards All rights reserved Sequential Logic and Timing

Copyright © 2001 Stephen A. Edwards All rights reserved Introduction to Registers  Being just logic, ALUs require all the inputs to be present at once.  They have no memory. ALU AB FS

Copyright © 2001 Stephen A. Edwards All rights reserved Basic Computation  Computers perform complicated tasks only because the programmer has broken that task down into a sequence of simple primitive operations. Moving information Performing simple arithmetic and logical operations  To perform operations in sequence, the results of previous operations must be remembered somehow.

Copyright © 2001 Stephen A. Edwards All rights reserved Using Memory  Even the simplest computations require memory.  For example, take a pocket calculator. To add 4 and 3: Press ‘4’ – calculator remembers the number Press ‘+’ – calculator remembers ‘4’ and ‘add’ Press ‘3’ – calculator remembers ‘4’, ‘add’ and ‘3’ Press ‘=’ – calculator works out the answer and remembers it so it can be displayed  To achieve this kind of functionality, we need a circuit that can remember binary numbers – a register.

Copyright © 2001 Stephen A. Edwards All rights reserved Memory Circuits  Simple memory circuit can be built using a pair of NOR gates: If the SET input is high, the output goes high If the RESET input is high, the output goes low If neither input is high, the output stays in its previous state

Copyright © 2001 Stephen A. Edwards All rights reserved How it Works 0 0 (1) (0) (1) (0) (1) (0) (1) (0) (1) (0) (1) 0 NB. Output of NOR gate = 1 only if both inputs are 0

Copyright © 2001 Stephen A. Edwards All rights reserved Flip-Flops  The R-S flip-flop is an asynchronous flip-flop. Its output changes immediately in response to an input.  Synchronous flip-flops only respond when they are ‘clocked’ by a separate clock-in.  Synchronous devices are preferred in computer design to avoid problems with unpredictable propagation delays.  Simplest synchronous flip-flop is probably the D-type flip-flop.  It is also the basis of a single-bit memory register.

Copyright © 2001 Stephen A. Edwards All rights reserved The Flip-Flop. A Single Bit Register. CLK D QQQQ DnDn Q n D CLK Q

Copyright © 2001 Stephen A. Edwards All rights reserved A Two-bit Register CLK D QQQQ D QQQQ D0D0 D1D1 Q0Q0 Q1Q1 D 0 D 1 CLK Q 0 Q 1

Copyright © 2001 Stephen A. Edwards All rights reserved Multiple Bit Register  To remember a whole byte, just use eight flip-flops… CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q CLK D Q D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7 Q 0 Q 1 Q 2 Q 3 Q 4 Q 5 Q 6 Q 7 CLK D 0-7 Q 0-7 D 0-7 Q 0-7 CLK 88 (shorthand form)

Copyright © 2001 Stephen A. Edwards All rights reserved The ‘Working Register’  The most common use of a register in a micro- controller is in conjunction with an ALU.  To simplify the inputs, one of the operands of any ALU operation is stored in a register.  Depending on the device, this register is known as: The Working Register (W) The Accumulator (A)

Copyright © 2001 Stephen A. Edwards All rights reserved Using a Working Register

Copyright © 2001 Stephen A. Edwards All rights reserved Example Operation  To subtract 3 from 5… Stage 1  Store the number 3 in the working register  Ignore the ALU output Stage 2  Input the number 5 and the selection word, S, representing (A – B)  ALU output equals 2 ALU A B S C OUT F Single input byte Control inputs Result Carry output Working register D Q CLK 8 8

Copyright © 2001 Stephen A. Edwards All rights reserved Are registers the same as memory ?  Yes Computer memory (RAM) is, effectively, a big bank of registers. In the PIC microcontrollers, the registers are the memory.  No Memory is usually physically separate from the microprocessor. Most microprocessors have only a few registers. Registers can be read from and written to very quickly. Register contents can be exchanged directly.

Copyright © 2001 Stephen A. Edwards All rights reserved Interconnecting Registers  How do we transfer information between two registers ? Like this ? CLK D 0-7 Q 0-7 CLK1 88 CLK D 0-7 Q CLK2

Copyright © 2001 Stephen A. Edwards All rights reserved Three Registers  OK, that sort of works, what about 3 registers ? CLK D 0-7 Q CLK D 0-7 Q CLK D 0-7 Q Don’t try to make sense of this. It’s an utter mess !

Copyright © 2001 Stephen A. Edwards All rights reserved Three Registers Mk II CLK D 0-7 Q 0-7 CLK1 88 CLK D 0-7 Q 0-7 CLK2 88 CLK D 0-7 Q 0-7 CLK3 88 8

Copyright © 2001 Stephen A. Edwards All rights reserved Interconnecting Registers  All registers are connected to a common set of 8 wires – a bus.  Each register needs a ‘switch’ to determine whether the bus is connected to: The register output  Register is outputting to the bus The register input  Register is inputting from the bus or…  … register is ignoring the bus  Using this basic scheme, any number of registers can be connected to the bus with no increase in complexity.

Copyright © 2001 Stephen A. Edwards All rights reserved Summary – ALUs and Registers  ALUs, despite their complexity, they are just combinational logic circuits with no memory.  Registers are fast access memory elements found inside microprocessors, micro-controllers etc.  Registers and their interconnections will be be discussed in more detail next time.

Copyright © 2001 Stephen A. Edwards All rights reserved Sequential Logic  Simply computing functions usually not enough  Want more time-varying behavior  Common model: combinational logic with state- holding elements Combinational logic InputsOutputs State-holding elements Clock Input

Copyright © 2001 Stephen A. Edwards All rights reserved State Machines  Common use of state-holding elements  Idea: machine may go to a new state in each cycle  Output and next state dependent on present state  E.g., a four-counter C’ / 0 C / 1 C’ / 1 C’ / 2 C / 2 C / 3 C’ / 3 C / 0

Copyright © 2001 Stephen A. Edwards All rights reserved Latches & Flip-Flops  Two common types of state-holding elements  Latch Level-sensitive Transparent when clock is high Holds last value when clock is low Cheap to implement Somewhat unwieldy to design with  Flip-flop Edge-sensitive Always holds value New value sampled when clock transitions from 0 to 1 More costly to implement Much easier to design with

Copyright © 2001 Stephen A. Edwards All rights reserved Latches & Flip-Flops  Timing diagrams for the two common types: Clk DQ DQ D Latch Flip- Flop

Copyright © 2001 Stephen A. Edwards All rights reserved RAMs  Another type of state-holding element  Addressable memory  Good for storing data like a von Neumann program Data In Address Read Write Data Out

Copyright © 2001 Stephen A. Edwards All rights reserved RAMs  Write cycle Present Address, data to be written Raise and lower write input  Read cycle Present Address Raise read Contents of address appears on data out Data In Address Read Write Data Out

Copyright © 2001 Stephen A. Edwards All rights reserved Setup & Hold Times  Flip-flops and latches have two types of timing requirements:  Setup time D input must be stable some time before the clock arrives  Hold time D input must remain stable some time after the clock has arrived

Copyright © 2001 Stephen A. Edwards All rights reserved Setup & Hold Times  For a flip-flop (edge-sensitive) D Clk Setup time: D must not change here Hold time: D must not change here

Copyright © 2001 Stephen A. Edwards All rights reserved Synchronous System Timing  Budgeting time in a typical synchronous design Clock period Clock skew Clk to D delay Slowest logical path Setup Time Clock skew

Copyright © 2001 Stephen A. Edwards All rights reserved Typical System Architecture  Most large digital systems consist of  Datapath Arithmetic units (adders, multipliers) Data-steering (multiplexers)  Memory Places to store data across clock cycles Memories, register files, etc.  Control Interacting finite state machines Direct how the data moves through the datapath

Copyright © 2001 Stephen A. Edwards All rights reserved Typical System Architecture  Primitive datapath plus controller RegistersMemory Controller Shared Bus Read/Write Addr. Reg. Latch Operation Result