当前位置:网站首页>[Verilog quick start of Niuke network question brushing series] ~ asynchronous reset Series T trigger
[Verilog quick start of Niuke network question brushing series] ~ asynchronous reset Series T trigger
2022-06-29 04:34:00 【AI is very good】
Catalog :
0. Preface
Today, I only scratched one question , Why? ? Is it because it's hard ? It doesn't seem to be !!! Because I think the question on niuke.com seems to be full of loopholes , So I came up with a bold idea , That is to write your own design and test files , Use vcs+verdi Co simulation ( Follow the crowd , Ha ha ha ). Let's not say anything else , It took me a day just to pretend , Purring . But now the environment is basically no problem , About the environment , I did it with reference to the boss , See references .
1. Asynchronous reset series T trigger
Click to see the original question
1.1 Title Description
use verilog Realize two asynchronous reset in series T Logic of trigger
1.1.1 Signal schematic diagram

1.1.2 Waveform diagram

1.1.3 Input description
Input signal data, clk, rst
type wire
stay testbench in ,clk For cycles 5ns The clock of ,rst Reset for low level
1.1.4 Output description
The output signal q
type reg
1.2 Their thinking
It should be noted that , What is the effective level of each signal ? We need to make this clear according to the requirements of the topic , What I need to roast about here is , It is a low level reset , It is not officially defined as rst_n(_n The default is that the low level is active , Personal habits ).
Knowledge point 1:T trigger ===> Input is 1, Output flip ; Input is 0, Output hold .
Knowledge point 2: Asynchronous reset means that the reset can be completed without waiting for the clock . meanwhile , And synchronous reset , In general , It is best to use synchronous reset , Sometimes, asynchronous reset cannot be avoided , Because it saves resources , Very provincial , ha-ha , therefore , An asynchronous reset has occurred , Synchronous release operation , extensive use .
1.3 Code implementation
`timescale 1ns/1ns
module Tff_2 (
input wire data, clk, rst,
output reg q
);
//*************code***********//
reg q_reg;
always @ (posedge clk or negedge rst) begin
if(!rst) begin
q_reg <= 1'b0;
end
else begin
if(data) begin
q_reg <= ~q_reg;
end
else begin
q_reg <= q_reg;
end
end
end
always @ (posedge clk or negedge rst) begin
if(!rst) begin
q <= 1'b0;
end
else begin
if(q_reg) begin
q <= ~q;
end
else begin
q <= q;
end
end
end
//*************code***********//
endmodule
1.4 Simulation file
About simulation files , I haven't done it yet , Let me familiarize myself with vcs and verdi A combination of , ha-ha ! Coming soon .
1.5 Simulation waveform
Coming soon !!!
reference
边栏推荐
- Apifox : 不仅是Api调试工具,更是开发团队的协作神器
- Pytorch read / write file
- [C language] explain the thread recycling function pthread_ join
- 汉泰示波器软件|汉泰示波器上位机软件NS-Scope,任意添加测量数据
- How to quickly install MySQL 5.7.17 under CentOS 6.5
- Blue Bridge Cup DFS (I)
- [structural mechanics] the reason why the influence line under joint load is different from that under direct load
- Remote connection of raspberry pie in VNC Viewer Mode
- NotImplementedError: Could not run torchvision::nms
- Multi machine LAN office artifact rustdesk use push!!!
猜你喜欢

Ask a simple question about SQL

Composite pattern

Wi-Fi 7 来啦,它到底有多强?

JVM_ 16_ Garbage collector

Iterator pattern

Apifox: it is not only an API debugging tool, but also a collaboration artifact of the development team

If I hadn't talked to Ali P7, I wouldn't know I was a mallet

Rapid development project -vscode plug-in

Memo pattern

Remediation for Unsafe Cryptographic Encryption
随机推荐
BERT和ViT简介
1019 数字黑洞
热更新流程
SEAttention 通道注意力机制
Analysis on the types of source code anti leakage technology
JDBC learning
Mécanisme d'attention du canal de fixation
Talking about Canary deployment
GBASE 8s must be a DBSA、路径更改导致无法启动的解决方法
Multi machine LAN office artifact rustdesk use push!!!
Remote connection of raspberry pie in VNC Viewer Mode
Quelles sont les méthodes de simulation et de gravure des programmes? (comprend les outils communs et la façon dont ils sont utilisés)
The virtual machine MySQL cannot be connected to the local computer
Cucumber test practice
JDBC man Han building code
Webapck system foundation
[WC2021] 斐波那契——数论、斐波那契数列
The people's Bank of China printed and distributed the notice on supporting cross-border RMB settlement of new foreign trade formats
1015 theory of virtue and talent
[structural mechanics] the reason why the influence line under joint load is different from that under direct load