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

📄 alt_u_div_eoe.tdf

📁 vhdl实现交通灯设计,可以实现十字路口处交通控制,开发工具quartus
💻 TDF
字号:
--alt_u_div DEVICE_FAMILY="Cyclone" LPM_PIPELINE=0 MAXIMIZE_SPEED=9 SKIP_BITS=0 WIDTH_D=5 WIDTH_N=9 WIDTH_Q=9 WIDTH_R=5 denominator numerator quotient remainder
--VERSION_BEGIN 7.2 cbx_cycloneii 2007:06:13:15:47:32:SJ cbx_lpm_abs 2006:04:25:14:52:42:SJ cbx_lpm_add_sub 2007:08:06:16:01:34:SJ cbx_lpm_divide 2007:01:30:03:58:02:SJ cbx_mgl 2007:08:03:15:48:12:SJ cbx_stratix 2007:05:02:16:27:14:SJ cbx_stratixii 2007:06:28:17:26:26:SJ cbx_util_mgl 2007:06:01:06:37:30:SJ  VERSION_END


-- 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.


FUNCTION add_sub_3dc (dataa[0..0], datab[0..0])
RETURNS ( cout, result[0..0]);
FUNCTION add_sub_4dc (dataa[1..0], datab[1..0])
RETURNS ( cout, result[1..0]);
FUNCTION add_sub_5dc (dataa[2..0], datab[2..0])
RETURNS ( cout, result[2..0]);
FUNCTION add_sub_6dc (dataa[3..0], datab[3..0])
RETURNS ( cout, result[3..0]);
FUNCTION add_sub_7dc (dataa[4..0], datab[4..0])
RETURNS ( cout, result[4..0]);
FUNCTION add_sub_8dc (dataa[5..0], datab[5..0])
RETURNS ( cout, result[5..0]);

--synthesis_resources = 
SUBDESIGN alt_u_div_eoe
( 
	den_out[4..0]	:	output;
	denominator[4..0]	:	input;
	numerator[8..0]	:	input;
	quotient[8..0]	:	output;
	remainder[4..0]	:	output;
) 
VARIABLE 
	add_sub_0 : add_sub_3dc;
	add_sub_1 : add_sub_4dc;
	add_sub_2 : add_sub_5dc;
	add_sub_3 : add_sub_6dc;
	add_sub_4 : add_sub_7dc;
	add_sub_5 : add_sub_8dc;
	add_sub_6 : add_sub_8dc;
	add_sub_7 : add_sub_8dc;
	add_sub_8 : add_sub_8dc;
	DenominatorIn[59..0]	: WIRE;
	DenominatorIn_tmp[59..0]	: WIRE;
	gnd_wire	: WIRE;
	nose[89..0]	: WIRE;
	NumeratorIn[89..0]	: WIRE;
	NumeratorIn_tmp[89..0]	: WIRE;
	prestg[53..0]	: WIRE;
	quotient_tmp[8..0]	: WIRE;
	sel[49..0]	: WIRE;
	selnose[89..0]	: WIRE;
	StageIn[59..0]	: WIRE;
	StageIn_tmp[59..0]	: WIRE;
	StageOut[53..0]	: WIRE;

