当前位置:网站首页>[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
边栏推荐
- 1019 数字黑洞
- JVM内存调优方式
- [structural mechanics] the reason why the influence line under joint load is different from that under direct load
- Apifox: it is not only an API debugging tool, but also a collaboration artifact of the development team
- Composite pattern
- Webapck system foundation
- [C language] start a thread
- Runtimeerror in yolox: dataloader worker (PID (s) 17724, 1364, 18928) exited unexpectedly
- [C language] address of stack memory associated with local variable 'num' returned
- Project development culture
猜你喜欢

Command pattern

Memo pattern

Runtimeerror in yolox: dataloader worker (PID (s) 17724, 1364, 18928) exited unexpectedly

安捷伦数字万用表软件NS-Multimeter,实时数据采集数据自动保存

Inftnews | metauniverse technology will bring a new shopping experience

Mécanisme d'attention du canal de fixation

How to quickly install MySQL 5.7.17 under CentOS 6.5

JVM_ 16_ Garbage collector

Anaconda's own Spyder editor starts with an error

What are the MySQL database constraint types
随机推荐
My creation anniversary
Analysis of moudo Network Library
Why is the test post a giant pit? The 8-year-old tester told you not to be fooled
快速开发项目-VScode插件
How to quickly install MySQL 5.7.17 under CentOS 6.5
Remediation for Unsafe Cryptographic Encryption
Sword finger offer II 040 Largest rectangle in matrix
Apifox: it is not only an API debugging tool, but also a collaboration artifact of the development team
[hackthebox] dancing (SMB)
Log in to the MySQL database and view the version number on the command line
Hot renewal process
Build a simple website by yourself
[结构力学] 结点承载下影响线与直接承载下影响线不同的原因
ROS TF coordinate transformation Library & rewrite to create high frequency coordinate transformation broadcaster
The subnet of the pool cannot be overlapped with that of other pools.
Call snapstateon closed sou from Oracle CDC
[structural mechanics] the reason why the influence line under joint load is different from that under direct load
泰克TDS3054B示波器技术指标
Proxy mode (proxy)
Is the increased life insurance off the shelf? What additional life insurance products are available now?