www.pudn.com > NCO.rar > cntr_g7h.tdf, change:2010-05-05,size:3051b


--lpm_counter CBX_DECLARE_ALL_CONNECTED_PORTS="OFF" DEVICE_FAMILY="Cyclone III" lpm_avalue=1 lpm_direction="DOWN" lpm_port_updown="PORT_UNUSED" lpm_width=1 aset clk_en clock cnt_en cout 
--VERSION_BEGIN 9.0 cbx_cycloneii 2008:05:19:10:57:37:SJ cbx_lpm_add_sub 2008:12:09:22:11:50:SJ cbx_lpm_compare 2009:02:03:01:43:16:SJ cbx_lpm_counter 2008:05:19:10:42:20:SJ cbx_lpm_decode 2008:05:19:10:39:27:SJ cbx_mgl 2009:01:29:16:12:07:SJ cbx_stratix 2008:09:18:16:08:35:SJ cbx_stratixii 2008:11:14:16:08:42:SJ  VERSION_END 
 
 
-- Copyright (C) 1991-2009 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. 
 
 
FUNCTION cycloneiii_lcell_comb (cin, dataa, datab, datac, datad) 
WITH ( DONT_TOUCH, LUT_MASK, SUM_LUTC_INPUT) 
RETURNS ( combout, cout); 
 
--synthesis_resources = lut 1 reg 1  
SUBDESIGN cntr_g7h 
(  
	aset	:	input; 
	clk_en	:	input; 
	clock	:	input; 
	cnt_en	:	input; 
	cout	:	output; 
	q[0..0]	:	output; 
)  
VARIABLE  
	counter_comb_bita0 : cycloneiii_lcell_comb 
		WITH ( 
			LUT_MASK = "5A60", 
			SUM_LUTC_INPUT = "cin" 
		); 
	counter_reg_bit[0..0] : dffeas; 
	a_val[0..0]	: WIRE; 
	aclr_actual	: WIRE; 
	cout_actual	: WIRE; 
	data[0..0]	: NODE; 
	external_cin	: WIRE; 
	pre_hazard[0..0]	: WIRE; 
	s_val[0..0]	: WIRE; 
	safe_q[0..0]	: WIRE; 
	sclr	: NODE; 
	sload	: NODE; 
	sset	: NODE; 
	time_to_clear	: WIRE; 
	updown_dir	: WIRE; 
 
BEGIN  
	counter_comb_bita[0..0].cin = ( external_cin); 
	counter_comb_bita[0..0].dataa = ( counter_reg_bit[0..0].q); 
	counter_comb_bita[0..0].datab = ( updown_dir); 
	counter_comb_bita[0..0].datad = ( B"1"); 
	counter_reg_bit[].asdata = (a_val[] $ ((! sclr) & ((sset & s_val[]) # ((! sset) & data[])))); 
	counter_reg_bit[].clk = clock; 
	counter_reg_bit[].clrn = (! aclr_actual); 
	counter_reg_bit[].d = ( counter_comb_bita[0].combout); 
	counter_reg_bit[].ena = (clk_en & (((cnt_en # sclr) # sset) # sload)); 
	counter_reg_bit[].sload = ((sclr # sset) # sload); 
	a_val[] = B"1"; 
	aclr_actual = aset; 
	cout = cout_actual; 
	cout_actual = (counter_comb_bita[0].cout # (time_to_clear & updown_dir)); 
	data[] = GND; 
	external_cin = B"1"; 
	pre_hazard[] = counter_reg_bit[].q; 
	q[] = safe_q[]; 
	s_val[] = B"1"; 
	safe_q[] = (pre_hazard[] $ a_val[]); 
	sclr = GND; 
	sload = GND; 
	sset = GND; 
	time_to_clear = B"0"; 
	updown_dir = B"0"; 
END; 
--VALID FILE