rstgenerator.v.bak

来自「用Verilog 实现将比特流数据转化为SPI协议数据的适配器」· BAK 代码 · 共 59 行

BAK
59
字号
// 编写时间: 2008.01.05// 最后更新: 2008.01.05// 编写人员: 梁浩// 版本编号: V1.0// 功能描述: 该模块实现了FPGA上电后的自复位脉冲`timescale 1ns / 100psmodule RSTGenerator (Clock50MHz,RSTCMP,RST);	output RSTCMP;		// system reset compare	output RST;			// system reset	input  Clock50MHz;	// system clock 50MHz		reg RSTCMP;	reg RST;		// used in the practice	//reg [23:0] CONTRST = 24'b0000_0000_0000_0000_0000_0000;	//always@(posedge Clock50MHz)	//begin	//	if(CONTRST == 24'b1111_1111_1111_1111_1111_1111)	//	begin	//		CONTRST	<= CONTRST;	//		RSTCMP	<= 1'b1;	//		RST		<= 1'b1;	//	end	//	else	//	begin	//		CONTRST	<= CONTRST + 1'b1;	//		RSTCMP	<= 1'b1;	//		RST		<= 1'b0;	//	end	//end	// used in the simulation	reg [3:0] CONTRST = 4'b0000;	always@(posedge Clock50MHz)	begin		if(CONTRST == 4'b1111)		begin			CONTRST	<= CONTRST;			RSTCMP	<= 1'b1;			RST		<= 1'b1;		end		else		begin			CONTRST	<= CONTRST + 1'b1;			RSTCMP	<= 1'b1;			RST		<= 1'b0;		end	end	endmodule

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?