Building a computer. Electronic Numerical Integrator and Computer (ENIAC)



Similar documents
Chapter 2 Logic Gates and Introduction to Computer Architecture

MICROPROCESSOR AND MICROCOMPUTER BASICS

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Central Processing Unit (CPU)

Microprocessor & Assembly Language

PART B QUESTIONS AND ANSWERS UNIT I

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

CSCI 4717 Computer Architecture. Function. Data Storage. Data Processing. Data movement to a peripheral. Data Movement

CPU Organisation and Operation

(Refer Slide Time: 00:01:16 min)

Let s put together a Manual Processor

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

Lecture N -1- PHYS Microcontrollers

CHAPTER 7: The CPU and Memory

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Central Processing Unit

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Computer Organization. and Instruction Execution. August 22

MICROPROCESSOR BCA IV Sem MULTIPLE CHOICE QUESTIONS

MACHINE ARCHITECTURE & LANGUAGE

CSE 141L Computer Architecture Lab Fall Lecture 2

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

Computer organization

Memory Elements. Combinational logic cannot remember

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

The Central Processing Unit:

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

BASIC COMPUTER ORGANIZATION AND DESIGN

TIMING DIAGRAM O 8085

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Logical Operations. Control Unit. Contents. Arithmetic Operations. Objectives. The Central Processing Unit: Arithmetic / Logic Unit.

8051 hardware summary

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

l C-Programming l A real computer language l Data Representation l Everything goes down to bits and bytes l Machine representation Language

Systems I: Computer Organization and Architecture

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

CHAPTER 4 MARIE: An Introduction to a Simple Computer

Chapter 2 Basic Structure of Computers. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

CHAPTER 3 Boolean Algebra and Digital Logic

The WIMP51: A Simple Processor and Visualization Tool to Introduce Undergraduates to Computer Organization

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

The components. E3: Digital electronics. Goals:

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

Chapter 13. PIC Family Microcontroller

Gates, Circuits, and Boolean Algebra

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

COMPUTER ARCHITECTURE. Input/Output

Serial Communications

Chapter 1 Computer System Overview

CTNET Field Protocol Specification November 19, 1997 DRAFT

TYPES OF COMPUTERS AND THEIR PARTS MULTIPLE CHOICE QUESTIONS

CHAPTER 6: Computer System Organisation 1. The Computer System's Primary Functions

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

Systems I: Computer Organization and Architecture

Lecture 8: Synchronous Digital Systems

Microprocessor and Microcontroller Architecture

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

8085 INSTRUCTION SET

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

TEACHING COMPUTER ARCHITECTURE THROUGH SIMULATION (A BRIEF EVALUATION OF CPU SIMULATORS) *

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

Microcontrollers Figure 26-1 Objectives Key Words and Terms 26.1 OVERVIEW OF THE MICROCONTROLLER microcontroller

LSN 2 Computer Processors

CSE140 Homework #7 - Solution

EMBEDDED SYSTEM BASICS AND APPLICATION

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

CPU Organization and Assembly Language

Chapter 7 Memory and Programmable Logic

Counters and Decoders

Chapter 4 System Unit Components. Discovering Computers Your Interactive Guide to the Digital World

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

Computer Systems Design and Architecture by V. Heuring and H. Jordan

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-12: ARM

1. Computer System Structure and Components

MULTIPLE CHOICE FREE RESPONSE QUESTIONS

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

BINARY CODED DECIMAL: B.C.D.

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Discovering Computers Living in a Digital World

Multiple Choice Questions(Computer)

CHAPTER 11: Flip Flops

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1

Chapter 9 Latches, Flip-Flops, and Timers

Lecture-3 MEMORY: Development of Memory:

Instruction Set Architecture. Datapath & Control. Instruction. LC-3 Overview: Memory and Registers. CIT 595 Spring 2010

Transcription:

Building a computer Electronic Numerical Integrator and Computer (ENIAC) CSCI 255: Introduc/on to Embedded Systems Keith Vertanen Copyright 2011

Layers of abstrac<on abstrac<on building blocks examples computer components Macbook Pro components sequen<al circuits mul<plexer, demul<plexer, adder, flip- flop logic gates, connectors, clock registers, ALU, counter flip- flop combina<onal circuit logic gates, connectors mul<plexer, demul<plexer, adder logic gates switches, connectors AND, OR, NOT clock raw materials crystal oscillator connector raw materials wire switch raw materials transistor, relay 2

Connector Goal: conduct electricity + = big hole miners wire 3

Clock Goal: periodic signal for synchroniza<on + = quartz crystal electricity clock signal 4

Switch Goal: allow electricity to be turned on & off + + = spring magnet wire switch Examples: NOT, OR, AND, NOR, NAND, XOR 5

Logic gates Goal: compute simple Boolean func<ons + = wire switch NOT gate + + = wire switch switch OR gate Examples: NOT, OR, AND, NOR, NAND, XOR 6

Combina<onal circuit Goal: compute any Boolean func<ons x y F(x,y) 0 0 0 0 1 1 1 0 1 + + = 1 1 0 truth table logic gates wire combina<onal circuit Examples: odd, majority, mul<plexer, demul<plexer, adder 7

Sequen<al circuit Goal: store persistent state + + = logic gates wire clock sequen<al circuit Examples: SR latch, D flip- flop, JK flip- flop, T flip- flop 8

Components Goal: provide high- level func<onality + = combina<onal circuits sequen<al circuits component Examples: register, register bank, mul<port register bank, synchronous counter, ALU 9

Computer Goal: store and process data according to a program + + = input components output computer 10

Computer Three major components Central Processing Unit (CPU) Performs opera<ons Memory Where data / program is stored Input / Output (I/O) system Get input, show results 11

Input/output configura<ons I/O CPU Memory CPU coordinates transfer between I/O and memory CPU Memory I/O Direct Memory Access (DMA) Bus: wires carrying informa<on between components 8- bit bus in Logisim 12

Bus width 4- bit Intel 4004 8- bit Intel 8052 16- bit Intel 80286 32- bit Intel 80386 32- bit Intel 80486 32- bit Intel Pen<um Pro 64- bit AMD Opteron 128- bit??? 13

Connec<ng CPU & Memory address bus CPU data bus control and status bus Memory Performs opera<ons Address bus Where CPU puts address of memory it wants Data bus Where memory puts data from requested address Control and status bus Stores operands and results Determines direc<on and coordinates <ming 14

CPU Central Processing Unit (CPU) The brains of the computer Main components: Arithme<c Logic Unit (ALU) Perform math and logic opera<ons Control Unit (CU) Fetching and decoding instruc<ons from memory Execu<ng instruc<ons by direc<ng sequence of transfers and opera<ons 15

Central Processing Unit (CPU) Control Unit (CU) Program Counter (PC) InstrucDon Register (IR) Memory address register Memory data register Address bus Data bus InstrucDon decoder Control and status bus General purpose registers ArithmeDc and Logic Unit (ALU) 16

Computer architecture Princeton's fic<<ous TOY computer's wiring. 17

Our "simple" ALU First input Output of calcula<on 2 bits on this line Second input 4 bits on these lines Business end of the ALU, compute all opera<ons in parallel Which type of thing to output, 00 = ADD, 01 = SUB, 10 = AND, 11 = XOR 18

ALU data paths 1 st input, current contents of accumulator 2 nd input, read from data bus A ALU B Result replaces old value in accumulator Accumulator (A) Memory data bus Control and status bus 19

Goal: 8052 adding numbers Add value in register 0 and 1 Put result in register 2 One- liner in C: r2 = r0 + r1; 20

Opcode ADD Adds values Example 8052 opcode InstrucDons OpCode Bytes Cycles Flags ADD A,#data 0x24 2 1 C, AC, OV ADD A,direct 0x25 2 1 C, AC, OV ADD A,@R0 0x26 1 1 C, AC, OV ADD A,@R1 0x27 1 1 C, AC, OV ADD A,R0 0x28 1 1 C, AC, OV ADD A,R1 0x29 1 1 C, AC, OV ADD A,R2 0x2A 1 1 C, AC, OV ADD A,R3 0x2B 1 1 C, AC, OV ADD A,R4 0x2C 1 1 C, AC, OV ADD A,R5 0x2D 1 1 C, AC, OV ADD A,R6 0x2E 1 1 C, AC, OV ADD A,R7 0x2F 1 1 C, AC, OV 21

Opcode MOV Example 8052 opcode Move memory InstrucDons OpCode Bytes Cycles Flags MOV A,R0 0xE8 1 1 None MOV A,R1 0xE9 1 1 None MOV A,R2 0xEA 1 1 None MOV A,R3 0xEB 1 1 None MOV A,R4 0xEC 1 1 None MOV A,R5 0xED 1 1 None MOV A,R6 0xEE 1 1 None MOV A,R7 0xEF 1 1 None MOV R0,A 0xF8 1 1 None MOV R1,A 0xF9 1 1 None MOV R2,A 0xFA 1 1 None MOV R3,A 0xFB 1 1 None 22

Goal: 8052 adding numbers Add value in register 0 and 1 Put result in register 2 Takes sequence of 3 instruc<ons in 8052 assembly: MOV A, R0 ADD A, R1 MOV R2, A Reflec<on of the underlying hardware reali<es 23

Control Unit (CU) Control Unit Fetches instruc<ons from memory Decodes instruc<ons Executes instruc<ons Sequence of data transfers & opera<ons Control Unit (CU) Program Counter (PC) Memory address register Address bus InstrucDon Register (IR) Memory data register Data bus InstrucDon decoder Control and status bus 24

Fetch- execute cycle Fetch Get the next instruc<on from memory Execute Perform data transfers and opera<ons Program counter (PC) provides the loca<on Retrieve addi<onal bytes as required by desired instruc<on 25

Fetch phase Fetch phase Control unit (CU) places program counter (PC) on memory address bus Starts memory read opera<on Increments program counter (PC) Wait for memory read to finish Copy value on memory data bus to instruc<on register (IR) Fetch Execute 26

Execute phase Execute phase First byte of instruc<on contains opera<on code (opcode) CU decodes opcode Details opcode specific May load addi<onal data from memory May place constants on data bus Put values on status and control bus (e.g. desired ALU opera<on) Fetch Execute 27

Memory architecture Harvard architecture Code and data stored in separate areas Program cannot accidently modify itself Example: 8052 256 bytes data memory (on chip) Code memory, EPROM or Flash (AT89S8253 12KB flash) Von Neumann architecture Code and data in same area Loaded at boot <me from device (e.g. hard drive) Example: modern PCs 28

8052 memory architecture 128 + 128 bytes Port 0-3, serial port, <mers, interrupts AT89S8253 12KB flash 29

8052 memory addresses 30

Building a computer Summary Raw materials switches gates circuits components computer Computer CPU + memory + I/O Fetch- and- execute cycle Assembly programming 8052 Some<mes tedious, but reflects hardware reali<es inside computer! 31