SDC C-Project CF Review 프로그램
LYW
2021-06-09 f143e5ece742a275d1e360c55e829d21e706b26d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#pragma once
 
#include "AssemParam.h"
#include "BlobStorage.h"
#include "AssemUtil.h"
 
#include "MosisStrg.h"
#define ASSEM_CONVBUFFER_SIZE    1024*1024
 
class CBlobStorage;
class CMosisAssem;
 
class AFX_EXT_CLASS CAssemControl
{
    int                m_nThread;
    int                m_nSpace;
    CMosisAssem        *m_pMosisAssem;
 
public:
    CAssemControl();
    ~CAssemControl();
 
public:
    int                InitAssemControl(int nThread, int maxDefect= 10000);
    void            ResetReinspectCount();
 
public:
    DIT_RESULT        Inspect_Rect(int iThread, CConvParam *pParam, BOOL bAsg= FALSE);//, class CDefectStorage *pDefectStorage, int iFrame, int iScan, int iModel, BOOL bCosmicFiler);
    DIT_RESULT        Inspect_Trapezium(int iThread, CConvParam *pParam);//, class CDefectStorage *pDefectStorage, int iFrame, int iScan, int iModel, BOOL bCosmicFiler);
    DIT_RESULT        Inspect_ASG(int iThread, CConvParam *pParam);
    DIT_RESULT        ASGVertConvolution(int iThread, CConvParam *pParam);
 
public:
    CMosisAssem*    GetMosisAssem(int iThread);
};
 
// CMosisAssem ³»¿¡¼­ ÁÖ¾îÁø °Ë»ç ¿µ¿ªÀ» ºÐÇÒÇØ Thread ºÐÇÒ °Ë»ç¸¦ ½Ç½ÃÇÑ´Ù.
class CAssemThreadControl
{
    int                m_nThread;
    int                m_nSpace;
    CMosisAssem        *m_pMosisAssem;
 
public:
    CAssemThreadControl();
    ~CAssemThreadControl();
    int                GetThreadCount(){return m_nThread;}
    BOOL            InitAssemThreadControl(int nThread, int maxDefect);
    DIT_RESULT        Inspect_RectThread(int iThread, CConvParam *pParam);//, class CDefectStorage *pDefectStorage, int iFrame, int iScan, int iModel, BOOL bCosmicFiler);
 
    CMosisAssem*    GetMosisAssemThread(int iThread);
};
 
class AFX_EXT_CLASS CMosisAssem     : public CBlobStorage
{
public:
    CAssemThreadControl    *m_pAssemControl;
    int        m_iThread;
    //    BOOL    m_bNowInspect;
 
    double    m_ConvTime;
    int        m_cReinspect;
 
 
protected:
    CMosisBlock<short>    m_ConvBlock;
    CMosisBlock<short>    m_ConvBlock2;
 
public:
    CMosisAssem(void);
    ~CMosisAssem(void);
 
public:
 
    BOOL        InitAssem(int iThread, int maxDefect);
    void        ResetReinspectCount()    {m_cReinspect= 0;}
    void        ResetMosisAssem();    // Inspect_Pre(); ¸¦ ResetMosisAssem()À¸·Î ¸íÀǺ¯°æÇÑ´Ù.
    void        InspectPAD_Clear();
 
    BOOL        EnableInternalThread(int nThrea, int maxDefect);
 
public:        // ¿ÜºÎ¿¡¼­ °Ë»ç½Ã È£ÃâÇϴ ½ÇÁ¦ ÀÎÅÍÆäÀ̽º[ÀÏ·ÃÀÇ °Ë»ç °úÁ¤(Reset, Check Validity, Inspect, PostProcess..]À» ³»ºÎ¿¡¼­ Æ÷ÇÔÇÑ´Ù]
    DIT_RESULT    Inspect_Rect(CConvParam *pParam);
    DIT_RESULT    Inspect_RectThread(CConvParam *pParam);
    DIT_RESULT    Inspect_Trapezium(CConvParam *pParam);
    DIT_RESULT    Inspect_ASG(CConvParam *pParam);    // Asg¿¡ Zone °Ë»ç°¡ Ãß°¡µÇ¸é¼­ Inspect °è¿­¿¡ Inspect_ASG() Ãß°¡
 
public:
    void        CountReinspect()    {m_cReinspect++;}
 
public:
    DIT_RESULT    CheckParameter(BOOL &bNoInspect);
    DIT_RESULT    CheckParameter_Vert(BOOL &bNoInspect);
 
public:// Assem È£ÃâÀ» ÅëÇØ ½ÇÁ¦ °Ë»ç ControlÇϴ ÇÔ¼öµé. Assemµî ½ÇÁ¦ °Ë»ç ·çƾÀ» Ãß°¡ ÇÏ·Á°Åµç ÀÌÂÊ °è¿­·Î »ç¿ëÇÑ´Ù.
    int            Compare_Float();
    int            Compare_Pixel();
    void        Compare_Zone();            // Compare_Zone2(); ·Î ´ëü
    int            Compare_Zone2();        //  Zone º° ´ÙÀ̳ª¹Í Threshold Ãß°¡µÈ ¹öÀü.
    void        Compare_Trapezium();
    int            Compare_ASGZone();
 
 
protected:// °Ë»ç¿¡ »ç¿ëµÉ À̹ÌÁö¸¦ À§ÇÑ Áß°£ ¹öÆÛ Control
    void        ResetConBuff(int &InspSize);            // ¼¼·Î¹æÇâ ºñ±³¸¦ À§ÇØ 16¹èÀÇ °ø°£ »ç¿ë
    short*        GetConBuffComp(){return m_ConvBlock.GetDataAddr();};
    short*        GetConBuffComp2(){return m_ConvBlock2.GetDataAddr();};
 
 
 
public:
    DIT_RESULT        ASGVertConvolution(CConvParam *pParam);
 
 
public:
    int            Inspect_Rect_Intrin(CConvParam &param);
};