Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Architecture Abhinav Agarwal Veeramani V.

Similar presentations

Presentation on theme: "Computer Architecture Abhinav Agarwal Veeramani V."— Presentation transcript:

1 Computer Architecture Abhinav Agarwal Veeramani V.

2 Outline Introduction of a Microprocessor Microprocessor design objectives and constraints Structure Interface ISA Microprocessor Instructions Number Systems

3 What is a Microprocessor? A circuit of transistors and other electrical components on a chip that can process programs, remember information, or perform calculations. The heart of every CPU Requires programmed input Advantages over a customised digital circuit  Cost  Scalable  Single design – multiple use © Intel Corp.

4 Design objectives Maximize Performance  Speed of operation: How quickly an operation can be completed  Throughput: No of operations completed in unit time, not necessarily the same as speed, consider Servers. Maximize Productivity  Interface provided must be easy Be one step ahead of market needs and two steps ahead of competition

5 Dramatic progress over the years © Intel 4004 Processor  Introduced in 1971  2300 Transistors  108 KHz Clock © Intel P4 Processor  Introduced in 2000  42,000,000 Transistors  1.5 GHz Clock (Initial)

6 Design Constraints Power consumed  Today’s processors consume a peak power of 100 W, which means a peak current of nearly 80A. Area Cost Backward compatibility  Windows running on Intel P3 Processor should run on Intel P4 too. Time taken to design the processor should not be very large or else the competitor may get ahead Other factors like security, scalability, reliability also need to be considered in processor design

7 Microprocessor Markets Desktop  Processor for desktop computers. Cost, backward compatibility are very important. Eg: Intel Pentium, AMD Athlon Servers  Processor for applications requiring huge amount of computation, data handling like web servers, database servers, scientific computation servers. In general, multiple processors are used. Throughput is a very important metric for servers in general. Eg: Google servers, vsnlproxy Embedded  For applications in electronic appliances, robots, cars, mobiles etc. Power consumption, cost are very important metrics. Eg: Microcontrollers like 8051, PIC, specifically designed processors for cars, mobiles etc.

8 Structure The processor is a computing unit which needs to interact with memory for getting instructions as well as data Processor Instruction Memory Data Memory Address (PC) Instruction Address (reg) Data (loads) Data (stores)

9 Internal Structure of the Processor Control Unit  Fetches instructions from memory, Interprets them, Controls ALU ALU  Does all computations Register File  Stores variables Data Address ALU (Calculator) Register File Data Control Unit Instr Control Flags PC Data Out Data In Instr In Inst Address r1 r2 r3 r4

10 Instruction set architecture (ISA) The first step in any processor design would be to decide on an ISA ISA is the interface provided by the architect to the external world  The instructions supported with their opcode (The binary representation of instruction mnemonics)  The width (number of bits) of data, instruction, data address, instruction address  Other information necessary to the compiler like number of registers in the register file etc.

11 Assembly Code High Level Language (Like C, C++, Java) void main () { int a = 22; int b = 42; int c = a + b; } This conversion is done by compiler Assembly language mov r1, 22 // Put the value 22 in R1 mov r2, 42 // Put the value 42 in R2 add r3, r1, r2 // Add the values in R1 & R2 and put result in R3 Destination Source1 Source2

12 Types of Instructions ALU  add, sub, mult, or, and, xor  Operands may be Register-register, Register-memory, memory-memory  Immediate operands (will be discussed later) MEM  load, store  Direct addressed: load r1, 1234H  Register Addressed:load r1, (r2) Control  jmp, branch  Change value of PC to required location

13 Converting Instructions to binary codes Each instruction is encoded into a binary format and stored in the instruction memory. The control unit decodes it and gives appropriate signals to ALU add r1, r2, r3 000111000010001000011 6 bit opcode for the add operation is 000111 Assuming that the register file has 32 registers, each register has a 5 bit code, from r1 to r31, r1 = 00001, r31 = 11111 Thus total length of instruction = 6 + 5*3 = 21 bits This is an example of fixed length encoding scheme.

14 Number Systems Decimal (D) Binary (B)Hexadecimal (H or X) Zero000 Nine910019 Ten101010A Eleven111011B Twelve121100C Thirteen131101D Fourteen141110E Fifteen (Largest 4 bit no.)151111F Forty Two420010 10102A Largest 8 bit no.2551111 FF Largest 16 bit no.655351111 1111 FF

15 References “How Microprocessors work”  lec1-1.ppt Slides 24-28  lec1-2.ppt  lec2-1.ppt

Download ppt "Computer Architecture Abhinav Agarwal Veeramani V."

Similar presentations

Ads by Google