Lecture 2: Digi Logic & Bus

Similar documents
Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

Microprocessor Design

ECE 263 Digital Systems, Fall 2015

ELCT201: DIGITAL LOGIC DESIGN

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

CHAPTER 4: Logic Circuits

Chapter 4. Logic Design

Logic Devices for Interfacing, The 8085 MPU Lecture 4

CHAPTER 4: Logic Circuits

Logic Design. Flip Flops, Registers and Counters

ECE 341. Lecture # 2

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

Contents Circuits... 1

BUSES IN COMPUTER ARCHITECTURE

Asynchronous (Ripple) Counters

UNIVERSITI TEKNOLOGI MALAYSIA

CHAPTER1: Digital Logic Circuits

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Introduction to Sequential Circuits

1. Convert the decimal number to binary, octal, and hexadecimal.

Chapter Contents. Appendix A: Digital Logic. Some Definitions

ELCT201: DIGITAL LOGIC DESIGN

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Experiment 8 Introduction to Latches and Flip-Flops and registers

Counters

Synchronous Sequential Logic

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

CS 61C: Great Ideas in Computer Architecture

BCN1043. By Dr. Mritha Ramalingam. Faculty of Computer Systems & Software Engineering

Combinational vs Sequential

CHAPTER 6 COUNTERS & REGISTERS

Chapter 6 Registers and Counters

Chapter. Synchronous Sequential Circuits

MC9211 Computer Organization

EE292: Fundamentals of ECE

WELCOME. ECE 2030: Introduction to Computer Engineering* Richard M. Dansereau Copyright by R.M. Dansereau,

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Sequential Logic Basics

CPS311 Lecture: Sequential Circuits

REPEAT EXAMINATIONS 2002

Unit 11. Latches and Flip-Flops

Principles of Computer Architecture. Appendix A: Digital Logic

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

RS flip-flop using NOR gate

Digital Logic Design ENEE x. Lecture 19

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

Chapter 2. Digital Circuits

Lecture 8: Sequential Logic

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

AC103/AT103 ANALOG & DIGITAL ELECTRONICS JUN 2015

Computer Architecture and Organization

Logic Design II (17.342) Spring Lecture Outline

Other Flip-Flops. Lecture 27 1

Find the equivalent decimal value for the given value Other number system to decimal ( Sample)

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Counter dan Register

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

Electrical and Telecommunications Engineering Technology_TCET3122/TC520. NEW YORK CITY COLLEGE OF TECHNOLOGY The City University of New York

CS8803: Advanced Digital Design for Embedded Hardware

Last time, we saw how latches can be used as memory in a circuit

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

EKT 121/4 ELEKTRONIK DIGIT 1

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Sequential Logic. Introduction to Computer Yung-Yu Chuang

RS flip-flop using NOR gate

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

MODULE 3. Combinational & Sequential logic

SEMESTER ONE EXAMINATIONS 2002

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

Chapter 3. Boolean Algebra and Digital Logic

Lecture 12. Amirali Baniasadi

Introduction to Microprocessor & Digital Logic

VeriLab. An introductory lab for using Verilog in digital design (first draft) VeriLab

FPGA Design. Part I - Hardware Components. Thomas Lenzi

INC 253 Digital and electronics laboratory I

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Unit-5 Sequential Circuits - 1

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

CHAPTER 1 LATCHES & FLIP-FLOPS

D Latch (Transparent Latch)

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Spring 2017 EE 3613: Computer Organization Chapter 5: The Processor: Datapath & Control - 1

R13. II B. Tech I Semester Regular Examinations, Jan DIGITAL LOGIC DESIGN (Com. to CSE, IT) PART-A

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Flip-Flops and Sequential Circuit Design

Vignana Bharathi Institute of Technology UNIT 4 DLD

COMP2611: Computer Organization. Introduction to Digital Logic

IS1500 (not part of IS1200) Logic Design Lab (LD-Lab)

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

DIGITAL FUNDAMENTALS

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Transcription:

Lecture 2 http://www.du.edu/~etuttle/electron/elect36.htm Flip-Flop (kiikku) Sequential Circuits, Bus Online Ch 20.1-3 [Sta10] Ch 3 [Sta10] Circuits with memory What moves on Bus? Flip-Flop S-R Latch PCI-bus Registers, Counters William Eccles & F.W. Jordan with vacuum tubes, 1919 2 states for (0 or 1, true or false) 1-bit memory Maintains state when input absent 2 outputs complement values both always available on different pins Need to be able to change the state ()? 2 S-R Flip-Flop or S-R Latch (salpa) Clocked Flip-Flops Usually both 0 R=0 S=0? State change can only when clock is 1 more control on state changes Clocked S-R Flip-Flop S = SET = Write 1 = set S=1 for a short time R = RESET = Write 0 = set R=1 for a short time Use NOR gates nor (0, 0) = 1 nor (0, 1) = 0 nor (1, 0) = 0 nor (1, 1) = 0 R S nor D Flip-Flop only one input D - D = 1 and CLOCK write 1 - D = 0 and CLOCK write 0 J-K Flip-Flop Toggle when J=K=1 (Sta10 Fig 20.24) 3 4 Registers Basic Clocked Flip-flops (not n ) Parallel registers read/write CPU user registers additional internal registers Shift Registers shifts data 1 bit to the right serial to parallel? ALU ops? rotate? Sta10 Fig 20.29 5 6 Comp. Org II, Spring 2012 1

