CWafflePackMatrix.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #pragma once
  2. #include "dt.h"
  3. #include <map>
  4. #include "CManageDB.h"
  5. #ifdef WAFFLE_PACK_EXPORTS
  6. #define WAFFLE_PACK_DLL_API __declspec(dllexport)
  7. #else
  8. #define WAFFLE_PACK_DLL_API //__declspec(dllimport)
  9. #endif
  10. using namespace ns_db;
  11. namespace ns_mat
  12. {
  13. typedef struct _WAFFLE_MATRIX_POINT_STRUCT
  14. {
  15. UINT nPackMatrixId; //华夫盒矩阵 Id 第个Id表示一种晶圆
  16. UINT nPackRow; //华夫盒矩阵行数
  17. UINT nPackCol; //华夫盒矩阵列数
  18. UINT nDieMatrixId; //晶圆矩阵Id
  19. UINT nDieRow; //固晶点在矩阵中所在行
  20. UINT nDieCol; //固晶点在矩阵中所在列
  21. UINT iDieIndex; //当前Point在pcb中的序号
  22. bool bDisable; //不可用晶片
  23. PICK_DIE_STATUS eStatus; //晶片状态
  24. XY_DOUBLE_STRUCT stPosition; //程序设置的位置
  25. } WAFFLE_MATRIX_POINT_STRUCT; //固晶点
  26. typedef struct _WAFFLE_MATRIX_INFO_STRUCT
  27. {
  28. UINT iCurrentBondIndex; //当前点
  29. UINT iBondAmount; //Die总数
  30. double dDieSizeX; //晶粒尺寸X
  31. double dDieSizeY; //晶粒尺寸Y
  32. vector <WAFFLE_MATRIX_POINT_STRUCT> vetPoints;
  33. } WAFFLE_MATRIX_INFO_STRUCT; //固晶点
  34. class WAFFLE_PACK_DLL_API CWafflePackMatrix
  35. {
  36. public:
  37. CWafflePackMatrix(INT iModuleId, string strModuleName);
  38. LONG LoadMatrix(MATRIX_SEARCH_DIR dir); //计算位置和index
  39. UINT GetCurrentIndex(UINT nMatrixId); //获取当前index
  40. LONG SetCurrentIndex(UINT nMatrixId,UINT nIndex); //设置当前index
  41. LONG GoNextIndex(UINT nMatrixId);
  42. LONG GetNextIndex(UINT nMatrixId, int& curIndex); //获取从当前点开始的下个点
  43. UINT GetPrevIndex(UINT nMatrixId); //获取从当前点开始的上个点
  44. UINT GetAmount(UINT nMatrixId); //获取总数
  45. //获取晶粒大小
  46. LONG GetDieSize(int nMatrixId, double& dieX, double& dieY);
  47. //设置指定晶圆的状态
  48. LONG SetPintInfoStatus(UINT nMatrixId,UINT nPtIndex, PICK_DIE_STATUS eStatus);
  49. //获取指定晶圆的位置信息
  50. LONG GetPintInfoByIndex(UINT nMatrixId, UINT nPtIndex, WAFFLE_MATRIX_POINT_STRUCT& stPointInfo);
  51. LONG GetAllPintInfo(vector<WAFFLE_MATRIX_POINT_STRUCT>& stPointInfo);
  52. private:
  53. static std::mutex m_MatrixMutex;
  54. bool bIsInitSuccess;
  55. int m_nModuleType;
  56. string m_strModuleName;
  57. //UINT m_iCurrentBondIndex;
  58. //UINT m_iBondAmount;
  59. CProduct* m_pCProduct = nullptr; //产品数据库
  60. std::vector<PROGRAM_WAFFLE_MATRIX_STRUCT> m_vetWaffleMatrix;
  61. std::map<int, WAFFLE_MATRIX_INFO_STRUCT> m_mapWaffleMatrixInfo;//保存所有的点,key为大矩阵id
  62. private:
  63. void SortDir_Z();
  64. void SortDir_S();
  65. };
  66. }