在Verilog 1995規定,對於沒宣告的信號會自動視為wire,這樣常常造成debug的困難,Verilog 2001另外定義了`default_nettype none,將不再自動產生wire.

1 module default_nettype_none (
2   input n0,
3   input n1,
4   output o1
5 );

7 assign ol = n0 & n1; // no error here, only warning

9 endmodule

因為打錯,而將o1打成ol,Quartus II並未抓出這個錯誤,竟然順利編譯成功,雖然有warning.

########################################################################

1 `default_nettype none

3 module default_nettype_none (
4   input n0,
5   input n1,
6   output o1
7 );

9 assign ol = n0 & n1; // compiler error here
10 
11 endmodule

第1行加了`default_nettype none,這是Verilog 2001新增的compiler directive,避免Verilog將未宣告的信號視為wire.

Verilog 2001 `default_nettype none的更多相关文章

  1. verilog 2001中的一些新语法

    比较有用的:1,generate语句,但需注意,generate-for中变量范围是已知的确定值, generate-case,generate-if语句中变量都必须是固定的, generate必须跟 ...

  2. Verilog Tips and Interview Questions

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

  3. verilog中的有符号数运算

    verilog中的有符号数运算 http://hi.baidu.com/lixu1113/item/d00dc095f86aed48f142159a verilog中的有符号数运算 有符号数的计算:若 ...

  4. 【转载】关于generate用法的总结【Verilog】

    原文链接: [原创]关于generate用法的总结[Verilog] - nanoty - 博客园http://www.cnblogs.com/nanoty/archive/2012/11/13/27 ...

  5. [转载]关于generate用法的总结【Verilog】

    转载自http://www.cnblogs.com/nanoty/archive/2012/11/13/2768933.html Abtract generate语句允许细化时间(Elaboratio ...

  6. 如何使用SignalTap II觀察reg與wire值? (SOC) (Verilog) (Quartus II) (SignalTap II)

    Abstract撰寫Verilog時,雖然每個module都會先用ModelSim或Quartus II自帶的simulator仿真過,但真的將每個module合併時,一些不可預期的『run-time ...

  7. verilog中的有符号数理解(转)

    verilog中的有符号数运算 有符号数的计算:若有需要关于有号数的计算,应当利用Verilog 2001所提供的signed及$signed()机制. Ex: input  signed [7:0] ...

  8. Verilog语言:还真的是人格分裂的语言

    人气腹语术师天愿在现场披露了被人偶搭档夺取灵魂的腹语术师将妻子杀害的表演节目.天愿真的陷入了多重人格,命令自己杀害妻子和子的人偶的人格出现了.为了不(让自己)杀害和弟子登川有外遇的妻子,天愿提出委托想 ...

  9. verilog FAQ(zz)

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

随机推荐

  1. UINavigationController+FDFullscreenPopGesture全屏回滑手势阅读理解

    滑动返回纯oc.纯swifthttps://github.com/Bonway/BBGestureBack UINavigationController+FDFullscreenPopGesture全 ...

  2. 第六周之Hadoop学习(六)

    继续上周开启telnet的过程,这个过程发现win10上运行不了telnet的命令 原因大概在于没有开启telnet服务,从网上下载好telent服务端,安装后继续尝试是否能在win10上使用hado ...

  3. 异常 日志-<多重catch语句>

    try{ }catch(){ }catch(){ }

  4. IIS URL Rewrite(URL 重写)-使用教程

    IIS URL Rewrite(URL 重写)-使用教程 作者:vkvi 来源:千一网络(原创) 日期:2011-8-17  http://www.cftea.com/c/2011/08/9CRXOL ...

  5. 本周总结(19年暑假)—— Part5

    日期:2019.8.11 博客期:111 星期日

  6. “嘭、嘭、嘭”---C/S架构下的心跳机制

    本人想使用AU3开发多客户端.一服务端.需要使用到心跳机制,即 在线状态实时更新以及掉线自动重连. 搜索网络发现没有人用AU3写心跳机制. 下面是一篇转帖(原文地址:http://www.cnblog ...

  7. 生成资源文件时候,可以动态替换为maven属性

    1.maven管理的文件或者是maven插件处理的文件中   可以引用maven属性,在编译输出时候,可以替换   ${project.build.testOutputDirectory}   在资源 ...

  8. 吴裕雄 Bootstrap 前端框架开发——Bootstrap 按钮:表示成功的动作

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  9. Spring之byte[]传输

    事出原因 某些原因,需要在在服务之间传输文件,想到只有通过Byte数组,或者是Stream传递,遂定下两方法,一个byte,一个inpustream,老样子,upload(@RequestParam( ...

  10. JetBrains IntelliJ IDEA(IJ)v2019.3.3/3.1/3.2/3.4/3.5 for mac/windows/linux 详细安装破解教程

    手欠升级了IntelliJ IDEA到2019.3.3,原来的破解不可用,IntelliJ IDEA 2019.3.3破解办法如下,为方便自己使用记录下.======================= ...