CSE 370 – Winter Introduction -2- 1

Slides:



Advertisements
Similar presentations
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Advertisements

I - Introduction © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Why study logic design? Obvious reasons  this course is part of the EE/CS/CE.
CS 151 Digital Systems Design Lecture 37 Register Transfer Level
CS 300 – Lecture 3 Intro to Computer Architecture / Assembly Language Sequential Circuits.
Overview Finite State Machines - Sequential circuits with inputs and outputs State Diagrams - An abstraction tool to visualize and analyze sequential circuits.
1 Digital Logic
EE 231 Digital Electronics Fall 01 week 1-slide 1 Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad.
Digital Electronics. Introduction to Number Systems & Codes Digital & Analog systems, Numerical representation, Digital number systems, Binary to Decimal.
1 Chapter 1 Introduction * Many slides are from the authors.
School of Computer Science G51CSA 1 Computer Systems Architecture Fundamentals Of Digital Logic.
I - Introduction © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Why study logic design? Obvious reasons  this course is part of the CS/CompE.
1 Lecture 13 Overview of sequential logic  Basic concepts  An example.
Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity.
CSE 311 Foundations of Computing I
CEC 220 Digital Circuit Design Timing Diagrams, MUXs, and Buffers Friday, February 14 CEC 220 Digital Circuit Design Slide 1 of 18.
CS/COE0447 Computer Organization & Assembly Language
Chapter 3 Digital Logic Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3-2 Transistor: Building.
Controller Implementation
1 CSE370, Lecture 24 Lecture 26 u Logistics n HW8 due Friday n Ant extra credit due Friday n Final exam a week from today, 12/8 8:30am-10:20am here n Review.
Digital Circuits ECGR2181 Chapter 3 Notes Data A-data B-data A B here
CS Fall Introduction - 1 Welcome to CS 150: Components and Design Techniques for Digital Systems This week What is logic design? What is digital.
EGR 2131 Unit 4 Combinational Circuits: Analysis & Design

4.
Chapter #6: Sequential Logic Design
Computer Organization and Design Memories and State Machines
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Stateless Combinational Logic and State Circuits
Lecture 26 Logistics Last lecture Today HW8 due Friday
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
Instructor:Po-Yu Kuo 教師:郭柏佑
COMP541 Sequential Logic – 2: Finite State Machines
Overview Introduction Logic Gates Flip Flops Registers Counters
Basics of Digital Logic Design Presentation D
Sequential logic examples
ECE 434 Advanced Digital System L03
Assistant Prof. Fareena Saqib Florida Institute of Technology
Basics Combinational Circuits Sequential Circuits Ahmad Jawdat
CPE/EE 422/522 Advanced Logic Design L02
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
How Boolean logic is implemented
Digital Circuits ECGR2181 Chapter 3 Notes Data A-data B-data A B here
Digital Logic Structures Logic gates & Boolean logic
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
Instructor: Alexander Stoytchev
Overview Last Lecture Conversion of two-level logic to NAND or NOR forms Multilevel logic AOI and OAI gates Today Timing and hazards Multiplexers and demultiplexers.
David Culler Electrical Engineering and Computer Sciences
ECE434a Advanced Digital Systems L02
CSE 370 – Winter Sequential Logic-2 - 1
CSE 370 – Winter Combinational Implementation - 1
CSE 370 – Winter Sequential Logic - 1
Lecture 15 Logistics Last lecture Today HW4 is due today
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Instructor:Po-Yu Kuo 教師:郭柏佑
Introduction to Sequential Circuits
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Portions © Copyright 2009, S. Brown and Z Vranesic
Part I Background and Motivation
January 24 W’05 Yutao He 4532B Boelter Hall CSM51A/EEM16-Sec.1 W’05
Guest Lecture by David Johnston
Overview Last lecture Digital hardware systems Today
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
ECE 352 Digital System Fundamentals
Lecture 24 Logistics Last lecture Today HW7 back today
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
EGR 2131 Unit 12 Synchronous Sequential Circuits
ECE 352 Digital System Fundamentals
CSE 370 – Winter Number syst.; Logic functions- 1
Lecture 4 – Binary Logic and Logic Gates
Presentation transcript:

