1 Homework Reading –PAL pp 119-125, 161-172 Continue mp1 –Questions? Continue lab sessions with your section.

Slides:



Advertisements
Similar presentations
D75P 34 – HNC Computer Architecture Week 10 Computer Memory. © C Nyssen/Aberdeen College 2003 All images © C Nyssen/Aberdeen College except where stated.
Advertisements

Engr. M.K.Debnath1 Microcontroller and PLC Eng. ISRAFIL KHAN. DIPLOMA IN ELECTRONIC.
1BA3 G Lacey Lecture 51 Evaluating mathematical expressions  How do computers evaluate x + y or any mathematical expression ?  Answer : “Reverse Polish.
Intermediate GNVQ ICT Computer Systems Hardware is the name that is given to any part of a computer that you can actually touch. An individual piece of.
CSS 372 Lecture 1 Course Overview: CSS 372 Web page Syllabus Lab Ettiquette Lab Report Format Review of CSS 371: Simple Computer Architecture Traps Interrupts.
COMP3221: Microprocessors and Embedded Systems Lecture 2: Instruction Set Architecture (ISA) Lecturer: Hui Wu Session.
PC hardware and x86 3/3/08 Frans Kaashoek MIT
Chapter 4 H1 Assembly Language: Part 2. Direct instruction Contains the absolute address of the memory location it accesses. ld instruction:
What is an instruction set?
Chapter 4 Computer Memory
IT Systems Memory EN230-1 Justin Champion C208 –
WANs and Routers Routers. Router Description Specialized computer Like a general purpose PC, a router has:  CPU  Memory  System Bus Connecting Internal.
Basic Computer Organization CH-4 Richard Gomez 6/14/01 Computer Science Quote: John Von Neumann If people do not believe that mathematics is simple, it.
UNIT 9 Computer architecture
Computer Organization
hardware and operating systems basics.
Memory Hierarchy.
Memory Main memory consists of a number of storage locations, each of which is identified by a unique address The ability of the CPU to identify each location.
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
6.828: PC hardware and x86 Frans Kaashoek
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
Random access memory.
Chapter 1 Computer System Overview Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William.
ECE Lecture 1 1 Introduction to Microcontrolllers Department of Electrical and Computer Engineering The Ohio State University ECE 2560.
Three fundamental concepts in computer security: Reference Monitors: An access control concept that refers to an abstract machine that mediates all accesses.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CS-334: Computer.
1 Fundamental of Computer Suthida Chaichomchuen : SCC
Laface Operating System Design Booting a PC to run a kernel from Low memory VGA display.
GCSE Information Technology Storing data Data storage devices can be divided into 2 main categories: Backing storage is used to store programs and data.
Components of a Computer Prepared by: Mrs. McCallum-Rodney.
© Banff and Buchan College 2007 DH2T 34 Computer Architecture 1 LO2 Lesson One Memory.
20-Sep Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Sept lecture7-8-compstate 1 Machine Organization  Systems (including.
Chidambaranathan C.M SRM University,Haryana. Memory:- As the word implies “memory” means the place where we have to store any thing, this is very essential.
GCSE Information Technology Computer Systems 2 Hardware is the name that is given to any part of a computer that you can actually touch. An individual.
1 The /27/ Today over fifty companies produce variations of the Several of these companies have over fifty versions of the 8051.
Information Technology Basic Computer Architecture Adnan Khalid.
ECE 265 – LECTURE 3 68HC11 Address Space, Memory, Registers, and data transfers 3/29/ ECE265.
Computer Architecture and Organization
UHD:CS2401: A. Berrached1 The Intel x86 Hardware Organization.
Computer Architecture EKT 422
Electronic Analog Computer Dr. Amin Danial Asham by.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
1 ENG224 INFORMATION TECHNOLOGY – Part I 1. Introduction to Computers.
Microprocessor Fundamentals Week 3 Mount Druitt College of TAFE Dept. Electrical Engineering 2008.
Architectural Considerations A Review of Some Architectural Concepts.
Components of Hardware 1. Processor Memory Input and output devices Storage 2.
Von Neumann Machines. 3 The Von Neumann Architecture Model for designing and building computers, based on the following three characteristics: 1)The.
PCs ENVIRONMENT and PERIPHERALS Lecture 3. operating system and other system software that control the usage of the computer equipment application programs.
Index What is an Interface Pins of 8085 used in Interfacing Memory – Microprocessor Interface I/O – Microprocessor Interface Basic RAM Cells Stack Memory.
Internal hardware of a computer Learning Objectives Learn how the processor works Learn about the different types of memory and what memory is used for.
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.
Introduction to Operating Systems Concepts
Homework Reading PAL pp ,
BIOS & CMOS.
introduction to computer
Memory chips Memory chips have two main properties that determine their application, storage capacity (size) and access time(speed). A memory chip contains.
SAPC Hardware Pentium CPU (or 486) 4M usable memory
9.0 EMBEDDED SOFTWARE DEVELOPMENT TOOLS
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
MICROPROCESSOR MEMORY ORGANIZATION
Chapter 2: Operating-System Structures
ECEG-3202 Computer Architecture and Organization
Introduction to Operating Systems
Introduction to Microprocessor Programming
8051 ASSEMBLY LANGUAGE PROGRAMMING
Chapter 2: Operating-System Structures
Presentation transcript:

1 Homework Reading –PAL pp , Continue mp1 –Questions? Continue lab sessions with your section

Memory Architectures Von Neumann Architecture –Code and data are accessed in one address space –The I/O ports may be in: The same address space (Memory Mapped I/O) A separate I/O address space (Intel) Harvard Architecture –Code is accessed in one address space –Data and I/O ports are in another address space 2

