当前位置:网站首页>1.14 - assembly line
1.14 - assembly line
2022-07-05 06:10:00 【It's Li sticky duck】
Catalog
3、 ... and 、 No pipeline is used to execute instructions
Four 、 Use pipeline to execute instructions
6、 ... and 、 Pipeline calculation formula
7、 ... and 、 Throughput of the pipeline
8、 ... and 、 Test method 1: Pipeline related calculation
One 、 The concept of pipeline
- The so-called assembly line , It refers to the execution of the program , Multiple instructions overlap A quasi parallel processing implementation technology .
Two 、 Pipeline workflow
- When an instruction is executed , It can usually be divided into several stages , Each stage is realized by different components ;
- Divide into 3 Take the first stage as an example : Fingering 、 analysis 、 perform ;
3、 ... and 、 No pipeline is used to execute instructions
1、 Execution process
- When the assembly line is not used , When the fetching part of the first instruction fetches , The analysis part and the execution part are idle ;
- When the finger picking part is finished , The analysis part starts the analysis instruction , At this time, the referring part and the executing part are idle ;
- When the execution of the analysis part is completed , The execution part executes instructions after compilation , At this time, the finger taking part and the analysis part are idle ;
2、 Conclusion
- Thus we can see that , When instructions are executed without pipeline , Take the finger part , Analyze components , The utilization of execution parts is not high ;
Four 、 Use pipeline to execute instructions
1、 Execution process
- When the first instruction starts to execute , Take the finger part and start working , Analysis part and execution part are idle ;
- When the first instruction fetch is completed , The analysis part starts to work ; At this time, the finger taking part is idle , At this point, you can get the second instruction ;
- When the first instruction analysis is completed , The execution part starts working ; At this time, the analysis unit is idle , At this point, you can analyze the second instruction just taken ; And since the second instruction fetching is completed , So at this time, the finger taking part is free again , So now you can get the third instruction ;
2、 Conclusion
- thus it can be seen , Use pipeline to execute instructions , It can effectively improve the utilization rate of components , It effectively improves the execution efficiency of instructions ;
5、 ... and 、 pipeline cycle
- At each stage of the instruction , The time of this stage with the longest execution time , Is the cycle of the assembly line ;
analysis :(1) For example, the workers on the assembly line , Three people work together to complete an item ; The first person needs 2 second , The second person needs 4 second , The third person needs 1 second ;(2) If the period for completing this item is set as 1 second , So first 、 The second person can't finish his work ;(3) Only set the period as 4 seconds , These three talents can complete their own work ;(4) So we will generally Complete an item The time of the phase that takes the longest to execute , Set as cycle , The period in the example is 4 second ;
6、 ... and 、 Pipeline calculation formula
- Time required for a single instruction +(n-1)*( pipeline cycle )
(1) It can be seen from the picture that , When executing the first instruction , need 3 Stages ;(2) At the end of the first instruction , The second order zh The analysis phase has been completed , Only one execution stage is needed to complete the execution of the second instruction ;(3) When the execution of the second instruction is completed , The third instruction has finished the analysis stage , Only one execution stage is needed to complete the execution of the third instruction ;(4) So execute n Instruction time , Just use the time of a single instruction ( The sum of the three phases of the first instruction )+(n-1) The time required to execute an instruction ;
- Be careful :n Indicates the number of instructions ;
7、 ... and 、 Throughput of the pipeline
8、 ... and 、 Test method 1: Pipeline related calculation
边栏推荐
- 2022 pole technology communication arm virtual hardware accelerates the development of Internet of things software
- Daily question 1688 Number of matches in the competition
- 从Dijkstra的图灵奖演讲论科技创业者特点
- redis发布订阅命令行实现
- A reason that is easy to be ignored when the printer is offline
- 可变电阻器概述——结构、工作和不同应用
- Multi screen computer screenshots will cut off multiple screens, not only the current screen
- Leetcode-6111: spiral matrix IV
- SPI 详解
- Redis publish subscribe command line implementation
猜你喜欢
Full Permutation Code (recursive writing)
Open source storage is so popular, why do we insist on self-development?
Wazuh开源主机安全解决方案的简介与使用体验
QQ computer version cancels escape character input expression
可变电阻器概述——结构、工作和不同应用
传统数据库逐渐“难适应”,云原生数据库脱颖而出
Sqlmap tutorial (II) practical skills I
How to adjust bugs in general projects ----- take you through the whole process by hand
[jailhouse article] performance measurements for hypervisors on embedded ARM processors
SPI 详解
随机推荐
884. Uncommon words in two sentences
LaMDA 不可能觉醒吗?
Doing SQL performance optimization is really eye-catching
7. Processing the input of multidimensional features
liunx启动redis
QQ computer version cancels escape character input expression
Full Permutation Code (recursive writing)
Matrixdb V4.5.0 was launched with a new mars2 storage engine!
Traditional databases are gradually "difficult to adapt", and cloud native databases stand out
Appium基础 — 使用Appium的第一个Demo
[rust notes] 16 input and output (Part 2)
Dichotomy, discretization, etc
Wazuh開源主機安全解决方案的簡介與使用體驗
Transform optimization problems into decision-making problems
Open source storage is so popular, why do we insist on self-development?
一些工具的记录2022
Common optimization methods
LVS简介【暂未完成(半成品)】
MatrixDB v4.5.0 重磅发布,全新推出 MARS2 存储引擎!
Flutter Web 硬件键盘监听