在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. 动态代理Cglib

    jar包 <!-- https://mvnrepository.com/artifact/cglib/cglib --><dependency> <groupId> ...

  2. [mjpeg @ ...] unable to decode APP fields: Invalid data found when processing input

    通过FFmpeg打开自己笔记本摄像头(HP Wide Vision HD Camera)操作时遇到如下错误: [mjpeg @ 0000029be7cbd000] unable to decode A ...

  3. Day11 - O - Coin Game HDU - 3951

    题目链接 思路:考虑第一个人取的方式: 1.每次能取的次数>= n, 一次取完 first win 2.每次能取1个,n是奇数 first win 3.一次取不完,这种情况下也分2种情况 1)s ...

  4. centos6.5安装图形操作界面

    yum -y install xorg-x11-fonts-Type1 #安装Xwindow yum -y groupinstall "X Window System" #安装GN ...

  5. 自定义Model类

    声明文件 #import <Foundation/Foundation.h> @interface OrderRecordModel : NSObject @property (nonat ...

  6. Django的urls(路由)

    目录 Django的urls(路由) 正则表达式详解 路由匹配(分组匹配) 无名分组 有名分组 反向解析 无名分组反向解析 有名分组反向解析 路由分发 名称空间 虚拟环境 伪静态 Django的url ...

  7. springboot#配置https

    1.准备证书 2.1 springboot 1.x配置 2.2 springboot 2.x配置 1.准备证书: keytool -genkeypair -alias tomcat -keyalg R ...

  8. DatePicker和DatePickerDialog的使用

    activity_main.xml: <Button android:id="@+id/showDatePickerButton" android:text="@s ...

  9. Metasploit学习笔记——强大的Meterpreter

    1. Meterpreter命令详解 1.1基本命令 使用Adobe阅读器渗透攻击实战案例打开的Meterpreter会话实验,靶机是WinXP.由于所有命令与书中显示一致,截图将书中命令记录下来. ...

  10. mutiset的简单介绍转载

    原文链接:https://blog.csdn.net/sodacoco/article/details/84798621        c++语言中,multiset是<set>库中一个非 ...