From Sequential Circuits to Real Computers

Similar documents
From Sequential Circuits to Real Computers

INF2270 Spring Philipp Häfliger. Lecture 8: Superscalar CPUs, Course Summary/Repetition (1/2)

CSE370: Introduction to Digital Design

Lecture 10: Synchronous Sequential Circuits Design

Chapter 3 Digital Logic Structures

Review for B33DV2-Digital Design. Digital Design

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

CprE 281: Digital Logic

ECE 448 Lecture 6. Finite State Machines. State Diagrams, State Tables, Algorithmic State Machine (ASM) Charts, and VHDL Code. George Mason University

Design at the Register Transfer Level

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

CMP 338: Third Class

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Finite State Machines CS 64: Computer Organization and Design Logic Lecture #15 Fall 2018

Fundamentals of Digital Design

Models for representing sequential circuits

Table of Content. Chapter 11 Dedicated Microprocessors Page 1 of 25

Sequential Logic. Handouts: Lecture Slides Spring /27/01. L06 Sequential Logic 1

CMPE12 - Notes chapter 1. Digital Logic. (Textbook Chapter 3)

ECE 341. Lecture # 3

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

CSC9R6 Computer Design. Practical Digital Logic

EE 209 Logic Cumulative Exam Name:

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

Latches. October 13, 2003 Latches 1

CprE 281: Digital Logic

CpE358/CS381. Switching Theory and Logical Design. Class 16

Lecture 13: Sequential Circuits, FSM

Sequential Circuits Sequential circuits combinational circuits state gate delay

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

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

NCU EE -- DSP VLSI Design. Tsung-Han Tsai 1

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

Enrico Nardelli Logic Circuits and Computer Architecture

Z = F(X) Combinational circuit. A combinational circuit can be specified either by a truth table. Truth Table

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

CS/COE1541: Introduction to Computer Architecture. Logic Design Review. Sangyeun Cho. Computer Science Department University of Pittsburgh

CMP 334: Seventh Class

(Boolean Algebra, combinational circuits) (Binary Codes and -arithmetics)

Project Two RISC Processor Implementation ECE 485

Binary addition example worked out

ECE/CS 250 Computer Architecture

Lecture 7: Logic design. Combinational logic circuits

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

課程名稱 : 數位邏輯設計 P-1/ /6/11

Boolean Algebra. Digital Logic Appendix A. Postulates, Identities in Boolean Algebra How can I manipulate expressions?

CpE358/CS381. Switching Theory and Logical Design. Summer

Lecture 13: Sequential Circuits, FSM

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design Boolean Algebra, Logic Gates

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

CS/COE0447: Computer Organization

State and Finite State Machines

Unit 8A Computer Organization. Boolean Logic and Gates

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits

Digital Logic Appendix A

CSE140: Design of Sequential Logic

Design of Sequential Circuits

ALU A functional unit

Figure 4.9 MARIE s Datapath

MACHINE COMPUTING. the limitations

Boolean Algebra. Digital Logic Appendix A. Boolean Algebra Other operations. Boolean Algebra. Postulates, Identities in Boolean Algebra

Adders allow computers to add numbers 2-bit ripple-carry adder

Logic and Boolean algebra

Faculty of Engineering. FINAL EXAMINATION FALL 2008 (December2008) ANSWER KEY

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Combinational vs. Sequential. Summary of Combinational Logic. Combinational device/circuit: any circuit built using the basic gates Expressed as

Self-reproducing programs. And Introduction to logic. COS 116, Spring 2012 Adam Finkelstein

UNIVERSITY OF WISCONSIN MADISON

First Steps Towards a CPU Made of Spiking Neural P Systems

Lecture 8: Sequential Networks and Finite State Machines

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

CS/COE0447: Computer Organization

Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines

ELCT201: DIGITAL LOGIC DESIGN

Finite State Machine. By : Ali Mustafa

ECE380 Digital Logic. Synchronous sequential circuits

CPE100: Digital Logic Design I

EXPERIMENT Traffic Light Controller

