Verilog 大小写敏感,且所有关键字都是小写

1  寄存器

 register = storage,是数据存储单元的抽象,可视为能够存储数值的变量 (variable that can hold value)

关键字 reg;  缺省值 x;  

2  网络连接

net = connection, 表示寄存器之间的连接,只能采用连续赋值 (must be driven continuously)

关键字 wire;  缺省值 z;  

2.1  D 触发器 (同步复位)

module  dff(clk, rst, d, q);  //dff with syn reset
input clk, rst, d;
output q;
reg q; always @(posedge clk)
begin
if (rst)
q <= 'b0;
else
q <= d;
end endmodule

2.2  D 触发器 (异步复位)

module  dff(clk, rst, d, q); // dff with asyn reset
input clk, rst, d;
output q;
reg q; always @(posedge clk or posedge rst)
begin
if (rst)
q <= 'b0;
else
q <= d;
end endmodule

3  连续赋值 continuous assignment

assign  data_left  =  data_right;  // right drive left(net)

例:选择器 mux

assign  data_out  =  select ? data_in1 : data_in0;

4  procedural assignment

1)  阻塞赋值 ("=")

execute sequential

2)  非阻塞赋值 ("<=")

read (right)  -> schedule (left) ->  execute (<=)

例: synchronizer

reg  [:]  data_sync;

always @ (posedge clk or posedge rst)
begin
if (rst)
data_sync <= 'b00;
else
data_sync <= {data_sync[], data_in};
end assign data_out = data_sync[];

Verilog (一) assignment, register and net的更多相关文章

  1. Quartus II 中 Verilog 常见警告/错误汇总

    Verilog 常见错误汇总 1.Found clock-sensitive change during active clock edge at time <time> on regis ...

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

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

  3. Quartus II中的Waring(转)

    1.Found clock-sensitive change during active clock edge at time <time> on register "<n ...

  4. [转载]Quartus ii 一些Warning/Eeror分析与解决

    我会在此基础上继续添加 原文地址:ii 一些Warning/Eeror分析与解决">Quartus ii 一些Warning/Eeror分析与解决作者:yanppf 注:http:// ...

  5. quartus II Warning 好的时序是设计出来的,不是约束出来的

    一.Warning (15714): Some pins have incomplete I/O assignments. Refer to the I/O Assignment Warnings r ...

  6. Verilog-1995 VS Verilog-2001

    http://www.cnblogs.com/tshell/p/3236476.html 2001年3月IEEE正式批准了Verilog‐2001标准(IEEE1364‐2001),与Verilog‐ ...

  7. uboot之at91sam9g45移植

    一.第一阶段,无修改 二.第二阶段 u-boot-1.3.4\lib_arm\board.c 1.增加头文件 2.增加版本号 3.start_armboot中初始化部分 板级初始化部分init_seq ...

  8. verilog behavioral modeling--procedural continous assignment(不用)

    assign / deassgin force /release the procedural continuous assignments(using keywords assign and for ...

  9. Verilog Tips and Interview Questions

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

随机推荐

  1. Linux修改命令提示符(关于环境参量PS1)

    关乎环境参量的四个文件/etc/profile  /etc/bashrc ~/.bashrc  ~/.bash_profile $$$:/etc/profile:此文件为系统的每个用户设置环境信息,当 ...

  2. UGUI之布局的使用

    unity的LayoutGroup分为三种, Horizontal Layout Group(水平布局):对象填充总个父物体,水平会填充 Vertical Layout Group(垂直布局):垂直( ...

  3. [moka同学笔记]yii2.0 dropdownlist的简单使用(一)

    1.controller控制中 $modelCountrytelCode = CountryTelCode::find()->orderBy('id DESC')->all(); $tel ...

  4. mongodb学习6--js操作mongodb

    一,mongo知识储备:1. 获取mongoDB中数据库的大小命令use databasenamedb.stats()显示信息如下 > db.stats() { "collection ...

  5. R语言-妹子被追后的选择分析

    前提假设 妹子们一生中可以遇到100个追求者,追求者的优秀程度符合正态分布: 每个妹子都具备判断并比较追求者优秀程度的能力: 接受或拒绝一个追求者后永远无法后悔. 那么,问题来了 当遇到追求者时,如何 ...

  6. 删除单链表倒数第n个节点

    基本问题 如何删除单链表中的倒数第n个节点? 常规解法 先遍历一遍单链表,计算出单链表的长度,然后,从单链表头部删除指定的节点. 代码实现 /** * * Description: 删除单链表倒数第n ...

  7. java微信开发(wechat4j)——发送客服消息

    微信支持主动发送客服消息.如果你要实现此功能,需要使用CustomerMsg类. 获得access_token access_token请求之后有一个过期时间,微信平台建议你使用一个中控服务器来定时刷 ...

  8. jQuery eislideshow 图片轮播

    在线实例 基础演示 自动播放 使用方法 <div id="ei-slider" class="ei-slider"> <ul class=&q ...

  9. andriod ==和equals

    == 用于数字 equals用于字符

  10. 用R语言分析我的fitbit计步数据

    目标:把fitbit的每日运动记录导入到R语言中进行分析,画出统计图表来 已有原始数据:fitbit2014年每日的记录电子表格文件,全部数据点此下载,示例如下: 日期 消耗卡路里数 步 距离 攀爬楼 ...