SlideShare a Scribd company logo
1 of 25
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

Memory map
Memory mapMemory map
Memory mapaviban
 
02 Computer Evolution And Performance
02  Computer  Evolution And  Performance02  Computer  Evolution And  Performance
02 Computer Evolution And PerformanceJeanie Delos Arcos
 
Memory Segmentation of 8086
Memory Segmentation of 8086Memory Segmentation of 8086
Memory Segmentation of 8086Nikhil Kumar
 
Memory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureMemory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureShweta Ghate
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersSanjeev Patel
 
01 intel processor architecture core
01 intel processor architecture core01 intel processor architecture core
01 intel processor architecture coresssuhas
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionCésar de Souza
 
Types of Memory, ram, rom and storage
Types of Memory, ram, rom and storageTypes of Memory, ram, rom and storage
Types of Memory, ram, rom and storageAbdikani Guushaa
 
Intel Processors
Intel ProcessorsIntel Processors
Intel Processorshome
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and DesignKamal Acharya
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer ScienceTransweb Global Inc
 
Computer architecture
Computer architectureComputer architecture
Computer architectureZuhaib Zaroon
 

What's hot (20)

Memory map
Memory mapMemory map
Memory map
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
02 Computer Evolution And Performance
02  Computer  Evolution And  Performance02  Computer  Evolution And  Performance
02 Computer Evolution And Performance
 
Memory Segmentation of 8086
Memory Segmentation of 8086Memory Segmentation of 8086
Memory Segmentation of 8086
 
PCI Drivers
PCI DriversPCI Drivers
PCI Drivers
 
Memory model
Memory modelMemory model
Memory model
 
Memory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureMemory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer Architechture
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
01 intel processor architecture core
01 intel processor architecture core01 intel processor architecture core
01 intel processor architecture core
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and Interconection
 
Types of Memory, ram, rom and storage
Types of Memory, ram, rom and storageTypes of Memory, ram, rom and storage
Types of Memory, ram, rom and storage
 
Arm processor
Arm processorArm processor
Arm processor
 
Pentium processor
Pentium processorPentium processor
Pentium processor
 
Intel Processors
Intel ProcessorsIntel Processors
Intel Processors
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer Science
 
Computer processors
Computer processorsComputer processors
Computer processors
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Rtos
RtosRtos
Rtos
 

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

Digital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationDigital VLSI Design and FPGA Implementation
Digital VLSI Design and FPGA ImplementationAmber Bhaumik
 
1st slide VLSI.pdf
1st slide VLSI.pdf1st slide VLSI.pdf
1st slide VLSI.pdfmisbahmridul
 
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.pptxbhaveshagrawal35
 
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.pdfAdelAbougdera
 
Basic Structure of a Computer System
Basic Structure of a Computer SystemBasic Structure of a Computer System
Basic Structure of a Computer SystemAmirthavalli Senthil
 
Fpga asic technologies_flow
Fpga asic technologies_flowFpga asic technologies_flow
Fpga asic technologies_flowravi4all
 
Microcontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basicsMicrocontroller pic 16f877 architecture and basics
Microcontroller pic 16f877 architecture and basicsNilesh 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 GreavesSatya Harish
 
Risc cisc Difference
Risc cisc DifferenceRisc cisc Difference
Risc cisc DifferenceSehrish Asif
 
Digital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) DesignDigital Integrated Circuit (IC) Design
Digital Integrated Circuit (IC) DesignMahesh Dananjaya
 
mICROPROCESSOR UNIT 1 ALL.pptx.pdf
mICROPROCESSOR UNIT 1 ALL.pptx.pdfmICROPROCESSOR UNIT 1 ALL.pptx.pdf
mICROPROCESSOR UNIT 1 ALL.pptx.pdfnofakeNews
 
mICROPROCESSOR UNIT 1 ALL.pptx
mICROPROCESSOR UNIT 1 ALL.pptxmICROPROCESSOR UNIT 1 ALL.pptx
mICROPROCESSOR UNIT 1 ALL.pptxnofakeNews
 
unit 1vlsi notes.pdf
unit 1vlsi notes.pdfunit 1vlsi notes.pdf
unit 1vlsi notes.pdfAcademicICECE
 
Micro controller and dsp processor
Micro controller and dsp processorMicro controller and dsp processor
Micro controller and dsp processorShubhamMishra485
 
Embedded system Design
Embedded system DesignEmbedded system Design
Embedded system DesignAJAL A J
 
Introduction to embedded System.pptx
Introduction to embedded System.pptxIntroduction to embedded System.pptx
Introduction to embedded System.pptxPratik Gohel
 

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
 
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
 
Basic Structure of a Computer System
Basic Structure of a Computer SystemBasic Structure of a Computer System
Basic Structure of a Computer System
 
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

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

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