TWI768377B - Method of generating packing solution of printed circuit board - Google Patents

Method of generating packing solution of printed circuit board Download PDF

Info

Publication number
TWI768377B
TWI768377B TW109120701A TW109120701A TWI768377B TW I768377 B TWI768377 B TW I768377B TW 109120701 A TW109120701 A TW 109120701A TW 109120701 A TW109120701 A TW 109120701A TW I768377 B TWI768377 B TW I768377B
Authority
TW
Taiwan
Prior art keywords
constraint
printed circuit
file
circuit board
board
Prior art date
Application number
TW109120701A
Other languages
Chinese (zh)
Other versions
TW202201264A (en
Inventor
林裕盛
陳佩君
陳維超
Original Assignee
英業達股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 英業達股份有限公司 filed Critical 英業達股份有限公司
Priority to TW109120701A priority Critical patent/TWI768377B/en
Publication of TW202201264A publication Critical patent/TW202201264A/en
Application granted granted Critical
Publication of TWI768377B publication Critical patent/TWI768377B/en

Links

Images

Abstract

A method of generating packing solution of printed circuit board (PCB) comprises: obtaining a plurality of component files, a first constraint file, and a second constraint file, wherein each of the component files corresponds to a electrical component, the first constraint file corresponds to a signal-PCB, and the second constraint file corresponds to a multiple-PCB; performing a genetic algorithm to generate a plurality of single-PCB solutions according to the plurality of component files and the first constraint files, wherein each of the single-PCB solutions comprises a shape description, selectively performing a concave hull algorithm to update the shape description, after updating the shape description, performing the genetic algorithm to generate a multiple-PCB solution according to the plurality of single-PCB solutions and the second constraint file.

Description

產生印刷電路板組裝方案的方法Method of producing a printed circuit board assembly scheme

本發明係關於印刷電路板,特別是一種印刷電路板的元件之間及板件之間組合的方法。The present invention relates to a printed circuit board, in particular to a method for combining components and boards of a printed circuit board.

在印刷電路板(Printed Circuit Board,PCB)製造業中,獨立的電子元件及基板被拼組為多個PCB單板(single-PCB),然後將這些PCB單板拼組為一個較大的PCB複合板(multiple-PCB)。最小化PCB的面積對於製造成本至關重要。In the Printed Circuit Board (PCB) manufacturing industry, independent electronic components and substrates are assembled into multiple single-PCBs (single-PCBs), and then these PCBs are assembled into a larger PCB Composite board (multiple-PCB). Minimizing the area of the PCB is critical to manufacturing costs.

然而,在現有技術中最小化PCB面積需要大量的人力。測試人員首先嘗試不同的PCB佈局組合,導出PCB佈局結果,然後驗證結果是否較小,如此將花費大量的時間以及人力成本。However, minimizing the PCB area in the prior art requires a lot of manpower. Testers first try different PCB layout combinations, export the PCB layout results, and then verify whether the results are smaller, which will take a lot of time and labor costs.

有鑑於此,本發明提出一種產生印刷電路板組裝方案的方法,藉此解決上述問題。In view of this, the present invention proposes a method for generating a printed circuit board assembly solution, thereby solving the above problems.

依據本發明一實施例敘述的一種產生印刷電路板組裝方案的方法,包括:取得多個元件檔、第一約束檔及第二約束檔,其中每一元件檔對應一電子元件,第一約束檔對應於一印刷電路單板,第二約束檔對應一印刷電路複合板;依據這些元件檔及第一約束檔執行遺傳演算法以產生多個單板可行方案,每一單板可行方案具有一形狀描述;依據每一單板可行方案選擇性地執行凹殼演算法以更新形狀描述;在依據每一單板可行方案執行凹殼演算法以更新形狀描述之後,依據這些單板可行方案及第二約束檔執行遺傳演算法以產生複合板組裝方案。A method for generating a printed circuit board assembly solution according to an embodiment of the present invention includes: obtaining a plurality of component files, a first constraint file and a second constraint file, wherein each component file corresponds to an electronic component, and the first constraint file Corresponding to a single printed circuit board, the second constraint file corresponds to a printed circuit composite board; according to these component files and the first constraint file, a genetic algorithm is performed to generate a plurality of single board feasible solutions, each single board feasible solution has a shape description; selectively execute the concave hull algorithm to update the shape description according to each veneer feasible scheme; after executing the concave hull algorithm according to each veneer feasible scheme to update the shape description, The constraint file executes a genetic algorithm to generate a composite panel assembly plan.

本發明提出的產生印刷電路板組裝方案的方法可以處理具有任意元件形狀的組合,並且符合如板級(board-level)、銅線等物理限制。本發明可以將元件封裝到PCB中,並使PCB面積盡可能小或是PCB面積利用率盡可能大。本發明提出使用自下而上的方法以及基於遺傳演算法的優化,以減少產生良好的PCB封裝結果所需的工作量和時間。本發明不僅減少了可行的組裝方案的搜索空間,而且極大地減少了計算時間。因此,本發明可在短時間內獲得接近最佳的解決方案。The method of generating a printed circuit board assembly scheme proposed by the present invention can handle combinations with arbitrary component shapes and conform to physical constraints such as board-level, copper wire, and the like. The invention can encapsulate the components into the PCB, and make the PCB area as small as possible or the utilization rate of the PCB area as large as possible. The present invention proposes to use a bottom-up approach and genetic algorithm based optimization to reduce the effort and time required to produce good PCB packaging results. The present invention not only reduces the search space of feasible assembly solutions, but also greatly reduces the computation time. Therefore, the present invention can achieve a near-optimal solution in a short time.

以上之關於本揭露內容之說明及以下之實施方式之說明係用以示範與解釋本發明之精神與原理,並且提供本發明之專利申請範圍更進一步之解釋。The above description of the present disclosure and the following description of the embodiments are used to demonstrate and explain the spirit and principle of the present invention, and provide further explanation of the scope of the patent application of the present invention.

以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其內容足以使任何熟習相關技藝者了解本發明之技術內容並據以實施,且根據本說明書所揭露之內容、申請專利範圍及圖式,任何熟習相關技藝者可輕易地理解本發明相關之目的及優點。以下之實施例係進一步詳細說明本發明之觀點,但非以任何觀點限制本發明之範疇。The detailed features and advantages of the present invention are described in detail below in the embodiments, and the content is sufficient to enable any person skilled in the relevant art to understand the technical content of the present invention and implement it accordingly, and according to the content disclosed in this specification, the scope of the patent application and the drawings , any person skilled in the related art can easily understand the related objects and advantages of the present invention. The following examples further illustrate the viewpoints of the present invention in detail, but do not limit the scope of the present invention in any viewpoint.

本發明提出的產生印刷電路板組裝方案的方法用於將多個電子元件組裝成一或多個印刷電路單板,再將所述一或多個印刷電路單板組裝成印刷電路複合板。電子元件可能是非凸的,並且有孔。電子元件在組裝時可以旋轉,但只能旋轉有限的一組方向,例如旋轉90度。The method for generating a printed circuit board assembly scheme proposed by the present invention is used to assemble a plurality of electronic components into one or more printed circuit single boards, and then assemble the one or more printed circuit single boards into a printed circuit composite board. Electronic components may be non-convex and have holes. Electronic components can be rotated when assembled, but only in a limited set of directions, such as 90 degrees.

請參考圖1,其係依據本發明一實施例繪示的流程圖。Please refer to FIG. 1 , which is a flowchart according to an embodiment of the present invention.

步驟S1為「取得元件檔、第一約束檔及第二約束檔」。每一元件檔對應一電子元件(以下簡稱為元件)。「取得多個元件檔」相當於決定可被組裝的元件之集合。Step S1 is "acquiring the component file, the first constraint file and the second constraint file". Each component file corresponds to an electronic component (hereinafter referred to as component). "Getting multiple component files" is equivalent to determining the set of components that can be assembled.

第一約束檔對應於一印刷電路單板,第二約束檔對應一印刷電路複合板。舉例來說:第一約束檔包括印刷電路單板之最大維度。若印刷電路單板之規格為矩形,則最大維度包括印刷電路單板的長度或寬度。第二約束檔包括印刷電路複合板之最小邊長,以及一印刷電路複合板上可設置的印刷電路單板的最大數量,即拼板(panelization)數量。須注意的是,第一及第二約束檔之內容並不受限於上述範例。舉例來說,第一及第二約束檔中皆可各自定義板邊(break-away)尺寸或治具孔(Tooling hole)數量等。The first constraint file corresponds to a single printed circuit board, and the second constraint file corresponds to a printed circuit composite board. For example: the first constraint file includes the maximum dimension of the printed circuit board. If the size of the printed circuit board is rectangular, the maximum dimension includes the length or width of the printed circuit board. The second constraint file includes the minimum side length of the printed circuit composite board and the maximum number of printed circuit single boards that can be arranged on a printed circuit composite board, that is, the number of panels. It should be noted that the contents of the first and second constraint files are not limited to the above examples. For example, the break-away size or the number of tooling holes can be defined in the first and second constraint files.

請參考圖2,其係依據圖1的步驟S1中的「取得元件檔」繪示的細部流程圖。Please refer to FIG. 2 , which is a detailed flowchart shown in step S1 of FIG. 1 according to "acquiring a component file".

步驟S11為「取得邊界資料及約束資料」。舉例來說,邊界資料及約束資料儲存於繪圖交換格式(Drawing Exchange Format,DXF)檔。一個DXF檔中記錄一個元件的外觀資訊(即邊界資料)及組裝上的限制條件(即約束資料)。Step S11 is "obtaining boundary data and constraint data". For example, boundary data and constraint data are stored in Drawing Exchange Format (DXF) files. A DXF file records the appearance information of a component (ie boundary data) and assembly constraints (ie constraint data).

步驟S13為「依據約束資料,更新邊界資料以作為元件檔」。請參考圖3,其係多個元件C1~C10的示意圖。如圖3所示,因為元件包含額外的約束資料,例如PCB標籤(label)或銅導體(copper conducter),元件未必是簡單的多邊形。若直接將元件的原始的邊界資料,如圖3中元件C1的外框B1,作為後續步驟的輸入,則據以組裝的結果將不可用。Step S13 is "update the boundary data as the component file according to the constraint data". Please refer to FIG. 3 , which is a schematic diagram of a plurality of components C1 ˜ C10 . As shown in Figure 3, the components are not necessarily simple polygons because they contain additional constraint data, such as PCB labels or copper conductors. If the original boundary data of the component, such as the outer frame B1 of the component C1 in FIG. 3 , is directly used as the input of the subsequent steps, the result of the assembly will not be available.

因此,針對步驟S11取得的DXF檔,步驟S13進行預處理,從DXF檔中提取原始的邊界資料之後,利用dxf2svg的程式將邊界資料轉換為縮放向量圖形(Scalable Vector Graphics,SVG)檔。然後以Javascript讀取SVG檔中的文件物件模型(Document Object Model,DOM)中的邊界資料,並依據關聯於元件尺寸的約束資料生成佈局邊界(layout boundary)作為元件檔。佈局邊界是依據元件的約束資料更新後的邊界資料。如圖3所示,元件C1的DXF檔的邊界資料對應至外框B1,依據約束資料更新於SVG檔(元件檔)的邊界資料對應至外框B2。Therefore, for the DXF file obtained in step S11, step S13 performs preprocessing, and after extracting the original boundary data from the DXF file, the dxf2svg program is used to convert the boundary data into a Scalable Vector Graphics (SVG) file. Then use Javascript to read the boundary data in the document object model (Document Object Model, DOM) in the SVG file, and generate the layout boundary as the component file according to the constraint data related to the size of the component. The layout boundary is the boundary data updated according to the constraint data of the component. As shown in FIG. 3 , the boundary data of the DXF file of the component C1 corresponds to the outer frame B1 , and the boundary data updated in the SVG file (component file) according to the constraint data corresponds to the outer frame B2 .

請回顧圖1,步驟S3為「依據元件檔及第一約束檔執行遺傳演算法以產生單板可行方案」。本發明一實施例中採用自下而上(bottom-up)的二階段的遺傳演算法(genetic algorithm)。步驟S3為第一階段的遺傳演算法。舉例來說,染色體為隨機編碼的多個元件,群體規模(population size)為單板可行方案(single-PCB feasible solution)的輸出個數,突變率(mutation rate)為編碼中的位元被置換的機率。單板可行方案代表將多個元件組裝成一個印刷電路單板的可行方案。Referring back to FIG. 1 , step S3 is “execute the genetic algorithm according to the component file and the first constraint file to generate a feasible solution for the single board”. In an embodiment of the present invention, a bottom-up two-stage genetic algorithm is used. Step S3 is the genetic algorithm of the first stage. For example, a chromosome is a number of randomly encoded elements, the population size is the output number of a single-PCB feasible solution, and the mutation rate is the bits in the encoding that are replaced probability. Single-board options represent possible options for assembling multiple components into a single printed circuit board.

在執行遺傳演算法的過程中,每個元件按照其編碼數值依序進行組裝以產生單板初步組裝方案。以適應函數(fitness function)計算每個子代(單板初步組裝方案)的參數。依據計算結果以及這些參數的預設門檻值,選擇較佳的子代作為單板可行方案,並進行下一次迭代,以及產生新的組裝順序或是新的組裝規則。在每次迭代之間,遺傳演算法調整元件組裝的條件,如組裝順序或放置到基板上的旋轉角度等。遺傳演算法終止的條件例如:達到指定的迭代次數、適應函數輸出的適應值(fitness value)收斂或是達到指定門檻值。適應函數的維度(評估參數)包括:元件之間的最小空間;曲線容許偏差,即貝茲曲線(Bézier curve)與圓弧的線性近似所允許的最大誤差,以SVG單位或以像素為單位,如果彎曲部分看起來略微重疊,則減小此值;以及元件旋轉數,每個元件可能評估的旋轉數,例如採90度旋轉元件時旋轉數為4,較大的值可改善結果,但收斂速度較慢。In the process of executing the genetic algorithm, each element is sequentially assembled according to its coded value to generate a preliminary assembly plan of the single board. The parameters of each progeny (preliminary assembly scheme of veneer) are calculated with the fitness function. According to the calculation results and the preset threshold values of these parameters, a better offspring is selected as a feasible solution for the single board, and the next iteration is performed, and a new assembly sequence or a new assembly rule is generated. Between each iteration, the genetic algorithm adjusts the conditions for component assembly, such as the order of assembly or the angle of rotation for placement on the substrate. The conditions for the termination of the genetic algorithm are, for example, reaching a specified number of iterations, convergence of the fitness value output by the fitness function, or reaching a specified threshold value. The dimensions of the fitness function (evaluation parameters) include: the minimum space between elements; the curve tolerance, that is, the maximum error allowed by the linear approximation of the Bézier curve to the arc, in SVG units or in pixels, Decrease this value if the curved sections appear to overlap slightly; and the number of rotations of the element, which may be evaluated for each element, e.g. 4 rotations when taking a 90-degree rotation of the element, larger values improve results but converge slower.

請參考圖4,其係依據圖1的步驟S3繪示的示意圖。圖4的左方為元件C11、C12及C13。圖4的右方為執行步驟S3之後產生的單板可行方案Q1、Q2及Q3。在圖4的範例中,每個元件C11~C13的可用數量皆為1個,但本發明不以此為限。Please refer to FIG. 4 , which is a schematic diagram according to step S3 of FIG. 1 . On the left of FIG. 4 are elements C11 , C12 and C13 . The right side of FIG. 4 is the single-board feasible solutions Q1 , Q2 and Q3 generated after step S3 is executed. In the example of FIG. 4 , the available number of each element C11 - C13 is one, but the present invention is not limited to this.

請參考圖5,其係依據圖1的步驟S3繪示的細部流程圖。舉例來說,從具有最小編碼數值的元件開始,將其組裝在基板上,然後將具有第二小編碼數值的元件鄰近組裝至具有最小編碼數值的元件旁邊。在組裝過程中,更包含步驟S31及步驟S33。Please refer to FIG. 5 , which is a detailed flowchart shown in step S3 of FIG. 1 . For example, start with the component with the smallest code value, assemble it on the substrate, and then assemble the component with the second smallest code value next to the component with the smallest code value. In the assembling process, step S31 and step S33 are further included.

步驟S31為「依據元件檔,以NFP演算法產生第一形狀」。舉例來說,選擇兩個元件對應的元件檔,依據這兩個元件檔所描述的佈局邊界作為輸入資料,運行NFP(no-fit polygon)演算法以產生第一形狀。第一形狀是包含這兩個元件的不重疊的可能組裝形狀。詳言之,給定兩個凸多邊形A及B及各自的參考頂點RA 及RB ,NFP演算法可輸出一個多邊形NFPA, B 。詳言之,將RA 固定在原點,以B外周之一點接觸並繞行A的外周,此時RB 所描繪出的形狀即NFPA, B 。本發明並不限制用以產生第一形狀的NFP演算法。Step S31 is "generate the first shape with the NFP algorithm according to the component file". For example, component files corresponding to two components are selected, and an NFP (no-fit polygon) algorithm is run to generate the first shape according to the layout boundaries described by the two component files as input data. The first shape is a non-overlapping possible assembled shape containing the two elements. In detail, given two convex polygons A and B and their respective reference vertices RA and RB , the NFP algorithm can output a polygon NFP A, B . To be more specific, RA is fixed at the origin, and a point on the outer circumference of B is in contact with and goes around the circumference of A. At this time, the shape drawn by RB is NFP A, B . The present invention does not limit the NFP algorithm used to generate the first shape.

步驟S33為「依據第一形狀產生第一排列方案」。因NFPA, B 包含元件A及元件B的多種排列候選者,故在執行遺傳演算法時,將從這些排列候選者中以例如隨機方式挑選一或多者作為第一排列方案。應用NFP演算法可快速地產生兩個元件彼此緊密連接的第一排列方案。Step S33 is "generate a first arrangement scheme according to the first shape". Since NFP A, B includes multiple arrangement candidates of element A and element B, one or more of these arrangement candidates will be selected as the first arrangement scheme in a random manner, for example, when the genetic algorithm is executed. Applying the NFP algorithm can quickly generate a first arrangement in which the two elements are closely connected to each other.

步驟S35為「依據第一約束檔,選擇性地保留第一排列方案作為單板可行方案之一者」。詳言之,依據第一約束檔中定義的多個規則,遺傳演算法在評估後保留符合的第一排列方案。每完成一次迭代,遺傳演算法的適應函數將依據前述的多個參數評估是否保留本次產生的第一排列方案作為單板可行方案。依據預設的世代(generation)數量,遺傳演算法可產生多個單板可行方案。Step S35 is "selectively keep the first arrangement scheme as one of the feasible schemes for the single board according to the first constraint file". In detail, according to a plurality of rules defined in the first constraint file, the genetic algorithm retains the first permutation scheme after evaluation. Each time an iteration is completed, the adaptation function of the genetic algorithm will evaluate whether to retain the first arrangement scheme generated this time as a feasible scheme for the single board according to the aforementioned multiple parameters. According to a preset number of generations, the genetic algorithm can generate multiple feasible solutions for a single board.

步驟S5為「執行凹殼演算法以更新單板可行方案」。當步驟S3產生的單板可行方案具有非凸形狀時,將選擇性地執行本步驟S5。Step S5 is "execute the concave hull algorithm to update the feasible solution of the single board". When the feasible solution of the single board generated in step S3 has a non-convex shape, this step S5 will be selectively executed.

詳言之,每一單板可行方案具有形狀描述。依據步驟S3產生的每一單板可行方案,本步驟S5執行凹殼(concave hull)演算法以更新形狀描述。形狀描述係記錄單板可行方案中每個元件拼接的方式以及印刷電路單板的形狀。請參考圖6,其係步驟S5執行前的輸入形狀與執行後的輸入形狀輸出示意圖。如圖5所示,D1為印刷電路單板的形狀,D2為依據D1執行凹殼演算法後更新的印刷電路單板的形狀。作為對照組,D3為依據D1執行凸殼(convex hull)演算法後得到的形狀。In detail, each veneer possible solution has a shape description. According to the feasible solutions of each single board generated in step S3, this step S5 executes a concave hull algorithm to update the shape description. The shape description records the way each component is spliced together in the veneer's possible solutions and the shape of the printed circuit veneer. Please refer to FIG. 6 , which is a schematic diagram of the input shape before the execution of step S5 and the output of the input shape after the execution. As shown in FIG. 5 , D1 is the shape of the printed circuit board, and D2 is the shape of the printed circuit board updated after executing the concave shell algorithm according to D1. As a control, D3 is the shape obtained by performing a convex hull algorithm on D1.

如圖6所示,D1之外形較為不規則,若以D1作為組裝印刷電路複合板的一個單位,可能增加第二階段的遺傳演算法的執行時的困難度。因此,本發明執行凹殼演算法以產生包含D1且容易組裝的形狀 D2。相較於直接將D1轉換為凸多邊形的D3,D2可節省基板上無元件設置的面積,即提升基板利用率,避免空間的浪費。須注意的是,本發明並不特別限制採用何種凹殼演算法。As shown in FIG. 6 , the shape of D1 is relatively irregular. If D1 is used as a unit for assembling the printed circuit composite board, it may increase the difficulty of executing the genetic algorithm in the second stage. Therefore, the present invention performs a concave hull algorithm to generate a shape D2 that contains D1 and is easy to assemble. Compared with D3, which directly converts D1 into a convex polygon, D2 can save the area without components on the substrate, that is, improve the utilization rate of the substrate and avoid the waste of space. It should be noted that the present invention does not specifically limit which concave hull algorithm is adopted.

在一實施例中,凹殼演算法之半徑參數係為形狀描述中所有短邊長度的兩倍。一般而言,任何凹殼演算法都需要一個半徑參數。半徑參數愈小,所得到的凹殼愈接近原本的形狀。然而,愈小的半徑參數將愈增加後續組裝時的困難。本發明為克服此問題,將形狀描述以線性逼近(linear approximation)的方式產生具有代表性的長邊L0。長邊L0相當於形狀D1的骨架。此長邊L0將被強制切成多個互相連接的短邊(如圖6的L1~L5),在凹殼演算法中需設定的半徑參數則被設定為這些短邊L1~L5的長度的兩倍。然而本發明並不限制於上述舉例的數字。實務上,在考量基板利用率或電子元件被設置在凹殼中央部位時的影響程度,可適應性地調整半徑參數的大小,或是其相對於短邊的比例。In one embodiment, the radius parameter of the concave hull algorithm is twice the length of all short sides in the shape description. In general, any concave hull algorithm requires a radius parameter. The smaller the radius parameter, the closer the resulting concave hull is to the original shape. However, the smaller the radius parameter, the more difficult the subsequent assembly will be. To overcome this problem, the present invention uses a linear approximation to generate a representative long side L0 from the shape description. The long side L0 corresponds to the skeleton of the shape D1. The long side L0 will be forced to be cut into multiple short sides that are connected to each other (L1~L5 in Figure 6). The radius parameter to be set in the concave shell algorithm is set to the length of these short sides L1~L5. double. However, the present invention is not limited to the figures exemplified above. In practice, considering the utilization rate of the substrate or the degree of influence when the electronic components are arranged in the central part of the concave shell, the size of the radius parameter or its ratio relative to the short side can be adjusted adaptively.

在一實施例中,在得到上述的多個短邊L1~L5之後,可返回步驟S3,修正遺傳演算法在步驟S3中用以排列元件的規則。舉例來說,若短邊L1上包括元件C14~C18(未繪示),則在步驟S3的迭代中,可固定元件C14~C18形成的排列方案。透過上述修正步驟,在第一階段的遺傳演算法完成後,可減少具有凹殼外形的單板可行方案的數量。一般而言,凸多邊形相較於凹多邊形更容易被組裝,因此,依據步驟S5的凹殼演算法的結果返回步驟S3進行修正,可望提升第二階段的遺傳演算法的執行效率。In one embodiment, after the above-mentioned plurality of short sides L1 to L5 are obtained, step S3 may be returned to modify the rules for arranging elements in step S3 by the genetic algorithm. For example, if the elements C14 - C18 (not shown) are included on the short side L1 , in the iteration of step S3 , the arrangement scheme formed by the elements C14 - C18 can be fixed. Through the above correction steps, after the genetic algorithm of the first stage is completed, the number of feasible solutions for the veneer with the concave shell shape can be reduced. Generally speaking, convex polygons are easier to assemble than concave polygons. Therefore, returning to step S3 for correction according to the result of the concave hull algorithm in step S5 is expected to improve the execution efficiency of the genetic algorithm in the second stage.

步驟S7為「依據單板可行方案及第二約束檔執行遺傳演算法以產生複合板組裝方案」。在步驟S5「依據每一單板可行方案執行凹殼演算法以更新形狀描述」之後。步驟S7為第二階段的遺傳演算法,本步驟S7的運作類似於步驟S3,其差別在於步驟S7的輸入資料為單板可行方案,輸出資料為複合板組裝方案。Step S7 is "execute the genetic algorithm according to the feasible plan of the single board and the second constraint file to generate the assembly plan of the composite board". After step S5 "execute the concave hull algorithm to update the shape description according to each veneer feasible solution". Step S7 is the second-stage genetic algorithm. The operation of this step S7 is similar to that of step S3, the difference is that the input data of step S7 is a feasible solution for a single board, and the output data is a composite board assembly solution.

請參考圖6,其係依據圖1的步驟S7繪示的示意圖。在圖6左邊,包含單板可行方案Q1及Q2。在圖6右邊,包含步驟S7執行之後產生的前二個複合板組裝方案R1及R2。Please refer to FIG. 6 , which is a schematic diagram according to step S7 of FIG. 1 . On the left side of Figure 6, there are single-board feasible solutions Q1 and Q2. On the right side of FIG. 6 , the first two composite board assembly schemes R1 and R2 generated after the execution of step S7 are included.

第二約束檔中可設定PCB複合板中可容納的PCB單板的最大數量,在圖6所示的範例中此最大數量設定值為4。因此,遺傳演算法可產生三種組合:Q1使用1個且Q2使用3個、Q1使用3個且Q2使用1個或Q2使用4個。前述數字僅為舉例說明而非用於限制本發明。In the second constraint file, the maximum number of PCB single boards that can be accommodated in the PCB composite board can be set. In the example shown in FIG. 6 , the maximum number is set to 4. Thus, the Genetic Algorithm can generate three combinations: Q1 uses 1 and Q2 uses 3, Q1 uses 3 and Q2 uses 1, or Q2 uses 4. The foregoing numbers are illustrative only and not intended to limit the present invention.

請參考圖8,其係依據圖1的步驟S7繪示的細部流程圖。步驟S71為「依據元件檔,以NFP演算法產生第二形狀」,步驟S73為「依據第二形狀產生第二排列方案」,步驟S75為「依據第二約束檔,選擇性地保留第二方案或複合板組裝方案」。步驟S71~S75可參考步驟S31~S35適應性地修改而實現,本發明在此不重複敘述。Please refer to FIG. 8 , which is a detailed flowchart shown in step S7 of FIG. 1 . Step S71 is "generate the second shape according to the component file using the NFP algorithm", step S73 is "generate the second arrangement scheme according to the second shape", and step S75 is "selectively retain the second scheme according to the second constraint file" or composite panel assembly plan”. Steps S71 to S75 can be implemented by adaptive modification with reference to steps S31 to S35, and the description is not repeated here in the present invention.

請參考圖9,其係依據本發明另一實施例繪示的流程圖。本另一實施例的步驟S1~S7與前述實施例基本上相同,在此不重複敘述。Please refer to FIG. 9 , which is a flowchart according to another embodiment of the present invention. Steps S1 to S7 in this other embodiment are basically the same as those in the previous embodiment, and are not repeated here.

在另一實施例中,產生印刷電路板組裝方案的方法更包括:在步驟S7之後的步驟S8及S9。In another embodiment, the method for generating a printed circuit board assembly scheme further includes steps S8 and S9 after step S7.

步驟S8為「依據複合板組裝方案中的元件檔,取得對應之約束資料」。詳言之,在印刷電路板佈局階段,除了需使用在步驟S7產生的複合板組裝方案,也需要參考每個元件的約束資料。因此,在步驟S13輸出SVG元件檔並刪除約束資料時,需另外記錄被刪除的內容,然後在執行本步驟S8時,將已刪除的內容還原至對應的元件中。Step S8 is "acquiring corresponding constraint data according to the component file in the composite board assembly plan". Specifically, in the printed circuit board layout stage, in addition to using the composite board assembly scheme generated in step S7, it is also necessary to refer to the constraint data of each component. Therefore, when the SVG component file is output and the constraint data is deleted in step S13, the deleted content needs to be additionally recorded, and then when this step S8 is executed, the deleted content is restored to the corresponding component.

步驟S9為「輸出繪圖交換格式檔」。在恢復複合板組裝方案中每個元件被刪除的約束資料之後輸出DXF檔,以便於在佈局階段使用。Step S9 is "outputting the drawing interchange format file". Export the DXF file after restoring the deleted constraint data for each component in the composite board assembly scheme for use in the layout stage.

請參考圖10,其係依據本發明又一實施例繪示的流程圖。本另一實施例的步驟S1~S3及S5~S9與前述實施例基本上相同,在此不重複敘述。在又一實施例中,產生印刷電路板組裝方案的方法更包括:在步驟S3之後且在步驟S5之前的步驟S4。Please refer to FIG. 10 , which is a flowchart according to another embodiment of the present invention. Steps S1 ˜ S3 and S5 ˜ S9 in this other embodiment are basically the same as those in the previous embodiment, and will not be repeated here. In yet another embodiment, the method for generating a printed circuit board assembly scheme further includes: step S4 after step S3 and before step S5.

步驟S4為「依據第三約束檔選擇性地刪除單板可行方案」。詳言之,為了加快後續的封裝流程,降低尋找可行方案的解空間(solution space),本發明允許在第一階段結束時被中斷,並且載入指定的第三約束檔,刪除不符合第三約束檔中定義的規則的單板可行方案。舉例來說,第三約束檔中定義單板上的電阻數量需小於100個。因此,電阻總數量違反此約束規則的單板可行方案將被刪除。本步驟S4可加快步驟S7的執行速度。舉另一例來說,第三約束檔中定義單板上元件的重量上限,此約束可避免過重的元件在經過迴焊爐(reflow oven)時因錫膏重新熔融而掉落的風險。第三約束檔中也可定義元件的吸熱係數。一般而言,第三約束檔中定義的約束規則關聯於元件在實際裝配時所需考量的非關於形狀的參數。Step S4 is "selectively delete the feasible solution of the board according to the third constraint file". In detail, in order to speed up the subsequent encapsulation process and reduce the solution space for finding feasible solutions, the present invention allows to be interrupted at the end of the first stage, and to load the specified third constraint file, delete the third A single-board feasible solution to the rules defined in the constraint file. For example, the number of resistors on a single board defined in the third constraint file should be less than 100. Therefore, feasible solutions for boards with a total number of resistors that violate this constraint will be removed. This step S4 can speed up the execution speed of step S7. For another example, the upper limit of the weight of components on a single board is defined in the third constraint file. This constraint can avoid the risk of excessively heavy components falling off due to re-melting of solder paste when passing through a reflow oven. The heat absorption coefficient of the element can also be defined in the third constraint file. Generally speaking, the constraint rules defined in the third constraint file are related to the non-shape-related parameters that the component needs to consider during the actual assembly.

本發明提出的產生印刷電路板組裝方案的方法可以處理具有任意元件形狀的組合,並且符合如板級(board-level)、銅線等物理限制。本發明可以將元件封裝到PCB中,並使PCB面積盡可能小或是PCB面積利用率盡可能大。本發明提出使用自下而上的方法以及基於遺傳演算法的優化,以減少產生良好的PCB封裝結果所需的工作量和時間。本發明不僅減少了可行的組裝方案的搜索空間,而且極大地減少了計算時間。因此,本發明可在短時間內獲得接近最佳的解決方案。The method of generating a printed circuit board assembly scheme proposed by the present invention can handle combinations with arbitrary component shapes and conform to physical constraints such as board-level, copper wire, and the like. The invention can encapsulate the components into the PCB, and make the PCB area as small as possible or the utilization rate of the PCB area as large as possible. The present invention proposes to use a bottom-up approach and genetic algorithm based optimization to reduce the effort and time required to produce good PCB packaging results. The present invention not only reduces the search space of feasible assembly solutions, but also greatly reduces the computation time. Therefore, the present invention can achieve a near-optimal solution in a short time.

雖然本發明以前述之實施例揭露如上,然其並非用以限定本發明。在不脫離本發明之精神和範圍內,所為之更動與潤飾,均屬本發明之專利保護範圍。關於本發明所界定之保護範圍請參考所附之申請專利範圍。Although the present invention is disclosed in the foregoing embodiments, it is not intended to limit the present invention. Changes and modifications made without departing from the spirit and scope of the present invention belong to the scope of patent protection of the present invention. For the protection scope defined by the present invention, please refer to the attached patent application scope.

S1~S9:步驟 S11~S13:步驟 S31~S35:步驟 S71~S75:步驟 C1~C10:電子元件 Q1~Q3單板可行方案 L0:長邊 L1~L5:短邊 B1:DXF檔的邊界資訊 B2:SVG檔的邊界資訊 R1、R2:複合板組裝方案S1~S9: Steps S11~S13: Steps S31~S35: Steps S71~S75: Steps C1~C10: Electronic components Q1~Q3 Board Feasible Solutions L0: Long side L1~L5: Short side B1: Boundary information of DXF file B2: Boundary information of SVG file R1, R2: Composite board assembly scheme

圖1係依據本發明一實施例繪示的流程圖; 圖2係依據圖1的步驟S1繪示的細部流程圖; 圖3係多個電子元件的示意圖 圖4係依據圖1的步驟S3繪示的示意圖; 圖5係依據圖1的步驟S3繪示的細部流程圖; 圖6係依據圖1的步驟S5繪示的示意圖; 圖7係依據圖1的步驟S7繪示的示意圖; 圖8係依據圖1的步驟S7繪示的細部流程圖; 圖9係依據本發明另一實施例繪示的流程圖;以及 圖10係依據本發明又一實施例繪示的流程圖。FIG. 1 is a flowchart according to an embodiment of the present invention; FIG. 2 is a detailed flow chart according to step S1 of FIG. 1 ; Figure 3 is a schematic diagram of a plurality of electronic components FIG. 4 is a schematic diagram according to step S3 of FIG. 1 ; FIG. 5 is a detailed flow chart according to step S3 of FIG. 1 ; FIG. 6 is a schematic diagram according to step S5 of FIG. 1 ; FIG. 7 is a schematic diagram according to step S7 of FIG. 1 ; FIG. 8 is a detailed flow chart according to step S7 of FIG. 1 ; FIG. 9 is a flowchart according to another embodiment of the present invention; and FIG. 10 is a flowchart according to another embodiment of the present invention.

S1~S7:步驟S1~S7: Steps

Claims (10)

一種產生印刷電路板組裝方案的方法,包括:取得多個元件檔、一第一約束檔及一第二約束檔,其中每一該元件檔對應一電子元件,該第一約束檔對應於一印刷電路單板,該第二約束檔對應一印刷電路複合板;依據該些元件檔及該第一約束檔執行一遺傳演算法以產生多個單板可行方案,每一該些單板可行方案具有一形狀描述;依據每一該些單板可行方案選擇性地執行一凹殼演算法以更新該形狀描述;以及在依據每一該些單板可行方案執行該凹殼演算法以更新該形狀描述之後,依據該些單板可行方案及該第二約束檔執行該遺傳演算法以產生一複合板組裝方案。 A method for generating a printed circuit board assembly scheme, comprising: obtaining a plurality of component files, a first constraint file and a second constraint file, wherein each component file corresponds to an electronic component, and the first constraint file corresponds to a printed circuit board a circuit board, the second constraint file corresponds to a printed circuit composite board; a genetic algorithm is executed according to the component files and the first constraint file to generate a plurality of single-board feasible solutions, each of the single-board feasible solutions has a shape description; selectively executing a concave hull algorithm to update the shape description according to each of the veneer feasible solutions; and executing the concave hull algorithm to update the shape description according to each of the veneer feasible solutions Then, the genetic algorithm is executed according to the feasible solutions of the single board and the second constraint file to generate a composite board assembly solution. 如請求項1所述的產生印刷電路板組裝方案的方法,其中依據該些元件檔及該第一約束檔執行該遺傳演算法以產生該些單板可行方案包括:依據該些元件檔,以一NFP(no-fit polygon)演算法產生該些元件檔其中二者之一第一形狀;以該遺傳演算法依據該第一形狀產生一第一排列方案;以及依據該第一約束檔,以該遺傳演算法選擇性地保留該第一排列方案形狀作為該些單板可行方案之一者。 The method for generating a printed circuit board assembly plan as claimed in claim 1, wherein executing the genetic algorithm to generate the single-board feasible plans according to the component files and the first constraint file comprises: according to the component files, to An NFP (no-fit polygon) algorithm generates a first shape of one of the component files; generates a first arrangement scheme according to the first shape with the genetic algorithm; and according to the first constraint file, to The genetic algorithm selectively retains the first arrangement plan shape as one of the veneer feasible plans. 如請求項2所述的產生印刷電路板組裝方案的方法,其中依據每一該些單板可行方案及該第二約束檔執行該遺傳演算法以產生該複合板組裝方案包括:依據每一該些單板可行方案,以該NFP演算法產生該些單板可行方案其中二者之一第二形狀;以該遺傳演算法依據該第二形狀產生一第二排列方案;以及依據該第二約束檔,以該遺傳演算法之選擇性地保留該第二排列方案作為該複合板組裝方案。 The method for generating a printed circuit board assembly plan according to claim 2, wherein executing the genetic algorithm to generate the composite board assembly plan according to each of the single-board feasible plans and the second constraint file comprises: according to each of the some single-board feasible solutions, using the NFP algorithm to generate one of the second shapes of the single-board feasible solutions; using the genetic algorithm to generate a second arrangement plan according to the second shape; and according to the second constraint file, and the second arrangement scheme is selectively reserved as the composite board assembly scheme by the genetic algorithm. 如請求項1所述的產生印刷電路板組裝方案的方法,其中取得該些元件檔、該第一約束檔及該第二約束檔包括:取得一邊界資料及一約束資料,其中該邊界資料及該約束資料皆對應該電子元件;以及依據該約束資料,更新該邊界資料以作為該些元件檔之一者。 The method for generating a printed circuit board assembly plan as claimed in claim 1, wherein obtaining the component files, the first constraint file and the second constraint file comprises: obtaining a boundary data and a constraint data, wherein the boundary data and The constraint data all correspond to the electronic component; and according to the constraint data, the boundary data is updated as one of the component files. 如請求項4所述的產生印刷電路板組裝方案的方法,其中該邊界資料及該約束資料儲存於繪圖交換格式檔,且每一該元件檔係可縮放向量圖形檔。 The method of generating a printed circuit board assembly scheme of claim 4, wherein the boundary data and the constraint data are stored in a drawing interchange format file, and each of the component files is a scalable vector graphics file. 如請求項4所述的產生印刷電路板組裝方案的方法,其中在依據該些單板可行方案及該第二約束檔執行該遺傳演算法以產生該複合板組裝方案之後,更包括:依據該複合板組裝方案中的該些元件檔,取得對應每一該些元件檔之該約束資料;以及 輸出一繪圖交換格式檔,該繪圖交換格式檔包括該些約束資料及該複合板組裝方案。 The method for generating a printed circuit board assembly plan according to claim 4, wherein after executing the genetic algorithm to generate the composite board assembly plan according to the single-board feasible plans and the second constraint file, further comprising: according to the For the component files in the composite board assembly plan, obtain the constraint data corresponding to each of the component files; and A drawing exchange format file is output, the drawing exchange format file includes the constraint data and the assembly plan of the composite board. 如請求項4所述的產生印刷電路板組裝方案的方法,其中該約束資料包含印刷電路板標籤及銅導體。 The method of generating a printed circuit board assembly scheme of claim 4, wherein the constraint data includes printed circuit board labels and copper conductors. 如請求項1所述的產生印刷電路板組裝方案的方法,其中該第一約束檔包括該印刷電路單板之最大維度及數量,該第二約束檔包括該印刷電路複合板之最小邊長。 The method for generating a printed circuit board assembly solution as claimed in claim 1, wherein the first constraint file includes the maximum dimension and quantity of the printed circuit single board, and the second constraint file includes the minimum side length of the printed circuit composite board. 如請求項1所述的產生印刷電路板組裝方案的方法,其中該形狀描述具有一長邊用以代表該單板可行方案之一形狀,該長邊包括多個短邊,且該凹殼演算法具有多個半徑參數,每一該些半徑參數關聯於每一該些短邊長度。 The method for generating a printed circuit board assembly solution as claimed in claim 1, wherein the shape description has a long side for representing a shape of a possible solution of the single board, the long side includes a plurality of short sides, and the concave shell is calculated The method has a plurality of radius parameters, and each of the radius parameters is associated with each of the short side lengths. 如請求項1所述的產生印刷電路板組裝方案的方法,其中在依據該些元件檔及該第一約束檔執行該遺傳演算法以產生包含該些單板可行方案之後,且在依據每一該些單板可行方案執行該凹殼演算法以更新該形狀描述之前,更包括:依據一第三約束檔選擇性地刪除該些單板可行方案之一者。The method for generating a printed circuit board assembly solution as claimed in claim 1, wherein after executing the genetic algorithm according to the component files and the first constraint file to generate a feasible solution including the single boards, and according to each Before executing the concave hull algorithm to update the shape description for the single-board feasible solutions, the method further includes: selectively deleting one of the single-board feasible solutions according to a third constraint file.
TW109120701A 2020-06-19 2020-06-19 Method of generating packing solution of printed circuit board TWI768377B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109120701A TWI768377B (en) 2020-06-19 2020-06-19 Method of generating packing solution of printed circuit board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109120701A TWI768377B (en) 2020-06-19 2020-06-19 Method of generating packing solution of printed circuit board

Publications (2)

Publication Number Publication Date
TW202201264A TW202201264A (en) 2022-01-01
TWI768377B true TWI768377B (en) 2022-06-21

Family

ID=80787951

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109120701A TWI768377B (en) 2020-06-19 2020-06-19 Method of generating packing solution of printed circuit board

Country Status (1)

Country Link
TW (1) TWI768377B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090031273A1 (en) * 2007-07-27 2009-01-29 Ming-Chin Tsai Method for stacked pattern design of printed circuit board and system thereof
CN102036484A (en) * 2010-09-30 2011-04-27 北大方正集团有限公司 Typesetting method and device of circuit board and circuit board template
TW201223364A (en) * 2010-11-30 2012-06-01 Inventec Corp Method for layouting print circuit board
US8918750B1 (en) * 2013-12-06 2014-12-23 International Business Machines Corporation Multi-dimensional physical arrangement techniques using bin-packing with per-branch combination tries

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090031273A1 (en) * 2007-07-27 2009-01-29 Ming-Chin Tsai Method for stacked pattern design of printed circuit board and system thereof
CN102036484A (en) * 2010-09-30 2011-04-27 北大方正集团有限公司 Typesetting method and device of circuit board and circuit board template
TW201223364A (en) * 2010-11-30 2012-06-01 Inventec Corp Method for layouting print circuit board
US8918750B1 (en) * 2013-12-06 2014-12-23 International Business Machines Corporation Multi-dimensional physical arrangement techniques using bin-packing with per-branch combination tries

Also Published As

Publication number Publication date
TW202201264A (en) 2022-01-01

Similar Documents

Publication Publication Date Title
KR100233972B1 (en) Compression of simple geotric models using spanning trees
CN113033811B (en) Processing method and device for two-quantum bit logic gate
Weber et al. Topological landscapes: A terrain metaphor for scientific data
CN107977414A (en) Image Style Transfer method and its system based on deep learning
CN109033528A (en) Differential pair pad evades generation method, device, equipment and the medium of routing region
CN110222381B (en) Method, system, medium and terminal for generating dynamic installation guide file for PCB assembly
CN110047044A (en) A kind of construction method of image processing model, device and terminal device
TWI768377B (en) Method of generating packing solution of printed circuit board
CN107766466A (en) Recognition methods, system, computer-readable recording medium and the equipment of data type
CN115240048A (en) Deep learning operator positioning fusion method and device for image classification
Manoj et al. Knowledge representation using fuzzy Petri nets-revisited
CN111598987A (en) Bone processing method, device, equipment and storage medium of virtual object
CN113806997B (en) Method for producing printed circuit board assembly scheme
CN101201867A (en) Method for laying circuit board line
CN112308939B (en) Image generation method and device
CN116721420B (en) Semantic segmentation model construction method and system for ultraviolet image of electrical equipment
CN104615697B (en) A kind of webpage level remembers return method
CN109918237A (en) Abnormal network layer determines method and Related product
JP2810397B2 (en) Error correction device
CN116249988A (en) Method and system for providing recommendations regarding configuration procedures
CN114662204A (en) Elastic bar system structure system data processing method and device based on graph neural network
CN112184592A (en) Image restoration method, device, equipment and computer readable storage medium
JPH1079049A (en) Method and system for compressing and decompressing geomtric model, and data structure
CN107451167A (en) The click data acquisition methods and system of position are clicked in standing
CN105740985A (en) Software product line feature selection optimization method