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 ...
随机推荐
- 【poj 2185】Milking Grid(字符串--KMP+问题分解)
题意:给定一个由字符组成的矩阵,求出它的面积最小的覆盖矩阵.(感觉应该是可重叠的......* (・ω・)っ) 解法:KMP.行列互不影响,可以问题分解.先求出每一行的最小重复串,利用kmp中的nex ...
- poolboy的坑
poolboy是Erlang中运用非常广泛的进程池库,它有很多优点,使用简单,在很多项目中都能看到它的身影.不过,它也有一些坑,使用时候需要注意.(本文对poolboy的分析基于1.5.1版本) wo ...
- 利用javascript、php和ajax实现计算器
计算器和ajax部分: <?php /** * Created by PhpStorm. * User: Administrator * Date: 16-9-2 * Time: 上午9:20 ...
- 安装SQL Server Management Studio Express错误码是29506
解决方法:1:新建一个记事本,输入msiexec /i path\SQLServer2005_SSMSEE.msi 然后另存为.cmd格式.2:右单击刚刚创建的那个.CMD文件,选择“以管理员身份运行 ...
- [leetcode] Number of Islands
Number of Islands Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. ...
- IOS真机测试(用证书进行真机测试)
真机测试需要准备 1.证书 2.Iphone或者Ipad 3.到developer.apple.com注册开发者账号(不用money的) ------------------------------- ...
- OC数组排序
NSArray *array = @[@"tailong", @"kaersasi", @"airuiliya", @"yingl ...
- 干货-iOS、mac开源项目及库,以后我也会持续更新。
昨晚在网上看的干货,直接分享给大家了,觉得有用的,直接fork吧. https://github.com/Brances/TimLiu-iOS
- CentOS6.5下RPM方式安装mysql5.6.33
1.mysql下载 下载地址:https://dev.mysql.com/downloads/mysql/5.6.html下载以下安装包: MySQL-client-5.6.33-1.el6.x86_ ...
- 敏捷软件开发:原则、模式与实践——第12章 ISP:接口隔离原则
第12章 ISP:接口隔离原则 不应该强迫客户程序依赖并未使用的方法. 这个原则用来处理“胖”接口所存在的缺点.如果类的接口不是内敛的,就表示该类具有“胖”接口.换句话说,类的“胖”接口可以分解成多组 ...