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

相关推荐
bendandawugui5 小时前
glitch free clk en和clkmux 设计
soc设计
FPGA小迷弟1 天前
FPGA工程师面试题汇总(二十五)
网络协议·tcp/ip·fpga开发·verilog·fpga
FPGA小迷弟2 天前
FPGA工程师面试题汇总(二十四)
网络协议·tcp/ip·fpga开发·verilog·fpga
FPGA小迷弟8 天前
FPGA工程师面试题汇总(九)
网络协议·tcp/ip·fpga开发·面试·verilog·fpga
星华云10 天前
[FPGA]Spartan6 Uart可变波特率读写JY901P惯导模块
fpga开发·verilog·jy901p·spartan6·惯导
星华云12 天前
[FPGA]Spartan6 Uart固定波特率读写JY901P惯导模块
fpga开发·verilog·jy901p·惯导模块
FPGA小迷弟13 天前
FPGA面试题汇总整理(一)
学习·fpga开发·verilog·fpga
FPGA小迷弟14 天前
FPGA工程师面试题汇总(二)
学习·fpga开发·verilog·fpga
FPGA小迷弟15 天前
FPGA 时序约束基础:从时钟定义到输入输出延迟的完整设置
前端·学习·fpga开发·verilog·fpga
FPGA小迷弟16 天前
高频时钟设计:FPGA 多时钟域同步与时序收敛实战方案
前端·学习·fpga开发·verilog·fpga