当前位置:网站首页>[Digital IC manual tearing code] Verilog asynchronous reset synchronous release | topic | principle | design | simulation
[Digital IC manual tearing code] Verilog asynchronous reset synchronous release | topic | principle | design | simulation
2022-07-06 02:29:00 【myhhhhhhhh】
Preface
This series aims to provide 100% Accurate numbers IC Design / Verify the title of the hand tearing code link , principle ,RTL Design ,Testbench And reference simulation waveform , The content of each article is checked by simulation . The quick navigation links are as follows :
Odd frequency division
Even frequency division
Semi integer batch
decimal / Fractional frequency division
Sequence detector
Mode three detector
Beverage machine
Asynchronous reset , Simultaneous release
Edge detection ( Rising edge , Falling edge , On both sides )
Full adder , Half adder
Gray code to binary
single bit Cross clock domain ( Two beats , Edge synchronization , Pulse synchronization )
Sync FIFO
Ought to say , The hand tearing code link is in the interview process Both important and simple A part of , Compared with software jobs , Numbers IC Hand tear code Fixed topic , Limited number , It belongs to a link that must be scored in the whole interview , Outside this series , I also recommend numbers IC Job seekers use “HdlBits” Code Training
Links are as follows
HDLBits — Verilog Practice
Asynchronous reset synchronous release problem
Use Verilog Code , Complete the design of asynchronous reset and synchronous release circuit
The principle of asynchronous reset and synchronous release
One with asynchronous reset end DFF workflow
If one DFF The reset value of is 0, that rst_n=0 When the signal comes , The DFF Reset , When rst_n=1 When the signal comes , The DFF Normal work .
Possible problems
When rst_n The signal returns 1 Time and clk When the signal coming from the rising edge is very close ,DFF Metastable state may be output , The reason why the signal cannot be recognized is 1 still 0
terms of settlement
Asynchronous reset : Yes 0 The reset signal of is not processed , Let it reset normally asynchronously
Simultaneous release : Yes 1 Make two beats of the reset signal , Align the edge of the clock when it is pulled up , In order to avoid metastable state
Sequence diagram of asynchronous reset and synchronous release 
RTL Design
module rst_asy(clk,rst_n,rst_out);
input clk;
input rst_n;
output reg rst_out;
reg rst_r1;
[email protected](posedge clk or negedge rst_n)
if(!rst_n)
begin
rst_out<= 1'b0;
rst_r1 <= 1'b0;
end
else
begin
rst_r1 <= rst_n;
rst_out <= rst_r1;
end
endmodule
Testbench Code
`timescale 1ns /1ps
module rst_asy_tb();
reg clk ;
reg rst_n;
wire rst_out;
rst_asy u1(.clk(clk),.rst_n(rst_n),.rst_out(rst_out));
always #5 clk = !clk;
initial
begin
clk = 0;
rst_n = 1;
#7
rst_n = 0;
#5
rst_n = 1;
#30
$stop;
end
endmodule
Simulation analysis

rst_n After re raising ,rst_out Wait for the register to save twice before output , Metastable state is avoided , Design establishment
边栏推荐
- Bigder: I felt good about the 34/100 interview, but I didn't receive the admission
- RDD conversion operator of spark
- [robot hand eye calibration] eye in hand
- Overview of spark RDD
- [solution] add multiple directories in different parts of the same word document
- UE4 - how to make a simple TPS role (I) - create a basic role
- Compact lidar global and Chinese markets 2022-2028: technology, participants, trends, market size and share Research Report
- Adapter-a technology of adaptive pre training continuous learning
- Thinking on Architecture Design (under continuous updating)
- How to use C to copy files on UNIX- How can I copy a file on Unix using C?
猜你喜欢

Minecraft 1.16.5 biochemical 8 module version 2.0 storybook + more guns

How to generate rich text online

Virtual machine network, networking settings, interconnection with host computer, network configuration

Concept of storage engine

Using SA token to solve websocket handshake authentication

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
![[depth first search notes] Abstract DFS](/img/d4/0cfb5254b0c0d04b4400b4628637d5.jpg)
[depth first search notes] Abstract DFS

数据工程系列精讲(第四讲): Data-centric AI 之样本工程

Keyword static

Httprunnermanager installation (III) - configuring myql Database & initialization data under Linux
随机推荐
MySQL learning notes - subquery exercise
Virtual machine network, networking settings, interconnection with host computer, network configuration
[coppeliasim] efficient conveyor belt
High number_ Vector algebra_ Unit vector_ Angle between vector and coordinate axis
I like Takeshi Kitano's words very much: although it's hard, I will still choose that kind of hot life
Text editing VIM operation, file upload
Is there a case where sqlcdc monitors multiple tables and then associates them to sink to another table? All operations in MySQL
2022.02.13
Httprunnermanager installation (III) - configuring myql Database & initialization data under Linux
MySQL lethal serial question 1 -- are you familiar with MySQL transactions?
零基础自学STM32-野火——GPIO复习篇——使用绝对地址操作GPIO
Use the list component to realize the drop-down list and address list
Sword finger offer 30 Stack containing min function
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Sword finger offer 29 Print matrix clockwise
Compact lidar global and Chinese markets 2022-2028: technology, participants, trends, market size and share Research Report
Campus second-hand transaction based on wechat applet
Zero foundation self-study STM32 - Review 2 - encapsulating GPIO registers with structures
550 permission denied occurs when FTP uploads files, which is not a user permission problem
Minecraft 1.16.5 biochemical 8 module version 2.0 storybook + more guns