1.task declaration

个人喜欢ANSI C格式的声明:

task mytask(output int x,input logic y);

......

endtask

注意端口列表的方向和数据结构,容易犯错,最好每个逐一显示声明。

2.static and automatic tasks(这个极易出错)

2.1 所有定义在module  、 interface 、 program、 package中的task

默认是静态task,其task中变量是静态变量,所有调用该task的程序都可以

共享该变量。(由此可见默认大部分都是static task.不知道单独建立的task lib的 .v文件是不是static的)

2.2automatic storage task in the following

2.2.1 显示声明为automatic

task automatic task_name(port list);

....

endtask

2.2.2 隐示声明,但定义task在module、program、package、interface中。 这个 systemverilog 上没看懂,貌似跟前面的2.1冲突了。

2.3 automatic task  intems 不可以 hierarchical reference 但 automatic tasks 可以穿层调用。

2.4

A task may be enabled more than once concurrently. All variables of an automatic task shall be replicated on
each concurrent task invocation to store state specific to that invocation. All variables of a static task shall be
static in that there shall be a single variable corresponding to each declared local variable in a module
instance, regardless of the number of concurrent activations of the task. However, static tasks in different
instances of a module shall have separate storage from each other.
Variables declared in static tasks, including input, output, and inout type arguments, shall retain their
values between invocations. They shall be initialized to the default initialization value as described in 6.8.
Variables declared in automatic tasks, including output type arguments, shall be initialized to the default
initialization value whenever execution enters their scope. input and inout type arguments shall be
initialized to the values passed from the expressions corresponding to these arguments listed in the task-
enabling statements.
Because variables declared in automatic tasks are deallocated at the end of the task invocation, they shall not
be used in certain constructs that might refer to them after that point:
—They shall not be assigned values using nonblocking assignments or procedural continuous
assignments.
—They shall not be referenced by procedural continuous assignments or procedural force statements.
—They shall not be referenced in intra-assignment event controls of nonblocking assignments.
—They shall not be traced with system tasks such as $monitor and $dumpvars.

systemverilog:task的更多相关文章

  1. systemverilog FAQ(zz)

    1. What is clocking block? Ans: Clocking block can be declared using the keywords clocking and endcl ...

  2. SystemVerilog 带输出的task

    1.task 的定义,输出定义为数组. /*- genRndPkt(): Generates random packet with the given length.*/ task genRndPkt ...

  3. systemverilog.vim

    " Vim syntax file " Language: SystemVerilog " Maintainer: Stephen Hobbs <stephenh@ ...

  4. systemverilog的高亮显示

    1. 在_vimrc文件末尾添加: syntax on "确定vim打开语法高亮 filetype on "打开文件类型检测 filetype plugin on "为特 ...

  5. vivado对task和function的可综合支持

    手册UG901,对vivado可综合的语句支持进行了描述,HDL包括:verilog-2001,system-verilog,VHDL: verilog-2001扩展了对task和function的支 ...

  6. systemverilog interface杂记

    随着IC设计复杂度的提高,模块间互联变得复杂,SV引入接口,代表一捆连线的结构. Systemverilog语法标准,新引入一个重要的数据类型:interface. interface主要作用有两个: ...

  7. systemverilog之OOP

    what is oop terminology an example class default methods for classes static attibute assigment and c ...

  8. 第三章:systemverilog文本值和数据类型

    1.增强的文本值 2.改进的`define文本替换 3.时间值 4.新的变量类型 5.有符号和无符号类型 6.静态和动态变量(***) 7.类型转换 8.常数 增强的文本值(文本赋值增强) 主要是:位 ...

  9. 第二章:systemverilog声明的位置

    1.package 定义及从package中导入定义(***) verilog中,对于变量.线网.task.function的声明必须在module和endmodule之间.如果task被多个modu ...

随机推荐

  1. MySQL 错误码对照

    1005:创建表失败 1006:创建数据库失败 1007:数据库已存在,创建数据库失败 1008:数据库不存在,删除数据库失败 1009:不能删除数据库文件导致删除数据库失败 1010:不能删除数据目 ...

  2. mac的日常使用总结

    目录 有一个github的仓库:(强烈推荐) 不推荐的但是可以试试的一些链接: # 关于mac book的使用教程 github简直是一个宝藏,发现好多各种好玩的东西, 爱了爱了, 开源一定是未来, ...

  3. Plugging an Unplugged Pluggable Database

    1.unplug To unplug a PDB, you first close it and then generate an XML manifest file. The XML file co ...

  4. mvc报( 检测到有潜在危险的 request.form 值 )错的解决方案

    今天在做项目中遇到了报( 检测到有潜在危险的 request.form 值 )错,百度过后解决了该问题,出此问题主要还是因为提交的Form中有HTML字符串,例如你在TextBox中输入了html标签 ...

  5. C#中this指针的用法示例

    这篇文章主要介绍了C#中this指针的用法,对初学者而言是非常重要的概念,必须加以熟练掌握,需要的朋友可以参考下. 本文实例展示了C#中this指针的用法,对于初学者进一步牢固掌握C#有很大帮助,具体 ...

  6. Android手机屏幕投射到电脑神器Vysor

    做android开发的,经常要把手机屏幕投射到电脑,用来演示.普遍的解决方案是360或者豌豆荚的演示功能,缺点是延迟非常厉害,大概有3秒左右,非常影响演示效果.以下介绍Vysor,几乎0延迟,能与手机 ...

  7. Openrisc的or1200

    1 什么是OpenRISC OpenRISC 是硬件开源社区opencores开发的RISC指令集处理器架构,包括32 bits 的Openrisc1000 和64 bitsOpenrisc 2000 ...

  8. 关于php的问题

    $polling_items = db_fetch_assoc("SELECT * FROM poller_item WHERE rrd_next_step<=0 ORDER by h ...

  9. KendoUI Grid Pager部分 Nan-Nan of x Items

    相关问题: http://stackoverflow.com/questions/23941065/pager-error-in-kendo-gridnan-nan-of-1-items http:/ ...

  10. innerHTML与IE浏览器内存泄露问题

    使用 sIEve 扫描和筛选 如果大量使用 JavaScript 和 Ajax 技术开发 Web 2.0 应用程序,您很有可能会遇到浏览器的内存泄漏问题.如果您有一个单页应用程序或者一个页面要处理很多 ...