You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.2 KiB

11 years ago
  1. /*
  2. * KiRouter - a push-and-(sometimes-)shove PCB router
  3. *
  4. * Copyright (C) 2013-2015 CERN
  5. * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
  6. * Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
  7. *
  8. * This program is free software: you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation, either version 3 of the License, or (at your
  11. * option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #ifndef __PNS_MEANDER_SKEW_PLACER_H
  22. #define __PNS_MEANDER_SKEW_PLACER_H
  23. #include "pns_meander_placer.h"
  24. #include "pns_diff_pair.h"
  25. namespace PNS {
  26. class ROUTER;
  27. class SHOVE;
  28. class OPTIMIZER;
  29. /**
  30. * MEANDER_SKEW_PLACER
  31. *
  32. * Differential pair skew adjustment algorithm.
  33. */
  34. class MEANDER_SKEW_PLACER : public MEANDER_PLACER
  35. {
  36. public:
  37. MEANDER_SKEW_PLACER( ROUTER* aRouter );
  38. ~MEANDER_SKEW_PLACER();
  39. /// @copydoc PLACEMENT_ALGO::Start()
  40. bool Start( const VECTOR2I& aP, ITEM* aStartItem ) override;
  41. /// @copydoc PLACEMENT_ALGO::Move()
  42. bool Move( const VECTOR2I& aP, ITEM* aEndItem ) override;
  43. /// @copydoc MEANDER_PLACER_BASE::TuningLengthResult()
  44. long long int TuningLengthResult() const override;
  45. /// @copydoc MEANDER_PLACER_BASE::TuningDelayResult()
  46. int64_t TuningDelayResult() const override;
  47. long long int CurrentSkew() const;
  48. private:
  49. long long int origPathLength() const override;
  50. int64_t origPathDelay() const override;
  51. void calculateTimeDomainTargets() override;
  52. DIFF_PAIR m_originPair;
  53. ITEM_SET m_tunedPathP, m_tunedPathN;
  54. long long int m_coupledLength;
  55. int64_t m_coupledDelay;
  56. int m_padToDieLengthP;
  57. int m_padToDieLengthN;
  58. int64_t m_padToDieDelayP;
  59. int64_t m_padToDieDelayN;
  60. };
  61. }
  62. #endif // __PNS_MEANDER_SKEW_PLACER_H