SlideShare a Scribd company logo
1
Layers of Computer Science,
ISA and uArch
Alexander Titov
20 September 2014
2
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
What is this course about?
• The shortest answer is about Computer Architecture
• Computer architecture is the design of the abstraction
layers that allow us to implement information processing
applications efficiently using available manufacturing
technologies
• Ok… but what is it?
Application
Physics
Decision: create many layers
with standardized interfaces
Issue: the gap is too large
to cross it over in one step
3
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Layer 1: Application
The general tasks: money accounting, text editing,
music/video encoding, games, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
4
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Layer 2: Algorithms
High-level math methods to perform the task: quick sort,
search in graphs, fractal compression, signal encoding, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
5
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Level 3: Program Language
Representation of algorithms in formal languages that can
be translated to “machine language”: C++, Java, Python,
SQL, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
6
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Level 4: Operating System
Manage computer resources and provides common interface
for user programs: Unix, Window, iOS, Android, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
7
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Level 5: Instruction Set Architecture (ISA)
Definition of “machine language” (commands) and available
hardware structures/mechanisms: MIPS, x86, ARM,
POWER, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
8
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Level 6: Microarchitecture
High-level definition of hardware structures and operations:
caches, buses, registers, pipeline, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
9
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Level 7: Gates/RTL
Detailed definition of hardware: floor plan, wires, signal
distribution, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
10
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Level 8: Circuits
Structure and operation of base hardware elements:
transistors, electricity effects (current, voltage, capacity, etc.)
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
11
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Level 9: Physics
Low level physics effects: material structure, diffusion of
electrons, semiconductors, etc.
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer (RTL)
Circuits
Physics
12
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Layers of Abstraction
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer Level (RTL)
Circuits
Physics
Hardware
(HW)
Software
(SW)
Application
Algorithms
Programming Language
Operating System
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer Level (RTL)
Circuits
Physics
Interface
between HW
and SW
13
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Course focus
We will focus our attention mostly on the microarchitecture,
but also look through the ISA and the HW levels
Instruction Set Architecture
Microarchitecture
Gates/Register-Transfer Level (RTL)
Circuits
Physics
The most
focus is here
14
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
ISA and uArch
• Instruction Set Architecture (ISA) is a precise definition of
computer instructions, features and mechanism
(procedures, interrupt/exception handler, etc.) and also
some structures (registers, memory, etc.)
• It can be thought as an agreement between a programmer
and an engineer:
• It’s all programmer needs to program machine.
• It’s all hardware designer needs to design machine.
• Microarchitecture (uArch, implementation) is an
organization and features of Hardware that executes
instructions and support features defined in the ISA.
15
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
ISA and uArch
• What a typical ISA defines
• Data Formats. (Integer, Floating Point, Vector/Packed)
• Instructions. (Operations, encoding, etc.)
• Registers and Memory Organization.
• Interrupts, exceptions, and traps.
• Implementation-Dependent Features. (Memory control, custom
features.)
• What a typical uArch defines (not included into ISA)
• Memory hierarchy organization (caches, buses, etc.)
• Pipeline (forwarding, branch prediction, etc.)
• Out-of-order executions … and many others.
the programmer-visible state
they change the state
16
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Example: MIPS
• An example of a RISC processor.
• Designed for easy programming and implementation.
• Short and simple, but fast instructions → programs are larger than others,
but run faster.
• The main aim was to take advantages of pipelined execution
• Pipeline was not specified in ISA, but ISA developers tried to simplify its
implementation in uArch.
• Implementations:
• The first one is R2000 (1986)
• Later: R3000A (PlayStation), R4000 (PSP), R5900 (PlayStation 2), etc.
• Currently it is widely used in embedded systems.
• One moment MIPS seemed to be overcome Intel IA-32, but it didn’t
happen because Intel’s uArch was significantly better and could
compensate the drawback of IA-32.
17
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Data Formats
• In the memory all including data and program code is
presented as binary numbers:
• Data representation:
• Sizes: 8-b Bytes, 16-b Half words, 32-b words and 64-b double
words (not considered in this course)
• Formats: signed/unsigned integer, signed/unsigned floating point
(not considered in this course)
0000 0010 | 0011 0010 | 0100 0000 | 0010 0000
add $t0, $s1, $s20x2012620
18
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Memory addressing
• Memory (MEM) is a concept of a storage for programs and their
data
• It is a part of programmer-visible machine state (fully controlled by a
programmer)
• It can be though as an linear array of Bytes.
• Data can be read or written into this storage using an index which is
called memory address.
• The size of the memory is equal to 2 𝑁 Bytes, where N is the maximal
number of bits that can be encoded in a memory address.
• Usually, there is no separate memory for code or data. They are
stored together in the same space.
00100100 … … … … ……
8 bits = 1 Byte
0 1 2 2 𝑁−2 2 𝑁−1 2 𝑁
19
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Big and Little Endian
• Historically numbers are being written from the right to the left
(the most significant digit is on the right):
• However, we used to enumerate elements in an array (and
most other things) from the left to the right:
• The question: if we put an value of two bytes (e.g. 256) at the
beginning of the array where the most significant byte will be?
In element 0 or element 1?
Decimal 537 = 7*100
+ 3*101
+ 5*102
Binary 1101 = 1*20
+ 0*21
+ 1*22
+ 1*23
… … … … … ……
0 1 2 2 𝑁−2 2 𝑁−1 2 𝑁
Decimal 537 = 7*100
+ 3*101
+ 5*102
Binary 1101 = 1*20
+ 0*21
+ 1*22
+ 1*23
20
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Big and Little Endian
• The answer: it depends on the ending which is defined in the
ISA.
Decimal 256 = Binary 0000 0001 | 0000 0000
Bib Endian Little Endian
15 8 7 0
Decimal 256 = Binary 0000 0001 | 0000 0000Decimal 256 = Binary 0000 0001 | 0000 0000
Most significant
byte
Least significant
byte
0 1 2
00000001 00000000
7 015 8
0 1 2
00000000 10000000
150 87
• The ISA of our host machines in the lab (x86) and MIPS ISA
that we will simulate both assume Little Endian
21
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Registers
• Registers is fast, but small (vs. memory) storage for data
• A great amount of registers are included into programmer-visible
machine state (fully controlled by a programmer):
• Program counter (PC) stores the address of the currently executed
instruction
• General Purpose Registers (GPR) is used to store intermediate
calculations.
• There are many examples of other registers (Flags, Control Registers,
etc.)
• The GPR can be thought as an array of elements indexed by
numbers of registers encoded in instructions.
• In general, the maximum number of the GRP is equal to 2 𝑁, where N
is the maximal number of bits that can be encoded in a instruction as
a register number.
22
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Operations
Common types:
• Set a register to constant value or value of other register (move operation).
• Loads (memory → register ) & stores (register ← memory)
• Read and write data from hardware devices (I/O) – not used in our project
• Arithmetic and Logic:
• +, -, *, /, =. . .
• And, Or, Xor, Not
• Compare two values of registers
• Control flow (taking decision: loops, if-else)
• branch to another location (set new value into PC)
• conditionally branch (if (condition) then PC new value)
• save current location and jump to new location (Procedure call)
23
Intel Laboratory at Moscow Institute of Physics and
Technology
MIPT-MIPS 2014 Project
Acknowledgements
These slides contain material developed and copyright by:
• Krste Asanovic (MIT/UCB), CS152-L1
• David M. Koppelman (LSU), EE4720-L1
Thank You
24
Layers of Computer Science, ISA and uArch Alexander Titov 20 September 2014.

