Verilog (一) assignment, register and net
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的更多相关文章
- Quartus II 中 Verilog 常见警告/错误汇总
Verilog 常见错误汇总 1.Found clock-sensitive change during active clock edge at time <time> on regis ...
- 对Verilog 初学者比较有用的整理(转自它处)
*作者: Ian11122840 时间: 2010-9-27 09:04 ...
- Quartus II中的Waring(转)
1.Found clock-sensitive change during active clock edge at time <time> on register "<n ...
- [转载]Quartus ii 一些Warning/Eeror分析与解决
我会在此基础上继续添加 原文地址:ii 一些Warning/Eeror分析与解决">Quartus ii 一些Warning/Eeror分析与解决作者:yanppf 注:http:// ...
- quartus II Warning 好的时序是设计出来的,不是约束出来的
一.Warning (15714): Some pins have incomplete I/O assignments. Refer to the I/O Assignment Warnings r ...
- Verilog-1995 VS Verilog-2001
http://www.cnblogs.com/tshell/p/3236476.html 2001年3月IEEE正式批准了Verilog‐2001标准(IEEE1364‐2001),与Verilog‐ ...
- uboot之at91sam9g45移植
一.第一阶段,无修改 二.第二阶段 u-boot-1.3.4\lib_arm\board.c 1.增加头文件 2.增加版本号 3.start_armboot中初始化部分 板级初始化部分init_seq ...
- verilog behavioral modeling--procedural continous assignment(不用)
assign / deassgin force /release the procedural continuous assignments(using keywords assign and for ...
- Verilog Tips and Interview Questions
Verilog Interiew Quetions Collection : What is the difference between $display and $monitor and $wr ...
随机推荐
- 译 PrestaShop开发者指南 第三篇 设置本地安装环境
## 环境要求 - Unix, Linux 或 Windows - Web服务器:Apache 1.3 或更高的版本 - PHP:5.2或更高版本 - MySQL:5.0或更高版本 PrestaSho ...
- 内核移植和文件系统制作(3)Ramdisk简介和常见问题
一,Ramdisk简介: Ramdisk是一种基于内存的虚拟文件系统(并非一个实际的文件系统),它将一部分固定大小(这个大小在编译内核的make menuconfig时配置)的内存当作硬盘一个分区来使 ...
- No.001:Two Sum
问题: Given an array of integers, return indices of the two numbers such that they add up to a specifi ...
- Linux命令详解之—cat命令
cat命令的功能是连接文件或标准输入并打印,今天就为大家介绍下Linux中的cat命令. 更多Linux命令详情请看:Linux命令速查手册 Linux 的cat命令通常用来显示文件内容,也可以用来将 ...
- 度娘果然毫无节操,纯粹就是order by 广告费 desc
度娘果然毫无节操,纯粹就是order by 广告费 desc 必应搜索出来排第一,度娘根本就找不到在哪....
- Linux 学习手记(4):Linux系统常用Shell命令
日期时间 date命令:显示当前时间日期 date -u # 显示格林威治(UTC)事件 date +%Y-%m-%d # 格式显示日期 date -s '20:25:25' # 修改系统时间,需要使 ...
- chenxi的js学习笔记
1.本文主体源自:http://www.cnblogs.com/coco1s/p/4029708.html,有兴趣的可以直接去那里看,也可以看看我整理加拓展的. 2.js是一门什么样的语言及特点? j ...
- 网站SEO之百度优化不得不知的铁人三项规则
奥运会有铁人三项,此运动更好的协调了运动员的综合素质水平,而百度优化排名中的“铁人三项”规则则是让网站的整体质量更好的满足市场用户体验.针对不同部分的操作,可以让网站在每个细节处都能凸显以人为本的服务 ...
- ArcGIS 10 SP5中文版(ArcGIS10补丁5中文版)
下载地址:百度网盘下载地址:http://pan.baidu.com/s/1o7qPGhk 来自:http://zhihu.esrichina.com.cn/?/sort_type-new__day- ...
- SharePoint Tricks - Survey
1. SharePoint 2010中,在Survey的问题框中输入HTML代码可以用于插入图片或者链接,具体方法为: 1.1 在问题框中输入html, 1.2 在New Form和Edit Form ...