sign_div_unsign_vlh.tdf 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. --sign_div_unsign DEN_REPRESENTATION="UNSIGNED" DEN_WIDTH=7 LPM_PIPELINE=0 MAXIMIZE_SPEED=5 NUM_REPRESENTATION="UNSIGNED" NUM_WIDTH=18 SKIP_BITS=0 denominator numerator quotient remainder
  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 alt_u_div_i7f (denominator[6..0], numerator[17..0])
  17. RETURNS ( quotient[17..0], remainder[6..0]);
  18. --synthesis_resources = lut 129
  19. SUBDESIGN sign_div_unsign_vlh
  20. (
  21. denominator[6..0] : input;
  22. numerator[17..0] : input;
  23. quotient[17..0] : output;
  24. remainder[6..0] : output;
  25. )
  26. VARIABLE
  27. divider : alt_u_div_i7f;
  28. norm_num[17..0] : WIRE;
  29. protect_quotient[17..0] : WIRE;
  30. protect_remainder[6..0] : WIRE;
  31. BEGIN
  32. divider.denominator[] = denominator[];
  33. divider.numerator[] = norm_num[];
  34. norm_num[] = numerator[];
  35. protect_quotient[] = divider.quotient[];
  36. protect_remainder[] = divider.remainder[];
  37. quotient[] = protect_quotient[];
  38. remainder[] = protect_remainder[];
  39. END;
  40. --VALID FILE