More Related Content

What's hot

Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
Zakaria Gomaa
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
PreethiSureshkumar1
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
Hossam Adel
 
multiprocessors and multicomputers
 multiprocessors and multicomputers multiprocessors and multicomputers
multiprocessors and multicomputers
Pankaj Kumar Jain
 
Computer organization
Computer organizationComputer organization
Computer organization
ishapadhy
 
Cache memory
Cache memoryCache memory
Cache memory
George Thomas
 
Locking in Linux Traffic Control subsystem
Locking in Linux Traffic Control subsystemLocking in Linux Traffic Control subsystem
Locking in Linux Traffic Control subsystem
Cong Wang
 
Introduction to NVMe Over Fabrics-V3R
Introduction to NVMe Over Fabrics-V3RIntroduction to NVMe Over Fabrics-V3R
Introduction to NVMe Over Fabrics-V3R
Simon Huang
 
Computer Organization and Design
Computer Organization and DesignComputer Organization and Design
Computer Organization and Design
Ra'Fat Al-Msie'deen
 
Arm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_modelArm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_model
Ganesh Naik
 
Processors used in System on chip
Processors used in System on chip Processors used in System on chip
Processors used in System on chip
A B Shinde
 
01 nand flash_reliability_notes
01 nand flash_reliability_notes01 nand flash_reliability_notes
01 nand flash_reliability_notes
swethamg18
 
Modular by Design: Supermicro’s New Standards-Based Universal GPU Server
Modular by Design: Supermicro’s New Standards-Based Universal GPU ServerModular by Design: Supermicro’s New Standards-Based Universal GPU Server
Modular by Design: Supermicro’s New Standards-Based Universal GPU Server
Rebekah Rodriguez
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
Anuj Modi
 
Arm: Enabling CXL devices within the Data Center with Arm Solutions
Arm: Enabling CXL devices within the Data Center with Arm SolutionsArm: Enabling CXL devices within the Data Center with Arm Solutions
Arm: Enabling CXL devices within the Data Center with Arm Solutions
Memory Fabric Forum
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
Dr. Balaji Ganesh Rajagopal
 
operating system question bank
operating system question bankoperating system question bank
operating system question bank
rajatdeep kaur
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
George Thomas
 
System on Chip (SoC)
System on Chip (SoC)System on Chip (SoC)
System on Chip (SoC)
Dimas Ruliandi
 
Arm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberArm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furber
asodariyabhavesh
 

What's hot (20)

Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
ARM architcture
ARM architcture ARM architcture
ARM architcture
 
multiprocessors and multicomputers
 multiprocessors and multicomputers multiprocessors and multicomputers
multiprocessors and multicomputers
 
Computer organization
Computer organizationComputer organization
Computer organization
 
Cache memory
Cache memoryCache memory
Cache memory
 
Locking in Linux Traffic Control subsystem
Locking in Linux Traffic Control subsystemLocking in Linux Traffic Control subsystem
Locking in Linux Traffic Control subsystem
 
Introduction to NVMe Over Fabrics-V3R
Introduction to NVMe Over Fabrics-V3RIntroduction to NVMe Over Fabrics-V3R
Introduction to NVMe Over Fabrics-V3R
 
Computer Organization and Design
Computer Organization and DesignComputer Organization and Design
Computer Organization and Design
 
Arm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_modelArm cm3 architecture_and_programmer_model
Arm cm3 architecture_and_programmer_model
 
Processors used in System on chip
Processors used in System on chip Processors used in System on chip
Processors used in System on chip
 
01 nand flash_reliability_notes
01 nand flash_reliability_notes01 nand flash_reliability_notes
01 nand flash_reliability_notes
 
Modular by Design: Supermicro’s New Standards-Based Universal GPU Server
Modular by Design: Supermicro’s New Standards-Based Universal GPU ServerModular by Design: Supermicro’s New Standards-Based Universal GPU Server
Modular by Design: Supermicro’s New Standards-Based Universal GPU Server
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Arm: Enabling CXL devices within the Data Center with Arm Solutions
Arm: Enabling CXL devices within the Data Center with Arm SolutionsArm: Enabling CXL devices within the Data Center with Arm Solutions
Arm: Enabling CXL devices within the Data Center with Arm Solutions
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
 
operating system question bank
operating system question bankoperating system question bank
operating system question bank
 
The Intel 8086 microprocessor
The Intel 8086 microprocessorThe Intel 8086 microprocessor
The Intel 8086 microprocessor
 
System on Chip (SoC)
System on Chip (SoC)System on Chip (SoC)
System on Chip (SoC)
 
Arm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furberArm architecture chapter2_steve_furber
Arm architecture chapter2_steve_furber
 

Similar to Layers of Computer Science, ISA and uArch Alexander Titov 20 September 2014.

Gourp 12 Report.pptx
Gourp 12 Report.pptxGourp 12 Report.pptx
Gourp 12 Report.pptx
ShubhamMane733576
 
Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA Implementation
Amber Bhaumik
 
