32位单精度浮点加法器

源代码在线查看: clk_div.v

软件大小: 4500 K
上传用户: yubo0808140725
关键词: 精度 浮点 加法器
下载地址: 免注册下载 普通下载 VIP

相关代码

				//-----------------------------------------------------------------------------				//  				//  Copyright (c) 2009 Xilinx Inc.				//				//  Project  : Programmable Wave Generator				//  Module   : clk_div.v				//  Parent   : wave_gen.v				//  Children : None				//				//  Description: 				//     This module is a programmable divider use for generating the sample				//     clock (clk_samp). It continuously counts down from pre_clk_tx-1 to				//     0, asserting en_clk_samp during the 0 count.				//				//     To ensure proper reset of the FFs running on the derived clock,				//     en_clk_samp is asserted during reset.				//				//  Parameters:				//				//  Notes       : 				//     pre_clk_tx must be at least 2 for this module to work. Since				//     it is not allowed to be 				//				//  Multicycle and False Paths				//     None								`timescale 1ns/1ps												module clk_div (				  input             clk_tx,          // Clock input				  input             rst_clk_tx,      // Reset - synchronous to clk_tx				  				  input      [15:0] pre_clk_tx,      // Current divider				  output reg        en_clk_samp      // Clock enable for BUFG				);								//***************************************************************************				// Function definitions				//***************************************************************************								//***************************************************************************				// Parameter definitions				//***************************************************************************												//***************************************************************************				// Reg declarations				//***************************************************************************								  reg [15:0]             cnt;            // Counter								//***************************************************************************				// Wire declarations				//***************************************************************************				  				//***************************************************************************				// Code				//***************************************************************************								  always @(posedge clk_tx)				  begin				    if (rst_clk_tx)				    begin				      en_clk_samp    				      cnt            				    end				    else // !rst				    begin				      // Since we want en_clk_samp to be 1 when cnt is 0 we compare				      // it to 1 on the clock before				      en_clk_samp 								      if (cnt == 0) // The counter expired and we are still not equal				      begin				        cnt 				      end				      else // The counter is not 0				      begin				        cnt 				      end				    end // if rst				  end // always								endmodule							

相关资源