lpm_divide_lkm.tdf 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --lpm_divide DEVICE_FAMILY="Cyclone IV E" LPM_DREPRESENTATION="UNSIGNED" LPM_NREPRESENTATION="UNSIGNED" LPM_WIDTHD=32 LPM_WIDTHN=27 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_9nh (denominator[31..0], numerator[31..0])
  17. RETURNS ( quotient[31..0], remainder[31..0]);
  18. --synthesis_resources =
  19. SUBDESIGN lpm_divide_lkm
  20. (
  21. denom[31..0] : input;
  22. numer[26..0] : input;
  23. quotient[26..0] : output;
  24. remain[31..0] : output;
  25. )
  26. VARIABLE
  27. divider : sign_div_unsign_9nh;
  28. gnd_wire : WIRE;
  29. num_padder[4..0] : WIRE;
  30. numer_tmp[31..0] : WIRE;
  31. BEGIN
  32. divider.denominator[] = denom[];
  33. divider.numerator[] = numer_tmp[];
  34. gnd_wire = B"0";
  35. num_padder[] = ( gnd_wire, gnd_wire, gnd_wire, gnd_wire, gnd_wire);
  36. numer_tmp[] = ( num_padder[], numer[]);
  37. quotient[26..0] = divider.quotient[26..0];
  38. remain[] = divider.remainder[];
  39. END;
  40. --VALID FILE