von Neumann Architecture Basic Computer System Early Computers Microprocessor Reading Assignment An Introduction to Computer Architecture

Similar documents
Basic Computer System. von Neumann Architecture. Reading Assignment. An Introduction to Computer Architecture. EEL 4744C: Microprocessor Applications

Microcomputer Architecture and Programming

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

The due date for submitting this assignment has passed. 1) Which of the following statements regarding a microcomputer, a

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY COMMUNICATION ENGINEERING REG 2008 TWO MARKS QUESTION AND ANSWERS

Chapter 1: Basics of Microprocessor [08 M]

Introduction to Computers - Chapter 4

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

Microcontroller Systems

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

2. Computer Evolution and Performance


Software and Hardware

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

THE MICROPROCESSOR Von Neumann s Architecture Model

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Introduction to Computer Engineering. CS/ECE 252 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin Madison

EE 3170 Microcontroller Applications

Computer Organization Question Bank

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)

Microprocessor. Dr. Rabie A. Ramadan. Al-Azhar University Lecture 1

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

Hardware Design I Chap. 10 Design of microprocessor

Chapter 4 The Von Neumann Model

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Computing Layers

Pin Description, Status & Control Signals of 8085 Microprocessor

Computer Architecture 2/26/01 Lecture #

1. Internal Architecture of 8085 Microprocessor

CS 101, Mock Computer Architecture

1. Internal Architecture of 8085 Microprocessor

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

Introduction to Microprocessor

Instruction : A command to the microprocessor to perform a given task on specified data. Each instruction has two parts

Assembly Language Programming of 8085

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

8051 Overview and Instruction Set

COS 140: Foundations of Computer Science

Microprocessor Architecture

Chapter 4 The Von Neumann Model

Chapter 4 The Von Neumann Model

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

(1) Define following terms: Instruction, Machine Cycle, Opcode, Oprand & Instruction Cycle. Instruction:

Lecture-15 W-Z: Increment-Decrement Address Latch:

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

The functional block diagram of 8085A is shown in fig.4.1.

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

Introduction to Microcontrollers

Computer Organization and Levels of Abstraction

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

Basics of Microprocessor

MICROPROCESSOR BASICS AND RELATED TERMS

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

Intel 8086 MICROPROCESSOR. By Y V S Murthy

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

Real instruction set architectures. Part 2: a representative sample

... Executing conditional instructions

9/25/ Software & Hardware Architecture

8085 Microprocessor Architecture and Memory Interfacing. Microprocessor and Microcontroller Interfacing

CSE140: Components and Design Techniques for Digital Systems

Chapter 1 : Introduction

ECE 341 Midterm Exam

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Ripple Counters. Lecture 30 1

1. Internal Architecture of 8085 Microprocessor

CREATED BY M BILAL & Arslan Ahmad Shaad Visit:

INTRODUCTION TO MICROPROCESSORS

Intel 8086 MICROPROCESSOR ARCHITECTURE

Computer Architecture

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

C Functions and Pointers. C Pointers. CS270 - Fall Colorado State University. CS270 - Fall Colorado State University

Question Bank Microprocessor and Microcontroller

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Have difficulty identifying any products Not incorporating embedded processor FPGA or CPLD In one form or another

Mark II Aiken Relay Calculator

Lecture 1: Introduction to Microprocessors

PESIT Bangalore South Campus

Computers and Microprocessors. Lecture 34 PHYS3360/AEP3630

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

Typical Processor Execution Cycle

COSC 122 Computer Fluency. Computer Organization. Dr. Ramon Lawrence University of British Columbia Okanagan

Computer Architecture

Copyright 2000 N. AYDIN. All rights reserved. 1

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Computer Architecture Review. ICS332 - Spring 2016 Operating Systems

Computer Organization and Levels of Abstraction

University of Technology

SISTEMI EMBEDDED. Basic Concepts about Computers. Federico Baronti Last version:

ECED3204: Microprocessor Part I--Introduction

Wednesday, February 4, Chapter 4

Introduction to CPU Design

8051 microcontrollers

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

Von Neumann architecture. The first computers used a single fixed program (like a numeric calculator).

CS1004: Intro to CS in Java, Spring 2005

Transcription:

Reading Assignment EEL 4744C: Microprocessor Applications Lecture 1 Part 1 An Introduction to Computer Architecture Microcontrollers and Microcomputers: Chapter 1, Appendix A, Chapter 2 Software and Hardware Engineering: Chapter 1 Or Software and Hardware Engineering (new version): Chapter 1, Appendix A, Chapter 2 (2.1 & 2.2) 1 2 Basic Computer System von Neumann Architecture ALU, control logic registers A computer design model that uses a processing unit and a single separate storage structure to hold both instructions and data Named after mathematician and early computer scientist John von Neumann 3 4 Early Computers Microprocessor CPU on a single IC 1971: Intel 4004 - The first microprocessor on the market ENIAC (Penn,1946) AVIDAC (Argonne, 1953) SAGE (Air Force, 1958) 5 6 1

Moore s Law If Automobile Industry follows Moore s Law.. If the automobile industry advanced as rapidly as the semiconductor industry, a Rolls Royce would get 1/2 million miles per gallon and it would be cheaper to throw it away than to park it. Gordon Moore, Intel Corporation 7 µp: Performance and Power Performance 8 µp Trend: Multi-core Power Today 9 Microcontroller & Embedded System Tomorrow 10 Dominant Species Microprocessor with extra on-chip features such as memory, I/O controller, A/D, etc. for embedded applications What is an embedded system A computer that doesn t look like a computer Interacts directly with world (not human) Primitive or no user interface Part of other products 11 12 2

Summary Points EEL 4744C: Microprocessor Applications Lecture 1 Part 2 (self-study part) Binary Codes (Textbook Appendix A) Binary Codes for Numerical Information Unsigned-binary code: represents only positive information Singed/magnitude binary code One s-complement code Two s-complement code and arithmetic Binary coded decimal Binary Codes for Non-Numerical Information ASCII 7-bit codes for alphanumeric characters (Table A-5) 13 14 Designing a Simple Computer EEL 4744C: Microprocessor Applications Define the set of operations: Assume 4 operations, 2 bits are needed to provide a unique op code for each operation Lecture 1 Part 3 Microprocessor Architecture Mnemonic (used by Assembly Code) Unsigned binary code (used by Machine Code) 15 16 ADD, SUB require 2 (8-bit) operands: Operands are held in registers (arrays of flip-flops) What if we also want AND, OR? Arithmetic and logic unit (ALU): A Register is used as both source and destination register Hardware for ADD, SUB Registers are used to hold operands Hardware for ADD, SUB (2) Processing flow: A Register and B Register hold the operands The operands flow from A and B into ALU ALU performs the ADD or SUB The answer flows from ALU back into A A Register is also called an Accumulator, because it accumulates answers B Register is a general-purpose register More details later: The Registers need a clock signal ALU must handle the carry signal produced by adder 17 18 3

Hardware for I/O Input: 8 switches, or more choices, i.e. an A/D converter? Output: 8 LED s, or more choices, i.e. an D/A converter? Design options for input: Use 2 input operations, IN1 (switches) and IN2 (A/D) Include the operand with the operation => instruction Instruction = operation + operand What is to be done, and what is to be operated on 19 Hardware for I/O (2) Assume 4 input and 4 output devices: Operand code is needed to specify one of 4 I/O devices Append this operand code to the op code We now have 8-bit instruction codes Input device number is encoded with ii Output device number is encoded with oo The MOV operations: Input into accumulator A, output from accumulator A Need to move number from A to B Define MOV to transfer data from A to B MOV copies data from source (A) to destination (B) Need to add 1 more bit to the Op Code 20 Hardware for I/O (3) Hardware for I/O (4) No need to specify operands Assembly Code Sequence The current instruction set Operands of I/O instructions 21 22 Computer Memory Example Program Read a number from the switches and multiply it by 3, then display the result on the LED s: Assume switches are Device 1 and LED s are Device 2 What is the assembly code? IN 1 MOV ADD ADD OUT 2 2 16 locations of 8-bit data, addressed by A0..A15, controlled by the control signals for READ, WRITE, etc. Contents of the memory before execution? Assembling the program => encoding the assembly code into 1 s and 0 s 23 24 4

