当前位置:网站首页>quartus调用&设计D触发器——仿真&时序波验证
quartus调用&设计D触发器——仿真&时序波验证
2022-06-23 12:57:00 【小小怪༻】
quartus调用&设计D触发器——仿真&时序波验证
目录
1、 在 Quartus-II 中自己用门电路设计一个D触发器,并进行仿真,时序波形验证;
2、在 Quartus-II 中直接调用一个D触发器电路,进行仿真,时序波形验证,与2做比较;
3、在 Quartus-II用Verilog语言写一个D触发器,进行仿真验证
一、认识D触发器
D触发器是一个具有记忆功能的,具有两个稳定状态的信息存储器件,是构成多种
时序电路的最基本逻辑单元,也是数字逻辑电路中一种重要的单元电路。
D触发器在时钟脉冲CP的前沿(正跳变0→1)发生翻转,触发器的次态取决于CP的脉冲上升沿到来之前D端的状态,即次态=D。因此,它具有置0、置1两种功能。由于在CP=1期间电路具有维持阻塞作用,所以在CP=1期间,D端的数据状态变化,不会影响触发器的输出状态。
D触发器应用很广,可用做数字信号的寄存,移位寄存,分频和波形发生器等。
1、结构
D触发器(data flip-flop或delay flip-flop)由4个与非门组成,其中G1和G2构成基本RS触发器。电平触发的主从触发器工作时,必须在正跳沿前加入输入信号。如果在CP高电平期间输入端出现干扰信号,那么就有可能使触发器的状态出错。而边沿触发器允许在CP触发沿来到前一瞬间加入输入信号。这样,输入端受干扰的时间大大缩短,受干扰的可能性就降低了。边沿D触发器也称为维持-阻塞边沿D触发器。边沿D触发器可由两个D触发器串联而成,但第一个D触发器的CP需要用非门反向。
2、特征
功能表
时序图
这里就是对D触发器的一个简单介绍,有关更多D触发器的认识,大家可以参考下面链接;
D触发器.
二、设计D触发器及时序验证
1、创建工程
file—>new project wizard
编辑工程名称,后面点击next
选择合适的芯片及其系列
直接next
工程创建完成,点击finish
2、创建方框文件
点击new
选择红色方框的署名
按图示选择
选择nand2,两个输入的与非门,依次添加4个nand2和一个非门not
添加完成后如图
选择连线工具
连线效果如图(双击鼠标可以更改引脚名称)
保存电路图
3、编译原理图文件
编译电路图
编译界面
rtl viewer,查看硬件电路图
电路图
4、创建vwm波形文件
选择图示vwm
操作如图
添加node or bus
效果展示
编辑输入信号clk,产生时钟信号
鼠标选择D,Q信号Q_n,进行编辑(鼠标左键选中 双击改值)
5、时序波形仿真
编译
出现报错
连接modelsim

报错解决方法

结果如图
仿真结果
三、调用D触发器及时序验证
1、创建方框文件
创建工程方法同上
调用D触发器
连线补引脚,效果如图(Ctrl+鼠标滚轮可以对触发器引脚等进行缩放)
2、编译原理图
查看硬件图
编译
3、创建vwm波形文件及仿真
波形
时序仿真结果
四、verilog语言实现D触发器及时序验证
1、编写verilog文件
首先创建工程,方法同上
创建Verilog文件,点击file—new
粘贴如下代码
//demo是文件名
module demo(d,clk,q);
input d;
input clk;
output q;
reg q;
always @ (posedge clk)//我们用正的时钟沿做它的敏感信号
begin
q <= d;//上升沿有效的时候,把d捕获到q
end
endmodule

保存并编译
2、查看生成的电路图

