www.pudn.com > SD_Card_Audio.rar > a_graycounter_f86.tdf


--a_graycounter DEVICE_FAMILY="Cyclone II" WIDTH=8 aclr clock cnt_en q 
--VERSION_BEGIN 5.0 cbx_a_gray2bin 2004:03:06:00:52:20:SJ cbx_a_graycounter 2004:10:01:12:13:16:SJ cbx_cycloneii 2004:12:20:14:28:52:SJ cbx_flex10ke 2002:10:18:16:54:38:SJ cbx_mgl 2005:05:19:13:51:58:SJ cbx_stratix 2005:11:01:14:36:46:SJ cbx_stratixii 2004:12:22:13:27:12:SJ  VERSION_END 
 
 
--  Copyright (C) 1988-2005 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 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 cycloneii_lcell_comb (cin, dataa, datab, datac, datad) 
WITH ( 	LUT_MASK,	SUM_LUTC_INPUT)  
RETURNS ( combout, cout); 
FUNCTION cycloneii_lcell_ff (aclr, clk, datain, ena, sclr, sdata, sload) 
RETURNS ( regout); 
 
--synthesis_resources = lut 9 reg 9  
SUBDESIGN a_graycounter_f86 
(  
	aclr	:	input; 
	clock	:	input; 
	cnt_en	:	input; 
	q[7..0]	:	output; 
)  
VARIABLE  
	countera0 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "C6A0", 
			SUM_LUTC_INPUT = "cin" 
		); 
	countera1 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "6C50", 
			SUM_LUTC_INPUT = "cin" 
		); 
	countera2 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "6C50", 
			SUM_LUTC_INPUT = "cin" 
		); 
	countera3 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "6C50", 
			SUM_LUTC_INPUT = "cin" 
		); 
	countera4 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "6C50", 
			SUM_LUTC_INPUT = "cin" 
		); 
	countera5 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "6C50", 
			SUM_LUTC_INPUT = "cin" 
		); 
	countera6 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "6C50", 
			SUM_LUTC_INPUT = "cin" 
		); 
	countera7 : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "5A5A", 
			SUM_LUTC_INPUT = "cin" 
		); 
	parity : cycloneii_lcell_comb 
		WITH ( 
			LUT_MASK = "6682" 
		); 
	counter_ffa[7..0] : cycloneii_lcell_ff; 
	parity_ff : cycloneii_lcell_ff; 
	power_modified_counter_values[7..0]	: WIRE; 
	sclr	: NODE; 
	updown	: NODE; 
 
BEGIN  
	countera[0].cin = parity.cout; 
	countera[1].cin = countera[0].cout; 
	countera[2].cin = countera[1].cout; 
	countera[3].cin = countera[2].cout; 
	countera[4].cin = countera[3].cout; 
	countera[5].cin = countera[4].cout; 
	countera[6].cin = countera[5].cout; 
	countera[7].cin = countera[6].cout; 
	countera[0].dataa = cnt_en; 
	countera[1].dataa = power_modified_counter_values[0..0]; 
	countera[2].dataa = power_modified_counter_values[1..1]; 
	countera[3].dataa = power_modified_counter_values[2..2]; 
	countera[4].dataa = power_modified_counter_values[3..3]; 
	countera[5].dataa = power_modified_counter_values[4..4]; 
	countera[6].dataa = power_modified_counter_values[5..5]; 
	countera[7].dataa = power_modified_counter_values[7..7]; 
	countera[0].datab = counter_ffa[0].regout; 
	countera[1].datab = power_modified_counter_values[1..1]; 
	countera[2].datab = power_modified_counter_values[2..2]; 
	countera[3].datab = power_modified_counter_values[3..3]; 
	countera[4].datab = power_modified_counter_values[4..4]; 
	countera[5].datab = power_modified_counter_values[5..5]; 
	countera[6].datab = power_modified_counter_values[6..6]; 
	countera[7..0].datad = B"11111111"; 
	parity.cin = updown; 
	parity.dataa = cnt_en; 
	parity.datab = parity_ff.regout; 
	parity.datad = B"1"; 
	counter_ffa[].aclr = aclr; 
	counter_ffa[].clk = clock; 
	counter_ffa[].datain = countera[7..0].combout; 
	counter_ffa[].sclr = sclr; 
	parity_ff.aclr = aclr; 
	parity_ff.clk = clock; 
	parity_ff.datain = parity.combout; 
	parity_ff.sclr = sclr; 
	power_modified_counter_values[] = ( counter_ffa[7..0].regout); 
	q[] = power_modified_counter_values[]; 
	sclr = GND; 
	updown = VCC; 
END; 
--VALID FILE