verilog behavioral modeling--blocking and nonblocking
BLOCKING ASSIGNMENTS
1.A blocking procedural assignment statement shall be exectuted before the execution of the statements that follow it in a sequential block (我们一般都这样用)
2.A blocking procedural assignment statement shall not prevent the execution of statements that follow it in a parallel block(看来阻塞赋值不是永远阻塞后面的语句)
3.variable_lvalue = [delay_or_event_control] expression(variable_lvalue、delay_or_event_control 、expression 都有多种写法,可以参考IEEE标准)
If variable_lvalue require an evaluation,it shall be evaluated at the time specified by the intra-assignment timing control.
The = assignment operator used by blocking procedural assignments is also used by procedural continous assignments and continous assignments.
NONBLOCKING ASSIGNMENTS
1.the nonblocking procedural assignment allows assignment scheduling without blocking the procedural flow.
2.the nonblocking procedural assignment statement can be used whenever several variable assignments within the same time step can be made without regard to order or dependence upon each other.
3.variable_lvalue <=[delay_or_event_control] expression
If variable_lvalue requires an evaluation,it shall be evaluated at the same time as the expression on the right-hand side.
The order of evaluation of the variable_lvalue and the expression on the right-hand side is undefined if timing control is not specified.
4.<=符合重载 : 小于等于 非阻塞赋值
5.The nonblocking procedural assignments shall be evaluated in two steps .(跟time region有关)
step1:the simulator evaluates the right-hand side of the nonblocking assignments and shedules the assignments for the end of the current time step
step2:at the end of the current time step, the simulator updates the left-hand side of each nonblocking assignment statement
6.the order of the execution of distinct nonblocking assignments to a given variable shall be preserved. in other words ,if there is clear ordering of the execution of a set of nonbolcking assignments ,
then the order of the resulting updates of the destination of the nonblocking assignments shall be the same as the ordering of the execution.(非阻塞也是可以写成阻塞的方式的)
eg:
module mutipe;
reg a;
initial a = 1;
//the assigned value of the reg is determinate
initial begin
a<= #4 0;
a<= # 1 ;
end
endmodule
7.If the simulator executes two procedural blocks concurrently and if these procedural blocks contain nonblocking assignment operators to the same variable, the final value of that variable is indeterminate.
eg:
module multipe2;
reg a;
inital a =1;
initial a<= #4 0; //schedules 0 at time 4
initial a<= #4 1; //schedules 1 at time 4
//at time 4 ,a =??
//the assigned value of the reg is indeterminate
endmodule
8.always中可以blocking /nonblocking assignments
initial 中可以blocking/nonblocking assignments
似乎,我们一直关注的是always中组合逻辑用blocking,时序逻辑用nonblocking,initial中用blocking(此外系统函数必须放在initial 中)。
其实,如果begin-end / fork-join 规定的串行/并行 跟 blocking / nonblocking 规定的阻塞/非阻塞交叉产生的效果。
verilog behavioral modeling--blocking and nonblocking的更多相关文章
- verilog behavioral modeling --procedural assignments
1.procedural assignments are used for updating reg ,integer , time ,real,realtime and memory data ty ...
- verilog behavioral modeling ---Block statements
block statements : 1. sequential block : begin-end block 2.parallel block : fork - join bloc ...
- verilog behavioral modeling --loop statement
1.forever 2.repeat 3.while 4.for The for statement accomplishes the same results as the following ps ...
- Atitit 五种IO模型attilax总结 blocking和non-blocking synchronous IO和asynchronous I
Atitit 五种IO模型attilax总结 blocking和non-blocking synchronous IO和asynchronous I 1.1. .3 进程的阻塞1 1.2. 网络 ...
- verilog behavioral modeling--overview
1.verilog behavioral models contain procedural statements that control the simulation and manipulate ...
- 同步IO与一部IO、IO多路复用(番外篇)select、poll、epoll三者的区别;blocking和non-blocking的区别 synchronous IO和asynchronous IO的区别
Python之路,Day9 , IO多路复用(番外篇) 同步IO和异步IO,阻塞IO和非阻塞IO分别是什么,到底有什么区别?不同的人在不同的上下文下给出的答案是不同的.所以先限定一下本文的上下文. ...
- verilog behaviral modeling -- procedural timing contronls
1.delay control : an expression specifies the time duration between initially encountering the state ...
- blocking and nonblocking assign
key word: 仿真建模 clock采样block/nonblock blocking时,有时候clk会sample edge后的data: nobocking时,clk sample 以前的d ...
- verilog behavioral modeling--branch statement
conditional statement case statement 1. conditional statement if(expression) statement_o ...
随机推荐
- 如何用dos命令结束进程
ntsd 是一条dos命令,功能是用于结束一些常规下结束不了的死进程. 用法为打开cmd 后输入以下命令就可以结束进程: 方法一:利用进程的PID结束进程 命令格式:ntsd -c q -p pid ...
- 基于http的软件仓库
这是企业中常用的方法 比如一台服务器准备好了,公司必然要安装一些应用 这时可以用这种方法批量安装应用 运行一条命令,服务器就会自己去连接软件仓库,去下载来安装. [root@webmaster htm ...
- Guard Duty (hard) Codeforces - 958E3 || uva 1411
https://codeforces.com/contest/958/problem/E3 当没有三点共线时,任意一个这样的点集都是保证可以找到答案的,(考虑任意一种有相交的连线方案,一定可以将其中两 ...
- matplotlib 学习笔记02:marker标记详解
本文内容来自于matplotlib官网:matplotlib官网markers资料 This module contains functions to handle markers. Used by ...
- HTML <form> 标签的 enctype
form的enctype有三种 application/x-www-form-urlencoded 在发送前编码所有字符(默认) multipart/form-data 不对字符编码. 在使用包含文件 ...
- ubuntu下安装无线网卡去驱动Qualcomm-Atheros-QCA9377
文件(文档和压缩包):http://pan.baidu.com/s/1mhktFT2
- hihocoder1766 字符串问题
思路: 不断贪心增加即可. 实现: #include <iostream> #include <cstring> using namespace std; ][]; int m ...
- 从零开始利用vue-cli搭建简单音乐网站(七)
这几天完成了歌曲收藏功能,先看最后效果: 新注册用户:“newuser”,进入“我的音乐界面如下所示” 点击新建歌单,输入:“新歌单”,确认,如下: 目前还没有歌曲,打开音乐界面,点击收藏功能,如下, ...
- 国内的Jquery CDN免费服务
Jquery是个非常流行的JS前端框架,在很多网站都能看到它的身影.很多网站都喜欢采用一些Jquery CDN加速服务,这样网站加载jquery会更快.之前火端网络的一些网站都是使用Google的jq ...
- uvm_scoreboard——得分
scoreboard 是验证平台很重要的一部分,因为,验证就是给激励,然后,检查结果.而scoreboard 就是肩负这检查结果的重任.测试用例能不能过,全由scoreboard说了算. A scor ...