当前位置:网站首页>[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
边栏推荐
- Shell脚本更新存储过程到数据库
- High number_ Vector algebra_ Unit vector_ Angle between vector and coordinate axis
- Global and Chinese market of commercial cheese crushers 2022-2028: Research Report on technology, participants, trends, market size and share
- Six stone management: why should leaders ignore product quality
- Sword finger offer 29 Print matrix clockwise
- 高数_向量代数_单位向量_向量与坐标轴的夹角
- 在线怎么生成富文本
- 剑指 Offer 30. 包含min函数的栈
- The third level of C language punch in
- How to generate rich text online
猜你喜欢
Paper notes: graph neural network gat
Structural theme model (I) STM package workflow
【MySQL 15】Could not increase number of max_ open_ files to more than 10000 (request: 65535)
力扣今日题-729. 我的日程安排表 I
0211 embedded C language learning
High number_ Vector algebra_ Unit vector_ Angle between vector and coordinate axis
Shell脚本更新存储过程到数据库
Visualstudio2019 compilation configuration lastools-v2.0.0 under win10 system
Reset nodejs of the system
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
随机推荐
MySQL winter vacation self-study 2022 11 (6)
RDD partition rules of spark
构建库函数的雏形——参照野火的手册
【coppeliasim】6自由度路径规划
The intelligent material transmission system of the 6th National Games of the Blue Bridge Cup
Campus second-hand transaction based on wechat applet
事故指标统计
Zero foundation self-study STM32 - Review 2 - encapsulating GPIO registers with structures
Global and Chinese market of commercial cheese crushers 2022-2028: Research Report on technology, participants, trends, market size and share
2022 edition illustrated network pdf
MySQL index
Jisuanke - t2063_ Missile interception
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
How to use C to copy files on UNIX- How can I copy a file on Unix using C?
【机器人手眼标定】eye in hand
有沒有sqlcdc監控多張錶 再關聯後 sink到另外一張錶的案例啊?全部在 mysql中操作
Global and Chinese markets of general purpose centrifuges 2022-2028: Research Report on technology, participants, trends, market size and share
Virtual machine network, networking settings, interconnection with host computer, network configuration
Know MySQL database
Using SA token to solve websocket handshake authentication