当前位置:网站首页>Verilog parallel block implementation
Verilog parallel block implementation
2022-07-02 03:08:00 【Da Xi】
Parallel blocks
Parallel blocks have keywords fork and join To express .
Statements in parallel blocks are executed in parallel , Even blocking assignments .
The delay of each statement in a parallel block is related to the time when the block statement begins to execute .
The difference between sequential blocks and parallel blocks is obvious , Let's use simulation to illustrate .
The simulation code is as follows :
example
`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
The simulation results are as follows :
As shown in the figure , Sequential block sequential execution , The first 10ns when , The signal bi_sequen Only assigned as 8.
Parallel block ,ai_paral And bi_paral The assignment of is performed simultaneously , So they are 5ns Is assigned .
Instead of blocking assignment , It can also achieve the same assignment effect as parallel blocks .
边栏推荐
- MongoDB非关系型数据库
- Stdref and stdcref
- /silicosis/geo/GSE184854_scRNA-seq_mouse_lung_ccr2/GSE184854_RAW/GSM5598265_matrix_inflection_demult
- 2022-2028 global military computer industry research and trend analysis report
- Start a business
- 2022 hoisting machinery command examination paper and summary of hoisting machinery command examination
- Leetcode question brushing (10) - sequential question brushing 46 to 50
- ORA-01547、ORA-01194、ORA-01110
- tarjan2
- The video number will not be allowed to be put on the shelves of "0 yuan goods" in the live broadcasting room?
猜你喜欢
Mongodb non relational database
2022-2028 global human internal visualization system industry research and trend analysis report
2022-2028 global military computer industry research and trend analysis report
Verilog 避免 Latch
Cache processing scheme in high concurrency scenario
Special symbols in SAP ui5 data binding syntax, and detailed explanation of absolute binding and relative binding concepts
Tupu software has passed CMMI5 certification| High authority and high-level certification in the international software field
Discussion on related configuration of thread pool
Actual battle of financial risk control - under Feature Engineering
el-table的render-header用法
随机推荐
Batch detect whether there is CDN in URL - high accuracy
数据传输中的成帧
What are the characteristics of common web proxy IP
旋转框目标检测mmrotate v0.3.1 学习模型
verilog 并行块实现
32, 64, 128 bit system
JS introduction < 1 >
Basic 01: print string
Special symbols in SAP ui5 data binding syntax, and detailed explanation of absolute binding and relative binding concepts
表单自定义校验规则
JDBC details
verilog REG 寄存器、向量、整数、实数、时间寄存器
Possible causes of runtime error
Soul app released the annual report on generation Z behavior: nearly 20% of young people love shopping in the vegetable market
Remote connection to MySQL under windows and Linux system
[JSON] gson use and step on the pit
Jointly developed by nailing, the exclusive functions of glory tablet V7 series were officially launched
Share the basic knowledge of a common Hongmeng application
小米青年工程师,本来只是去打个酱油
tarjan2