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

📄 bd_generator.v.bak

📁 FPGA Cycloneii 系列的
💻 BAK
字号:
// WARNING: Do NOT edit the input and output ports in this file in a text
// editor if you plan to continue editing the block that represents it in
// the Block Editor! File corruption is VERY likely to occur.

// Copyright (C) 1991-2007 Altera Corporation
// Your use of Altera Corporation's design tools, logic functions 
// and other software and tools, and its AMPP partner logic 
// functions, and any output files from any of the foregoing 
// (including device programming or simulation files), and any 
// associated documentation or information are expressly subject 
// to the terms and conditions of the Altera Program License 
// Subscription Agreement, Altera MegaCore Function License 
// Agreement, or other applicable license agreement, including, 
// without limitation, that your use is for the sole purpose of 
// programming logic devices manufactured by Altera and sold by 
// Altera or its authorized distributors.  Please refer to the 
// applicable agreement for further details.


// Generated by Quartus II Version 7.1 (Build Build 156 04/30/2007)
// Created on Sat Jun 30 10:18:46 2007

//  Module Declaration
module bd_generator
(
	// {{ALTERA_ARGS_BEGIN}} DO NOT REMOVE THIS LINE!
	clk, ce, reset_n, bd_out, indicator
	// {{ALTERA_ARGS_END}} DO NOT REMOVE THIS LINE!
);
// Port Declaration

	// {{ALTERA_IO_BEGIN}} DO NOT REMOVE THIS LINE!
	input clk;
	input ce;
	input reset_n;
	output bd_out;
	output indicator;
	// {{ALTERA_IO_END}} DO NOT REMOVE THIS LINE!
	reg bd_out;
	reg indicator;
	reg [15:0]clk_count;
	//57600 bps;
	parameter start_count=5; //2604;434
	parameter end_count=10;  //5208;868
	
	always@ (posedge clk or negedge reset_n)
		if (reset_n==1'b0)
			begin
				bd_out<=1'b0;
				indicator<=1'b0;
				clk_count<=16'b0;
			end
		else if(ce==1'b1)
			if (clk_count==start_count-1)
				begin
					bd_out<=1'b1;
					clk_count<=clk_count+1;
				end
			else if(clk_count==end_count-1)
				begin
					indicator<=1'b1;
					bd_out<=1'b0;
					clk_count<=0;
				end
			else if(clk_count==16'b0)
				begin
					indicator<=1'b0;
					clk_count<=clk_count+1;
				end
			else
				clk_count<=clk_count+1;



endmodule

⌨️ 快捷键说明

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