CSE 370 – Winter 2002 - Introduction -2- 1 Overview Last lecture Introduction What is logical design What is digital hardware Switches as basis for digital computation Today Abstraction and hierarchy in digital design Combinational vs. sequential systems High-level examples of combinational and sequential designs The whole course in 2 examples! 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 1

CSE 370 – Winter 2002 - Introduction -2- 2 Digital vs. analog It is convenient to think of digital systems as having only discrete, digital, input/output values In reality, real electronic components exhibit continuous, analog, behavior Why do we make this abstraction? Simplify the design process (analog  digital, transistors as switches, switches as logic elements) Why does it work? We can ignore slight (analog) variations: We can regenerate “high” or “low” signals 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 2

Mapping from physical world to binary world Technology State 0 State 1 Relay logic Circuit Open Circuit Closed CMOS logic 0.0-1.0 volts 2.0-3.0 volts Transistor transistor logic (TTL) 0.0-0.8 volts 2.0-5.0 volts Fiber Optics Light off Light on Dynamic RAM Discharged capacitor Charged capacitor Nonvolatile memory (erasable) Trapped electrons No trapped electrons Programmable ROM Fuse blown Fuse intact Bubble memory No magnetic bubble Bubble present Magnetic disk No flux reversal Flux reversal Compact disc No pit Pit 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 3

Combinational vs. sequential digital circuits A simple model of a digital system is a unit with inputs and outputs: Combinational means "memory-less" a digital circuit is combinational if its output values only depend on its input values Sequential systems have memory The output values depend on the input values and previous input values This distinction is another abstraction All circuits are sequential: outputs do not change instantaneously The abstraction: we restrict ourselves to steady-state behavior inputs system outputs 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 4

Combinational logic symbols Common combinational logic systems have standard symbols called logic gates Buffer, NOT AND, NAND OR, NOR easy to implement with CMOS transistors (the switches we have available and use most) 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 5

Synchronous sequential digital systems Outputs of a combinational circuit depend only on current inputs after sufficient time has elapsed Sequential circuits have memory even after waiting for the transient activity to finish The steady-state abstraction is so useful that most designers use a form of it when constructing sequential circuits: the memory of a system is represented as its state changes in system state are only allowed to occur at specific times controlled by an external periodic clock the clock period is the time that elapses between state changes. It must be sufficiently long so that the system reaches a steady-state before the next state change at the end of the period 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 6

Contrast between combinational and sequential logic input A, B wait for clock edge observe C wait for another clock edge observe C again: will stay the same Sequential: observe C again: may be different A C B Clock 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 7

CSE 370 – Winter 2002 - Introduction -2- 8 Abstractions Some we've seen already digital interpretation of analog values transistors as switches switches as logic gates use of a clock to realize a synchronous sequential circuit Some others we will see truth tables and Boolean algebra to represent combinational logic encoding of signals with more than two logical values into binary form state diagrams to represent sequential logic hardware description languages to represent digital logic waveforms to represent temporal behavior 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 8

An example of combinational logic Calendar subsystem: number of days in a month (to control watch display) used in controlling the display of a wrist-watch LCD screen inputs: month, leap year flag outputs: number of days 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 9

Implementation in software integer number_of_days ( month, leap_year_flag) { switch (month) { case 1: return (31); case 2: if (leap_year_flag == 1) then return (29) else return (28); case 3: return (31); ... case 12: return (31); default: return (0); } 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 10

Implementation as a combinational digital system Encoding: how many bits for each input/output? binary number for month four wires for 28, 29, 30, and 31 Behavior: combinational (output depends only on input) truth table specification leap month 28 29 30 31 month leap 28 29 30 31 0001 – 0 0 0 1 0010 0 1 0 0 0 0010 1 0 1 0 0 0011 – 0 0 0 1 0100 – 0 0 1 0 ... 1100 – 0 0 0 1 1101 – – – – – 111– – – – – – 0000 – – – – – 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 11

Combinational example (cont’d) Truth-table to logic to gates 28 = 1 when month=0010 and leap=0 28 = mo1'•mo2'•mo3•mo4'•leap' 31 = 1 when month=0001 or month=0011 or ... month=1100 31 = (mo1'•mo2'•mo3'•mo4) + (mo1'•mo2'•mo3•mo4) + ... (mo1•mo2•mo3'•mo4') 31 = we simplify more (see later in the quarter) symbol for or symbol for and symbol for not month leap 28 29 30 31 0001 – 0 0 0 1 0010 0 1 0 0 0 0010 1 0 1 0 0 0011 – 0 0 0 1 0100 – 0 0 1 0 ... 1100 – 0 0 0 1 1101 – – – – – 111– – – – – – 0000 – – – – – 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 12

Example of a sequential system Door combination lock: punch in 3 values in sequence and the door opens; if there is an error the lock must be reset; once the door opens, the lock must be reset inputs: sequence of input values, reset outputs: door open/close memory: must remember combination or always have it available as an input 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 13

Implementation in software integer combination_lock ( ) { integer v1, v2, v3; integer error = 0; static integer c[3] = 3, 4, 2; while (!new_value( )); v1 = read_value( ); if (v1 != c[1]) then error = 1; v2 = read_value( ); if (v2 != c[2]) then error = 1; v3 = read_value( ); if (v2 != c[3]) then error = 1; if (error == 1) then return(0); else return (1); } 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 14

Implementation as a sequential digital system Encoding: how many bits per input value? how many values in sequence? how do we know a new input value is entered? how do we represent the states of the system? Behavior: clock wire tells us when it’s ok to look at inputs (i.e., they have settled after change) sequential: sequence of values must be entered sequential: remember if an error occurred finite-state specification reset value open/closed new clock 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 15

Sequential example (cont’d): abstract control Finite-state diagram states: 5 states represent point in execution of machine each state has outputs transitions: 6 from state to state, 5 self transitions, 1 global changes of state occur when clock says it’s ok based on value of inputs inputs: reset, new, results of comparisons output: open/closed ERR closed C1!=value & new C2!=value & new C3!=value & new S1 S2 S3 OPEN reset closed closed closed open C1=value & new C2=value & new C3=value & new not new not new not new 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 16

Sequential example (cont’d): data-path vs. control Internal structure: separate data-path and control data-path storage for combination (C1, C2, C3) comparators control finite-state machine controller control for data-path state changes controlled by clock new equal reset value C1 C2 C3 mux control multiplexer controller clock comparator equal open/closed 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 17

Sequential example (cont’d): finite-state machine refine state diagram to include internal structure generate state table (much like a truth-table) ERR closed not equal & new not equal & new not equal & new S1 S2 S3 OPEN closed mux=C1 closed mux=C2 closed mux=C3 reset open equal & new equal & new equal & new not new not new not new reset new equal state state mux open/closed 1 – – – S1 C1 closed 0 0 – S1 S1 C1 closed 0 1 0 S1 ERR – closed 0 1 1 S1 S2 C2 closed ... 0 1 1 S3 OPEN – open ... next 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 18

Sequential example (cont’d): encoding Encode state table state can be: S1, S2, S3, OPEN, or ERR needs at least 3 bits to encode: 000, 001, 010, 011, 100 and as many as 5: 00001, 00010, 00100, 01000, 10000 choose 4 bits: 0001, 0010, 0100, 1000, 0000 output mux can be: C1, C2, or C3 needs 2 to 3 bits to encode choose 3 bits: 001, 010, 100 output open/closed can be: open or closed needs 1 or 2 bits to encode choose 1 bit: 1, 0 reset new equal state state mux open/closed 1 – – – 0001 001 0 0 0 – 0001 0001 001 0 0 1 0 0001 0000 – 0 0 1 1 0001 0010 010 0 ... 0 1 1 0100 1000 – 1 ... next good choice of encoding! mux is identical to last 3 bits of state open/closed is identical to first bit of state 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 19

Sequential example (cont’d): controller implementation Implementation of the controller special circuit element, called a register, for remembering inputs when told to by clock new equal reset mux control controller clock new equal reset open/closed mux control comb. logic state clock open/closed 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 20

CSE 370 – Winter 2002 - Introduction -2- 21 Design hierarchy system data-path control code registers state registers combinational logic multiplexer comparator register logic switching networks 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 21

CSE 370 – Winter 2002 - Introduction -2- 22 Summary of examples That was what the entire course is about converting solutions to problems into combinational and sequential networks effectively organizing the design hierarchically doing so with a modern set of design tools that lets us handle large designs effectively taking advantage of optimization opportunities Now lets do it again this time we'll take nine weeks 5/10/2019 CSE 370 – Winter 2002 - Introduction -2- 22