mult_apl.tdf 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. --lpm_mult DEDICATED_MULTIPLIER_CIRCUITRY="NO" DEVICE_FAMILY="Cyclone IV E" DSP_BLOCK_BALANCING="AUTO" LPM_PIPELINE=0 LPM_WIDTHA=9 LPM_WIDTHB=10 LPM_WIDTHP=19 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 135
  23. SUBDESIGN mult_apl
  24. (
  25. dataa[8..0] : input;
  26. datab[9..0] : input;
  27. result[18..0] : output;
  28. )
  29. VARIABLE
  30. add13_result[17..0] : WIRE;
  31. add17_result[13..0] : WIRE;
  32. add21_result[9..0] : WIRE;
  33. add25_result[2..0] : WIRE;
  34. add9_result[20..0] : WIRE;
  35. cs2a[4..0] : carry_sum;
  36. cs3a[4..0] : carry_sum;
  37. le4a[11..0] : lcell;
  38. le5a[11..0] : lcell;
  39. le6a[11..0] : lcell;
  40. le7a[11..0] : lcell;
  41. le8a[10..0] : lcell;
  42. sft10a[20..0] : soft;
  43. sft11a[20..0] : soft;
  44. sft12a[20..0] : soft;
  45. sft14a[17..0] : soft;
  46. sft15a[17..0] : soft;
  47. sft16a[17..0] : soft;
  48. sft18a[13..0] : soft;
  49. sft19a[13..0] : soft;
  50. sft20a[13..0] : soft;
  51. sft22a[9..0] : soft;
  52. sft23a[9..0] : soft;
  53. sft24a[9..0] : soft;
  54. sft26a[2..0] : soft;
  55. sft27a[2..0] : soft;
  56. sft28a[2..0] : soft;
  57. dataa_node[9..0] : WIRE;
  58. datab_node[8..0] : WIRE;
  59. final_result_node[18..0] : WIRE;
  60. w136w[11..0] : WIRE;
  61. w18w[9..0] : WIRE;
  62. w195w[11..0] : WIRE;
  63. w245w[11..0] : WIRE;
  64. w303w[11..0] : WIRE;
  65. w395w : WIRE;
  66. w418w : WIRE;
  67. w608w[20..0] : WIRE;
  68. BEGIN
  69. add13_result[] = sft14a[].out + sft15a[].out;
  70. add17_result[] = sft18a[].out + sft19a[].out;
  71. add21_result[] = sft22a[].out + sft23a[].out;
  72. add25_result[] = sft26a[].out + sft27a[].out;
  73. add9_result[] = sft10a[].out + sft11a[].out;
  74. cs2a[].cin = ( ((w18w[8..8] & cs2a[3].cout) # w18w[9..9]), ((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]);
  75. cs2a[].sin = ( ((((((! w18w[9..9]) & w18w[8..8]) & cs2a[3].cout) # ((w18w[9..9] & w18w[8..8]) & (! cs2a[3].cout))) # ((w18w[9..9] & (! w18w[8..8])) & cs2a[3].cout)) # ((w18w[9..9] & (! w18w[8..8])) & (! cs2a[3].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[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]);
  76. cs3a[].cin = ( ((w18w[8..8] & cs3a[3].cout) # w18w[9..9]), ((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]);
  77. cs3a[].sin = ( ((((((! w18w[9..9]) & (! w18w[8..8])) & cs3a[3].cout) # (((! w18w[9..9]) & w18w[8..8]) & (! cs3a[3].cout))) # ((w18w[9..9] & w18w[8..8]) & (! cs3a[3].cout))) # ((w18w[9..9] & (! w18w[8..8])) & cs3a[3].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[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]);
  78. 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)))));
  79. 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)))));
  80. 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)))));
  81. 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)))));
  82. le8a[].in = ((cs2a[4].sout & ( dataa_node[], B"0")) # (cs3a[4].sout & ( B"0", dataa_node[])));
  83. sft10a[].in = ( w395w, ( w395w, ( le8a[10..10].out, ( sft16a[15..15].out, ( sft16a[14..14].out, ( sft16a[13..13].out, ( sft16a[12..12].out, ( sft16a[11..11].out, ( sft16a[10..10].out, ( sft16a[9..9].out, ( sft16a[8..8].out, ( sft16a[7..7].out, ( sft16a[6..6].out, ( sft16a[5..5].out, ( sft16a[4..4].out, ( sft16a[3..3].out, ( sft16a[2..2].out, ( le5a[1..1].out, ( le5a[0..0].out, ( le4a[1..0].out))))))))))))))))))));
  84. sft11a[].in = ( w418w, ( sft16a[17..17].out, ( sft16a[16..16].out, ( sft20a[13..13].out, ( sft20a[12..12].out, ( sft20a[11..11].out, ( sft20a[10..10].out, ( sft20a[9..9].out, ( sft20a[8..8].out, ( sft20a[7..7].out, ( sft20a[6..6].out, ( sft20a[5..5].out, ( sft20a[4..4].out, ( sft20a[3..3].out, ( sft20a[2..2].out, ( sft20a[1..1].out, ( sft20a[0..0].out, ( sft16a[1..1].out, ( sft16a[0..0].out, ( w418w, cs2a[0].sout))))))))))))))))))));
  85. sft12a[].in = add9_result[];
  86. sft14a[].in = ( w418w, ( w395w, ( 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, ( le8a[0..0].out, ( le7a[1..1].out, ( le7a[0..0].out, ( le6a[1..1].out, ( le6a[0..0].out, ( le4a[3..2].out)))))))))))))))));
  87. sft15a[].in = ( w418w, ( w418w, ( (! w303w[11..11]), ( le7a[10..10].out, ( le7a[9..9].out, ( sft24a[8..8].out, ( sft24a[7..7].out, ( sft24a[6..6].out, ( sft24a[5..5].out, ( sft24a[4..4].out, ( sft24a[3..3].out, ( sft24a[2..2].out, ( sft24a[1..1].out, ( sft24a[0..0].out, ( le5a[3..3].out, ( le5a[2..2].out, ( w418w, cs2a[1].sout)))))))))))))))));
  88. sft16a[].in = add13_result[];
  89. sft18a[].in = ( w418w, ( w395w, ( (! w245w[11..11]), ( le7a[8..8].out, ( le7a[7..7].out, ( le7a[6..6].out, ( le7a[5..5].out, ( le7a[4..4].out, ( le7a[3..3].out, ( le7a[2..2].out, ( le6a[3..3].out, ( le6a[2..2].out, ( le4a[5..5].out, cs2a[2].sout)))))))))))));
  90. sft19a[].in = ( w418w, ( w418w, ( sft24a[9..9].out, ( le6a[10..10].out, ( sft28a[2..2].out, ( sft28a[1..1].out, ( sft28a[0..0].out, ( le6a[6..6].out, ( le6a[5..5].out, ( le6a[4..4].out, ( le5a[5..5].out, ( le5a[4..4].out, ( w418w, le4a[4..4].out)))))))))))));
  91. sft20a[].in = add17_result[];
  92. sft22a[].in = ( w418w, ( w395w, ( le6a[9..9].out, ( le6a[8..8].out, ( le6a[7..7].out, ( le5a[8..8].out, ( le5a[7..7].out, ( le5a[6..6].out, ( le4a[7..6].out)))))))));
  93. sft23a[].in = ( w418w, ( w418w, ( (! w195w[11..11]), ( le5a[10..10].out, ( le5a[9..9].out, ( le4a[10..10].out, ( le4a[9..9].out, ( le4a[8..8].out, ( w418w, cs2a[3].sout)))))))));
  94. sft24a[].in = add21_result[];
  95. sft26a[].in = ( w418w, ( w395w, w395w));
  96. sft27a[].in = ( w418w, ( w418w, (! w136w[11..11])));
  97. sft28a[].in = add25_result[];
  98. dataa_node[] = ( datab[9..0]);
  99. datab_node[] = ( dataa[8..0]);
  100. final_result_node[] = ( w608w[18..0]);
  101. result[] = ( final_result_node[18..0]);
  102. w136w[] = le4a[].out;
  103. w18w[] = ( B"0", datab_node[]);
  104. w195w[] = le5a[].out;
  105. w245w[] = le6a[].out;
  106. w303w[] = le7a[].out;
  107. w395w = B"1";
  108. w418w = B"0";
  109. w608w[] = ( sft12a[20..19].out, sft12a[18..17].out, sft12a[16..15].out, sft12a[14..13].out, sft12a[12..11].out, sft12a[10..9].out, sft12a[8..7].out, sft12a[6..5].out, sft12a[4..3].out, sft12a[2..1].out, sft12a[0..0].out);
  110. END;
  111. --VALID FILE