Unit I_MT2301.pdf
Unit I_MT2301.pdfUnit I_MT2301.pdf
Unit I_MT2301.pdf
Kannan Kanagaraj
 
1st slide VLSI.pdf
1st slide VLSI.pdf1st slide VLSI.pdf
1st slide VLSI.pdf
misbahmridul
 
MergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxMergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptx
bhaveshagrawal35
 
Basic Structure of a Computer System
Basic Structure of a Computer SystemBasic Structure of a Computer System
Basic Structure of a Computer System
Amirthavalli Senthil
 
CE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdfCE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdf
AdelAbougdera
 
Fpga asic technologies_flow
Fpga asic technologies_flowFpga asic technologies_flow
Fpga asic technologies_flow
ravi4all
 
Microcontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basicsMicrocontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basics
Nilesh Bhaskarrao Bahadure
 
System on Chip Design and Modelling Dr. David J Greaves
System on Chip Design and Modelling   Dr. David J GreavesSystem on Chip Design and Modelling   Dr. David J Greaves
System on Chip Design and Modelling Dr. David J Greaves
Satya Harish
 
Risc cisc Difference
Risc cisc DifferenceRisc cisc Difference
Risc cisc Difference
Sehrish Asif
 
Digital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) DesignDigital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) Design
Mahesh Dananjaya
 
mICROPROCESSOR UNIT 1 ALL.pptx.pdf
mICROPROCESSOR UNIT 1 ALL.pptx.pdfmICROPROCESSOR UNIT 1 ALL.pptx.pdf
mICROPROCESSOR UNIT 1 ALL.pptx.pdf
nofakeNews
 
mICROPROCESSOR UNIT 1 ALL.pptx
mICROPROCESSOR UNIT 1 ALL.pptxmICROPROCESSOR UNIT 1 ALL.pptx
mICROPROCESSOR UNIT 1 ALL.pptx
nofakeNews
 
unit 1vlsi notes.pdf
unit 1vlsi notes.pdfunit 1vlsi notes.pdf
unit 1vlsi notes.pdf
AcademicICECE
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processor
ShubhamMishra485
 
Digital_system_design_A (1).ppt
Digital_system_design_A (1).pptDigital_system_design_A (1).ppt
Digital_system_design_A (1).ppt
BUCHUPALLIVIMALAREDD2
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
AJAL A J
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
Pratik Gohel
 
COA.pptx
COA.pptxCOA.pptx

Similar to Layers of Computer Science, ISA and uArch Alexander Titov 20 September 2014. (20)

Gourp 12 Report.pptx
Gourp 12 Report.pptxGourp 12 Report.pptx
Gourp 12 Report.pptx
 
Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA Implementation
 
Unit I_MT2301.pdf
Unit I_MT2301.pdfUnit I_MT2301.pdf
Unit I_MT2301.pdf
 
1st slide VLSI.pdf
1st slide VLSI.pdf1st slide VLSI.pdf
1st slide VLSI.pdf
 
MergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptxMergeResult_2023_04_02_05_26_56.pptx
MergeResult_2023_04_02_05_26_56.pptx
 
Basic Structure of a Computer System
Basic Structure of a Computer SystemBasic Structure of a Computer System
Basic Structure of a Computer System
 
CE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdfCE412 -advanced computer Architecture lecture 1.pdf
CE412 -advanced computer Architecture lecture 1.pdf
 
Fpga asic technologies_flow
Fpga asic technologies_flowFpga asic technologies_flow
Fpga asic technologies_flow
 
Microcontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basicsMicrocontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basics
 
System on Chip Design and Modelling Dr. David J Greaves
System on Chip Design and Modelling   Dr. David J GreavesSystem on Chip Design and Modelling   Dr. David J Greaves
System on Chip Design and Modelling Dr. David J Greaves
 
Risc cisc Difference
Risc cisc DifferenceRisc cisc Difference
Risc cisc Difference
 
Digital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) DesignDigital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) Design
 
mICROPROCESSOR UNIT 1 ALL.pptx.pdf
mICROPROCESSOR UNIT 1 ALL.pptx.pdfmICROPROCESSOR UNIT 1 ALL.pptx.pdf
mICROPROCESSOR UNIT 1 ALL.pptx.pdf
 
mICROPROCESSOR UNIT 1 ALL.pptx
mICROPROCESSOR UNIT 1 ALL.pptxmICROPROCESSOR UNIT 1 ALL.pptx
mICROPROCESSOR UNIT 1 ALL.pptx
 
unit 1vlsi notes.pdf
unit 1vlsi notes.pdfunit 1vlsi notes.pdf
unit 1vlsi notes.pdf
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processor
 
Digital_system_design_A (1).ppt
Digital_system_design_A (1).pptDigital_system_design_A (1).ppt
Digital_system_design_A (1).ppt
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system Design
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptx
 
COA.pptx
COA.pptxCOA.pptx
COA.pptx
 

Recently uploaded

AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 

Recently uploaded (20)

AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 

Layers of Computer Science, ISA and uArch Alexander Titov 20 September 2014.

  • 1. 1 Layers of Computer Science, ISA and uArch Alexander Titov 20 September 2014
  • 2. 2 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project What is this course about? • The shortest answer is about Computer Architecture • Computer architecture is the design of the abstraction layers that allow us to implement information processing applications efficiently using available manufacturing technologies • Ok… but what is it? Application Physics Decision: create many layers with standardized interfaces Issue: the gap is too large to cross it over in one step
  • 3. 3 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Layer 1: Application The general tasks: money accounting, text editing, music/video encoding, games, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 4. 4 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Layer 2: Algorithms High-level math methods to perform the task: quick sort, search in graphs, fractal compression, signal encoding, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 5. 5 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Level 3: Program Language Representation of algorithms in formal languages that can be translated to “machine language”: C++, Java, Python, SQL, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 6. 6 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Level 4: Operating System Manage computer resources and provides common interface for user programs: Unix, Window, iOS, Android, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 7. 7 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Level 5: Instruction Set Architecture (ISA) Definition of “machine language” (commands) and available hardware structures/mechanisms: MIPS, x86, ARM, POWER, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 8. 8 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Level 6: Microarchitecture High-level definition of hardware structures and operations: caches, buses, registers, pipeline, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 9. 9 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Level 7: Gates/RTL Detailed definition of hardware: floor plan, wires, signal distribution, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 10. 10 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Level 8: Circuits Structure and operation of base hardware elements: transistors, electricity effects (current, voltage, capacity, etc.) Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 11. 11 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Level 9: Physics Low level physics effects: material structure, diffusion of electrons, semiconductors, etc. Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer (RTL) Circuits Physics
  • 12. 12 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Layers of Abstraction Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer Level (RTL) Circuits Physics Hardware (HW) Software (SW) Application Algorithms Programming Language Operating System Instruction Set Architecture Microarchitecture Gates/Register-Transfer Level (RTL) Circuits Physics Interface between HW and SW
  • 13. 13 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Course focus We will focus our attention mostly on the microarchitecture, but also look through the ISA and the HW levels Instruction Set Architecture Microarchitecture Gates/Register-Transfer Level (RTL) Circuits Physics The most focus is here
  • 14. 14 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project ISA and uArch • Instruction Set Architecture (ISA) is a precise definition of computer instructions, features and mechanism (procedures, interrupt/exception handler, etc.) and also some structures (registers, memory, etc.) • It can be thought as an agreement between a programmer and an engineer: • It’s all programmer needs to program machine. • It’s all hardware designer needs to design machine. • Microarchitecture (uArch, implementation) is an organization and features of Hardware that executes instructions and support features defined in the ISA.
  • 15. 15 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project ISA and uArch • What a typical ISA defines • Data Formats. (Integer, Floating Point, Vector/Packed) • Instructions. (Operations, encoding, etc.) • Registers and Memory Organization. • Interrupts, exceptions, and traps. • Implementation-Dependent Features. (Memory control, custom features.) • What a typical uArch defines (not included into ISA) • Memory hierarchy organization (caches, buses, etc.) • Pipeline (forwarding, branch prediction, etc.) • Out-of-order executions … and many others. the programmer-visible state they change the state
  • 16. 16 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Example: MIPS • An example of a RISC processor. • Designed for easy programming and implementation. • Short and simple, but fast instructions → programs are larger than others, but run faster. • The main aim was to take advantages of pipelined execution • Pipeline was not specified in ISA, but ISA developers tried to simplify its implementation in uArch. • Implementations: • The first one is R2000 (1986) • Later: R3000A (PlayStation), R4000 (PSP), R5900 (PlayStation 2), etc. • Currently it is widely used in embedded systems. • One moment MIPS seemed to be overcome Intel IA-32, but it didn’t happen because Intel’s uArch was significantly better and could compensate the drawback of IA-32.
  • 17. 17 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Data Formats • In the memory all including data and program code is presented as binary numbers: • Data representation: • Sizes: 8-b Bytes, 16-b Half words, 32-b words and 64-b double words (not considered in this course) • Formats: signed/unsigned integer, signed/unsigned floating point (not considered in this course) 0000 0010 | 0011 0010 | 0100 0000 | 0010 0000 add $t0, $s1, $s20x2012620
  • 18. 18 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Memory addressing • Memory (MEM) is a concept of a storage for programs and their data • It is a part of programmer-visible machine state (fully controlled by a programmer) • It can be though as an linear array of Bytes. • Data can be read or written into this storage using an index which is called memory address. • The size of the memory is equal to 2 𝑁 Bytes, where N is the maximal number of bits that can be encoded in a memory address. • Usually, there is no separate memory for code or data. They are stored together in the same space. 00100100 … … … … …… 8 bits = 1 Byte 0 1 2 2 𝑁−2 2 𝑁−1 2 𝑁
  • 19. 19 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Big and Little Endian • Historically numbers are being written from the right to the left (the most significant digit is on the right): • However, we used to enumerate elements in an array (and most other things) from the left to the right: • The question: if we put an value of two bytes (e.g. 256) at the beginning of the array where the most significant byte will be? In element 0 or element 1? Decimal 537 = 7*100 + 3*101 + 5*102 Binary 1101 = 1*20 + 0*21 + 1*22 + 1*23 … … … … … …… 0 1 2 2 𝑁−2 2 𝑁−1 2 𝑁 Decimal 537 = 7*100 + 3*101 + 5*102 Binary 1101 = 1*20 + 0*21 + 1*22 + 1*23
  • 20. 20 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Big and Little Endian • The answer: it depends on the ending which is defined in the ISA. Decimal 256 = Binary 0000 0001 | 0000 0000 Bib Endian Little Endian 15 8 7 0 Decimal 256 = Binary 0000 0001 | 0000 0000Decimal 256 = Binary 0000 0001 | 0000 0000 Most significant byte Least significant byte 0 1 2 00000001 00000000 7 015 8 0 1 2 00000000 10000000 150 87 • The ISA of our host machines in the lab (x86) and MIPS ISA that we will simulate both assume Little Endian
  • 21. 21 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Registers • Registers is fast, but small (vs. memory) storage for data • A great amount of registers are included into programmer-visible machine state (fully controlled by a programmer): • Program counter (PC) stores the address of the currently executed instruction • General Purpose Registers (GPR) is used to store intermediate calculations. • There are many examples of other registers (Flags, Control Registers, etc.) • The GPR can be thought as an array of elements indexed by numbers of registers encoded in instructions. • In general, the maximum number of the GRP is equal to 2 𝑁, where N is the maximal number of bits that can be encoded in a instruction as a register number.
  • 22. 22 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Operations Common types: • Set a register to constant value or value of other register (move operation). • Loads (memory → register ) & stores (register ← memory) • Read and write data from hardware devices (I/O) – not used in our project • Arithmetic and Logic: • +, -, *, /, =. . . • And, Or, Xor, Not • Compare two values of registers • Control flow (taking decision: loops, if-else) • branch to another location (set new value into PC) • conditionally branch (if (condition) then PC new value) • save current location and jump to new location (Procedure call)
  • 23. 23 Intel Laboratory at Moscow Institute of Physics and Technology MIPT-MIPS 2014 Project Acknowledgements These slides contain material developed and copyright by: • Krste Asanovic (MIT/UCB), CS152-L1 • David M. Koppelman (LSU), EE4720-L1