33
ISA SC6231 (Advanced Computer Architecture) Student : Abdulle Hassan ID: g6029694 <1>

SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

ISA

SC6231 (Advanced Computer Architecture)

Student : Abdulle Hassan

ID: g6029694

<1>

Page 2: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Agenda

1. Definitions

2. Simulations

3. Discussions

<2>

Page 3: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

<3>

Definitions

ISA:

The portion of the computer visible to the programmers

or compiler writers

Page 4: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

4

ISA Design

Class of architecture:

16-bit processor based ISA

r0 r1

ALU Register ArrayRegister Array CU

GPR 16-bit integer Registers

. . . . . .

r7

Processor

Page 5: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

ISA Design

• This ISA uses sixteen 16-bit General

Purpose Registers (r0 – r7), and two

additional registers of size 32 bit size

registers called ‘rm’ to store the result of

multiplication operation and register ‘re’ to

store the division operation.

<5>

Page 6: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Memory Design

Byte addressable 24-bit Memory design

<6>

23 0

Op code Control bit Operand 1 Operand2

5 bit 1 bit 3 bit 7 bit

The memory design can address up to 16MB

memory location any one time

Page 7: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Memory Design

<7>

The ISA GPR registers are of 16 bit

length.

The designed memory of the

Instruction Set Architecture is of size

24-bit architecture.

Page 8: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Basic Instruction Format

8

Opcode Rs Rd Shamt

5 bit 3 bit 3 bit 5 bit

Opcode address

Opcode Rs Rt immediate

Register-Register

Register-Immediate

Memory reference

5bit 3 bit 3 bit 5 bit

5bit 11 bit

Page 9: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Basic Instruction Format

Operation Encoding

9

OpCode Encoding

Arithmetic Instructions

Add 00010

Add Imm 00011

Sub 00101

Mul 00111

Mul Imm 00111

Div 01000

Div Imm 01001

Data Transfer Instructions

Mov 00001

Page 10: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Op Code Control Bit Operations Addressing Modes

00000 0

MOV

Register Addressing Mode

00001 1 Immediate Addressing Mode

00010 0

ADD

Register Address Mode

00011 1 Immediate Addressing Mode

00101 0

SUB

Register Address Mode

00101 1 Immediate Addressing Mode

00110 0

MUL

Register Address Mode

00111 1 Immediate Addressing Mode

01000 0

DIV

Register Address Mode

01001 1 Immediate Addressing Mode

10

Encoding Instructions

Page 11: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Encoding Summary

MOV

1. Copies an integer value into one of the GPR

2. Copies a register content into another GPR

Example

• MOV r0 r1 (moves r1 contents into r0

• MOV r0 10 (moves constant value10 into r0

11

Page 12: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

ADD

1. Sums two values stored in two GPRs and

store the result into the destination one

2. Sums Constant values and content of GPR

1ans store the result into the Destinations

Example

• ADD r0 r1 // r0 = r0 + r1

• ADD R0 AFH // r0 = r0 + AFH

12

Page 13: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

SUB

Subtracts two values stored in two GPR registers,

Subtracts integer value from a value stored in the

register.

Example

SUB r0 r1 // r0 = r0 + Comp(r1) +1

SUB r0 FA H // r0 = r0 + 05H +1

13

Page 14: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

14

[ 3 7] 2 E

GPR Data

Register file

GPR

Writeback

9 H

1011 1000 0000 0000

1001 0000 0000 0000

Data Output

(Outside World) Input

DataPath

1101 1100 0000 0000

0010

sub r1 46 H

add r1 16 H

rr1 =

Sub

Virtual Processor Unpipelined, ISA Format of I-Type

Assembly Language Machine Language Human Language

Page 15: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Multiple implementations for a

single architecture:

<15>

Page 16: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Multiple implementations for a

single architecture:

• Single-cycle implementation

– A technique in which an instruction is executed in

one clock cycle [1].

<16>

Page 17: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Multiple implementations for a

single architecture:

• Multi-cycle implementation

– A technique in which an instruction is executed in

multiple clock cycles [1, 3].

<17>

Page 18: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Multiple implementations for a

single architecture:

• Pipelining implementation

– A technique that exploits parallelism among the

instructions in a sequential instruction stream [1, 2].

<18>

Page 19: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Single-cycle implementation

Example

Instruction 1 Instruction 2

Instruction 3Instruction 4

X X

XX

Four sample instructions, executed linearly

<19>

Page 20: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Four Pipelined Instructions

IF

IF

IF

IF

ID

ID

ID

ID

EX

EX

EX

EX M

M

M

M

W

W

W

W

5

1

1

1

Pipelined implementationPipelined implementation

ExampleExample

20

Page 21: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Pipeline Hazards

• Data Hazards – an instruction uses the result of the previous

instruction. A hazard occurs exactly when an instruction tries

to read a register in its ID stage that an earlier instruction

intends to write in its WB stage.

• Control Hazards – the location of an instruction depends on

previous instruction

• Structural Hazards – two instructions need to access the same

resource

<21>

Page 22: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Data Hazards

IF

IF

ID

ID EX

EX M

M

WB

WB

ADD R1, R2, R3

SUB R4, R1, R5

Select R2 and R3 for

ALU OperationsADD R2 and R3 STORE SUM IN

R1

Select R1 and R5 for

ALU Operations

<22>

Page 23: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Stalling

• Stalling involves halting the flow of instructions until the

required result is ready to be used. However stalling wastes

processor time by doing nothing while waiting for the result.

23

Page 24: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

IF

IF

ID

ID EX

EX M

M

WB

WB

ADD R1, R2, R3

SUB R4, R1, R5

IF ID EX M WBSTALL

IF ID EX M WBSTALL

IF ID EX M WBSTALL

24

Page 25: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

SIMULATIONS

25

Page 26: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Pipeline Examples

<26>

Page 27: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Pipeline Examples

<27>

Page 28: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Pipeline Examples

<28>

Page 29: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Pipeline Examples

<29>

Page 30: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Pipeline Examples

<30>

Page 31: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

Pipeline Examples

<31>

Page 32: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

References

1. Computer Architecture: A Quantitative Approach, John L. Hennessy and David A. Patterson, Morgan Kaufmann, 20016 ISBN: 9716-161-312-0726-0

2. Computer architecture and implementation (b-ok.org) Harvey G Cragon , Pearson, 2010.

3. Instruction Set Architecture Impact on Design Space Subsetting for Configurable Systems, Mohamad Hammam Alsafrjalani, 2017 IEEE 3rd International Proc. Pp 1-5.

<32>

Page 33: SC6231 (Advanced Computer Architecture) Student : Abdulle ...portal.scitech.au.edu/anilkumar/wp-content/uploads/... · 1. Computer Architecture: A Quantitative Approach, John L. Hennessy

33

Discussions

Thank you