Memory Architectures 3 CodeDataI/O Ports Atmega Intel 386 Motorola 68xxx Comparison of Memory Architectures Architecture Harvard Von Neumann

4 Intel Memory Architecture We’ll discuss various aspects of memory use: –Storage of bytes –Storage of words and long words –Storage of strings –The stack and the stack pointer –RAM and ROM –Addressing - real mode and protected mode

5 Storage of Bytes Memory is byte addressable (8 bits/byte) A memory address “points” to the location of a specific byte in memory As we know from C data types, a “pointer” can be “cast” to point to a type or structure in memory that is larger than one byte In that case, the memory address “points” to the lowest address of the storage area used

6 Storage of Words and Long Words Word Sizes –A Word usually means 16 bits or 2 bytes –A Long Word usually means 32 bits or 4 bytes Many processors (Motorola 68000/PPC and Sun) store words and long words in memory in “Big Endian” fashion Intel and Atmega Processors store words and long words in memory in “Little Endian” fashion

7 “Big Endian” Mapping a long word from register to memory: %eax * * * Memory Address 0x1000e00x1000e10x1000e20x1000e3 0x120x340x560x78 0x120x340x560x78

8 “Big Endian” Appearance Hex value as seen in register: %eax: Hex value(s) as seen in memory bytes (md): 0x1000e0: Irrelevant to the end user – self consistent! Has a logical appearance to a programmer using a debugger!

9 “Little Endian” Mapping a long word from register to memory: %eax * * * Memory Address 0x1000e00x1000e10x1000e20x1000e3 0x120x340x560x78 0x560x340x12

10 “Little Endian” Appearance Hex value as seen in register: %eax: Hex value(s) as seen in memory bytes (md): 0x1000e0: Irrelevant to the end user – self consistent! A bit confusing to programmers using a debugger!

11 Debugging with “Little Endian” Mostly learn to live with it! To help with displays, the “real” Tutor monitor has an "mdd" command (memory-display-doubleword) This command reorders the bytes and displays four bytes at a time as a double word value: Tutor> mdd 1000e0 1000e

12 Storage of Strings How are strings stored? –Look at string “help” stored at location 0x –Since memory is “byte addressable” each character (i.e. each byte) has its own address –The address of the entire string is the address of the first byte of the string (the lowest address) –The null terminator shows the end * * * Memory Address 0x x x x x ‘h’ ‘e’ ‘l’ ‘p’ ‘\0’

13 The Stack One register is called the “extended stack pointer” and is used to implement a stack There are various times when data is pushed on the stack and/or popped off the stack that we will study later –Function calls and returns –Interrupts and returns –System calls and returns

14 The Stack For now, we will just understand how the esp register is used to push and pop data on and off the stack Why is a specific register used? Can’t the software use any register for a stack pointer? Not for the system stack! Both hardware and software must push and pop data on and off the same stack Hardware is designed to use a specific register (%esp) so software must be consistent and use same register

15 The Stack - Initialization Software initializes system stack pointer to point just after the end of available area in memory (i.e., not used for another purpose than stack) Contents of the stack area are not initialized * * * Memory Address 0x00FFFFFC0x00FFFFFD0x00FFFFFE0x00FFFFFF movl $0x , %esp ?? %esp

16 The Stack - Push When data is pushed onto the stack, the esp register is decremented and the value being pushed is stored to memory at the address value (“pointer”) stored in the esp register * * * Memory Address movl $0x , %eax pushl %eax 0x780x560x340x12 0x00FFFFFC0x00FFFFFD0x00FFFFFE0x00FFFFFF %esp

17 The Stack - Pop When data is popped off the stack, the value of the data is read from memory at the address value (“pointer”) stored in the esp register and the esp register is incremented * * * Memory Address popl %eax (%eax contains 0x again) 0x00FFFFFC0x00FFFFFD0x00FFFFFE0x00FFFFFF 0x780x560x340x12 %esp

18 The Stack - Remove When data is removed from the stack, the value of the data is NOT read from memory The esp register is merely incremented by the size in bytes of the data being removed * * * Memory Address addl $0x04, %esp (value of long word on stack is “lost”) 0x00FFFFFC0x00FFFFFD0x00FFFFFE0x00FFFFFF 0x780x560x340x12 %esp

19 Memory Types Random Access Memory (RAM) –Contents are “volatile” (lost when power is off) –Can be loaded with code from a non-volatile media/source such as a disk or a network server –Can be used for reading and writing data via normal reads and writes to the memory address –Can be overwritten unintentionally, e.g. using a “bad” pointer when storing data in memory –Faster access

20 Memory Types (Continued) Read Only Memory (ROM) –Contents are “non-volatile” (saved with power off) –Contains code needed to “boot” the processor –Can be used for reading (but not writing) data –Programmable Parts: Low Volume/High Cost (Development and Testing) –Preprogrammed Parts: High Volume/Low Cost (Production)

21 Software in Embedded System Memory (Low volume / High Cost) Prom Programmer Dev’t Host File Inventory of Blank Memory Chips Prototype Board(s) Manual process to “burn” PROMs is costly in high volume!! If EPROM, erase and reuse after testing and finding bugs UV Light “Sun Tan”

22 Software in Embedded System Memory (High Volume / Low Cost) Memory Chip Vendor Dev’t Host File Production Boards Inventory of Programmed Chips * * * Transfer file to Memory Chip Vendor Order Production Quantities (Least Expensive Per Unit) BUT, if bugs are found during production run, inventory is scrapped!!

EEPROM/Flash Upgrade For some computer systems (e.g. PC’s) and embedded devices, the pre-programmed parts are electrically writeable using procedures that are not normal software write operations These parts can be reloaded using a special procedure, e.g. BIOS update for a PC Risk: If anything goes wrong, the device may become unusable and the part need replacing 23