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 ...
随机推荐
- struts2学习笔记 day02 获取参数 访问ServletAPI 结果类型
- MySQL 索引及优化实战
https://blog.csdn.net/qq_21987433/article/details/79753551 https://tech.meituan.com/mysql_index.html ...
- STP-2-三个选择
1.选择根交换机 2.确定根端口 3.确定指定端口 1.选择根交换机 stp中只有一台交换机能成为根(Root),每台交换机按自己的STP逻辑,先发一个hello称自己为根,如果收到了比自 ...
- 网络流--Dinic(自用,勿看)
注意:这是一篇个人学习笔记,如果有人因为某些原因点了进来并且要看一下,请一定谨慎地阅读,因为可能存在各种奇怪的错误,如果有人发现错误请指出谢谢! https://www.luogu.org/probl ...
- OS 内存泄漏 导致 整个aix主机block
问题 aix 主机 1.数据库主机使用vmstat 监控,隔几分钟 就是block 爆满. cpu 没有瓶颈,I/O 显示本地磁盘hdisk0和hdisk 1 是爆满. vmstat 同时显示大量pa ...
- Java之file操作
File类既可以表示文件,也可以表示为文件夹 文件的创建.删除.重命名 1.文件的创建 File file=new File("new Hello.txt");//当前工程目录下 ...
- JavaScript Allongé 第一呷 :基础函数 (3) 未完
闭包与域是时候来看下一个带函数的函数是如何工作的: (function (x) { return function (y) { return x } })(1)(2) //=> 1 首先,我们使 ...
- IIS+PHP访问量大时内存爆满等性能问题解决方案
如今还是有许多人在用老掉牙的 IIS6 + PHP.本文解决方法适用于使用 FastCGI 运行 PHP 的用户. 问题原因: 你可以试一试,你在 VPS 上用 IIS6 安装 FastCGI 跑 P ...
- 【javascript】2017-9-12 腾讯笔试小Q升序算法
刚做完笔试,腾讯笔试系统真的不友好,作为一个前端,我只会用js写编程题,然而,然而腾讯笔试系统连js输入函数都没给,还不准跳出页面,那个调试结果一直显示错误,我一直找不到错误在哪,心累. 只做了一道笔 ...
- jquery.qrcode.min.js生成二维码
jquery.qrcode.min.js是一款可以生成二维码的插件,使用前提是先引入jquery,因为jquery.qrcode.min.js依赖jquery. 基本用法 1.引入js <scr ...