1  Explicit event

  The value changes on nets and variable can be used as events to trigger the execution of a statement.

  The event can also be based on the direction of the change that is, towards the value 1 ( posedge) or towards the value 0 (negedge).

  - A negedge shall be detected on the transition from 1 to x, z, or 0, and from x or z to 0

  - A posedge shall be detected on the transition from 0 to x, z, or 1, and from x or z to 1    

@(trig or enable) rega = regb;  // event "or" is the same as ","
@(trig, enable) rega = regb; @(posedge clk_a or posedge ck_b or trig) rega = regb; always @(a, b, c, d, e)
always @(posedge clk, negedge rstn)
always @(a or b, c, d or e)

2  Implicit event

// Example 1
always @(*) // equivalent to @(a or b or c or d or f)
y = (a & b) | (c & d) | myfunction(f); // Example 2
always @* begin // equivalent to @(a or b or c or d or tmp1 or tmp2)
tmp1 = a & b;
tmp2 = c & d;
y = tmp1 | tmp2;
end // Example 3
always @* begin // equivalent to @(b)
@(i) kid = b; // i is not added to @*
end // Example 4
always @* begin // equivalent to @(a, b, c, d)
x = a ^ b;
@*
x = c ^ d;
end

  

Verilog之event的更多相关文章

  1. Verilog之event的用法

    编写verilog的testbench时,可使用event变量触发事件. event变量声明为: event var; event触发为: ->var; 捕获触发为: @(var); 在mode ...

  2. verilog FAQ(zz)

    1. What is the race condition in verilog? Ans :The situation when two expressions are allowed to exe ...

  3. verilog断言(SVA:systemverlog assertion)语法 ---- 转载

    转载自:http://blog.sina.com.cn/s/blog_4c270c730101f6mw.html 作者:白栎旸     断言assertion被放在verilog设计中,方便在仿真时查 ...

  4. Verilog篇(二)系统函数

    显示任务:$display,$write, 前者总会输出一个换行符,后者不会.固定输出格式版:$displayb/$displayo/$displayh/$writeb/$writeo/$writeh ...

  5. Verilog杂谈

    1. Testbech总是用reg去驱动DUT的input端口,因为需要在仿真期间设置和保持输入端的值(例如在initial中设置初值,在always中设置激励值): 2. 避免对局部reg在定义时赋 ...

  6. Verilog Tips and Interview Questions

    Verilog Interiew Quetions Collection :  What is the difference between $display and $monitor and $wr ...

  7. 对Verilog 初学者比较有用的整理(转自它处)

    *作者: Ian11122840    时间: 2010-9-27 09:04                                                              ...

  8. (转帖) 有限狀態機FSM coding style整理 (SOC) (Verilog)

    来源:http://www.codesoso.net/Record/101092_95120_21.html 来源:http://www.cnblogs.com/oomusou/archive/201 ...

  9. 不可综合的verilog语句分析

    前半部分转自http://www.cnblogs.com/Mrseven/articles/2247657.html,后半部分为自己测试结果. 基础知识:verilog 不可综合语句 (1)所有综合工 ...

随机推荐

  1. 神马都是浮云,unity中自己写Coroutine协程源代码

    孙广东   2014.7.19 无意之间看到了,Unity维基上的一篇文章,  是关于自己写协程的介绍. 认为非常好,这样能更好的了解到协程的执行机制等特性.还是不错的. 原文链接地址例如以下: ht ...

  2. 中国第二代身份证验证js代码

    以下这部分代码截取自盛大的某个网页.详细我就不给url了.以下是相应的js代码: iW = new Array(7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2,1); iSum ...

  3. 【Codevs 4672】辛苦的老园丁

    http://codevs.cn/problem/4672/ 那个一看这不是(最大独立集)的最大权值和,类似 反图→ 最大团  NP问题 搜索解决 改一下模板即可 参考最大独立集  Maximum C ...

  4. Flask的jinja2模板中自定义过滤器的使用

    大部分的模板引擎都是支持过滤器功能的,jinja2也不例外,它提供了丰富的内置过滤器,但是有些时候还是没办法满足我们的需求,好在jinja2支持自定义过滤器,下面是一个简单的例子. 下面的例子完成了自 ...

  5. 响应在此上下文中不可用 asp.net

    (一)实例1: 在asp.net程序中添加了一个 类.cs 如下 using System; using System.Collections; using System.ComponentModel ...

  6. ECS服务器配置密钥登录及常用日志

    一.介绍 1.SSH(22端口)是Secure Shell Protocol的简写,由IETF网络工作小组(Network Working Group)制定:在进行数据传输之前,SSH先对联机数据包通 ...

  7. bzoj 1753: [Usaco2005 qua]Who's in the Middle【排序】

    --这可能是早年Pascal盛行的时候考排序的吧居然还是Glod-- #include<iostream> #include<cstdio> #include<algor ...

  8. Springboot 相关注解大全

    1.Spring注解 1.@Autowired 标注在方法,Spring容器创建当前对象,就会调用方法,完成赋值:方法使用的参数,自定义类型的值从ioc容器中获取自动装配; Spring利用依赖注入( ...

  9. BACnet开发资料与调试工具

    一.开发资料 1.认识BACnet协议 2.BACnet网络讲义: 链接:https://pan.baidu.com/s/1A6OOUxvJe1zIYbockqTEsQ提取码:wz49 二.调试工具 ...

  10. css 实现 checkbox 大小调整

    一般调整 checkbox 大小我们想到的是 width.height,可是设置后,发现是没有效的. 如微信小程序里面,checkbox 默认就很大,想设置小一点怎么办? transform: sca ...