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的更多相关文章

  1. verilog behavioral modeling --procedural assignments

    1.procedural assignments are used for updating reg ,integer , time ,real,realtime and memory data ty ...

  2. verilog behavioral modeling ---Block statements

    block statements : 1. sequential block  : begin-end block 2.parallel block       :  fork - join bloc ...

  3. verilog behavioral modeling --loop statement

    1.forever 2.repeat 3.while 4.for The for statement accomplishes the same results as the following ps ...

  4. 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. 网络 ...

  5. verilog behavioral modeling--overview

    1.verilog behavioral models contain procedural statements that control the simulation and manipulate ...

  6. 同步IO与一部IO、IO多路复用(番外篇)select、poll、epoll三者的区别;blocking和non-blocking的区别 synchronous IO和asynchronous IO的区别

    Python之路,Day9 , IO多路复用(番外篇)   同步IO和异步IO,阻塞IO和非阻塞IO分别是什么,到底有什么区别?不同的人在不同的上下文下给出的答案是不同的.所以先限定一下本文的上下文. ...

  7. verilog behaviral modeling -- procedural timing contronls

    1.delay control : an expression specifies the time duration between initially encountering the state ...

  8. blocking and nonblocking assign

    key word: 仿真建模  clock采样block/nonblock blocking时,有时候clk会sample edge后的data: nobocking时,clk sample 以前的d ...

  9. verilog behavioral modeling--branch statement

    conditional statement case statement 1. conditional statement     if(expression)         statement_o ...

随机推荐

  1. python入门之实例-用户登录、注册

    用户密码存储文件db(其中用户和密码之间用$符合隔开): admin$123456 root$sdfk9f24 chy$654321 代码如下: def login(username,password ...

  2. G. Of Zorcs and Axes 二分 + 贪心 —— STL的用法

    http://codeforces.com/gym/101149/problem/G 一开始还以为要用二分图去做,但是复杂度也太高了,O(n * m)的话直接爆炸. 考虑贪心,考虑第i个东西优先选一个 ...

  3. Mex(线段树的巧妙应用)

    题目要求求某段区间第一个没有出现的数(0,1,2,3....) ,对于所有的区间,我们把这样的数加起来最后得到一个结果. 首先,我们要求出这样的数,然后还得列举出所有的区间,复杂度太大了. 换种思路, ...

  4. mysql查询某个数据库某个表的字段

    1.查看字段详细信息 -- 查看详细信息 SELECT COLUMN_NAME "字段名称", COLUMN_TYPE "字段类型长度", IF(EXTRA=& ...

  5. java jps

    jps:虚拟机进程状况工具: 命令格式: jps [options] [hostid] hostid 为RMI注册表中注册的主机名. 执行样例: options 参数: 选项  作用 -q  只输出L ...

  6. React 实践记录 01 组件开发入门

    Introduction 本文组成: Ryan Clark文章Getting started with React的翻译. 博主的实践心得. React由Facebook的程序员创建,是一个非常强大的 ...

  7. Java基础教程(25)--I/O

    一.I/O流   I/O流表示输入源或输出目标.流可以表示许多不同类型的源和目标,例如磁盘文件.设备.其他程序等.   流支持许多不同类型的数据,包括字节.原始数据类型.字符和对象等.有些流只传递数据 ...

  8. node.js之Windows 系统下设置Nodejs NPM全局路径

    node.js 0.10 版本下修改全局路径: npm config set cache "D:\nodejs\node_cache" npm config set prefix ...

  9. SQLServer 错误: 15404,无法获取有关 Windows NT 组/ 用户 'WIN-8IVSNAQS8T7\Administrator' 的信息,错误代码 0x534。

    在自动清理日志的作业中,执行过程出现如下问题:“SQLServer 错误: 15404,无法获取有关 Windows NT 组/ 用户 'WIN-8IVSNAQS8T7\Administrator' ...

  10. 编写Robotium测试程序

    6.编写Robotium测试程序 1)导包 //导入需要测试的工程 import com.example.android.notepad.NotesList; //robotium提供的测试用类 im ...