sc6231 (advanced computer architecture) student : abdulle...
TRANSCRIPT
![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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/1.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/2.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/3.jpg)
<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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/4.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/5.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/6.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/7.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/8.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/9.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/10.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/11.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/12.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/13.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/14.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/15.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/16.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/17.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/18.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/19.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/20.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/21.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/22.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/23.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/24.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/25.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/26.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/27.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/28.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/29.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/30.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/31.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/32.jpg)
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](https://reader030.vdocument.in/reader030/viewer/2022040506/5e3e97797f818e3dc220b798/html5/thumbnails/33.jpg)
33
Discussions
Thank you