Counters Add 1 to stored counter value Counter parallel register plus increment circuits Ripple counter (aalto, viive) asynchronous increment least significant bit, and handle carry bit as far as needed Synchronous counter modify all counter flip-flops simultaneously faster, more complex, more expensive space-time tradeoff (http://www.allaboutcircuits.com) Boolean algebra Digital Logic Summary Gates not, nand, xor, and, or Circuits Presentation: Boolean equations, Truth tables, Graphical Symbols Simplification with Karnaugh Maps Combination Circuits output depends on input only Set inputs, wait, output ready no dynamic state memory ROM Sequential Circuits output depends also on internal state Flip-Flops, registers, counters, memory Implement Computer apply combination and sequential circuits smartly Discussion? 7 8 Bus (Sta10 Fig 3.16) Bus (Väylä) Ch 3 [Sta10] What moves on Bus? PCI-bus For communication with and between devices Broadcast (yleislähetys) - most common Everybody hear everything React to messages/signals to itself only Each device has its own control and status information Device driver (OS) moves control data to device controller s registers ~ memory address, device address, how much, direction Device driver reads the status from the controller s status register - Ready? Operation successful? 10 Bus structure Control lines (Ohjausväylä, ~ johtimet) Control and timing information - Operations: like memory read, memory write, I/O read - Interrupt request - Clock lines (Osoiteväylä) Source and destination ids - Memory address, device address (module, port) - For transfer source and destination Width (number of parallel lines) determines directly addressable memory address space (osoiteavaruuden koko) - For example: 32 b 4 GB Bus structure lines (dataväylä) All processing information: - Instructions - - DMA transfer contents Width determines the maximum number of bits that can be transferred at the same time - For example 38b wide line allows 32 bits data plus 6 Hamming-coded parity bits 11 12 Comp. Org II, Spring 2012 2

What moves on the bus? Control Status External Bus = Bottleneck? Processor Memory I/O Controller CPU System bus Memory Req / Rel R/W Interrupt - Timing R/W Control Req / Rel Interrupt R / W - Memory-mapped I/O - DMA Internal von Neumann architecture Instructions and data both in main memory All memory content referred using address Sequentially ordered instructions executed sequentially - unless order changed explicitly (jumps, branches) I/O 13 14 Width ~ 50 100 lines (johdin) mother board, cable, connectors Bus type Dedicated, non-multiplexed (dedikoitu) - and data separate lines Time multiplexed (aikavuorottelu) - and data share lines - valid / data valid -line Arbitration (vuoron varaus) Centralized - One bus controller, arbiter (väyläohjain) Distributed - Controllers have necessary logic http://en.wikipedia.org/wiki/motherboard 15 Timing (ajoitus, tahdistus) Synchronous (tahdistettu) - Regular clock cycle (kellopulssi) sequence of 0s and 1s Asynchronous - Separate signals when needed Shared traffic rules - everyone knows what is going to happen next Efficiency (tehokkuus) Bandwidth (kaistanleveys) - How many bits per second 16 Synchronous timing Based on clock Control line has clock pulse (cycle 1-0) All devices hear the same pulse Event takes one cycle (commonly) Start at the begin of the cycle (leading edge) For example, reading data takes one cycle All devices in the bus work at the same pace Slowest determines the speed of all Each device knows the speed of the others Each device knows, when the other is ready for next event Do this during the next cycle Device can count on the other one to do it! 17 Asynchronous timing Devices can use arbitrary speeds (variation allowed) Processing time depends on the device Device can determine, when the other one is ready - How long is the event going to last to perform? Synchronization using a special signal Send synchronization signal, when work done and ready - and data on bus send signal write (for example: change write -line to 1) - stored to memory send signal ack Time of the next event depends on signals Do this when you have time, inform me when ready Wait until get signal that this is done 18 Comp. Org II, Spring 2012 3

Timing diagrams (ajoituskaavio) See Appendix 3a [Sta10, Ch 3] Initiator CPU (for example) Synchronous Timing assert or active = 0-level Response or Response# Asserted on 0; asserted on 1 (Sta10 Fig 3.27) 19 (Sta10 Fig 3.19) 20 Asynchronous timing - Read Asynchronous timing - Write Initiator e.g., CPU Initiator e.g., CPU Target e.g., MEM Target e.g., MEM (Sta10 Fig 3.20a) (Sta10 Fig 3.20b) Discussion? 22 21 Bus Events (väylätapahtumia) Bus Configuration (Sta10 Fig 3.21) All devices on one bus? All must use the same technique Long bus large propagation delay (etenemisviive) Combined data rates of the devices may exceed the capacity of the bus Collisions on the arbitration, extra wait Synchronous? slowest determines the speed of all Bus hierarchy Isolate independent traffic from each other Maximize the most important transfer pace CPU MEM I/O can manage with lower speed Bottleneck! 23 24 Comp. Org II, Spring 2012 4

Bus Hierarchy Typical Pentium 4 Computer Organization II PCI-bus [Sta10, Ch 3.5] Bridge (silta) Different data rates Different bus protocols http://www.soe.ucsc.edu/classes/cmpe003/spring02/motherboard.gif (Tan06 Fig 3-53) 25 26 PCI: Peripheral Component Interconnect 49 Mandatory Signal Lines (PCI) (Sta10 Table 3.3) 49 mandatory (+51 optional) signal lines data: 32b mandatory (optional allows 64b) Other signals: 17 mandatory (+ 19 optional) Centralized arbiter (keskitetty väylän varaus) Synchronous timing (synkroninen tahdistus) own 33 or 66 MHz clock (PCI-X: 133/156/533 Mhz) Transfer rate 133, 266, 532 MB/s (PCI-X: 1 GB/s,4 GB/s) Events on the bus read, write, read block, write block (multiplexed) Max 16 devices AD[32]: address or data, multiplexed (aikavuorottelu) + 1 parity C/BE[4]: bus command tai byte enable, multiplexed For example: 0110/1111 = memory read/all 4 Bytes CLK, RST#: clock, reset 6 for interface control FRAME#, IRDY#, TRDY#, STOP#, IDSEL, DEVSEL# 2 for arbitration (väylän varaus) RE# requires, GNT# granted Dedicated lines for devices 2 error reporting pins (lines) PERR# parity, SERR# system 27 28 51 Optional Signal Lines (PCI) 4 lines for interrupt requests (keskeytyspyyntö) Each device has its own dedicated line(s) 2 lines for cache support (on CPU or other devices) snoopy cache 32 A/D extra lines 32 mandatory + 32 optional => 64 bit address/data lines 4 additional lines for C/BE 2 lines to negotiate 64b transfer 1 extra parity line 5 lines for testing (Sta10 Table 3.4) bus command/byte enable PCI Transactions Bus activity as transactions New bus request for each new transaction (1) Bus reservation Central arbiter send RE, wait for GNT (2) Bus transaction Initiator or master (device who reserved the bus) Begin by asserting FRAME (reserve of bus) Stop by releasing FRAME (indicate free bus) (Sta10 Fig 3.24) 29 30 Comp. Org II, Spring 2012 5

Bus arbitration : A and B want bus a) A wants bus d) A starts frame, e) Grants bus to Bg) B starts frame, b) B wants bus Arbitration: requests also A forand next B want trans. bus no more B req. (11) c) A granted bus next transaction f) A marks last frame transfer, A knows that it has bussees that both marks data ready Sees that and bus is available still want it A s target reads data only A wants it A action B action Arbiter action (Sta10 Fig 3.25) 31 All ready for new trans All ready Fig. 3.25 for new trans, (Fig. granted 3.23 [Sta10]) for B, B knows that it has bus 32 PCI Memory Read (Sta10 Fig 3.23) 33 a) start trans frame, d) ack address, set data, set & indicate data set addr, CPU set trans. Reads type indicate from valid Memory data data ready, read b) recognise data ready, read set & indicate data address, find data e) sel next bytes g) not ready: hold c) select bytes, f) need more time, h) ready for last block: indicate ready to receiveindicate not valid data end frame and stop hold Initiator CPU action Target memory action turnaround time data ready, read get ready for next All ready for new transaction get ready for next (Sta10 Fig 3.23) All Fig. ready 3.23 for new transaction 34 PCI Memory Read Lecture 2 Summary Boolean Algebra Gates Circuits Combination circuits, sequential circuits Components for CPU design ROM, adder, multiplexer, encoder/decoder flip-flop, register, shift register, counter Bus Structure, components, signals, arbitration PCI bus example (Sta10 Fig 3.23) Discussion? Simulations of gates and circuits: Hades Simulation Framework: http://tams-www.informatik.uni-hamburg.de/applets/hades/webdemos/index.html http://tams-www.informatik.uni-hamburg.de/applets/hades/webdemos/16-flipflops/10-srff/srff.html 35 36 Comp. Org II, Spring 2012 6

Review uestions Main differences between synchronous and asynchronous timing? Benefits of bus hierarchy? Simple processor Text book review questions Text book support page review questions http://www.box.net/shared/4597aix1nm http://www.gamezero.com/team-0/articles/math_magic/micro/stage4.html 37 38 Comp. Org II, Spring 2012 7