mult_jrs.tdf
Upload User: abszbd2002
Upload Date: 2020-10-12
Package Size: 33407k
Code Size: 3k
Development Platform:

VHDL

  1. --lpm_mult CBX_DECLARE_ALL_CONNECTED_PORTS="OFF" DEVICE_FAMILY="Cyclone II" DSP_BLOCK_BALANCING="Auto" INPUT_B_IS_CONSTANT="YES" LPM_PIPELINE=2 LPM_REPRESENTATION="UNSIGNED" LPM_WIDTHA=8 LPM_WIDTHB=8 LPM_WIDTHP=16 LPM_WIDTHS=1 MAXIMIZE_SPEED=5 clock dataa datab result CARRY_CHAIN="MANUAL" CARRY_CHAIN_LENGTH=48
  2. --VERSION_BEGIN 7.1 cbx_cycloneii 2007:01:23:09:39:40:SJ cbx_lpm_add_sub 2007:01:08:11:15:18:SJ cbx_lpm_mult 2007:03:30:15:38:08:SJ cbx_mgl 2007:04:03:14:06:46:SJ cbx_padd 2006:11:07:15:06:12:SJ cbx_stratix 2007:04:12:16:43:52:SJ cbx_stratixii 2007:02:12:17:08:26:SJ cbx_util_mgl 2007:01:15:12:22:48:SJ  VERSION_END
  3. -- Copyright (C) 1991-2007 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 cycloneii_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. PARAMETERS
  20. (
  21. dataa_width = 0
  22. );
  23. FUNCTION cycloneii_mac_out (aclr, clk, dataa[dataa_width-1..0], ena)
  24. WITH (  dataa_width, output_clock) 
  25. RETURNS ( dataout[dataa_width-1..0]);
  26. --synthesis_resources = dsp_9bit 1 
  27. SUBDESIGN mult_jrs
  28. clock : input;
  29. dataa[7..0] : input;
  30. datab[7..0] : input;
  31. result[15..0] : output;
  32. VARIABLE 
  33. mac_mult1 : cycloneii_mac_mult
  34. WITH (
  35. dataa_clock = "0",
  36. dataa_width = 8,
  37. datab_clock = "0",
  38. datab_width = 8,
  39. signa_clock = "none",
  40. signb_clock = "none"
  41. );
  42. mac_out2 : cycloneii_mac_out
  43. WITH (
  44. dataa_width = 16,
  45. output_clock = "0"
  46. );
  47. aclr : NODE;
  48. clken : NODE;
  49. BEGIN 
  50. mac_mult1.aclr = aclr;
  51. mac_mult1.clk = clock;
  52. mac_mult1.dataa[] = ( dataa[]);
  53. mac_mult1.datab[] = ( datab[]);
  54. mac_mult1.ena = clken;
  55. mac_mult1.signa = B"0";
  56. mac_mult1.signb = B"0";
  57. mac_out2.aclr = aclr;
  58. mac_out2.clk = clock;
  59. mac_out2.dataa[] = mac_mult1.dataout[];
  60. mac_out2.ena = clken;
  61. aclr = GND;
  62. clken = VCC;
  63. result[15..0] = mac_out2.dataout[15..0];
  64. END;
  65. --VALID FILE