3、测试时序仿真
代码如下
//测试代码
`timescale 1ns / 1ns
module demo_tb;
reg clk,d;
wire q;
demo u1(.d(d),.clk(clk),.q(q));
initial
begin
clk = 1;
d <= 0;
forever
begin
#60 d <= 1;//人为生成毛刺
#22 d <= 0;
#2 d <= 1;
#2 d <= 0;
#16 d <= 0;//维持16ns的低电平,然后让它做周期性的循环
end
end
always #20 clk <= ~clk;//半周期为20ns,全周期为40ns的一个信号
endmodule
保存并编译
仿真效果图
五、总结与参考资料
1、总结
D触发器及时序仿真的过程,可以发现D触发器的基本功能是在复位信号为1的时候,CLK的上升沿会引起Q值的变化。由此,可以得出次态方程为 Q n + 1 = D
2、参考资料
Quartus II自带仿真工具的使用.
Quartus-II输入原理图及仿真步骤.docx.
Quartus-II13.1三种方式实现D触发器及时序仿真.
边栏推荐
- How to solve the task cache compilation problem caused by gradle build cache
- Packaging and unpacking process of ESP message under IPSec transmission mode
- Architecture design methods in technical practice
- [deeply understand tcapulusdb technology] transaction execution of document acceptance
- 深入剖析MobileNet和它的变种
- Yyds dry inventory solution sword finger offer: judge whether it is a balanced binary tree
- R language dplyr package mutate_ The all function multiplies all numeric columns (variables) in the dataframe by a fixed value to generate a new data column, and specifies a user-defined suffix name f
- 4-way telephone +1-way Gigabit Ethernet 4-way PCM telephone optical transceiver
- R语言将距离矩阵输入给hclust函数进行层次聚类分析,使用cutree函数进行层次聚类簇的划分、参数k指定聚类簇的个数、给每个样本都分配了簇标签
- Homekit supports the matter protocol. What does this imply?
猜你喜欢

腾讯的技术牛人们,是如何完成全面上云这件事儿的?

What is the principle of live CDN in the process of building the source code of live streaming apps with goods?

After the uncommitted transactions in the redo log buffer of MySQL InnoDB are persisted to the redo log, what happens if the transaction rollback occurs?

1 channel 100m optical fiber transceiver 1 100m optical 1 100m electric desktop Ethernet optical fiber transceiver built-in power supply

Configure SSH Remote Login for H3C switch

32-way telephone +2-way Gigabit Ethernet 32-way PCM telephone optical transceiver supports FXO port FXS voice telephone to optical fiber

windows 安装 MySQL

DBMS in Oracle_ output. put_ How to use line

2 万字 + 30 张图 |MySQL 日志:undo log、redo log、binlog 有什么用?

First exposure! The only Alibaba cloud native security panorama behind the highest level in the whole domain
随机推荐
sed -i命令怎么使用
R语言使用MASS包的polr函数构建有序多分类logistic回归模型、使用exp函数和coef函数获取模型中每个变量(自变量改变一个单位)对应的优势比(odds ratio)
交换两个数的三种方法原理解析
&lt; Sicily&gt; 1000. number reversal
同花顺网上开户安全吗,需要注意什么
Has aaig really awakened its AI personality after reading the global June issue (Part 1)? Which segment of NLP has the most social value? Get new ideas and inspiration ~
能把SAP系统玩成鸡肋的公司,太有才了!
Digraph D and e
『忘了再学』Shell流程控制 — 39、特殊流程控制语句
Lm05 former VIX (second generation product)
MySQL single database and table splitting using MYCAT
[website architecture] the unique skill of 10-year database design, practical design steps and specifications
How to solve the task cache compilation problem caused by gradle build cache
美国的国家公园概览
The redis keys command should be used with caution in the production environment. It is best to shield it
服务稳定性治理
What is the reason why maxcompute is sometimes particularly slow to execute SQL queries
C语言的基本数据类型及其打印输出
R language dplyr package arrange function sorts dataframe data and sorts dataframe data through multiple data columns (ascending sort by default)
The GLM function of R language uses frequency data to build a binary logistic regression model. The input data for analysis is frequency data, which is transformed into normal sample data (split and s