COMPUTER ORGANIZATION & ARCHITECTURE A digital computer solves problems by executing a sequence of instructions called a program Ioan Despi.

Slides:



Advertisements
Similar presentations
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Copyright © 2006 by The McGraw-Hill Companies,
Advertisements

Introduction to Computers Section 4A. home Decimal Number System Called base 10 because 10 symbols are available.
Computer Organization and Architecture
1 Lecture 3: Instruction Set Architecture ISA types, register usage, memory addressing, endian and alignment, quantitative evaluation.
CS2422 Assembly Language & System Programming September 19, 2006.
ENGIN112 L30: Random Access Memory November 14, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 30 Random Access Memory (RAM)
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
Professor Michael J. Losacco CIS 1110 – Using Computers System Unit Chapter 4.
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
Introduction to Microprocessors Number Systems and Conversions No /6/00 Chapter 1: Introduction to 68HC11 The 68HC11 Microcontroller.
CS 151 Digital Systems Design Lecture 30 Random Access Memory (RAM)
Chapter 5 Internal Memory
What is an instruction set?
August 26 TA: Angela Van Osdol Questions?. What is a computer? Tape drives? Big box with lots of lights? Display with huge letters? Little box with no.
Chapter 6 Memory and Programmable Logic Devices
CIS 260 Computer Programming I in C Prof. Timothy Arndt.
CSE378 MIPS ISA1 MIPS History MIPS is a computer family –R2000/R3000 (32-bit); R4000/4400 (64-bit); R8000; R10000 (64-bit) etc. MIPS originated as a Stanford.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
Lesson 3 — How a Computer Processes Data
Lecture#14. Last Lecture Summary Memory Address, size What memory stores OS, Application programs, Data, Instructions Types of Memory Non Volatile and.
E0001 Computers in Engineering1 The System Unit & Memory.
Introduction to Computing: Lecture 4
Physics 413 Chapter 1 Computer Architecture What is a Digital Computer ? A computer is essentially a fast electronic calculating machine. What is a program.
4-1 Chapter 4 - The Instruction Set Architecture Computer Architecture and Organization by M. Murdocca and V. Heuring © 2007 M. Murdocca and V. Heuring.
Instruction Set Architecture
4-1 Chapter 4 - The Instruction Set Architecture Department of Information Technology, Radford University ITEC 352 Computer Organization Principles of.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Lesson 3 — How a Computer Processes Data Unit 1 — Computer Basics.
1 Computer Architecture COSC 3430 Lecture 3: Instructions.
4-1 Chapter 4 - The Instruction Set Architecture Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Computer Architecture And Organization UNIT-II General System Architecture.
SKILL AREA: 1.2 MAIN ELEMENTS OF A PERSONAL COMPUTER.
Computer Organization & Assembly Language © by DR. M. Amer.
Computer Architecture and Organization
Computer Architecture EKT 422
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Adapted from Computer Organization and Design, Patterson & Hennessy, UCB ECE232: Hardware Organization and Design Part 5: MIPS Instructions I
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Chapter 5A Transforming Data Into Information.
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Overview von Neumann Architecture Computer component Computer function
Computer operation is of how the different parts of a computer system work together to perform a task.
DR. SIMING LIU SPRING 2016 COMPUTER SCIENCE AND ENGINEERING UNIVERSITY OF NEVADA, RENO CS 219 Computer Organization.
Address alignment When a word (4-bytes) is loaded or stored the memory address must be a multiple of four. This is called an alignment restriction. Addresses.
©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. Introduction to Computers and Computing.
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Hello world !!! ASCII representation of hello.c.
Operating Systems A Biswas, Dept. of Information Technology.
Components of Computer. Memory Unit Most important part of the computer Used to store data and instructions that are currently in use Main memory consists.
Chapter 2 content Basic organization of computer What is motherboard
McGraw-Hill Technology Education
What is Computer Architecture?
Introduction to Microprocessor Programming
What is Computer Architecture?
What is Computer Architecture?
McGraw-Hill Technology Education
Review In last lecture, done with unsigned and signed number representation. Introduced how to represent real numbers in float format.
McGraw-Hill Technology Education
Introduction to Computers
CSE378 Introduction to Machine Organization
Computer Memory.
Presentation transcript:

COMPUTER ORGANIZATION & ARCHITECTURE A digital computer solves problems by executing a sequence of instructions called a program Ioan Despi

Instructions can be written as: 1. High level language (C, C++, Java, Pascal) statements: a = a + b 2. Assembly language statements: add a,b 3. Bit patterns:

Required steps to obtain an exe from assembly language At assemble time, assembly language text is converted to (binary) machine language –They may be generated by translating instructions, hexadecimal or decimal numbers, characters, etc. –Addresses are translated by way of a symbol table –Addresses are adjusted to allow for blocks of memory reserved for arrays, etc. At link time, separately assembled modules are combined and absolute addresses assigned At load time, the binary words are loaded into memory At run time, the PC is set to the starting address of the loaded module (usually the o.s. makes a jump or procedure call to that address)

WHAT IS “COMPUTER ARCHITECTURE”? Applications O/ S Kernel Instruction Set Architecture Functional Units Memory I/ O System Logic Gates (Digital Design) Devices (Circuit Design) Compiler

THE MAIN COMPONENTS OF A COMPUTER ProcessorMemory Peripheral Devices datapath control input output

Control Unit causes successive instructions to be fetched from memory and executed : fetch-execute cycle instructions provided describe the instruction set architecture (ISA) of the computer this represents the interface between the hardware and the lowest software level

Datapath comprises two components: arithmetic and logic unit (ALU) register file ALU performs simple operations between registers A+B A B registers ALU

Memory divided into cells, each of which has unique address standard cell size of 8 bits (binary digits) called a byte often, a parity bit is stored with each byte for checking purposes; the bit is chosen so that the total number of 1’s bits is either even - even parity odd - odd parity

Memory address parity

Memory for many operations, bytes are grouped into words a machine may have a 2-byte (16-bit), 4-byte (32-bit) or 8-byte (64-bit) word some machines insist that accesses to words be aligned. Access to a word of size S bytes at address A is allowed only if A mod S = 0 an aligned 32-bit word machine would disallow access to a word at address 3

Memory Address access disallowed

Memory –RAM (Random Access Memory) can be both read and written –it is volatile : contents lost when power switched off –DRAM (Dynamic RAM) must be refreshed regularly access time : ~100ns; capacity : ~16Mbits used in main memory (16-64Mbyte) –SRAM (Static RAM ) no refresh required access time : ~10ns; capacity : ~ 1Mbit used in cache memory (256Kbyte - 1Mbyte)

Memory Read only Memory (ROM) written once during manufacture, thereafter only read it is non-volatile : contents remains when power switched off several kinds of ROM –ROM : read only memory (once, factory) –PROM : programmable ROM (once, customer) –EPROM : erasable PROM (many times, customer) –EEPROM : electrically erasable PROM (many times, customer)

MEMORY ADDRESSING = Logical structure of a computer's random-access memory (RAM) The generic term for the smallest unit of memory that the CPU can read or write is cell In most modern computers, the size of a cell is 8 bits (1 byte) Hardware-accessible units of memory larger than one cell are called words Currently (1999) the most common word sizes are 32 bits (4 bytes) and 64 bits (8 bytes)

Byte - Addressed Memory

Byte -Addressed Memory: 32 bit addressing The address of a byte is 4-byte word (32 bits) data addresses

Word Addressing Word address = n + 4 Word address = n addresses

Every memory cell has a unique integer address The CPU accesses a cell by giving its address Addresses of logically adjacent cells differ by 1 The address space of a processor is the range of possible integer addresses, typically (0 : )

BYTE ORDERING Big-endian byte ordering Most significant (leftmost) byte has the lowest address The address of a word is the address of its most significant byte Default byte ordering in MIPS, DEC Alpha, HP PA-RISC and IBM/Motorola/Apple PowerPC architectures Only available byte ordering in SPARC and IBM 370 architectures Little-endian byte ordering Least significant (rightmost) byte has the lowest address The address of a word is the address of its least significant byte Only available byte ordering in Intel 80x86, National SemiconductorNS and DEC Vax architectures

LITTLE-ENDIAN vs BIG-ENDIAN BYTE ORDERING Affects the interpretation of multi-byte structures (4-byte words, etc.) Examples: Strings: "MIPS" = 4D (big-endian) = D (little-endian) But D = "SPIM" (big-endian) Unsigned 32-bit integer (such as an IP address): 81 6E (base16) = 2,171,474,003 (base 10) (big- endian) But E 81(base16) = 1,393,585,793 (base10) (little- endian) A problem for data transfer from one device to another!

Byte ordering conventions The arrows point in the direction of increasingly significant digits Bytes: 3210 Bytes: 0123 Big - Endian Little - Endian

ALIGNMENT In RISC ISAs, the address of the low-address byte of a block of mem- ory that holds a data type must be a multiple of the data type's size The address of a byte can be any unsigned integer within the processor's address space Assume that a word is 4 bytes (32 bits) The address of a word (4 bytes) must be a multiple of 4 A word address ends with 2 zero bits (00) Possible last hexadecimal digits in a word address: 0, 4, 8, C The address of a doubleword (8 bytes) must be a multiple of 8 A doubleword address ends with 3 zero bits (000) Possible last hexadecimal digits in a word address: 0, 8 The MIPS directive.align n aligns block addresses on multiples of n

Input and Output input –keyboard (character), –mouse (x,y), –disc(block)

Output - character terminal 25 x 80 characters, 8 attribute bits/character, 4kbyte video RAM - bit-mapped terminal 1280 x 1024 pixels, 24 attribute bits/pixel, 3840kbyte video RAM - laser printer dots/inch (dpi), 6-12 pages per min

SIMULATORS SPIM (“ 1/25th the performance at none of the cost”) Simulates the RISC architecture (MIPS) most used embedded systems (Nintendo 64, Sony PlayStation,... ) Available for architectures other than the native one The MIPS instruction set is simpler than most The SPIM interface is better than any real debuggers (Registers, data segment, text segment, stack) Documentation: Patterson & Hennessy, Appendix A; Waldron XMPSIM Simulates one Cray X- MP processor Runs under DOS Gives good view of pipeline timing, stalls, etc.

Scales, Units, and Conventions Term K (kilo-) M (mega-) G (giga-) T (tera-) = 1, = 1,048, = 1,073,741, = 1,099,511,627,776 Normal UsageAs a power of 2 Term Usage m (milli-)  (micro-) n (nano-) p (pico-) Units: Bit (b), Byte (B), Nibble, Word (w), Double Word, Long Word, Second (s), Hertz (Hz)