mult_rql.tdf 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. --lpm_mult DEDICATED_MULTIPLIER_CIRCUITRY="NO" DEVICE_FAMILY="Cyclone IV E" DSP_BLOCK_BALANCING="AUTO" LPM_PIPELINE=0 LPM_WIDTHA=10 LPM_WIDTHB=18 LPM_WIDTHP=28 MAXIMIZE_SPEED=5 dataa datab result CARRY_CHAIN="MANUAL" CARRY_CHAIN_LENGTH=48
  2. --VERSION_BEGIN 13.0 cbx_cycloneii 2013:04:24:18:08:47:SJ cbx_lpm_add_sub 2013:04:24:18:08:47:SJ cbx_lpm_mult 2013:04:24:18:08:47:SJ cbx_mgl 2013:04:24:18:11:10:SJ cbx_padd 2013:04:24:18:08:47:SJ cbx_stratix 2013:04:24:18:08:47:SJ cbx_stratixii 2013:04:24:18:08:47:SJ cbx_util_mgl 2013:04:24:18:08:47:SJ VERSION_END
  3. -- Copyright (C) 1991-2013 Altera Corporation
  4. -- Your use of Altera Corporation's design tools, logic functions
  5. -- and other software and tools, and its AMPP partner logic
  6. -- functions, and any output files from any of the foregoing
  7. -- (including device programming or simulation files), and any
  8. -- associated documentation or information are expressly subject
  9. -- to the terms and conditions of the Altera Program License
  10. -- Subscription Agreement, Altera MegaCore Function License
  11. -- Agreement, or other applicable license agreement, including,
  12. -- without limitation, that your use is for the sole purpose of
  13. -- programming logic devices manufactured by Altera and sold by
  14. -- Altera or its authorized distributors. Please refer to the
  15. -- applicable agreement for further details.
  16. FUNCTION carry_sum (cin, sin)
  17. RETURNS ( cout, sout);
  18. FUNCTION lcell (in)
  19. RETURNS ( out);
  20. FUNCTION soft (in)
  21. RETURNS ( out);
  22. --synthesis_resources = lut 253
  23. SUBDESIGN mult_rql
  24. (
  25. dataa[9..0] : input;
  26. datab[17..0] : input;
  27. result[27..0] : output;
  28. )
  29. VARIABLE
  30. add10_result[30..0] : WIRE;
  31. add14_result[27..0] : WIRE;
  32. add18_result[24..0] : WIRE;
  33. add22_result[19..0] : WIRE;
  34. add26_result[14..0] : WIRE;
  35. add30_result[2..0] : WIRE;
  36. cs2a[5..0] : carry_sum;
  37. cs3a[5..0] : carry_sum;
  38. le4a[19..0] : lcell;
  39. le5a[19..0] : lcell;
  40. le6a[19..0] : lcell;
  41. le7a[19..0] : lcell;
  42. le8a[19..0] : lcell;
  43. le9a[18..0] : lcell;
  44. sft11a[30..0] : soft;
  45. sft12a[30..0] : soft;
  46. sft13a[30..0] : soft;
  47. sft15a[27..0] : soft;
  48. sft16a[27..0] : soft;
  49. sft17a[27..0] : soft;
  50. sft19a[24..0] : soft;
  51. sft20a[24..0] : soft;
  52. sft21a[24..0] : soft;
  53. sft23a[19..0] : soft;
  54. sft24a[19..0] : soft;
  55. sft25a[19..0] : soft;
  56. sft27a[14..0] : soft;
  57. sft28a[14..0] : soft;
  58. sft29a[14..0] : soft;
  59. sft31a[2..0] : soft;
  60. sft32a[2..0] : soft;
  61. sft33a[2..0] : soft;
  62. dataa_node[17..0] : WIRE;
  63. datab_node[9..0] : WIRE;
  64. final_result_node[27..0] : WIRE;
  65. w140w[19..0] : WIRE;
  66. w18w[11..0] : WIRE;
  67. w215w[19..0] : WIRE;
  68. w273w[19..0] : WIRE;
  69. w347w[19..0] : WIRE;
  70. w526w : WIRE;
  71. w555w : WIRE;
  72. w913w[30..0] : WIRE;
  73. BEGIN
  74. add10_result[] = sft11a[].out + sft12a[].out;
  75. add14_result[] = sft15a[].out + sft16a[].out;
  76. add18_result[] = sft19a[].out + sft20a[].out;
  77. add22_result[] = sft23a[].out + sft24a[].out;
  78. add26_result[] = sft27a[].out + sft28a[].out;
  79. add30_result[] = sft31a[].out + sft32a[].out;
  80. cs2a[].cin = ( ((w18w[10..10] & cs2a[4].cout) # w18w[11..11]), (cs2a[3].cout & w18w[8..8]), ((w18w[6..6] & cs2a[2].cout) # w18w[7..7]), ((w18w[4..4] & cs2a[1].cout) # w18w[5..5]), ((w18w[2..2] & cs2a[0].cout) # w18w[3..3]), w18w[1..1]);
  81. cs2a[].sin = ( ((((((! w18w[11..11]) & w18w[10..10]) & cs2a[4].cout) # ((w18w[11..11] & w18w[10..10]) & (! cs2a[4].cout))) # ((w18w[11..11] & (! w18w[10..10])) & cs2a[4].cout)) # ((w18w[11..11] & (! w18w[10..10])) & (! cs2a[4].cout))), (cs2a[3].cout & w18w[8..8]), ((((((! w18w[7..7]) & w18w[6..6]) & cs2a[2].cout) # ((w18w[7..7] & w18w[6..6]) & (! cs2a[2].cout))) # ((w18w[7..7] & (! w18w[6..6])) & cs2a[2].cout)) # ((w18w[7..7] & (! w18w[6..6])) & (! cs2a[2].cout))), ((((((! w18w[5..5]) & w18w[4..4]) & cs2a[1].cout) # ((w18w[5..5] & w18w[4..4]) & (! cs2a[1].cout))) # ((w18w[5..5] & (! w18w[4..4])) & cs2a[1].cout)) # ((w18w[5..5] & (! w18w[4..4])) & (! cs2a[1].cout))), ((((((! w18w[3..3]) & w18w[2..2]) & cs2a[0].cout) # ((w18w[3..3] & w18w[2..2]) & (! cs2a[0].cout))) # ((w18w[3..3] & (! w18w[2..2])) & cs2a[0].cout)) # ((w18w[3..3] & (! w18w[2..2])) & (! cs2a[0].cout))), w18w[1..1]);
  82. cs3a[].cin = ( ((w18w[10..10] & cs3a[4].cout) # w18w[11..11]), (cs3a[3].cout $ w18w[8..8]), ((w18w[6..6] & cs3a[2].cout) # w18w[7..7]), ((w18w[4..4] & cs3a[1].cout) # w18w[5..5]), ((w18w[2..2] & cs3a[0].cout) # w18w[3..3]), w18w[1..1]);
  83. cs3a[].sin = ( ((((((! w18w[11..11]) & (! w18w[10..10])) & cs3a[4].cout) # (((! w18w[11..11]) & w18w[10..10]) & (! cs3a[4].cout))) # ((w18w[11..11] & w18w[10..10]) & (! cs3a[4].cout))) # ((w18w[11..11] & (! w18w[10..10])) & cs3a[4].cout)), (cs3a[3].cout $ w18w[8..8]), ((((((! w18w[7..7]) & (! w18w[6..6])) & cs3a[2].cout) # (((! w18w[7..7]) & w18w[6..6]) & (! cs3a[2].cout))) # ((w18w[7..7] & w18w[6..6]) & (! cs3a[2].cout))) # ((w18w[7..7] & (! w18w[6..6])) & cs3a[2].cout)), ((((((! w18w[5..5]) & (! w18w[4..4])) & cs3a[1].cout) # (((! w18w[5..5]) & w18w[4..4]) & (! cs3a[1].cout))) # ((w18w[5..5] & w18w[4..4]) & (! cs3a[1].cout))) # ((w18w[5..5] & (! w18w[4..4])) & cs3a[1].cout)), ((((((! w18w[3..3]) & (! w18w[2..2])) & cs3a[0].cout) # (((! w18w[3..3]) & w18w[2..2]) & (! cs3a[0].cout))) # ((w18w[3..3] & w18w[2..2]) & (! cs3a[0].cout))) # ((w18w[3..3] & (! w18w[2..2])) & cs3a[0].cout)), w18w[0..0]);
  84. le4a[].in = (! ((! (((! ( B"0", dataa_node[], B"0")) & cs2a[0].sout) & (! cs3a[0].sout))) & (! ((((! ( B"0", B"0", dataa_node[])) & cs2a[0].sout) & cs3a[0].sout) # ((( B"0", B"0", dataa_node[]) & (! cs2a[0].sout)) & cs3a[0].sout)))));
  85. le5a[].in = (! ((! (((! ( B"0", dataa_node[], B"0")) & cs2a[1].sout) & (! cs3a[1].sout))) & (! ((((! ( B"0", B"0", dataa_node[])) & cs2a[1].sout) & cs3a[1].sout) # ((( B"0", B"0", dataa_node[]) & (! cs2a[1].sout)) & cs3a[1].sout)))));
  86. le6a[].in = (! ((! (((! ( B"0", dataa_node[], B"0")) & cs2a[2].sout) & (! cs3a[2].sout))) & (! ((((! ( B"0", B"0", dataa_node[])) & cs2a[2].sout) & cs3a[2].sout) # ((( B"0", B"0", dataa_node[]) & (! cs2a[2].sout)) & cs3a[2].sout)))));
  87. le7a[].in = (! ((! (((! ( B"0", dataa_node[], B"0")) & cs2a[3].sout) & (! cs3a[3].sout))) & (! ((((! ( B"0", B"0", dataa_node[])) & cs2a[3].sout) & cs3a[3].sout) # ((( B"0", B"0", dataa_node[]) & (! cs2a[3].sout)) & cs3a[3].sout)))));
  88. le8a[].in = ((cs2a[4].sout & ( B"0", dataa_node[], B"0")) # (cs3a[4].sout & ( B"0", B"0", dataa_node[])));
  89. le9a[].in = (w18w[9..9] & ( B"0", dataa_node[]));
  90. sft11a[].in = ( w526w, ( w526w, ( sft17a[26..26].out, ( sft17a[25..25].out, ( sft17a[24..24].out, ( sft17a[23..23].out, ( sft17a[22..22].out, ( sft17a[21..21].out, ( sft17a[20..20].out, ( sft17a[19..19].out, ( sft17a[18..18].out, ( sft17a[17..17].out, ( sft17a[16..16].out, ( sft17a[15..15].out, ( sft17a[14..14].out, ( sft17a[13..13].out, ( sft17a[12..12].out, ( sft17a[11..11].out, ( sft17a[10..10].out, ( sft17a[9..9].out, ( sft17a[8..8].out, ( sft17a[7..7].out, ( sft17a[6..6].out, ( sft17a[5..5].out, ( sft17a[4..4].out, ( sft17a[3..3].out, ( sft17a[2..2].out, ( le5a[1..1].out, ( le5a[0..0].out, ( le4a[1..0].out))))))))))))))))))))))))))))));
  91. sft12a[].in = ( w555w, ( sft17a[27..27].out, ( sft21a[24..24].out, ( sft21a[23..23].out, ( sft21a[22..22].out, ( sft21a[21..21].out, ( sft21a[20..20].out, ( sft21a[19..19].out, ( sft21a[18..18].out, ( sft21a[17..17].out, ( sft21a[16..16].out, ( sft21a[15..15].out, ( sft21a[14..14].out, ( sft21a[13..13].out, ( sft21a[12..12].out, ( sft21a[11..11].out, ( sft21a[10..10].out, ( sft21a[9..9].out, ( sft21a[8..8].out, ( sft21a[7..7].out, ( sft21a[6..6].out, ( sft21a[5..5].out, ( sft21a[4..4].out, ( sft21a[3..3].out, ( sft21a[2..2].out, ( sft21a[1..1].out, ( sft21a[0..0].out, ( sft17a[1..1].out, ( sft17a[0..0].out, ( w555w, cs2a[0].sout))))))))))))))))))))))))))))));
  92. sft13a[].in = add10_result[];
  93. sft15a[].in = ( w555w, ( w526w, ( le9a[18..18].out, ( le9a[17..17].out, ( le9a[16..16].out, ( le9a[15..15].out, ( le9a[14..14].out, ( le9a[13..13].out, ( le9a[12..12].out, ( le9a[11..11].out, ( sft25a[13..13].out, ( le9a[9..9].out, ( le9a[8..8].out, ( le9a[7..7].out, ( le9a[6..6].out, ( le9a[5..5].out, ( le9a[4..4].out, ( le9a[3..3].out, ( le9a[2..2].out, ( le9a[1..1].out, ( le9a[0..0].out, ( le8a[0..0].out, ( le7a[1..1].out, ( le7a[0..0].out, ( le6a[1..1].out, ( le6a[0..0].out, ( le4a[3..2].out)))))))))))))))))))))))))));
  94. sft16a[].in = ( w555w, ( w555w, ( le8a[19..19].out, ( le8a[18..18].out, ( le8a[17..17].out, ( sft25a[18..18].out, ( sft25a[17..17].out, ( sft25a[16..16].out, ( sft25a[15..15].out, ( sft25a[14..14].out, ( sft29a[10..10].out, ( sft25a[12..12].out, ( sft25a[11..11].out, ( sft25a[10..10].out, ( sft25a[9..9].out, ( sft25a[8..8].out, ( sft25a[7..7].out, ( sft25a[6..6].out, ( sft25a[5..5].out, ( sft25a[4..4].out, ( sft25a[3..3].out, ( sft25a[2..2].out, ( sft25a[1..1].out, ( sft25a[0..0].out, ( le5a[3..3].out, ( le5a[2..2].out, ( w555w, cs2a[1].sout)))))))))))))))))))))))))));
  95. sft17a[].in = add14_result[];
  96. sft19a[].in = ( w555w, ( w526w, ( w526w, ( (! w347w[19..19]), ( le8a[16..16].out, ( le8a[15..15].out, ( le8a[14..14].out, ( sft29a[12..12].out, ( sft29a[11..11].out, ( le9a[10..10].out, ( le8a[10..10].out, ( le8a[9..9].out, ( le8a[8..8].out, ( le8a[7..7].out, ( le8a[6..6].out, ( le8a[5..5].out, ( le8a[4..4].out, ( le8a[3..3].out, ( le8a[2..2].out, ( le8a[1..1].out, ( le7a[2..2].out, ( le6a[3..3].out, ( le6a[2..2].out, ( le4a[5..5].out, cs2a[2].sout))))))))))))))))))))))));
  97. sft20a[].in = ( w555w, ( w555w, ( w555w, ( sft25a[19..19].out, ( le7a[18..18].out, ( sft29a[14..14].out, ( sft29a[13..13].out, ( sft33a[2..2].out, ( sft33a[1..1].out, ( sft33a[0..0].out, ( sft29a[9..9].out, ( sft29a[8..8].out, ( sft29a[7..7].out, ( sft29a[6..6].out, ( sft29a[5..5].out, ( sft29a[4..4].out, ( sft29a[3..3].out, ( sft29a[2..2].out, ( sft29a[1..1].out, ( sft29a[0..0].out, ( le6a[4..4].out, ( le5a[5..5].out, ( le5a[4..4].out, ( w555w, le4a[4..4].out))))))))))))))))))))))));
  98. sft21a[].in = add18_result[];
  99. sft23a[].in = ( w555w, ( w526w, ( le7a[17..17].out, ( le7a[16..16].out, ( le8a[13..13].out, ( le8a[12..12].out, ( le8a[11..11].out, ( le7a[12..12].out, ( le7a[11..11].out, ( le7a[10..10].out, ( le7a[9..9].out, ( le7a[8..8].out, ( le7a[7..7].out, ( le7a[6..6].out, ( le7a[5..5].out, ( le7a[4..4].out, ( le7a[3..3].out, ( le5a[6..6].out, ( le4a[7..6].out)))))))))))))))))));
  100. sft24a[].in = ( w555w, ( w555w, ( (! w273w[19..19]), ( le6a[18..18].out, ( le7a[15..15].out, ( le7a[14..14].out, ( le7a[13..13].out, ( le6a[14..14].out, ( le6a[13..13].out, ( le6a[12..12].out, ( le6a[11..11].out, ( le6a[10..10].out, ( le6a[9..9].out, ( le6a[8..8].out, ( le6a[7..7].out, ( le6a[6..6].out, ( le6a[5..5].out, ( le4a[8..8].out, ( w555w, cs2a[3].sout)))))))))))))))))));
  101. sft25a[].in = add22_result[];
  102. sft27a[].in = ( w555w, ( w526w, ( le6a[17..17].out, ( le6a[16..16].out, ( le6a[15..15].out, ( le5a[16..16].out, ( le5a[15..15].out, ( le5a[14..14].out, ( le5a[13..13].out, ( le5a[12..12].out, ( le5a[11..11].out, ( le5a[10..10].out, ( le5a[9..9].out, ( le5a[8..7].out))))))))))))));
  103. sft28a[].in = ( w555w, ( w555w, ( (! w215w[19..19]), ( le5a[18..18].out, ( le5a[17..17].out, ( le4a[18..18].out, ( le4a[17..17].out, ( le4a[16..16].out, ( le4a[15..15].out, ( le4a[14..14].out, ( le4a[13..13].out, ( le4a[12..12].out, ( le4a[11..11].out, ( le4a[10..9].out))))))))))))));
  104. sft29a[].in = add26_result[];
  105. sft31a[].in = ( w555w, ( w526w, w526w));
  106. sft32a[].in = ( w555w, ( w555w, (! w140w[19..19])));
  107. sft33a[].in = add30_result[];
  108. dataa_node[] = ( datab[17..0]);
  109. datab_node[] = ( dataa[9..0]);
  110. final_result_node[] = ( w913w[27..0]);
  111. result[] = ( final_result_node[27..0]);
  112. w140w[] = le4a[].out;
  113. w18w[] = ( B"00", datab_node[]);
  114. w215w[] = le5a[].out;
  115. w273w[] = le6a[].out;
  116. w347w[] = le7a[].out;
  117. w526w = B"1";
  118. w555w = B"0";
  119. w913w[] = ( sft13a[30..29].out, sft13a[28..27].out, sft13a[26..25].out, sft13a[24..23].out, sft13a[22..21].out, sft13a[20..19].out, sft13a[18..17].out, sft13a[16..15].out, sft13a[14..13].out, sft13a[12..11].out, sft13a[10..9].out, sft13a[8..7].out, sft13a[6..5].out, sft13a[4..3].out, sft13a[2..1].out, sft13a[0..0].out);
  120. END;
  121. --VALID FILE