DIRECT MEMORY ACCESS and Computer Buses

Slides:



Advertisements
Similar presentations
Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation.
Advertisements

Bus Specification Embedded Systems Design and Implementation Witawas Srisa-an.
Computer Buses Ref: Burd, Chp – 220 Englander, Chp 7 p
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
Interfacing Processors and Peripherals Andreas Klappenecker CPSC321 Computer Architecture.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
CPU Chips The logical pinout of a generic CPU. The arrows indicate input signals and output signals. The short diagonal lines indicate that multiple pins.
PHY 201 (Blum) Buses Warning: some of the terminology is used inconsistently within the field.
Computer Architecture Lecture 08 Fasih ur Rehman.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Spring EE 437 Lillevik 437s06-l2 University of Portland School of Engineering Advanced Computer Architecture Lecture 2 NSD with MUX and ROM Class.
Cis303a_chapt06_exam.ppt CIS303A: System Architecture Exam - Chapter 6 Name: __________________ Date: _______________ 1. What connects the CPU with other.
LOGO BUS SYSTEM Members: Bui Thi Diep Nguyen Thi Ngoc Mai Vu Thi Thuy Class: 1c06.
Computer Architecture
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
Buses Warning: some of the terminology is used inconsistently within the field.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Top Level View of Computer Function and Interconnection.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
General Concepts of Computer Organization Overview of Microcomputer.
MBG 1 CIS501, Fall 99 Lecture 18: Input/Output (I/O): Buses and Peripherals Michael B. Greenwald Computer Architecture CIS 501 Fall 1999.
EEE440 Computer Architecture
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
ECE 526 – Network Processing Systems Design Computer Architecture: traditional network processing systems implementation Chapter 4: D. E. Comer.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Input/Output Organization III: Commercial Bus Standards CE 140 A1/A2 20 August 2003.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Computer Architecture. Top level of Computer A top level of computer consists of CPU, memory, an I/O components, with one or more modules of each type.
Computer Organization and Architecture + Networks Lecture 6 Input/Output.
Lecture 2. A Computer System for Labs
Interconnection Structures
Department of Computer Science and Engineering
Chapter 6 Input/Output Organization
Computer System Structures
Input/Output and Communication
Operating Systems (CS 340 D)
I/O Memory Interface Topics:
CHAPTER 4 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Chapter 3 Top Level View of Computer Function and Interconnection
COMP2121: Microprocessors and Interfacing
CS703 - Advanced Operating Systems
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Computer Architecture
BIC 10503: COMPUTER ARCHITECTURE
Central Processing Unit
ECEG-3202 Computer Architecture and Organization
Overview of Computer Architecture and Organization
Chapter 2: Data Manipulation
I/O BUSES.
PC Buses & Standards Bus = Pathway across which data can travel. Can be established between two or more computer elements. PC has a hierarchy of different.
Created by Vivi Sahfitri
Overview of Computer Architecture and Organization
Chapter 2: Data Manipulation
William Stallings Computer Organization and Architecture 7th Edition
Chapter 13: I/O Systems.
Chapter 2: Data Manipulation
William Stallings Computer Organization and Architecture
Presentation transcript:

DIRECT MEMORY ACCESS and Computer Buses Tutorial 6 Logic Design

Tutorial Contents 1. Concepts 2. Measurement 3. Operation

Concepts

Concepts A bus is a collection of wires and connectors through which the data is transmitted. Bus = address bus + data bus Data bus: transfers actual data. Address bus: transfers information about data and where it should go. כל מה שצריך לתקשורת הוא מה שרשום בשקף , מה שנחשב אצלינו כבס זה הכתובת והמידע – וכך גם מחשבים את הרוחב שלו

Concepts (cont.) Bus protocol: rules determining the format and transmission of data through bus. Parallel bus: data is transmitted in parallel. Advantage: fast Disadvantage: high cost for long distance transmission, interference between lines at high frequency. Serial bus: data is transmitted in serial. Advantage: low cost for long distance transmission, no interference. Disadvantage: slow Bus master: The device controls bus. Other devices are slaves. בס מקבילי - זה בס עם הרבה חוטים – לדוגמא בס בין המחשב לזכרון שנועד להעביר כמויות גדולתו של מידע כל הזמן . כל אחד מקבל את כל החוטים לאיזשהו פר זמן מסויים לפי הפרוטוקול. חסרון – החוטים יכולים להשפיע אחד על השני ( יוצרים קיבול בניהם ) ועלות לזה שיש יותר חוטים .

Measurement Bus width: indicates the number of wires in the bus for transferring data. Bus bandwidth: refers to the total amount of data that can theoretically be transferred on the bus in a given unit of time. Bandwidth שקול לתפוקה חוץ מזה שמתייחסים לאיבר הראשון והאחרון .

Width and Bandwidth of Some Typical Buses Width (bit) Bandwidth (MB/s) 16-bit ISA 16 15.9 EISA 32 31.8 VLB 127.2 PCI 64-bit PCI 2.1 (66 MHz) 64 508.6 AGP 8x 2,133 USB 2 1 Slow-Speed: 1.5 Mbit/s Full-Speed: 12 Mbit/s Hi-Speed: 480 Mbit/s Firewire 400 400 Mbit/s PCI-Express 16x version 2 8,000 בסים ישנים – אבל זה מציג רוחב ומהירות וזה הרעיון של השקף

Synchronous Bus vs. Asynchronouse Bus A bus can be classified as one of two type: synchronous and asynchronous. Synchronous bus: there is a common clock that synchronizes bus operations. Asynchronous bus: there is no common clock. Bus master and slaves have to “handshake” during transmission process. בבס אסינכרוני יש שעונים שונים , בשביל שכמה חלקים ידברו הם צריכים איזשהו מנגנון אינטרפט – מנגנון הנדשיק, ואז הם מסנכרנים את השעונים שלהם .

A simple bus Wires: Uni-directional or bi-directional One line may represent multiple wires Bus Set of wires with a single function Address bus, data bus Or, entire collection of wires Address, data and control Associated protocol: rules for communication bus structure Processor Memory rd'/wr enable addr[0-11] data[0-7] bus

Timing Diagrams Most common method for describing a communication protocol Protocol may have subprotocols Called bus cycle, e.g., read and write Each may be several clock cycles Read example rd’/wr set low, address placed on addr for at least tsetup time before enable asserted, enable triggers memory to place data on data wires by time tread rd'/wr enable addr data tsetup tread read protocol הדוגמא הזו אנחנו מראים קריאה מהבס . הכתובת צריכה להיות מוכנה לפני ( t setup ) שהאיניבל עולה ( ואומר תתחיל לקרוא ) T read זה הדילי בין הבקשה לקריאה עד שהרכיב השני ( סליב ) עונה לו

Bridge-based bus architectures System includes a lot of buses which are segregated by bridges. Advantage: buses can simultaneously operate. Intel architecture: segregated מופרדים Nothbridge מדבר עם הזכרונות Southbridge מדבר עם ה פריפרילים שזה ה USB וכו היתרון שחילקנו לכמה ברידגים היא שאפשר לעשות דברים במקביל ( לדבר עם הזכרון והריב פריפריאלי במקביל) זה הצורה שאינטל עובדת , כל חברה יכולה לעשות אחרת

Internal Communication Methodologies Programmed I/O (polling) Interrupt-drive I/O Direct Memory Access (DMA) Dma עובד ב interrupt

Programmed I/O (polling) CPU polls each device to see if it needs servicing. Drawback: The CPU wastes time for polling devices (busy-wait.)

Interrupt-Drive I/O (PIO) Device requests service through a special interrupt request line that goes directly to the CPU. No busy-wait. More efficient than PIO.

Direct Memory Access (DMA) Devices transfer data directly to and from memory bypasses the CPU. Very efficient mode. CPU is free to do other operations. ה DMA מעביר את המידע מהדיסק ל CPU ( לדוגמא ל CPU ה DMAיכול להעביר מכל מקום לכל מקום ) וכך ה CPU חופשי להמשיך לעשות דברים אחרים ולא להיתקע על להביא זיכרון לא צריך את ה CPU בשביל להעביר מידע מהדיסק לזכון

Direct Memory Access (DMA) Why is DMA an improvement over CPU programmed I/O? DMA is a mechanism that provides a device controller the ability to transfer data directly to or from the memory without involving the processor. This allows the CPU to perform arithmetic and other instructions while the DMA is going on in parallel ה CPU הוא לא המתווך והוא לא ירבל אינטרפט בשביל להעביר מהדיסק לממורי – אבל הואר כן יקבל אינטרפט ברגע שהמידע יועבר לזכרון

Direct Memory Access (DMA) When would DMA transfer be a poor choice? DMA is not useful when the amount of data to transferred between memory and the I/O device is negligible. In this case the overhead of setting up the DMA transfer would outweigh the benefits of direct data transfer without the interference of the processor.

Programmed I/O modes in the ATA interface Performance Example Programmed I/O modes in the ATA interface Mode Maximum transfer rate (MB/s) mode 0 3.3 mode 1 5.2 mode 2 8.3 mode 3 11.1 mode 4 16.7 mode 5 20 mode 6 25 בין הדיסק ללוח אם

DMA modes in the ATA interface Performance Example DMA modes in the ATA interface Modes Maximum transfer rate (MB/s) Multi-word DMA 1 13.3 Multi-word DMA 2 16.6 Ultra DMA 0 16.7 Ultra DMA 1 25.0 Ultra DMA 2 33.3 Ultra DMA 3 44.4 Ultra DMA 4 66.7 Ultra DMA 5 100 Ultra DMA 6 133 המטרה של השקף הקודם ולזה הוא שהקצבים עם DMA ואותו ברזלים משפר מאוד את המהירות

Direct Memory Access (DMA) ה CPU פה הוא לא מתווך בין הזכרון לחומרה אחרת

In conclusion Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU’s execution load. Q : How does the CPU interface with the device to coordinate the transfer? A : All devices have special hardware controllers. The device controllers have registers, counters and buffers to store arguments and results. The CPU first loads them, and then the device controller takes over. ל CPU יש רגיססטרים מיועדים בשביל לבצע העברה ל DMA. ואז הממורי רונטרולר ( DMA) קורא אותם ועושה את העברה . זה בעצם הדרך של ה CPU לומר ל DMA איזה מידע להעביר ( כתובת וגודל וממי )

In conclusion Q : How does the CPU know when the memory operations are complete? A : The device controller sends an interrupt to the CPU