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

相关推荐
微小冷5 天前
OV5640 相机开发流程
fpga开发·verilog·ov5640·双目相机·相机开发
ChipCamp8 天前
ChipCamp探索系列 -- 1. Soft-Core RISC-V on FPGA
fpga开发·verilog·risc-v
思尔芯S2C13 天前
Cost-Effective and Scalable: A Smarter Choice for RISC-V Development
fpga开发·risc-v·soc设计·prototyping
FPGA小迷弟17 天前
京微齐力系列FPGA---- Debugware IP核使用教程!!!
物联网·fpga开发·硬件架构·verilog·fpga
月光技术杂谈25 天前
上海RISC-V峰会-香山开源RISC-V CPU随想随记
verilog·risc-v·chisel·vhdl·香山·开源cpu·xiangshan
可编程芯片开发1 个月前
基于FPGA的多级流水线加法器verilog实现,包含testbench测试文件
fpga开发·verilog·加法器·多级流水线
进击的奶龙1 个月前
02VCS_使用教程
verilog·仿真·eda
热爱学习地派大星1 个月前
Xilinx FPGA功耗评估
fpga开发·verilog·vivado·fpga功耗·xpe
进击的奶龙1 个月前
21verilog函数
verilog·基础语法
tiantianuser2 个月前
RDMA简介7之RoCE v2可靠传输
服务器·fpga开发·verilog·xilinx·rdma·可编程逻辑