当前位置:网站首页>verilog 并行块实现
verilog 并行块实现
2022-07-02 03:02:00 【嗒曦】
并行块
并行块有关键字 fork 和 join 来表示。
并行块中的语句是并行执行的,即便是阻塞形式的赋值。
并行块中每条语句的时延都是与块语句开始执行的时间相关。
顺序块与并行块的区别显而易见,下面用仿真说明。
仿真代码如下:
实例
`timescale 1ns/1ns
module test ;
reg [3:0] ai_sequen, bi_sequen ;
reg [3:0] ai_paral, bi_paral ;
reg [3:0] ai_nonblk, bi_nonblk ;
//============================================================//
//(1)Sequence block
initial begin
#5 ai_sequen = 4'd5 ; //at 5ns
#5 bi_sequen = 4'd8 ; //at 10ns
end
//(2)fork block
initial fork
#5 ai_paral = 4'd5 ; //at 5ns
#5 bi_paral = 4'd8 ; //at 5ns
join
//(3)non-block block
initial fork
#5 ai_nonblk <= 4'd5 ; //at 5ns
#5 bi_nonblk <= 4'd8 ; //at 5ns
join
endmodule
仿真结果如下:

如图所示,顺序块顺序执行,第 10ns 时,信号 bi_sequen 才赋值为 8。
而并行块,ai_paral 与 bi_paral 的赋值是同时执行的,所以均在 5ns 时被赋值。
而非阻塞赋值,也能达到和并行块同等的赋值效果。
边栏推荐
- Missing numbers from 0 to n-1 (simple difficulty)
- MongoDB非關系型數據庫
- Baohong industry | 6 financial management models at different stages of life
- Websocket + spingboot realize code scanning login
- What is the difference between an intermediate human resource manager and an intermediate economist (human resources direction)?
- 2022-2028 global nano abrasive industry research and trend analysis report
- What is hybrid web containers for SAP ui5
- Jvm-01 (phased learning)
- Which kind of sports headphones is easier to use? The most recommended sports headphones
- MVVM and MVC
猜你喜欢

Common means of modeling: aggregation

2022-2028 global deep sea generator controller industry research and trend analysis report

AcWing 245. Can you answer these questions (line segment tree)

Delphi xe10.4 installing alphacontrols15.12
![[learn C and fly] 4day Chapter 2 program in C language (exercise 2.5 generate power table and factorial table](/img/f4/298f64c4b4f8674eda4e8fb19a976a.png)
[learn C and fly] 4day Chapter 2 program in C language (exercise 2.5 generate power table and factorial table
![[Chongqing Guangdong education] Sichuan University concise university chemistry · material structure part introductory reference materials](/img/ae/7edbdf55795400166650c795c8bd58.jpg)
[Chongqing Guangdong education] Sichuan University concise university chemistry · material structure part introductory reference materials

Design details of SAP e-commerce cloud footernavigationcomponent

Coordinatorlayout + tablayout + viewpager2 (there is another recyclerview nested inside), and the sliding conflict of recyclerview is solved

PHP notes - use Smarty to set public pages (include, if, else, variable settings)

After marriage
随机推荐
多线程查询,效率翻倍
[JVM] detailed description of the process of creating objects
Redis set command line operation (intersection, union and difference, random reading, etc.)
GB/T-2423. XX environmental test documents, including the latest documents
tarjan2
Ten minutes will take you in-depth understanding of multithreading - multithreaded teamwork: synchronous control
2022安全员-C证考试题及模拟考试
Connected block template and variants (4 questions in total)
2022 low voltage electrician test question simulation test question bank simulation test platform operation
C reflection practice
2022 safety officer-c certificate examination questions and mock examination
Mongodb base de données non relationnelle
[Chongqing Guangdong education] Sichuan University concise university chemistry · material structure part introductory reference materials
Divorce for 3 years to discover the undivided joint property, or
es面試題
JDBC details
How to run oddish successfully from 0?
LFM signal denoising, time-frequency analysis, filtering
Multi threaded query, double efficiency
[staff] the direction of the symbol stem and the connecting line (the symbol stem faces | the symbol stem below the third line faces upward | the symbol stem above the third line faces downward | the