当前位置:网站首页>[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
边栏推荐
- 【无标题】数据库中一条查询SQL执行的过程
- 在线怎么生成富文本
- Have a look at this generation
- The intelligent material transmission system of the 6th National Games of the Blue Bridge Cup
- [untitled] a query SQL execution process in the database
- Sword finger offer 29 Print matrix clockwise
- 更改对象属性的方法
- Global and Chinese markets of screw rotor pumps 2022-2028: Research Report on technology, participants, trends, market size and share
- 2022年版图解网络PDF
- Prepare for the autumn face-to-face test questions
猜你喜欢
Use the list component to realize the drop-down list and address list
Zero foundation self-study STM32 - Review 2 - encapsulating GPIO registers with structures
Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework
一位博士在华为的22年
Adapter-a technology of adaptive pre training continuous learning
【无标题】数据库中一条查询SQL执行的过程
【社区人物志】专访马龙伟:轮子不好用,那就自己造!
RDD partition rules of spark
从顶会论文看2022年推荐系统序列建模的趋势
Spark accumulator
随机推荐
[eight part essay] what is the difference between unrepeatable reading and unreal reading?
MySQL (IV) - transactions
剑指 Offer 30. 包含min函数的栈
更换gcc版本后,编译出现make[1]: cc: Command not found
Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework
0211 embedded C language learning
在GBase 8c数据库中使用自带工具检查健康状态时,需要注意什么?
技术管理进阶——什么是管理者之体力、脑力、心力
Jisuanke - t2063_ Missile interception
好用的 JS 脚本
This time, thoroughly understand the deep copy
高数_向量代数_单位向量_向量与坐标轴的夹角
数据准备工作
[solution] add multiple directories in different parts of the same word document
Data preparation
Spark accumulator
ftp上传文件时出现 550 Permission denied,不是用户权限问题
Thinking on Architecture Design (under continuous updating)
Global and Chinese markets of screw rotor pumps 2022-2028: Research Report on technology, participants, trends, market size and share
Advanced technology management - what is the physical, mental and mental strength of managers