ELCT201: DIGITAL LOGIC DESIGN

CS61c: Representations of Combinational Logic Circuits

Processor Design & ALU Design

Introduction to Computer Engineering. CS/ECE 252, Fall 2012 Prof. Guri Sohi Computer Sciences Department University of Wisconsin Madison

( c) Give logic symbol, Truth table and circuit diagram for a clocked SR flip-flop. A combinational circuit is defined by the function

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

ECE290 Fall 2012 Lecture 22. Dr. Zbigniew Kalbarczyk

State & Finite State Machines

CMPT-150-e1: Introduction to Computer Design Final Exam

Philadelphia University Student Name: Student Number:

6.111 Lecture # 12. Binary arithmetic: most operations are familiar Each place in a binary number has value 2 n

Logic design? Transistor as a switch. Layered design approach. CS/COE1541: Introduction to Computer Architecture. Logic Design Review.

ALU, Latches and Flip-Flops

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Counters. We ll look at different kinds of counters and discuss how to build them

Numbers and Arithmetic

ELCT201: DIGITAL LOGIC DESIGN

Transcription:

1 / 36 From Sequential Circuits to Real Computers Lecturer: Guillaume Beslon Original Author: Lionel Morel Computer Science and Information Technologies - INSA Lyon Fall 2017

2 / 36 Introduction What we have done so far is implementing simple automata No (complex) data is manipulated (e.g., integers) because this will require to many states... But digital circuits (and of course full-fledged computers) deal with data We need a methodology that will gather: combinatorial functions, automata, registers, to build functions such as counters, dividers, speedometers... and general computers. Control-Data Separation

A Sequential Circuit within the Control-Data Separation Scheme 3 / 36

4 / 36 Datapath Offers computational ressources needed for the operations to be implemented Typically includes an ALU (Arithmetic and Logical Unit) and registers connected by buses and multiplexers Exchanges data (in/out) with the outside of the circuit Performs all operations on data But typically doesn t know which operation to perform and when to perform it Clock drives registers (synchronous circuits)

A typical (simplistic) Datapath 5 / 36

6 / 36 Control Knows which operations to perform and when Doesn t deal with data directly (doesn t no how to do the operations) Typically implemented as a Finite State Machine, i.e., an automaton (see lectures 4 and 5) Input alphabet: Orders (from the outside of the circuit) and Reports (from the datapath) Output alphabet: Acknowledgements (to the outside of the circuit) and Commands (to the datapath) Clock drives automaton state changes (synchronous circuits)

Control Control is designed as a classical FSM (remember lectures 4 and 5) 7 / 36

Control (cont d) Then control is implemented as a classical FSM (remember lectures 4 and 5) I = Orders Reports O = Acknowledgements Commands Q = set of states T = Q (Orders Reports) Q (transition function) F = Q (Acknowledgements Commands) (output function) 8 / 36

Control (cont d) 9 / 36

10 / 36 Control (cont d) Control is just about implemeting a Moore machine (no more, no less!!). Biggest difficulty is to not forget any control signal: Between Control and outside world (Orders, Acknowledgments) Between Control and Datapath (Commands, Reports) VERY IMPORTANT Commands will control datapath registers through their enable pin Commands control datapath routing through mutiplexers Control never has access to the data. It only receives Reports computed by the datapath. Reports are used to choose automaton transitions.

Conception Methodology 1. Start with: The algorithm describing the expected behavior The general scheme of a sequential circuit 2. Using knowledge about circuit s environment and expected functionalities, identify Orders and Acknowledgements. 3. Build the Datapath: Identify registers and computational resources (ALU) Connect them such that all computations can be performed (including reports computation) 4. Design Datapath/Control interface (Commands and Reports signals). Interface will connect: Outputs of the control automaton to enable signals of datapath registers, or to datapath multiplexers (Commands) Outputs of computations as reports sent to control (used as inputs of the automaton) 5. Transform the (unformal) algorithm into a Moore machine: Identify states and transitions Associate Acknowledges and Commands to each state. 11 / 36

