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 ...
随机推荐
- SpringBoot | Data Access
https://docs.spring.io/spring-boot/docs/current/reference/html/howto-data-access.html 配置数据源启动器.
- 整理一下 通知传值 Block传值
Block: 一. (1) 在需要传值的界面定义属性 // 点击collectionViewCell的回调 @property (nonatomic, copy) void(^Didcollectio ...
- HDU6300(2018多校第一场)
Bryce1010模板 http://acm.hdu.edu.cn/showproblem.php?pid=6300 排个序就好了 #include<iostream> #include& ...
- Hive_Hive体系结构
元数据: HQL的执行过程 ORACEL 执行计划,Hive 类似. 无索引时,生成全表扫描执行计划,执行全表扫描. 创建索引后,重新生成SQL语句执行计划,基于索引扫描,提高查询效率.
- 090 Subsets II 子集 II
给定一个可能包含重复整数的列表,返回所有可能的子集(幂集).注意事项:解决方案集不能包含重复的子集.例如,如果 nums = [1,2,2],答案为:[ [2], [1], [1,2,2], ...
- ruby 正则匹配返回值matchdata
引用连接: 为处理与正则表达式的匹配过程相关的信息而设置的类. 可以通过下列途径 Regexp.last_match Regexp#match, String#match $~ 得到该类的实例. 超类 ...
- mirror.js 整合redux的好工具
mirror.js 很简单,让state管理更方便了,没有新增api,值 得使用 https://github.com/yurizhang/mirror package.json { "na ...
- 第十章 设计用户界面 之 构建UI布局
1. 概述 本章内容包括:实现可在不同区域重用的片段.使用Razor模板设计和实现页面.设计可视结构的布局.基于模板页开发. 2. 主要内容 2.1 实现可在不同区域重用的片段 最简单的重用方式就是在 ...
- 【持续更新】HTML5 基础知识
文档类型声明 <!DOCTYPE html> 必不可少,位于文件第一行. 字符编码 <meta charset="UTF-8"> 语义化标记元素 heade ...
- oracle 换行回车符
工作中碰到这样一种情况,做一个data patch,将表中的某个字段的内容copy到另一个字段,添加时若目标字段有值,需要换行处理. 首先,oracle中的回车符是chr(13),换行符是chr(10 ...