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. Eclipse - 安装了jd-eclipse插件后依然无法反编译类文件

    问题 Eclipse在安装了jd-eclipse插件后依然无法反编译类文件,这个问题是因为没有修改默认的类文件查看器. 解决方法 修改默认的类文件查看器为jd-eclipse Window -> ...

  2. sql 语句 替换字段的一些内容

    update t_table set field = replace(field,'替换内容','替换为');

  3. iphone、ipad等网页中电话号码呈蓝色的解决方案

    iPhone手机.ipad上的浏览器(如Safari),在解析网页的时候会自动给 像是电话号码的数字 加上link样式,所以号码呈蓝色. 可以添加下面的meta禁用掉这个功能. <meta na ...

  4. 反射和__setattr__,__delattr__,__getattr__用法

    反射 什么是反射:反射的概念是由Smith在1982年首次提出的,主要是指程序可以访问.检测和修改它本身状态或行为的一种能力(自省).这一概念的提出很快引发了计算机科学领域关于应用反射性的研究.它首先 ...

  5. StretchDIBits速度测试(HALFTONE)

    StretchDIBits速度测试(HALFTONE) 下面实验中显示窗口大小为1024*768,拉伸模式设为HALFTONE. 一.单通道图像 (1) 保持图像高度为1024,宽度从24到2024递 ...

  6. 转:在linux中vi 文件里行尾奇怪的^M及解决

    Linux编辑器vim中删除行尾的^M 有时候,在 Linux 中使用打开曾在 Windows 中编辑过的文件时,会在行尾看到 ^M 字符.看起来总是感觉很别扭. 删除方法如下: 在 Vim 的命令模 ...

  7. 关于ViewPager高度自适应(随着pager页的高度改变Viewpager的高度)

    该博客借鉴的是某位大神的博客 我只是写一下用后感和总结 博客链接地址 http://blog.csdn.net/qq_34972666/article/details/52386999?locatio ...

  8. SDIO学习

    https://baijiahao.baidu.com/s?id=1561100856106707&wfr=spider&for=pc http://www.eepw.com.cn/a ...

  9. android开发学习 ------- debug 和 release版本执行结果不同

    在debug上测试成功的,release上测试不成功,就想着怎么将 release 版本进行调试一下.还好 Android Studio 3.0是可以进行调试apk的 可以显示log,自己看自己的逻辑 ...

  10. storm trident的filter和函数

    目的:通过kafka输出的信息进行过滤,添加指定的字段后,进行打印 SentenceSpout: package Trident; import java.util.HashMap; import j ...