SOC设计:关于reset的细节

有如下几个信号

1、时钟:clk_top

2、总的reset信号:rstn_top

3、scan的reset信号:scan_rstn

4、软件复位信号:rstn_soft_sub

5、scan模式信号:scan_mode

6、reset bypass 信号:scan_rstn_sel

功能:

一:在非test模式时,也就是test_mode=1'd0时,如果rstn_soft_sub=1,则rstn_top直接透传过去给reset_soft_block里的rstn,然后rstn再经过2拍同步处理,然后产生rstn_sub。这里涉及到了异步复位,同步释放知识点。

二:正常功能仿真时,scan_mode = 1'd0 和scan_rstn_sel=0,直观点讲,rstn_sub是由rstn_top同步处理2拍后产生。

reset_soft_block u0_sub_rstn_gen (/*autoinst*/

.clk (clk_top ), // input

.rstn0 (rstn_top ), // input

.rstn1 (scan_rstn ), // input

.rstn_soft (rstn_soft_sub ), // input

.test_mode (scan_mode ), // input

.rst_bypass (scan_rstn_sel ), // input

.rstn_out (rstn_sub ) // output

);

reset_soft_block功能

module reset_soft_block (

clk,

rstn0,

rstn1,

rstn_soft,

test_mode,

rst_bypass,

rstn_out

);

input clk;

input rstn0;

input rstn1;

input rstn_soft;

input test_mode;

input rst_bypass;

output rstn_out;

wire rstn;

wire rstnsync;

//assign rstn = rstn0 & (rstn_soft | test_mode);

macro_oa21 C1 ( .b0(rstn0), .a0(rstn_soft), .a1(test_mode), .o(rstn) );

resetsync u_rstn_sync (.clk(clk), .rstn(rstn), .rstnsync(rstnsync));

macro_mux C2 ( .d0(rstnsync), .d1(rstn1), .s(rst_bypass), .o(rstn_out) );

endmodule

module resetsync ( clk, rstn, rstnsync);

input clk;

input rstn;

output rstnsync;

wire rstnsync1;

macro_sdfr u_rstnsync1(.CK(clk), .D(rstn), .RB(rstn), .Q(rstnsync1));

macro_sdfr u_rstnsync2(.CK(clk), .D(rstnsync1), .RB(rstn), .Q(rstnsync));

endmodule

相关推荐
FPGA小迷弟14 小时前
FPGA开发Vivado Block Design/Vitis/SDK/xlinx/开发教程,保姆级别,一看就会!
网络协议·tcp/ip·fpga开发·verilog·fpga
FPGA小迷弟14 小时前
基于FPGA实现智能网卡的概念,什么是智能网卡
网络协议·tcp/ip·fpga开发·verilog·fpga
泡泡糖的中文规格书7 天前
HDLbits 1.2 学习笔记
fpga开发·学习笔记·verilog
星夜离尘5612 天前
FPGA实现CRC-8/SMBUS:从参数和位序核对到1041次自检
fpga开发·verilog·fpga·crc
星夜离尘5613 天前
FPGA正交编码器非法跳变检测:把16种状态转移和采样边界测清楚
verilog·fpga·编码器
星夜离尘5614 天前
I²C总线卡死:先分清SCL拉低、SDA拉低,再谈9个时钟恢复
fpga开发·verilog·i2c
星夜离尘5615 天前
Testbench不只看波形:用scoreboard抓住丢包、重复和乱序
fpga开发·verilog·testbench·scoreboard
星夜离尘5615 天前
FIFO深度怎么定?用突发流量和背压算清缓存预算
缓存·fpga开发·verilog·fifo·背压
ChipCamp16 天前
零门槛上手的RISC-V项目:picorv32
ubuntu·verilog·verilator·iverilog·gtkwave·riscv64-unknown
m0_547486661 个月前
《数字电路与逻辑设计:基于Verilog HDL和Quartus Prime》全套PPT课件2026
verilog·数字电路·数字逻辑电路