📄 alt_u_div_a2f.tdf
字号:
--alt_u_div DEVICE_FAMILY="Cyclone II" LPM_PIPELINE=0 MAXIMIZE_SPEED=5 SKIP_BITS=0 WIDTH_D=4 WIDTH_N=10 WIDTH_Q=10 WIDTH_R=4 denominator numerator quotient remainder
--VERSION_BEGIN 9.1SP1 cbx_cycloneii 2010:01:25:21:17:36:SJ cbx_lpm_abs 2010:01:25:21:17:36:SJ cbx_lpm_add_sub 2010:01:25:21:17:36:SJ cbx_lpm_divide 2010:01:25:21:17:36:SJ cbx_mgl 2010:01:25:21:32:39:SJ cbx_stratix 2010:01:25:21:17:36:SJ cbx_stratixii 2010:01:25:21:17:36:SJ cbx_util_mgl 2010:01:25:21:17:36:SJ VERSION_END
-- Copyright (C) 1991-2010 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_lkc (dataa[0..0], datab[0..0])
RETURNS ( cout, result[0..0]);
FUNCTION add_sub_mkc (dataa[1..0], datab[1..0])
RETURNS ( cout, result[1..0]);
--synthesis_resources = lut 45
SUBDESIGN alt_u_div_a2f
(
denominator[3..0] : input;
numerator[9..0] : input;
quotient[9..0] : output;
remainder[3..0] : output;
)
VARIABLE
add_sub_0 : add_sub_lkc;
add_sub_1 : add_sub_mkc;
add_sub_2_result_int[3..0] : WIRE;
add_sub_2_cout : WIRE;
add_sub_2_dataa[2..0] : WIRE;
add_sub_2_datab[2..0] : WIRE;
add_sub_2_result[2..0] : WIRE;
add_sub_3_result_int[4..0] : WIRE;
add_sub_3_cout : WIRE;
add_sub_3_dataa[3..0] : WIRE;
add_sub_3_datab[3..0] : WIRE;
add_sub_3_result[3..0] : WIRE;
add_sub_4_result_int[5..0] : WIRE;
add_sub_4_cout : WIRE;
add_sub_4_dataa[4..0] : WIRE;
add_sub_4_datab[4..0] : WIRE;
add_sub_4_result[4..0] : WIRE;
add_sub_5_result_int[5..0] : WIRE;
add_sub_5_cout : WIRE;
add_sub_5_dataa[4..0] : WIRE;
add_sub_5_datab[4..0] : WIRE;
add_sub_5_result[4..0] : WIRE;
add_sub_6_result_int[5..0] : WIRE;
add_sub_6_cout : WIRE;
add_sub_6_dataa[4..0] : WIRE;
add_sub_6_datab[4..0] : WIRE;
add_sub_6_result[4..0] : WIRE;
add_sub_7_result_int[5..0] : WIRE;
add_sub_7_cout : WIRE;
add_sub_7_dataa[4..0] : WIRE;
add_sub_7_datab[4..0] : WIRE;
add_sub_7_result[4..0] : WIRE;
add_sub_8_result_int[5..0] : WIRE;
add_sub_8_cout : WIRE;
add_sub_8_dataa[4..0] : WIRE;
add_sub_8_datab[4..0] : WIRE;
add_sub_8_result[4..0] : WIRE;
add_sub_9_result_int[5..0] : WIRE;
add_sub_9_cout : WIRE;
add_sub_9_dataa[4..0] : WIRE;
add_sub_9_datab[4..0] : WIRE;
add_sub_9_result[4..0] : WIRE;
DenominatorIn[54..0] : WIRE;
DenominatorIn_tmp[54..0] : WIRE;
gnd_wire : WIRE;
nose[109..0] : WIRE;
NumeratorIn[109..0] : WIRE;
NumeratorIn_tmp[109..0] : WIRE;
prestg[49..0] : WIRE;
quotient_tmp[9..0] : WIRE;
sel[43..0] : WIRE;
selnose[109..0] : WIRE;
StageIn[54..0] : WIRE;
StageIn_tmp[54..0] : WIRE;
StageOut[49..0] : WIRE;
BEGIN
add_sub_0.dataa[0..0] = NumeratorIn[9..9];
add_sub_0.datab[0..0] = DenominatorIn[0..0];
add_sub_1.dataa[] = ( StageIn[5..5], NumeratorIn[18..18]);
add_sub_1.datab[1..0] = DenominatorIn[6..5];
add_sub_2_result_int[] = (0, add_sub_2_dataa[]) - (0, add_sub_2_datab[]);
add_sub_2_result[] = add_sub_2_result_int[2..0];
add_sub_2_cout = !add_sub_2_result_int[3];
add_sub_2_dataa[] = ( StageIn[11..10], NumeratorIn[27..27]);
add_sub_2_datab[] = DenominatorIn[12..10];
add_sub_3_result_int[] = (0, add_sub_3_dataa[]) - (0, add_sub_3_datab[]);
add_sub_3_result[] = add_sub_3_result_int[3..0];
add_sub_3_cout = !add_sub_3_result_int[4];
add_sub_3_dataa[] = ( StageIn[17..15], NumeratorIn[36..36]);
add_sub_3_datab[] = DenominatorIn[18..15];
add_sub_4_result_int[] = (0, add_sub_4_dataa[]) - (0, add_sub_4_datab[]);
add_sub_4_result[] = add_sub_4_result_int[4..0];
add_sub_4_cout = !add_sub_4_result_int[5];
add_sub_4_dataa[] = ( StageIn[23..20], NumeratorIn[45..45]);
add_sub_4_datab[] = DenominatorIn[24..20];
add_sub_5_result_int[] = (0, add_sub_5_dataa[]) - (0, add_sub_5_datab[]);
add_sub_5_result[] = add_sub_5_result_int[4..0];
add_sub_5_cout = !add_sub_5_result_int[5];
add_sub_5_dataa[] = ( StageIn[28..25], NumeratorIn[54..54]);
add_sub_5_datab[] = DenominatorIn[29..25];
add_sub_6_result_int[] = (0, add_sub_6_dataa[]) - (0, add_sub_6_datab[]);
add_sub_6_result[] = add_sub_6_result_int[4..0];
add_sub_6_cout = !add_sub_6_result_int[5];
add_sub_6_dataa[] = ( StageIn[33..30], NumeratorIn[63..63]);
add_sub_6_datab[] = DenominatorIn[34..30];
add_sub_7_result_int[] = (0, add_sub_7_dataa[]) - (0, add_sub_7_datab[]);
add_sub_7_result[] = add_sub_7_result_int[4..0];
add_sub_7_cout = !add_sub_7_result_int[5];
add_sub_7_dataa[] = ( StageIn[38..35], NumeratorIn[72..72]);
add_sub_7_datab[] = DenominatorIn[39..35];
add_sub_8_result_int[] = (0, add_sub_8_dataa[]) - (0, add_sub_8_datab[]);
add_sub_8_result[] = add_sub_8_result_int[4..0];
add_sub_8_cout = !add_sub_8_result_int[5];
add_sub_8_dataa[] = ( StageIn[43..40], NumeratorIn[81..81]);
add_sub_8_datab[] = DenominatorIn[44..40];
add_sub_9_result_int[] = (0, add_sub_9_dataa[]) - (0, add_sub_9_datab[]);
add_sub_9_result[] = add_sub_9_result_int[4..0];
add_sub_9_cout = !add_sub_9_result_int[5];
add_sub_9_dataa[] = ( StageIn[48..45], NumeratorIn[90..90]);
add_sub_9_datab[] = DenominatorIn[49..45];
DenominatorIn[] = DenominatorIn_tmp[];
DenominatorIn_tmp[] = ( DenominatorIn[49..0], ( gnd_wire, denominator[]));
gnd_wire = B"0";
nose[] = ( B"0000000000", add_sub_9_cout, B"0000000000", add_sub_8_cout, B"0000000000", add_sub_7_cout, B"0000000000", add_sub_6_cout, B"0000000000", add_sub_5_cout, B"0000000000", add_sub_4_cout, B"0000000000", add_sub_3_cout, B"0000000000", add_sub_2_cout, B"0000000000", add_sub_1.cout, B"0000000000", add_sub_0.cout);
NumeratorIn[] = NumeratorIn_tmp[];
NumeratorIn_tmp[] = ( NumeratorIn[99..0], numerator[]);
prestg[] = ( add_sub_9_result[], add_sub_8_result[], add_sub_7_result[], add_sub_6_result[], add_sub_5_result[], add_sub_4_result[], GND, add_sub_3_result[], B"00", add_sub_2_result[], B"000", add_sub_1.result[], B"0000", add_sub_0.result[]);
quotient[] = quotient_tmp[];
quotient_tmp[] = ( (! selnose[0..0]), (! selnose[11..11]), (! selnose[22..22]), (! selnose[33..33]), (! selnose[44..44]), (! selnose[55..55]), (! selnose[66..66]), (! selnose[77..77]), (! selnose[88..88]), (! selnose[99..99]));
remainder[3..0] = StageIn[53..50];
sel[] = ( gnd_wire, (sel[43..43] # DenominatorIn[53..53]), (sel[42..42] # DenominatorIn[52..52]), (sel[41..41] # DenominatorIn[51..51]), gnd_wire, (sel[39..39] # DenominatorIn[48..48]), (sel[38..38] # DenominatorIn[47..47]), (sel[37..37] # DenominatorIn[46..46]), gnd_wire, (sel[35..35] # DenominatorIn[43..43]), (sel[34..34] # DenominatorIn[42..42]), (sel[33..33] # DenominatorIn[41..41]), gnd_wire, (sel[31..31] # DenominatorIn[38..38]), (sel[30..30] # DenominatorIn[37..37]), (sel[29..29] # DenominatorIn[36..36]), gnd_wire, (sel[27..27] # DenominatorIn[33..33]), (sel[26..26] # DenominatorIn[32..32]), (sel[25..25] # DenominatorIn[31..31]), gnd_wire, (sel[23..23] # DenominatorIn[28..28]), (sel[22..22] # DenominatorIn[27..27]), (sel[21..21] # DenominatorIn[26..26]), gnd_wire, (sel[19..19] # DenominatorIn[23..23]), (sel[18..18] # DenominatorIn[22..22]), (sel[17..17] # DenominatorIn[21..21]), gnd_wire, (sel[15..15] # DenominatorIn[18..18]), (sel[14..14] # DenominatorIn[17..17]), (sel[13..13] # DenominatorIn[16..16]), gnd_wire, (sel[11..11] # DenominatorIn[13..13]), (sel[10..10] # DenominatorIn[12..12]), (sel[9..9] # DenominatorIn[11..11]), gnd_wire, (sel[7..7] # DenominatorIn[8..8]), (sel[6..6] # DenominatorIn[7..7]), (sel[5..5] # DenominatorIn[6..6]), gnd_wire, (sel[3..3] # DenominatorIn[3..3]), (sel[2..2] # DenominatorIn[2..2]), (sel[1..1] # DenominatorIn[1..1]));
selnose[] = ( (! nose[109..109]), (! nose[108..108]), (! nose[107..107]), (! nose[106..106]), (! nose[105..105]), (! nose[104..104]), ((! nose[103..103]) # sel[43..43]), ((! nose[102..102]) # sel[42..42]), ((! nose[101..101]) # sel[41..41]), ((! nose[100..100]) # sel[40..40]), (! nose[99..99]), (! nose[98..98]), (! nose[97..97]), (! nose[96..96]), (! nose[95..95]), (! nose[94..94]), ((! nose[93..93]) # sel[39..39]), ((! nose[92..92]) # sel[38..38]), ((! nose[91..91]) # sel[37..37]), ((! nose[90..90]) # sel[36..36]), (! nose[89..89]), (! nose[88..88]), (! nose[87..87]), (! nose[86..86]), (! nose[85..85]), (! nose[84..84]), ((! nose[83..83]) # sel[35..35]), ((! nose[82..82]) # sel[34..34]), ((! nose[81..81]) # sel[33..33]), ((! nose[80..80]) # sel[32..32]), (! nose[79..79]), (! nose[78..78]), (! nose[77..77]), (! nose[76..76]), (! nose[75..75]), (! nose[74..74]), ((! nose[73..73]) # sel[31..31]), ((! nose[72..72]) # sel[30..30]), ((! nose[71..71]) # sel[29..29]), ((! nose[70..70]) # sel[28..28]), (! nose[69..69]), (! nose[68..68]), (! nose[67..67]), (! nose[66..66]), (! nose[65..65]), (! nose[64..64]), ((! nose[63..63]) # sel[27..27]), ((! nose[62..62]) # sel[26..26]), ((! nose[61..61]) # sel[25..25]), ((! nose[60..60]) # sel[24..24]), (! nose[59..59]), (! nose[58..58]), (! nose[57..57]), (! nose[56..56]), (! nose[55..55]), (! nose[54..54]), ((! nose[53..53]) # sel[23..23]), ((! nose[52..52]) # sel[22..22]), ((! nose[51..51]) # sel[21..21]), ((! nose[50..50]) # sel[20..20]), (! nose[49..49]), (! nose[48..48]), (! nose[47..47]), (! nose[46..46]), (! nose[45..45]), (! nose[44..44]), ((! nose[43..43]) # sel[19..19]), ((! nose[42..42]) # sel[18..18]), ((! nose[41..41]) # sel[17..17]), ((! nose[40..40]) # sel[16..16]), (! nose[39..39]), (! nose[38..38]), (! nose[37..37]), (! nose[36..36]), (! nose[35..35]), (! nose[34..34]), ((! nose[33..33]) # sel[15..15]), ((! nose[32..32]) # sel[14..14]), ((! nose[31..31]) # sel[13..13]), ((! nose[30..30]) # sel[12..12]), (! nose[29..29]), (! nose[28..28]), (! nose[27..27]), (! nose[26..26]), (! nose[25..25]), (! nose[24..24]), ((! nose[23..23]) # sel[11..11]), ((! nose[22..22]) # sel[10..10]), ((! nose[21..21]) # sel[9..9]), ((! nose[20..20]) # sel[8..8]), (! nose[19..19]), (! nose[18..18]), (! nose[17..17]), (! nose[16..16]), (! nose[15..15]), (! nose[14..14]), ((! nose[13..13]) # sel[7..7]), ((! nose[12..12]) # sel[6..6]), ((! nose[11..11]) # sel[5..5]), ((! nose[10..10]) # sel[4..4]), (! nose[9..9]), (! nose[8..8]), (! nose[7..7]), (! nose[6..6]), (! nose[5..5]), (! nose[4..4]), ((! nose[3..3]) # sel[3..3]), ((! nose[2..2]) # sel[2..2]), ((! nose[1..1]) # sel[1..1]), ((! nose[0..0]) # sel[0..0]));
StageIn[] = StageIn_tmp[];
StageIn_tmp[] = ( StageOut[49..0], B"00000");
StageOut[] = ( ((( StageIn[48..45], NumeratorIn[90..90]) & selnose[99..99]) # (prestg[49..45] & (! selnose[99..99]))), ((( StageIn[43..40], NumeratorIn[81..81]) & selnose[88..88]) # (prestg[44..40] & (! selnose[88..88]))), ((( StageIn[38..35], NumeratorIn[72..72]) & selnose[77..77]) # (prestg[39..35] & (! selnose[77..77]))), ((( StageIn[33..30], NumeratorIn[63..63]) & selnose[66..66]) # (prestg[34..30] & (! selnose[66..66]))), ((( StageIn[28..25], NumeratorIn[54..54]) & selnose[55..55]) # (prestg[29..25] & (! selnose[55..55]))), ((( StageIn[23..20], NumeratorIn[45..45]) & selnose[44..44]) # (prestg[24..20] & (! selnose[44..44]))), ((( StageIn[18..15], NumeratorIn[36..36]) & selnose[33..33]) # (prestg[19..15] & (! selnose[33..33]))), ((( StageIn[13..10], NumeratorIn[27..27]) & selnose[22..22]) # (prestg[14..10] & (! selnose[22..22]))), ((( StageIn[8..5], NumeratorIn[18..18]) & selnose[11..11]) # (prestg[9..5] & (! selnose[11..11]))), ((( StageIn[3..0], NumeratorIn[9..9]) & selnose[0..0]) # (prestg[4..0] & (! selnose[0..0]))));
END;
--VALID FILE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -