当前位置:网站首页>Quartus call & design D trigger Simulation & timing wave verification
Quartus call & design D trigger Simulation & timing wave verification
2022-06-23 13:37:00 【Little monster】
quartus call & Design D trigger —— Simulation & Time series wave verification
Catalog
1、 stay Quartus-II I use the gate circuit to design a D trigger , And simulate , Timing waveform verification ;
2、 stay Quartus-II Directly call a D Trigger circuit , Conduct simulation , Timing waveform verification , And 2 compare ;
3、 stay Quartus-II use Verilog Write a language D trigger , Conduct simulation verification
One 、 know D trigger
D A trigger is a device with memory function , Information storage device with two stable states , Is to constitute a variety of
The most basic logic unit of a sequential circuit, It is also an important unit circuit in digital logic circuit .
D Trigger inClock pulses CP The leading edge of the ( Positive jump 0→1) Flipping occurs, The secondary state of the trigger depends on CP Before the rising edge of the pulse arrives D The state of the end , namelySubstate =D. therefore , It has 0、 Set up 1 Two functions . Because in CP=1 During this period, the circuit has the function of maintaining blocking , So in CP=1 period ,D The data state of the terminal changes , It will not affect the output state of the trigger .
D Triggers are widely used , It can be used as the deposit of digital signals , Shift deposit , Frequency division and waveform generator, etc .
1、 structure
D trigger (data flip-flop or delay flip-flop) from 4 A NAND gate , among G1 and G2 Constitute the basic RS trigger . When the level triggered master-slave trigger works , The input signal must be added before the positive jump edge . If in CP Interference signal appears at the input during high level , Then it is possible to make the trigger state error . The edge trigger allows you to CP The trigger edge comes to the moment before adding the input signal . such , The time when the input is disturbed is greatly shortened , The possibility of interference is reduced . edge D Triggers are also called sustain - Blocking edges D trigger . edge D The trigger can consist of two D The trigger is connected in series , But the first one D Trigger CP Need to use non gate reverse .
2、 features
Menu 
Sequence diagram 
This is right D A brief introduction to triggers , For more D Understanding of triggers , You can refer to the following link ;
D trigger .
Two 、 Design D Trigger timing verification
1、 Create a project
file—>new project wizard
Edit project name , Click later next
Choose the right chip and its family 
direct next
Project creation complete , Click on finish
2、 Create a box file
Click on new
Select the signature in the red box 
Select... As shown 
choice nand2, Two input NAND gates , Add... In turn 4 individual nand2 And a non gate not
After adding, as shown in the figure 
Select the connection tool 
The wiring effect is shown in the figure ( Double click the mouse to change the pin name )
Save the circuit diagram 
3、 Compile schematic file
Compile the circuit diagram 
Compiler interface 
rtl viewer, Check the hardware circuit diagram 
Circuit diagram 
4、 establish vwm Waveform file
Select the icon vwm
Operation as shown in figure 
add to node or bus
Effect display 
Edit input signal clk, Generate a clock signal 
Mouse selection D,Q The signal Q_n, Editing ( Select with the left mouse button Double click to change the value )
5、 Timing waveform simulation
compile 
There is an error 
Connect modelsim

Error reporting solution 

The result is shown in Fig. 
Simulation results 
3、 ... and 、 call D Trigger timing verification
1、 Create a box file
The creation method is the same as above
call D trigger 
Wiring patch pin , The effect is as shown in the picture (Ctrl+ The mouse wheel can zoom the trigger pin, etc )
2、 Compile the schematic
Check the hardware diagram 
compile 
3、 establish vwm Waveform file and simulation
wave form 
Timing simulation results 
Four 、verilog Language implementation D Trigger timing verification
1、 To write verilog file
Create the project first , Method is the same as above.
establish Verilog file , Click on file—new
Paste the following code
//demo File name
module demo(d,clk,q);
input d;
input clk;
output q;
reg q;
always @ (posedge clk)// We use the positive edge of the clock as its sensitive signal
begin
q <= d;// When the rising edge is valid , hold d Capture to q
end
endmodule

