1. Trang chủ
  2. » Công Nghệ Thông Tin

Các thiết bị vào ra (Bài giảng Kiến trúc máy tính)

33 20 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 33
Dung lượng 1,65 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 4Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 4... Computer Architecture –Department

Trang 2

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 2

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 2

 Interrupt driven I/O

 Direct Memory Access – DMA

 Kênh vào/ra & CPU

4 Interfacing

Trang 3

1 Quản lý vào/ra (I/O)

 Khối lượng khác nhau

 Tốc độ khác nhau

 Định dạng khác nhau

nhiều so với CPU và MM

Trang 4

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 4

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 4

Trang 5

2 Chức năng của I/O Module

Trang 6

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 6

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 6

Quy trình hoạt động mô đun I/O

đun I/O

4 Mô đun I/O lấy dữ liệu từ thiết bị

như DMA, etc.

Trang 7

Sơ đố khối I/O

Trang 8

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 8

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 8

3 Kỹ thuật kiểm soát vào/ra

Trang 9

i Programmed I/O

tiếp các thiết bị ngoại vi

 Phát hiện thay đổi (sensing

status)

 Gửi các lệnh read/write

 Truyền dữ liệu

tác  lãng phí tài nguyên

Các bước thực hiện

 CPU requests I/O operation

 I/O module performs operation

 I/O module sets status bits

 CPU checks status bits periodically

 I/O module does not inform CPU directly

 I/O module does not interrupt CPU

 CPU may wait or come back later

Trang 10

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 10

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 10

I/O Commands

 Xác định bộ vào/ra (& thiết bị nếu >1 mỗi bộ)

 Control : yêu cầu module thực hiện thao tác

 Ví dụ: quay đĩa, di chuyển đầu từ, …

 Test – kiểm tra trạng thái thiết bị

 Ví dụ: đã được cung cấp nguồn? Có lỗi hay không?

 Read/Write

 Module truyền dữ liệu sử dụng buffer từ/đến thiết bị

Trang 11

Đánh địa chỉ với các thiết bị I/O

việc truy cập bộ nhớ chính (CPU viewpoint)

 I/O được ánh xạ vào MM: các thiết bị có địa chỉ nằm trong không

gian địa chỉ của MM

 Các thao tác với I/O tương tự như đọc/ghi bộ nhớ,

 Không cần lệnh đặc biệt

 I/O độc lập so với MM: các thiết bị có địa chỉ độc lập so với không

gian địa chỉ MM

 Cần cơ chế liên kết riêng cho I/O

 Cần có lệnh riêng thao tác với I/O

Trang 12

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 12

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 12

Minh hoạ

Trang 13

ii Interrupt Driven I/O

Các bước thực hiện

whilst CPU does other work

Trang 14

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 14

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 14

Sơ đồ xử lý ngắt

Trang 15

Thay đổi trong MM và Registers khi

xử lý ngắt

Trang 16

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 16

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 16

Vấn đề cần quan tâm

Trang 17

Xác định module ngắt

ngắt mỗi khi CPU nhận được yêu cầu ngắt

được truyền lần lượt các thiết bị cho đến khi đến được thiết bị yêu cầu

Trang 18

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 18

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 18

Đa ngắt

(priority), đường ngắt có độ ưu tiên cao hơn có thể ngắt

Trang 19

iii Direct Memory Access

thiệp” của CPU

 Tốc độ truyền giữa các thiết bị sẽ bị giới hạn

 CPU có thể bị quá tải

điểm nêu trên khi truyền khối lượng dữ liệu lớn

 Sử dụng thêm module (hardware) DMA Controller

 DMA controller giữ vai trò điều phối vào/ra

Trang 20

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 20

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 20

Sơ đồ bộ DMA điển hình

Trang 21

Quy trình hoạt động

 Read/Write

 Device address

 Starting address of memory block for data

 Amount of data to be transferred

Trang 22

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 22

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 22

DMA truyền với kỹ thuật Cycle Stealing

data bus để truyền dữ liệu (one word/cycle)

Trang 23

Cấu hình DMA

Trang 24

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 24

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 24

Ví dụ: Intel 8237A DMA Controller

Trang 25

iv I/O Channels

 VD: Card đồ hoạ (GPU), …

truyền dữ liệu

Trang 26

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 26

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 26

Kiến trúc kênh vào/ra

Trang 28

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 28

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 28

Trang 29

FireWire Configuration

 Really 64 of which one is the interface itself

Trang 30

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 30

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 30

Simple FireWire Configuration

Trang 31

FireWire 3 Layer Stack

Trang 32

Computer Architecture –Department of Information Systems @ Hoá NGUYEN 32

Computer Architecture – Department of Information Systems @ NGUYỄN Ngọc Hoá 32

FireWire Subactions

Trang 33

Kết luận

giới bên ngoài

I/O và DMA

chuẩn: Firewire 1394, USB, …

Ngày đăng: 26/10/2021, 08:51

HÌNH ẢNH LIÊN QUAN

Sơ đồ bộ DMA điển hình - Các thiết bị vào ra (Bài giảng Kiến trúc máy tính)
Sơ đồ b ộ DMA điển hình (Trang 20)
Cấu hình DMA - Các thiết bị vào ra (Bài giảng Kiến trúc máy tính)
u hình DMA (Trang 23)

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

🧩 Sản phẩm bạn có thể quan tâm