当前位置:网站首页>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 .
边栏推荐
- Verilog 避免 Latch
- SAP ui5 beginner tutorial 19 - SAP ui5 data types and complex data binding
- Find duplicates [Abstract binary / fast and slow pointer / binary enumeration]
- Leetcode question brushing (10) - sequential question brushing 46 to 50
- [staff] restore mark (Introduction to the use of restore mark | example analysis of Metaphone mark and restore mark)
- What is hybrid web containers for SAP ui5
- How to create an instance of the control defined in SAP ui5 XML view at runtime?
- JS <2>
- GB/T-2423.xx 环境试验文件,整理包括了最新的文件里面
- Batch detect whether there is CDN in URL - high accuracy
猜你喜欢

STM32__ 05 - PWM controlled DC motor

Framing in data transmission

2022-2028 global manual dental cleaning equipment industry research and trend analysis report

Force deduction daily question 540 A single element in an ordered array

使用 useDeferredValue 进行异步渲染
![Find duplicates [Abstract binary / fast and slow pointer / binary enumeration]](/img/9b/3c001c3b86ca3f8622daa7f7687cdb.png)
Find duplicates [Abstract binary / fast and slow pointer / binary enumeration]

MongoDB非关系型数据库

Multi threaded query, double efficiency

OSPF LSA message parsing (under update)

verilog 并行块实现
随机推荐
ORA-01547、ORA-01194、ORA-01110
[staff] pitch representation (treble clef | C3 60 ~ B3 71 pitch representation | C4 72 pitch representation | C5 84 pitch representation)
C shallow copy and deep copy
Intersection vengraph
QT uses sqllite
What is the difference between an intermediate human resource manager and an intermediate economist (human resources direction)?
Realize the code scanning function of a custom layout
2022-2028 global military computer industry research and trend analysis report
寻找重复数[抽象二分/快慢指针/二进制枚举]
Gradle notes
图扑软件通过 CMMI5 级认证!| 国际软件领域高权威高等级认证
QT implementation interface jump
4. Find the median of two positive arrays
Feature query of hypergraph iserver rest Service
V-model of custom component
QT使用sqllite
Qualcomm platform WiFi -- Native crash caused by WiFi
Stdref and stdcref
Framing in data transmission
verilog 并行块实现