Example Program (2) Instruction Register & Decoder When an instruction is fetched from the computer memory, its is transferred to an instruction register and decoder The instruction register holds the instruction, the decoder then decode the instruction The decoder is a combinational logic circuit It takes the op code bits from the instruction and generates logic signals that are asserted for each operation These logic signals go to appropriate places in the computer Basically, the instruction decoder decodes the operation code and asserts proper control signals 25 26 Instruction Decoder Circuit: An Example Instruction Register & Decoder (2) Op code bits from instruction register 0 0 1 Asserted signal Control signal Program instructions transfer from memory into an instruction register and decoder. The decoder asserts a control signal appropriate for each defined operation of the computer 27 28 Control Signals from Decoder The asserted signals from decoder are used for data path control PC & Memory Address Register To run a program, we need a Program Counter (PC) and a Memory Address Register to step through the program When it is asserted by the decoder, IN activates the clock to latch the data from Device #1 into A Register. When OUT is asserted, the data in A Register is transferred to the LED s. 29 30 5

Instruction Execution Cycle Sequential State Machine The sequence of steps the processor goes through to do the complete instruction and to get ready for the next, until the program is finished or stopped Specific steps (simplified) IF: instruction fetched ID: instruction decoded, control signals asserted RT/EX: register transfer and/or execution PC: increment program counter These steps are repeated for each instruction execution cycle until the program is done, or until something is done to make the program stop 31 Partition instruction execution into smaller work unit. Each work unit can complete within a single clock cycle. State transition diagram is used to generate control signals at given clock cycle. A sequential state transition diagram 32 Sequential State Machine (2) The instruction execution cycle is partitioned into 5 different states, each state is an element of time long enough for an event to occur: State 1: fetch instruction from memory State 2: decode the instruction State 3: register transfer op, e.g. IN, OUT, MOV State 4: ALU op, e.g. ADD, SUB State 5: PC=PC+1, MAR<=PC Note that after State 4, we enter State 3 to transfer the ALU result (ADD/SUB) into the A Register Sequence Controller Combination of the sequential state machine and the instruction decoder: Generates control signals at the correct time for operation Example (Slide 29): signal is generated in State 3 for IN Allows different instructions to be executed in different amounts of time; controls computer s sequential operation 4 Cycles Time taken by each state should be equal!! 33 5 Cycles 34 Program Execution Time Sequence Controller Sequential state machine is operated by a clock This allows different instructions to take different amounts of time to finish Execution time = Total # states x time per state If basic clock frequency is 1 MHz, then time per state is 1µs = 1 sec/1000000 If total# states = 21, then total program execution time will be 21 µs Assert signals at corresponding clock cycle Instruction Type 35 36 6

I/O Synchronization & Wait State I/O Synchronization & Wait State (2) How do we make the computer wait for human input, e.g. entering data from outside? For example, your program is designed to input 2 numbers from the 8-bit switches and add them up How do you make the computer wait for you when you input those 2 numbers? We need a Wait state, where the processor will spin its wheels until a ready signal is asserted, allowing synchronization with slow input devices For IN, the SSM enters the Wait state and stays there until an external control signal, i.e. READY, is asserted by the user. 37 38 I/O Synchronization & Wait State (3) How about the OUT instruction? Should it have a Wait state also? The READY signal for OUT can be asserted when the output device has received the data MOV that uses 2 Registers MOV dd, ss (dd) (ss) Moves data from (ss) source register to (dd) destination register Register codes: A=00, B=01, C=10, D=11 Example: MOV B, A will be assembled as the following binary code: 010-0100 39 40 Memory Reference Instructions A Program Example MVI dd, 65 (dd) 65 (next memory location) 2-byte instruction that moves data from memory location right after the op code, i.e. the data is 65 10 in this case, to the destination register (dd) Register codes: A=00, B=01, C=10, D=11 Example: MVI A, 65 will be assembled as below: First byte: 110----00 Op + Operand Code Second byte: 01000001 Data(= 65 10 ) 41 What does this program do? 42 7

Control Instructions HALT Stops the clock pulses going into the sequence controller JMP or BRA Transfers the PC from one place of the program to another Operand is the memory location from which the computer must fetch its next instruction This is a 3-byte instruction Example: unconditional branch : BRA 15 First byte: Op Code Second byte: (branch address) Third byte: (branch address) 43 Control Instructions (2) Conditional branch Condition code (RC) register contains bits which are set or reset when an ALU operation is performed A RC register can hold flip-flops for carry, zero, negative, two s complement overflow, odd/even parity The RC register bits are connected to the sequence controller We can then design branch-if-carry, branch-ifoverflow, etc. 44 Putting them Together 45 8