add_sub_7pc.tdf 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --lpm_add_sub CARRY_CHAIN="MANUAL" CARRY_CHAIN_LENGTH=48 DEVICE_FAMILY="Cyclone IV E" LPM_DIRECTION="SUB" LPM_WIDTH=1 cout dataa datab result
  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_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 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. --synthesis_resources =
  17. SUBDESIGN add_sub_7pc
  18. (
  19. cout : output;
  20. dataa[0..0] : input;
  21. datab[0..0] : input;
  22. result[0..0] : output;
  23. )
  24. VARIABLE
  25. carry_eqn[0..0] : WIRE;
  26. cin_wire : WIRE;
  27. datab_node[0..0] : WIRE;
  28. sum_eqn[0..0] : WIRE;
  29. BEGIN
  30. carry_eqn[] = ( ((dataa[0..0] & datab_node[0..0]) # ((dataa[0..0] # datab_node[0..0]) & cin_wire)));
  31. cin_wire = B"1";
  32. cout = carry_eqn[0..0];
  33. datab_node[] = (! datab[]);
  34. result[] = sum_eqn[];
  35. sum_eqn[] = ( ((dataa[0..0] $ datab_node[0..0]) $ cin_wire));
  36. END;
  37. --VALID FILE