9 Bộ dòng dữ liệu – datapaths unit • Bộ số học luận lý arithmetic logic unit... • Định nghĩa các trạng thái điều khiển hỗ trợ tập lệnh• Xây dựng FSM sinh ra tín hiệu điều khiển... ASM A
Trang 3 Hệ thống thông tin liên lạc, xử lý tín hiệu,…
Máy tuần được phân loại và phân hoạch
Trang 49 Bộ dòng dữ liệu – datapaths unit
• Bộ số học luận lý (arithmetic logic unit
Trang 6• Định nghĩa các trạng thái điều khiển hỗ trợ tập lệnh
• Xây dựng FSM sinh
ra tín hiệu điều khiển
Trang 9puter
Trang 10ASM ASMD cho bộ dòng dữ liệu được
điều khiển bởi máy trạng thái
Trang 11puter
Trang 13puter
Trang 14• RISC: Reduced instruction-set computers
Tập lệnh đơn giản
Số chu kỳ clock cho mỗi lệnh là nhỏ
Trang 16 Cập nhật thanh ghi lệnh (IR)
Cập nhật thanh ghi địa chỉ (ADD_R)
Cập nhật bộ nhớ
Điều khiển dòng dữ liệu
Trang 179 Bộ điều khiển – Controller (1)
• Chức năng bộ điều khiển
Định thời tất cả các hoạt động
Lựa chọn đường dữ liệu từ các bộ multiplexer
Giám sát trạng thái của bộ xử lý (Processing Unit) và quyết định giá trị tín hiệu điều khiển
Điều khiển các bus 3 trạng thái
Trang 18R2, and R3 to drive Bus_1
drive Bus_2
Trang 20AND NOT SUB
dest <= src && dest dest <= ~src dest <= dest - src
HALT 1111 ?? ?? Halts execution until reset
* Lệnh dài, ? Don’t care
Trang 21 fetch : lấy 1 lệnh từ bộ nhớ (2 chu kỳ clock)
decode : giải mã lệnh, tính toán dòng dữ liệu
và load giá trị vào thanh ghi (1 chu kỳ clock)
execute : sinh ra kết quả câu lệnh (0, 1, 2 chu
kỳ clock)
Trang 229 Các trạng thái của controller (1)
S_idle State entered after reset is asserted No action.
S_fet1 Load the Add_R with the contents of the PC
S_fet2 Load the IR with the word addressed by the Add_R,
Increment the PC
S_dec Decode the IR
Assert signals to control datapaths and register transfers.
S_ex1 Execute the ALU operation for a single-byte instruction,
Conditionally assert the zero flag, Load the destination register
S_rd1 Load Add_R with the second byte of an RD instruction
Increment the PC.
S_rd2 Load the destination register with memory[Add_R]
S_wr1 Load Add_R with the second byte of a WR instruction,
Increment the PC.
S_wr2 Write memory[Add_R] with the source register
S_br1 Load Add_R with the second byte of a BR instruction
Increment the PC.
S_br2 Load the PC with the memory[Add_R]
S_halt Default state to trap failure to decode a valid instruction
Trang 259 Controller ASM: RD
Trang 279 Controller ASM: BR/BRZ