12 / 36 Running Example: a telemeter Let s build a telemeter with digital display. Usage: User presses a button Telemeter emits an ultrasound impulse Measures the echo travel time Travel time is translated into a distance Distance is displayed on screen

13 / 36 Running Example: definition of input/output signals Inputs are: GO: triggers a new measure. Telemeter waits for GO to be 1 to start a new measure. Receive: 0 when the ultrasound sensor hears nothing, 1 when sensor hears an echo. Outputs are: Emit: Needs to be set to 1 during one clock cycle to emit an ultrasound impulse. Distance: unsigned, 16 bits precision (but maximum value can be different from 65,535) due to time distance convertion); 0 until Receive. OK: 0 whenever the telemeter counts, 1 as soon as Distance is valid. Stays 1 until we ask for a new measure ERR: 1 if echo never comes back, 0 otherwise.

Running Example: Circuit interface 14 / 36

Running Example: Global architecture 15 / 36

Running Example: counting distance 16 / 36

17 / 36 Running Example: bonus, dealing with time and overflow Blackboard!

Running Example: moore machine 18 / 36

Demo Time! 19 / 36

20 / 36 Final sprint: building a real (but simple) computer Great, we have all the necessary elements to build a Real computer The only thing we still need is a way to organize things in order to execute any program rather than always the same computation... But executing a program can be simply viewed as a computation (i.e. always the same!) read an instruction execute it go to the next one We will use Control-Data separation to build a sequential circuit which function will be to compute the execution of a sequence of instructions von Neumann architecture

Von Neumann s computer 21 / 36

Von Neumann and the EDVAC 22 / 36

The considerations which follow deal with the structure of a very high speed automatic digital computing system, and in particular with its logical control. An automatic computing system is a (usually highly composite) device, which can carry out instructions to perform calculations of a considerable order of complexity e.g. to solve a non-linear partial differential equation in 2 or 3 independent variables numerically. bold faces added by me :) 23 / 36

24 / 36 At any rate a central arithmetical part of the device will probably have to exist, and this constitutes the first specific part: CA. Datapath and ALU

25 / 36 If the device is to be elastic, that is as nearly as possible all purpose, then a distinction must be made between the specific instructions given for and defining a particular problem, and the general control organs which see to it that these instructions no matter what they are are carried out. By the central control we mean this latter function only, and the organs which perform it form the second specific part: CC. Control

26 / 36 At any rate the total memory constitutes the third specific part of the device: M. Memory

27 / 36 The three specific parts CA, CC (together C) and M correspond to the associative neurons in the human nervous system. The First Draft Report on the EDVAC by John von Neumann, Jun 30th, 1945

Von Neumann s Architecture https://en.wikipedia.org/wiki/von_neumann_architecture 28 / 36

What is a program? 29 / 36

30 / 36 Programs. s e c t i o n. i n i t 9 main : mov. b #2, &0x32 loop : mov. b #2, &0x31 mov #20000, R4 wait1 : dec R4 j n z wait1 mov. b #0, &0x31 mov #20000, R4 wait2 : dec R4 j n z wait2 jmp loop

31 / 36 Executing programs - The Von Neumann Cycle - 1 Programs are executed instruction by instruction: loop { Fetch Current I n s t r u c t i o n Decode I n s t r u c t i o n Execute ( use datapath ) Write Results ( to r e g i s t e r s / memory ) Go to Next I n s t r u c t i o n } The Von Neumann cycle is Implemented in Hardware in the CPU Control component.

Executing programs - The Von Neuman Cycle - 2 32 / 36

Von Neuman Architecture more details 33 / 36

Von Neumann Architecture a real computer 34 / 36

Demo Time! 35 / 36

36 / 36 That all folks! In this course, we followed a bottom-up approach: How information is coded binary How we can deal with this information to compute other information from it boolean algebra How to build combinatorial circuits implementing simple mathematical functions How to deal with time and describe sequential behaviors How to build a small programmable machine The Computer Architecture course will further this discussion towards real computers.