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. day01 继承

  2. java对mongodb数据库的简单操作

    准备工作: 下载好mongodriver.jar包(https://oss.sonatype.org/content/repositories/releases/org/mongodb/mongodb ...

  3. python 对mongdb的简单操作

    准备工作:1.选择安装合适的mongodb到本地电脑,2.创建mongodb实例,3,开启mongodb实例,4,下载pymongo第三方库,5.下载pycharm对mongodb可视化支持的插件mo ...

  4. laravel-admin 自定义导出表单

    官方导出文档 laravel-admin自带的导出excel会导出与此模型关联的其他数据.所以参考官方文档调整代码 文章表:id,title,user_id 用户表:id,username //文章模 ...

  5. Linux —— 压缩命令

    压缩与解压命令 .zip格式 压缩文件: zip 压缩文件名 原文件名 (压缩目录添加 -r) 解压缩文件/目录: unzip .zip压缩包 .gz格式 压缩文件: gzip 原文件名称 压缩文件为 ...

  6. Codeforces 1139D(推式子+dp)

    题目传送 推公式博客传送 推完式子就是去朴素地求就行了Orz const int maxn = 1e5 + 5; const int mod = 1e9 + 7; int m, mu[maxn], v ...

  7. Hive_Hive的管理_远程服务

    远程服务启动方式 - 端口号10000 - 启动方式: #hive --service hiveserver & 以JDBC或ODBC的程序登陆到hive中操作数据时,必须选用远程服务启动方式 ...

  8. selenium登录 京东滑动验证码

    京东的滑动验证码在页面上是没有原图的,所有我是用ps把他们拼成一个的. from selenium import webdriver from selenium.webdriver import Ac ...

  9. js获取窗口参数

    window.onscroll=function getScrollTop(){ console.log(scrollTop) if(document.documentElement&& ...

  10. 《javascript设计模式》笔记之第五章:单体模式

    一:单体的基本结构: 最简单的单体,实际就是一个对象字面量: var Singleton = { attribute1: true, attribute2, method1: function() { ...