mult_pbt.tdf 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --lpm_mult CBX_DECLARE_ALL_CONNECTED_PORTS="OFF" DEVICE_FAMILY="Cyclone IV E" DSP_BLOCK_BALANCING="Auto" INPUT_A_IS_CONSTANT="NO" INPUT_B_IS_CONSTANT="NO" LPM_REPRESENTATION="UNSIGNED" LPM_WIDTHA=10 LPM_WIDTHB=9 LPM_WIDTHP=19 LPM_WIDTHS=1 MAXIMIZE_SPEED=6 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 cycloneive_mac_mult (aclr, clk, dataa[dataa_width-1..0], datab[datab_width-1..0], ena, signa, signb)
  17. WITH ( dataa_clock, dataa_width, datab_clock, datab_width, signa_clock, signb_clock)
  18. RETURNS ( dataout[dataa_width+datab_width-1..0]);
  19. FUNCTION cycloneive_mac_out (aclr, clk, dataa[dataa_width-1..0], ena)
  20. WITH ( dataa_width = 0, output_clock)
  21. RETURNS ( dataout[dataa_width-1..0]);
  22. --synthesis_resources = dsp_9bit 2
  23. SUBDESIGN mult_pbt
  24. (
  25. dataa[9..0] : input;
  26. datab[8..0] : input;
  27. result[18..0] : output;
  28. )
  29. VARIABLE
  30. mac_mult1 : cycloneive_mac_mult
  31. WITH (
  32. dataa_clock = "none",
  33. dataa_width = 10,
  34. datab_clock = "none",
  35. datab_width = 9,
  36. signa_clock = "none",
  37. signb_clock = "none"
  38. );
  39. mac_out2 : cycloneive_mac_out
  40. WITH (
  41. dataa_width = 19,
  42. output_clock = "none"
  43. );
  44. BEGIN
  45. mac_mult1.dataa[] = ( dataa[]);
  46. mac_mult1.datab[] = ( datab[]);
  47. mac_mult1.signa = B"0";
  48. mac_mult1.signb = B"0";
  49. mac_out2.dataa[] = mac_mult1.dataout[];
  50. result[18..0] = mac_out2.dataout[18..0];
  51. END;
  52. --VALID FILE