当前位置:网站首页>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

边栏推荐
- Personal developed penetration testing tool Satania v1.2 update
- QQ computer version cancels escape character input expression
- Introduction to LVS [unfinished (semi-finished products)]
- Matrixdb V4.5.0 was launched with a new mars2 storage engine!
- Wazuh開源主機安全解决方案的簡介與使用體驗
- 7. Processing the input of multidimensional features
- 【Rust 笔记】13-迭代器(下)
- 实时时钟 (RTC)
- Shutter web hardware keyboard monitoring
- 1040 Longest Symmetric String
猜你喜欢

可变电阻器概述——结构、工作和不同应用

LaMDA 不可能觉醒吗?

Real time clock (RTC)

How to adjust bugs in general projects ----- take you through the whole process by hand
![Introduction to LVS [unfinished (semi-finished products)]](/img/72/d5a943a8d6d71823dcbd7f23dda35b.png)
Introduction to LVS [unfinished (semi-finished products)]

Liunx starts redis

API related to TCP connection

SPI details

Arduino 控制的 RGB LED 无限镜

Spark中groupByKey() 和 reduceByKey() 和combineByKey()
随机推荐
Sqlmap tutorial (II) practical skills I
1039 Course List for Student
Erreur de connexion Navicat à la base de données Oracle Ora - 28547 ou Ora - 03135
JS quickly converts JSON data into URL parameters
The connection and solution between the shortest Hamilton path and the traveling salesman problem
Leetcode-6111: spiral matrix IV
【Rust 笔记】15-字符串与文本(下)
Bit mask of bit operation
[rust notes] 14 set (Part 2)
On the characteristics of technology entrepreneurs from Dijkstra's Turing Award speech
从Dijkstra的图灵奖演讲论科技创业者特点
QT判断界面当前点击的按钮和当前鼠标坐标
leetcode-6109:知道秘密的人数
PC register
Introduction and experience of wazuh open source host security solution
MIT-6874-Deep Learning in the Life Sciences Week 7
Appium基础 — 使用Appium的第一个Demo
Error ora-28547 or ora-03135 when Navicat connects to Oracle Database
Smart construction site "hydropower energy consumption online monitoring system"
redis发布订阅命令行实现