⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rstgenerator.v.bak

📁 用Verilog 实现将比特流数据转化为SPI协议数据的适配器
💻 BAK
字号:
// 编写时间: 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -