lpm_divide_nkm.tdf 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --lpm_divide DEVICE_FAMILY="Cyclone IV E" LPM_DREPRESENTATION="UNSIGNED" LPM_NREPRESENTATION="UNSIGNED" LPM_WIDTHD=24 LPM_WIDTHN=28 OPTIMIZE_FOR_SPEED=5 denom numer quotient CARRY_CHAIN="MANUAL" CARRY_CHAIN_LENGTH=48 IGNORE_CARRY_BUFFERS="OFF"
  2. --VERSION_BEGIN 13.0 cbx_cycloneii 2013:04:24:18:08:47:SJ cbx_lpm_abs 2013:04:24:18:08:47:SJ cbx_lpm_add_sub 2013:04:24:18:08:47:SJ cbx_lpm_divide 2013:04:24:18:08:47:SJ cbx_mgl 2013:04:24:18:11:10: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 sign_div_unsign_fnh (denominator[23..0], numerator[27..0])
  17. RETURNS ( quotient[27..0], remainder[23..0]);
  18. --synthesis_resources = lut 423
  19. SUBDESIGN lpm_divide_nkm
  20. (
  21. denom[23..0] : input;
  22. numer[27..0] : input;
  23. quotient[27..0] : output;
  24. remain[23..0] : output;
  25. )
  26. VARIABLE
  27. divider : sign_div_unsign_fnh;
  28. numer_tmp[27..0] : WIRE;
  29. BEGIN
  30. divider.denominator[] = denom[];
  31. divider.numerator[] = numer_tmp[];
  32. numer_tmp[] = numer[];
  33. quotient[] = divider.quotient[];
  34. remain[] = divider.remainder[];
  35. END;
  36. --VALID FILE