Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 9 Design of the Computer Instruction Set and the CPU Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.

Similar presentations


Presentation on theme: "Lecture 9 Design of the Computer Instruction Set and the CPU Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU."— Presentation transcript:

1 Lecture 9 Design of the Computer Instruction Set and the CPU Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU

2 Design of the Computer Instructions

3

4

5 Registers/ Addresses Numbers AL000 AH001 BL010 BH011 CL100 CH101 DL110 DH111 MOVEAL, AH ADDBL, CL INCAH JMP 000000, 001 010010, 100 110001, XXX 111XXX, XXX 1.Two address instructions 2.Each address requires three bits 3.Instructions require three bits Total = 3 + 3 + 3 = 9 bit ≈ 2 byte Find the optimum one

6 Example 1 Let you are designing two address instructions for a microprocessor. You have 20 different instructions and your addressable memory is 128 bytes. What will the minimum length of your instructions? ItemBits 20 different Instructions5 128 different memories (1 st )7 128 different memories (2 nd )7 Total19 No of bytes are: 3

7 Example 2 Let you are designing three address instructions for a microprocessor. You have 64 different instructions and your addressable memory is 1MB. What will the minimum length of your instructions? ItemBits 64 different Instructions6 1 MB (1 st, 2 nd, 3 rd )20 x 3 = 60 Total66 No of bytes are: 9

8 Design of the CPU CPU / Microprocessor contains three elements – Registers – The ALU – The Control Unit

9 Register Design General purpose register stores address/data A computer can also execute instructions to perform shift operations We will design a shifter

10 Shifter Design

11 y3y3 y2y2 y1y1 y0y0 __ OE S1S0S1S0 4-input MUX 0 1 2 3 i 3 i 2 i 1 i 0 i -1 i -2 i -3

12 y3y3 y2y2 y1y1 y0y0 __ OE S1S0S1S0 4-input MUX 0 1 2 3 i 3 i 2 i 1 i 0 i -1 i -2 i -3 Alternative Design

13 Design Left Rotator Using Left Shifter

14 0 1 2 3 -1 -2 -3 0 1 2 3 0 1 2 3 -1 -2 -3 0 1 2 3 0 1 2 3 -1 -2 -3 0 1 2 3 0 1 2 3 -1 -2 -3 0 1 2 3 y 15 y 14 y 13 y 12 y 11 y 10 y 9 y 8 y 7 y 6 y 5 y 4 y 3 y 2 y 1 y 0 __ OE S1S0S1S0 X 15 X 14 X 13 X 12 X 11 X 10 X 9 X 8 X 7 X 6 X 5 X 4 X 3 X 2 X 1 X 0

15 References Chapter 7, Fundamental of Digital Logic and Microcomputer Design – by M. Rafiquzzaman


Download ppt "Lecture 9 Design of the Computer Instruction Set and the CPU Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU."

Similar presentations


Ads by Google