Save and compile 
2、 View the generated circuit diagram

3、 Test timing simulation
The code is as follows
// Test code
`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;// Artificially generated burr
#22 d <= 0;
#2 d <= 1;
#2 d <= 0;
#16 d <= 0;// maintain 16ns Low level of , Then let it cycle periodically
end
end
always #20 clk <= ~clk;// Half cycle is 20ns, The whole cycle is 40ns A signal of
endmodule
Save and compile 
Simulation effect picture 
5、 ... and 、 Summary and references
1、 summary
D The process of trigger timing simulation , You can find D The basic function of the trigger is when the reset signal is 1 When ,CLK The rising edge of will cause Q Change in value . thus , It can be concluded that the equation of state is Q n + 1 = D
2、 Reference material
Quartus II Use of built-in simulation tools .
Quartus-II Input schematic diagram and simulation steps .docx.
Quartus-II13.1 Three ways to achieve D Trigger timing simulation .
边栏推荐
- Have you ever encountered incompatibility between flink1.15.0 and Flink CDC MySQL 2.2.1? f
- How deci and Intel can achieve up to 16.8x throughput improvement and +1.74% accuracy improvement on mlperf
- What is the principle of live CDN in the process of building the source code of live streaming apps with goods?
- Hanyuan hi tech 1-way uncompressed 4k-dvi optical transceiver 4K HD uncompressed DVI to optical fiber 4k-dvi HD video optical transceiver
- . Net how to use log framework NLog
- React query tutorial ④ - cache status and debugging tools
- Runtime application self-protection (rasp): self-cultivation of application security
- sed -i命令怎么使用
- How to enable the SMS function of alicloud for crmeb knowledge payment
- 构建英特尔 DevCloud
猜你喜欢

Quartus II 13.1 安装步骤详解

Can cold plate, submerged and spray liquid cooling lead the development of high-performance computing?

windows 安装 MySQL

【深入理解TcaplusDB技术】单据受理之事务执行

Go写文件的权限 WriteFile(filename, data, 0644)?

Go寫文件的權限 WriteFile(filename, data, 0644)?

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

快速了解常用的非对称加密算法,再也不用担心面试官的刨根问底

One way linked list implementation -- counting

First exposure! The only Alibaba cloud native security panorama behind the highest level in the whole domain
随机推荐
R language uses matchit package for propensity matching analysis (set the matching method as nearest, match the control group and case group with the closest propensity score, 1:1 ratio), and use matc
Broadcast level E1 to aes-ebu audio codec E1 to stereo audio XLR codec
618的省钱技术攻略 来啦 -体验场景 领取10元猫超卡!
1 channel 100m optical fiber transceiver 1 100m optical 1 100m electric desktop Ethernet optical fiber transceiver built-in power supply
Deci 和英特尔如何在 MLPerf 上实现高达 16.8 倍的吞吐量提升和 +1.74% 的准确性提升
Go写文件的权限 WriteFile(filename, data, 0644)?
R language uses the polR function of mass package to build an ordered multi classification logistic regression model, and uses the summary function to obtain the summary statistical information of the
Quartus II 13.1 detailed installation steps
Groovy map operation
栈和队列的基本使用
windows 安装 MySQL
64 channel telephone +2-channel Gigabit Ethernet 64 channel PCM telephone optical transceiver voice telephone to optical fiber
React query tutorial ④ - cache status and debugging tools
【深入理解TcaplusDB技术】单据受理之事务执行
Dataset之GermanCreditData:GermanCreditData数据集的简介、下载、使用方法之详细攻略
How to use sed -i command
RestCloud ETL解决shell脚本参数化
Cloud native essay deep understanding of ingress
How do the top ten securities firms open accounts? Is online account opening safe?
quartus調用&設計D觸發器——仿真&時序波驗證