BEGIN 
	add_sub_0.dataa[0..0] = NumeratorIn[8..8];
	add_sub_0.datab[0..0] = DenominatorIn[0..0];
	add_sub_1.dataa[] = ( StageIn[6..6], NumeratorIn[16..16]);
	add_sub_1.datab[1..0] = DenominatorIn[7..6];
	add_sub_2.dataa[] = ( StageIn[13..12], NumeratorIn[24..24]);
	add_sub_2.datab[2..0] = DenominatorIn[14..12];
	add_sub_3.dataa[] = ( StageIn[20..18], NumeratorIn[32..32]);
	add_sub_3.datab[3..0] = DenominatorIn[21..18];
	add_sub_4.dataa[] = ( StageIn[27..24], NumeratorIn[40..40]);
	add_sub_4.datab[4..0] = DenominatorIn[28..24];
	add_sub_5.dataa[] = ( StageIn[34..30], NumeratorIn[48..48]);
	add_sub_5.datab[5..0] = DenominatorIn[35..30];
	add_sub_6.dataa[] = ( StageIn[40..36], NumeratorIn[56..56]);
	add_sub_6.datab[5..0] = DenominatorIn[41..36];
	add_sub_7.dataa[] = ( StageIn[46..42], NumeratorIn[64..64]);
	add_sub_7.datab[5..0] = DenominatorIn[47..42];
	add_sub_8.dataa[] = ( StageIn[52..48], NumeratorIn[72..72]);
	add_sub_8.datab[5..0] = DenominatorIn[53..48];
	den_out[4..0] = DenominatorIn[52..48];
	DenominatorIn[] = (gnd_wire # DenominatorIn_tmp[]);
	DenominatorIn_tmp[] = ( DenominatorIn[53..0], ( gnd_wire, denominator[]));
	gnd_wire = B"0";
	nose[] = ( B"000000000", (add_sub_8.cout # gnd_wire), B"000000000", (add_sub_7.cout # gnd_wire), B"000000000", (add_sub_6.cout # gnd_wire), B"000000000", (add_sub_5.cout # gnd_wire), B"000000000", (add_sub_4.cout # gnd_wire), B"000000000", (add_sub_3.cout # gnd_wire), B"000000000", (add_sub_2.cout # gnd_wire), B"000000000", (add_sub_1.cout # gnd_wire), B"000000000", (add_sub_0.cout # gnd_wire));
	NumeratorIn[] = (gnd_wire # NumeratorIn_tmp[]);
	NumeratorIn_tmp[] = ( NumeratorIn[80..0], numerator[]);
	prestg[] = ( add_sub_8.result[], add_sub_7.result[], add_sub_6.result[], add_sub_5.result[], GND, add_sub_4.result[], B"00", add_sub_3.result[], B"000", add_sub_2.result[], B"0000", add_sub_1.result[], B"00000", add_sub_0.result[]);
	quotient[] = quotient_tmp[];
	quotient_tmp[] = ( (! selnose[0..0]), (! selnose[10..10]), (! selnose[20..20]), (! selnose[30..30]), (! selnose[40..40]), (! selnose[50..50]), (! selnose[60..60]), (! selnose[70..70]), (! selnose[80..80]));
	remainder[4..0] = StageIn[58..54];
	sel[] = ( gnd_wire, (gnd_wire # (sel[49..49] # DenominatorIn[58..58])), (gnd_wire # (sel[48..48] # DenominatorIn[57..57])), (gnd_wire # (sel[47..47] # DenominatorIn[56..56])), (gnd_wire # (sel[46..46] # DenominatorIn[55..55])), gnd_wire, (gnd_wire # (sel[44..44] # DenominatorIn[52..52])), (gnd_wire # (sel[43..43] # DenominatorIn[51..51])), (gnd_wire # (sel[42..42] # DenominatorIn[50..50])), (gnd_wire # (sel[41..41] # DenominatorIn[49..49])), gnd_wire, (gnd_wire # (sel[39..39] # DenominatorIn[46..46])), (gnd_wire # (sel[38..38] # DenominatorIn[45..45])), (gnd_wire # (sel[37..37] # DenominatorIn[44..44])), (gnd_wire # (sel[36..36] # DenominatorIn[43..43])), gnd_wire, (gnd_wire # (sel[34..34] # DenominatorIn[40..40])), (gnd_wire # (sel[33..33] # DenominatorIn[39..39])), (gnd_wire # (sel[32..32] # DenominatorIn[38..38])), (gnd_wire # (sel[31..31] # DenominatorIn[37..37])), gnd_wire, (gnd_wire # (sel[29..29] # DenominatorIn[34..34])), (gnd_wire # (sel[28..28] # DenominatorIn[33..33])), (gnd_wire # (sel[27..27] # DenominatorIn[32..32])), (gnd_wire # (sel[26..26] # DenominatorIn[31..31])), gnd_wire, (gnd_wire # (sel[24..24] # DenominatorIn[28..28])), (gnd_wire # (sel[23..23] # DenominatorIn[27..27])), (gnd_wire # (sel[22..22] # DenominatorIn[26..26])), (gnd_wire # (sel[21..21] # DenominatorIn[25..25])), gnd_wire, (gnd_wire # (sel[19..19] # DenominatorIn[22..22])), (gnd_wire # (sel[18..18] # DenominatorIn[21..21])), (gnd_wire # (sel[17..17] # DenominatorIn[20..20])), (gnd_wire # (sel[16..16] # DenominatorIn[19..19])), gnd_wire, (gnd_wire # (sel[14..14] # DenominatorIn[16..16])), (gnd_wire # (sel[13..13] # DenominatorIn[15..15])), (gnd_wire # (sel[12..12] # DenominatorIn[14..14])), (gnd_wire # (sel[11..11] # DenominatorIn[13..13])), gnd_wire, (gnd_wire # (sel[9..9] # DenominatorIn[10..10])), (gnd_wire # (sel[8..8] # DenominatorIn[9..9])), (gnd_wire # (sel[7..7] # DenominatorIn[8..8])), (gnd_wire # (sel[6..6] # DenominatorIn[7..7])), gnd_wire, (gnd_wire # (sel[4..4] # DenominatorIn[4..4])), (gnd_wire # (sel[3..3] # DenominatorIn[3..3])), (gnd_wire # (sel[2..2] # DenominatorIn[2..2])), (gnd_wire # (sel[1..1] # DenominatorIn[1..1])));
	selnose[] = ( (gnd_wire # (! nose[89..89])), (gnd_wire # (! nose[88..88])), (gnd_wire # (! nose[87..87])), (gnd_wire # (! nose[86..86])), ((gnd_wire # (! nose[85..85])) # sel[49..49]), ((gnd_wire # (! nose[84..84])) # sel[48..48]), ((gnd_wire # (! nose[83..83])) # sel[47..47]), ((gnd_wire # (! nose[82..82])) # sel[46..46]), ((gnd_wire # (! nose[81..81])) # sel[45..45]), (gnd_wire # (! nose[80..80])), (gnd_wire # (! nose[79..79])), (gnd_wire # (! nose[78..78])), (gnd_wire # (! nose[77..77])), ((gnd_wire # (! nose[76..76])) # sel[44..44]), ((gnd_wire # (! nose[75..75])) # sel[43..43]), ((gnd_wire # (! nose[74..74])) # sel[42..42]), ((gnd_wire # (! nose[73..73])) # sel[41..41]), ((gnd_wire # (! nose[72..72])) # sel[40..40]), (gnd_wire # (! nose[71..71])), (gnd_wire # (! nose[70..70])), (gnd_wire # (! nose[69..69])), (gnd_wire # (! nose[68..68])), ((gnd_wire # (! nose[67..67])) # sel[39..39]), ((gnd_wire # (! nose[66..66])) # sel[38..38]), ((gnd_wire # (! nose[65..65])) # sel[37..37]), ((gnd_wire # (! nose[64..64])) # sel[36..36]), ((gnd_wire # (! nose[63..63])) # sel[35..35]), (gnd_wire # (! nose[62..62])), (gnd_wire # (! nose[61..61])), (gnd_wire # (! nose[60..60])), (gnd_wire # (! nose[59..59])), ((gnd_wire # (! nose[58..58])) # sel[34..34]), ((gnd_wire # (! nose[57..57])) # sel[33..33]), ((gnd_wire # (! nose[56..56])) # sel[32..32]), ((gnd_wire # (! nose[55..55])) # sel[31..31]), ((gnd_wire # (! nose[54..54])) # sel[30..30]), (gnd_wire # (! nose[53..53])), (gnd_wire # (! nose[52..52])), (gnd_wire # (! nose[51..51])), (gnd_wire # (! nose[50..50])), ((gnd_wire # (! nose[49..49])) # sel[29..29]), ((gnd_wire # (! nose[48..48])) # sel[28..28]), ((gnd_wire # (! nose[47..47])) # sel[27..27]), ((gnd_wire # (! nose[46..46])) # sel[26..26]), ((gnd_wire # (! nose[45..45])) # sel[25..25]), (gnd_wire # (! nose[44..44])), (gnd_wire # (! nose[43..43])), (gnd_wire # (! nose[42..42])), (gnd_wire # (! nose[41..41])), ((gnd_wire # (! nose[40..40])) # sel[24..24]), ((gnd_wire # (! nose[39..39])) # sel[23..23]), ((gnd_wire # (! nose[38..38])) # sel[22..22]), ((gnd_wire # (! nose[37..37])) # sel[21..21]), ((gnd_wire # (! nose[36..36])) # sel[20..20]), (gnd_wire # (! nose[35..35])), (gnd_wire # (! nose[34..34])), (gnd_wire # (! nose[33..33])), (gnd_wire # (! nose[32..32])), ((gnd_wire # (! nose[31..31])) # sel[19..19]), ((gnd_wire # (! nose[30..30])) # sel[18..18]), ((gnd_wire # (! nose[29..29])) # sel[17..17]), ((gnd_wire # (! nose[28..28])) # sel[16..16]), ((gnd_wire # (! nose[27..27])) # sel[15..15]), (gnd_wire # (! nose[26..26])), (gnd_wire # (! nose[25..25])), (gnd_wire # (! nose[24..24])), (gnd_wire # (! nose[23..23])), ((gnd_wire # (! nose[22..22])) # sel[14..14]), ((gnd_wire # (! nose[21..21])) # sel[13..13]), ((gnd_wire # (! nose[20..20])) # sel[12..12]), ((gnd_wire # (! nose[19..19])) # sel[11..11]), ((gnd_wire # (! nose[18..18])) # sel[10..10]), (gnd_wire # (! nose[17..17])), (gnd_wire # (! nose[16..16])), (gnd_wire # (! nose[15..15])), (gnd_wire # (! nose[14..14])), ((gnd_wire # (! nose[13..13])) # sel[9..9]), ((gnd_wire # (! nose[12..12])) # sel[8..8]), ((gnd_wire # (! nose[11..11])) # sel[7..7]), ((gnd_wire # (! nose[10..10])) # sel[6..6]), ((gnd_wire # (! nose[9..9])) # sel[5..5]), (gnd_wire # (! nose[8..8])), (gnd_wire # (! nose[7..7])), (gnd_wire # (! nose[6..6])), (gnd_wire # (! nose[5..5])), ((gnd_wire # (! nose[4..4])) # sel[4..4]), ((gnd_wire # (! nose[3..3])) # sel[3..3]), ((gnd_wire # (! nose[2..2])) # sel[2..2]), ((gnd_wire # (! nose[1..1])) # sel[1..1]), ((gnd_wire # (! nose[0..0])) # sel[0..0]));
	StageIn[] = (gnd_wire # StageIn_tmp[]);
	StageIn_tmp[] = ( StageOut[53..0], B"000000");
	StageOut[] = ( ((( StageIn[52..48], NumeratorIn[72..72]) & selnose[80..80]) # (prestg[53..48] & (! selnose[80..80]))), ((( StageIn[46..42], NumeratorIn[64..64]) & selnose[70..70]) # (prestg[47..42] & (! selnose[70..70]))), ((( StageIn[40..36], NumeratorIn[56..56]) & selnose[60..60]) # (prestg[41..36] & (! selnose[60..60]))), ((( StageIn[34..30], NumeratorIn[48..48]) & selnose[50..50]) # (prestg[35..30] & (! selnose[50..50]))), ((( StageIn[28..24], NumeratorIn[40..40]) & selnose[40..40]) # (prestg[29..24] & (! selnose[40..40]))), ((( StageIn[22..18], NumeratorIn[32..32]) & selnose[30..30]) # (prestg[23..18] & (! selnose[30..30]))), ((( StageIn[16..12], NumeratorIn[24..24]) & selnose[20..20]) # (prestg[17..12] & (! selnose[20..20]))), ((( StageIn[10..6], NumeratorIn[16..16]) & selnose[10..10]) # (prestg[11..6] & (! selnose[10..10]))), ((( StageIn[4..0], NumeratorIn[8..8]) & selnose[0..0]) # (prestg[5..0] & (! selnose[0..0]))));
END;
--VALID FILE

⌨️ 快捷键说明

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