CN101101610A - Large scale integrated circuit division method based on multi-level division method - Google Patents
Large scale integrated circuit division method based on multi-level division method Download PDFInfo
- Publication number
- CN101101610A CN101101610A CNA2007100437653A CN200710043765A CN101101610A CN 101101610 A CN101101610 A CN 101101610A CN A2007100437653 A CNA2007100437653 A CN A2007100437653A CN 200710043765 A CN200710043765 A CN 200710043765A CN 101101610 A CN101101610 A CN 101101610A
- Authority
- CN
- China
- Prior art keywords
- division
- circuit
- node
- graph
- undirected graph
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Medicines Containing Antibodies Or Antigens For Use As Internal Diagnostic Agents (AREA)
Abstract
本发明涉及一种基于多水平划分法的大规模集成电路划分方法,本划分方法对多水平划分法做了改进,实现电路线网到无向图的转换,并保存为带权值的无向图文件,然后启动无向图多水平划分程序,对生成的无向赋权图进行划分。采用本发明的划分方法,不仅仅有效地提高了电路划分的效率,还显著地提高了电路划分的性能,具有较好的实用性。
The invention relates to a large-scale integrated circuit division method based on a multi-level division method. The division method improves the multi-level division method, realizes the conversion of a circuit line network into an undirected graph, and saves it as an undirected graph with weights. graph file, and then start the undirected graph multi-level division program to divide the generated undirected weighted graph. Adopting the division method of the present invention not only effectively improves the efficiency of circuit division, but also remarkably improves the performance of circuit division, and has better practicability.
Description
技术领域:Technical field:
本发明涉及一种设计大规模集成电路用的基于多水平划分法的大规模集成电路划分方法。The invention relates to a large-scale integrated circuit division method based on a multi-level division method for designing large-scale integrated circuits.
背景技术:Background technique:
电路划分在使用硬件描述语言设计大规模集成电路中占有重要的地位。随着集成技术的快速发展,在一个芯片上集成几十万门甚至几百万门电路已成为现实,因此在大规模集成电路设计中使用电路划分,有效地减低了对集成电路进行模拟或综合的复杂性等要求。电路划分也是层次化设计思想的重要一环,电路可以在不同级别上进行划分:进行系统级划分把一个系统划分到一组印刷电路板上,进行板级划分把印刷电路板上的电路划分成一组芯片,进行芯片级划分把芯片中的电路划分成更小的电路。电路划分还有一个重要的原因就是满足封装性要求,电路中门的数目与输入输出引脚数目之间的关系受Rent规则约束,每个芯片上输出引脚的数目以及门电路的数目都不能无限制增加,加之对大规模集成电路封装性要求,所以必须对大规模集成电路进行划分。研究出一个好的电路划分方法是提高大规模集成电路划分系统性能的必要条件。Circuit division plays an important role in the design of large-scale integrated circuits using hardware description languages. With the rapid development of integration technology, it has become a reality to integrate hundreds of thousands or even millions of gate circuits on a chip. Therefore, the use of circuit division in large-scale integrated circuit design effectively reduces the need for simulation or synthesis of integrated circuits. complexity and other requirements. Circuit division is also an important part of hierarchical design thinking. Circuits can be divided at different levels: system-level division divides a system into a group of printed circuit boards, and board-level division divides circuits on printed circuit boards into one Group chips, and perform chip-level division to divide the circuits in the chip into smaller circuits. Another important reason for circuit division is to meet the packaging requirements. The relationship between the number of gates in the circuit and the number of input and output pins is constrained by the Rent rule. The number of output pins on each chip and the number of gate circuits cannot Unlimited increase, coupled with the encapsulation requirements for large-scale integrated circuits, so large-scale integrated circuits must be divided. To study a good circuit division method is a necessary condition to improve the performance of LSI division system.
请参见图1所示,现有技术的电路划分系统中电路划分方法,第一步,用硬件描述语言描述被划分的电路101,得到电路源代码102;第二步,词法分析电路的源代码,得到对应的单词符号103;第三步,在词法分析基础上进行语法分析,得到对应的语法短语104;第四步,在语法分析基础上进行语义分析,得到对应的类型信息105;第五步,在语义分析基础上生成中间代码,构造对应的电路线网106;第六步,根据中间代码生成的线网,调用划分程序109对电路进行划分;第七步,根据划分结果修改对应的线网,得到修改后线网107;第八步,对修改后线网进行电路输出,得到划分后电路描述源代码108。See also shown in Fig. 1, the circuit division method in the circuit division system of prior art, the first step, describe the
从现有技术的电路划分系统中有若干种逻辑电路的划分法,这些划分法从互连线数目最小,划分后电路子集的逻辑单元数目均匀分布等不同的方面来实现,其中:There are several division methods of logic circuits in the circuit division system of the prior art. These division methods are realized from different aspects such as the minimum number of interconnection lines and the uniform distribution of the number of logic units in the circuit subset after division, wherein:
一种基于迁移的划分法,首先,产生电路的随机初始划分,同一个电路逻辑单元不能同时属于两个电路子集。在迁移优化阶段,该划分法在两个电路子集中各选取一个电路逻辑单元进行成对交换,这两个电路逻辑单元分别属于两个不同的电路子集且收益最大,从而每次都利用交换过程最大限度地改进电路划分质量。在这个过程中,划分法记录割切达到最小值时刻的电路划分结果,且一旦交换了选择的两个电路逻辑单元,在整个迁移过程余下的优化改进中,将这两个电路逻辑单元锁定使得它们不再被选中,重复上述过程直到所有可能的电路逻辑单元都经迁移之后,然后回滚到累计收益最大即割切最小值的时刻。该程序得到的电路划分结果不稳定,离散性很大,因此限制了该划分法所能解决问题的规模。A partitioning method based on migration, firstly, a random initial partition of the circuit is generated, and the same circuit logic unit cannot belong to two circuit subsets at the same time. In the migration optimization stage, the division method selects one circuit logic unit in each of the two circuit subsets for pair-wise exchange. process to maximize the quality of circuit partitioning. In this process, the division method records the circuit division results at the moment when the cutting reaches the minimum value, and once the two selected circuit logic units are exchanged, in the remaining optimization and improvement of the entire migration process, the two circuit logic units are locked so that They are no longer selected, and the above process is repeated until all possible circuit logic units have been migrated, and then rolled back to the moment when the cumulative benefit is the largest, that is, the cutting minimum value. The circuit division results obtained by this program are unstable and highly discrete, which limits the scale of the problem that can be solved by this division method.
另一种水平嵌套划分法,首先,选择一个电路逻辑单元,把这个电路逻辑单元标上0,然后把那些和这个电路逻辑单元相连的电路逻辑单元标上1,之后对于那些还未标上号码,但是和已经标上号码的电路逻辑单元相邻的电路逻辑单元,将其标号为相连的电路逻辑单元号码上加1;直到一半的电路逻辑单元标上号码,标号过程才结束。那些已经标上号码的电路逻辑单元集合设为一个电路子集,其他电路逻辑单元为另一个电路子集。该划分法只有在选取的初始电路逻辑单元接近外围时,得到的电路划分结果相对较好,因此得到的电路划分结果也不稳定。Another horizontal nesting division method, first, select a circuit logic unit, mark this circuit logic unit with 0, then mark those circuit logic units connected to this circuit logic unit with 1, and then for those that have not been marked number, but the circuit logic unit adjacent to the numbered circuit logic unit is labeled as the number of the connected circuit logic unit plus 1; until half of the circuit logic unit is marked with a number, the labeling process is just over. Those sets of circuit logic units marked with numbers are set as a circuit subset, and other circuit logic units are another circuit subset. Only when the selected initial circuit logic unit is close to the periphery of this division method, the obtained circuit division result is relatively good, so the obtained circuit division result is also unstable.
还有一种多水平划分法,首先,采用随机匹配将某些电路逻辑单元结合在一起,得到下一水平层的粗化电路图,重复此过程直到粗化电路图足够小为止,即得到一个最小电路图。然后,采用划分法对最小电路图进行对分,得到一个初始二划分。之后,在从最小电路图投影回初始电路图,在每一水平层的细化电路划分中,按照贪心原则选择收益值最大的电路逻辑单元进行迁移优化,得到最后的电路划分结果。该划分法相对上述两种方法,更适合针对超大规模集成电路进行划分,但由于采用随机策略进行匹配和贪心原则进行优化,因此逃离局部最优的能力是有限的。There is also a multi-level division method. First, random matching is used to combine some circuit logic units together to obtain a roughened circuit diagram of the next level. This process is repeated until the roughened circuit diagram is small enough to obtain a minimum circuit diagram. Then, the minimal circuit diagram is bisected by the partition method to obtain an initial two-partition. After that, after projecting from the minimum circuit diagram back to the initial circuit diagram, in the refined circuit division of each horizontal layer, the circuit logic unit with the largest profit value is selected according to the greedy principle for migration optimization, and the final circuit division result is obtained. Compared with the above two methods, this division method is more suitable for VLSI division. However, due to the random strategy for matching and the greedy principle for optimization, the ability to escape from local optimum is limited.
发明内容:Invention content:
本发明的目的在于针对已有技术存在的不足,提供一种改进的基于多水平划分法的大规模集成电路划分方法,提高大规模集成电路划分的效率和性能。为达到上述目的,本发明的构思如下:The purpose of the present invention is to provide an improved LSI division method based on the multi-level division method to improve the efficiency and performance of LSI division in view of the deficiencies in the prior art. For achieving the above object, design of the present invention is as follows:
实现电路线网到无向图的转换,并保存为带权值的无向图文件,然后启动无向图多水平划分程序,对生成的赋权无向图进行划分。Realize the conversion of the circuit line network into the undirected graph, and save it as an undirected graph file with weights, and then start the multi-level division program of the undirected graph to divide the generated weighted undirected graph.
在多水平划分法的粗化阶段,通过对结点属性进行赋权无向图中所有结点的核值求解排序,基于结点核值的非严格降序,按照该次序访问处于未匹配状态的结点,依据一定规则对其进行匹配,从而将连接性好的结点合并在一起。In the coarsening stage of the multi-level partition method, by sorting the kernel values of all nodes in the weighted undirected graph for the node attributes, based on the non-strict descending order of the node kernel values, access the unmatched state according to this order. Nodes are matched according to certain rules, so that nodes with good connectivity are merged together.
在多水平划分法的优化阶段,采用免疫克隆优化程序改进贪心原则的局部搜索方法,对在每一水平层图投影的划分进行优化,借助适当的克隆操作、克隆变异操作、接种免疫疫苗操作、克隆选择操作,使得改进后的方法在利用启发信息搜索局部最优解的同时,更大自由地对具有潜力的解空间进行搜索,增加全局搜索能力。In the optimization stage of the multi-level partition method, the immune cloning optimization program is used to improve the local search method of the greedy principle, and the partition of the map projection at each level is optimized. The clone selection operation enables the improved method to search the potential solution space more freely while using the heuristic information to search for the local optimal solution, increasing the global search ability.
根据上述的发明构思,本发明的技术方案是这样实现的:一种基于多水平划分法的大规模集成电路划分方法,其特征在于,具体步骤如下,According to the above-mentioned inventive concept, the technical solution of the present invention is realized as follows: a large-scale integrated circuit division method based on multi-level division method, characterized in that, the specific steps are as follows,
步骤1,用硬件描述语言描述该电路,生成该电路的源代码;
步骤2,词法分析,从左到右一个个读入该电路的源代码,对构成源代码的字符流进行扫描和分解,从而识别出一个个单词;
步骤3,语法分析,在词法分析的基础上将单词序列分解成各类语法短语,依据硬件描述语言的语法规则,确定整个字符流是否构成一个语法上正确的程序;
步骤4,语义分析,在语法分析的基础上审核源代码有无语义错误,为中间代码生成阶段收集类型信息;
步骤5,中间代码生成,在语法分析和语义分析的基础上,将源代码生成中间代码,用内部中间格式表示;
步骤6,带权值的无向图文件生成,基于中间代码构造文本描述的电路对应的线网,经过电路线网到无向图的转换之后,保存为带权值的无向图文件;
步骤7,无向图划分,启动无向图多水平划分程序,读取带权值的无向图文件,对生成的赋权图进行划分,将最终得到的划分结果存储在无向图划分文件中;
步骤8,修改线网,在检测到无向图划分程序完成划分之后,从无向图划分文件中读取相应的划分结果,根据划分信息修改电路对应的线网;
步骤9,电路输出,遍历修改后的线网,将得到的电路划分结果以硬件描述语言存储在电路描述文件中。
上述的步骤6的操作程序为:The operation procedure of the
6.1基于中间代码构造电路源代码描述电路对应的线网,生成完整电路线网;一个完整的电路线网看作是一个根模块,它由层次化的子模块实例和电路逻辑单元通过信号互联构成,且每个子模块内部由端口、电路逻辑单元、嵌套子模块的实例通过信号连接构成;6.1 Construct the circuit source code based on the intermediate code to describe the network corresponding to the circuit, and generate a complete circuit network; a complete circuit network is regarded as a root module, which is composed of hierarchical sub-module instances and circuit logic units through signal interconnection , and each sub-module is composed of ports, circuit logic units, and instances of nested sub-modules through signal connections;
6.2遍历完整的电路线网,并对电路中的基本电路逻辑单元命名标识号;确立各逻辑单元之间的信号连接方式,实现到无向图的转换,该图中的基本电路逻辑单元用结点Vi表示,该图中信号用边Ej表示;结点Vi的权值代表基本电路逻辑单元的大小,边Ej的权值代表基本电路逻辑单元之间信号连线转换的权值;6.2 Traverse the complete circuit network, and name the identification number of the basic circuit logic unit in the circuit; establish the signal connection mode between each logic unit, and realize the conversion to the undirected graph. The point V i is represented, and the signal in the figure is represented by the side E j ; the weight of the node V i represents the size of the logic unit of the basic circuit, and the weight of the side E j represents the weight of the signal connection conversion between the logic units of the basic circuit ;
6.3将转换得到的无向图保存为带权值的无向图文件。6.3 Save the converted undirected graph as an undirected graph file with weights.
上述的步骤7的操作程序为:The operation procedure of the above-mentioned
7.1读取带权值的无向图文件,采用压缩存储格式对图进行存储;7.1 Read the undirected graph file with weights, and store the graph in a compressed storage format;
7.2进入到多水平划分法的粗化阶段,采用匹配程序将某些结点结合在一起,得到下一水平层的粗化图,重复此过程直到粗化图足够小为止,即得到一个最小图;7.2 Enter the coarsening stage of the multi-level partition method, use the matching program to combine some nodes together to obtain the coarsening graph of the next level, repeat this process until the coarsening graph is small enough, that is, a minimum graph is obtained ;
7.3进入到多水平划分法的初始划分阶段,初始化抗体种群,其中抗体种群中每个抗体采用划分程序得到一个初始二划分,并采用接种免疫疫苗操作进行初始二划分的优化;7.3 Enter the initial division stage of the multi-level division method, initialize the antibody population, wherein each antibody in the antibody population uses the division procedure to obtain an initial two-division, and uses the immunization operation to optimize the initial two-division;
7.4进入到多水平划分法的优化阶段,从最小图投影回初始图,在每一水平层的细化图中,设定克隆规模参数,采用免疫克隆优化程序对划分进行优化;7.4 Enter the optimization stage of the multi-level partition method, project from the minimum map back to the initial map, set the clone scale parameters in the detailed map of each horizontal layer, and use the immune cloning optimization program to optimize the partition;
7.5将最终得到的划分结果存储在无向图划分文件中。7.5 Store the final division result in the undirected graph division file.
上述的步骤7.2中,所述的匹配程序为:In the above step 7.2, the matching procedure is:
7.2.1标注图中所有结点处于未匹配状态;7.2.1 All nodes in the annotation graph are in an unmatched state;
7.2.2基于结点属性进行图中所有结点的核值求解;7.2.2 Solve the kernel value of all nodes in the graph based on node attributes;
7.2.3按照结点的核值进行非严格降序排序,且按照该次序访问处于未匹配状态的结点v;如果结点v还有邻接结点未匹配,那么选取处于没有匹配状态的且权值最大的边的邻接结点u和结点v匹配,且标注这两个结点为匹配状态;如果结点v所有邻接匹配结点处于匹配状态,那么结点v仍处于未匹配状态,在粗化过程中直接拷贝到下一水平层的粗化图中;7.2.3 Perform a non-strict descending sort according to the core value of the node, and visit the node v in the unmatched state according to this order; if the node v has unmatched adjacent nodes, then select the unmatched state and the weight The adjacent node u and node v of the side with the largest value match, and mark these two nodes as the matching state; if all the adjacent matching nodes of node v are in the matching state, then the node v is still in the unmatched state. During the coarsening process, it is directly copied to the coarsening map of the next horizontal layer;
7.2.4重复上一步,直至访问结束。7.2.4 Repeat the previous step until the visit ends.
上述的步骤7.4中,所述的免疫克隆优化程序为:In the above-mentioned step 7.4, the immune cloning optimization procedure described is:
7.4.1将上一水平层粗化图抗体种群优化后的划分投影回当前层的细化图,作为当前层的抗体种群初始划分;7.4.1 Project the optimized division of the antibody population in the coarsened map of the previous level back to the refined map of the current layer as the initial division of the antibody population in the current layer;
7.4.2设置抗体种群初始划分中最优的划分为种群最优划分BEST,且将免疫克隆程序的循环计数器COUNTER置为零;7.4.2 Set the optimal division in the initial division of the antibody population as the optimal division of the population BEST, and set the cycle counter COUNTER of the immune cloning program to zero;
7.4.3计算抗体种群的亲合度,依据设定的抗体克隆规模参数,对抗体种群中每个抗体进行克隆操作、克隆变异操作、接种免疫疫苗操作、克隆选择操作;7.4.3 Calculate the affinity of the antibody population, and perform cloning operations, cloning mutation operations, immunization operations, and clone selection operations for each antibody in the antibody population according to the set antibody cloning scale parameters;
7.4.4如果新抗体种群中最优的划分优于种群最优划分BEST,则更新种群最优划分BEST;7.4.4 If the optimal division in the new antibody population is better than the optimal division BEST of the population, update the optimal division BEST of the population;
7.4.5循环计数器COUNTER加一;7.4.5 Add one to the loop counter COUNTER;
7.4.6重复7.4.3、7.4.4、7.4.5步,直至循环计数器COUNTER到达给定的上限。7.4.6 Repeat steps 7.4.3, 7.4.4, 7.4.5 until the loop counter COUNTER reaches the given upper limit.
上述的步骤8的操作程序为:The operation procedure of the above-mentioned
8.1读取无向图划分文件存储的相应划分结果;8.1 Read the corresponding division results stored in the undirected graph division file;
8.2通过修改电路对应的线网,将划分结果对应的基本电路逻辑单元搬移到指定的模块。8.2 By modifying the network corresponding to the circuit, the basic circuit logic unit corresponding to the division result is moved to the specified module.
本发明与现有技术相比较,具有如下显而易见的突出实质性特点和显著优点:Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant advantages:
1、提高了电路划分的效率1. Improve the efficiency of circuit division
本发明基于多水平划分法的大规模集成电路划分方法,由于实现电路线网到带权值无向图文件的转换,然后启动无向图多水平划分程序,对生成的赋权无向图进行划分,从而避免了划分法直接在电路线网上进行划分,并且可以通过设置划分法的参数获取较优的划分结果后,再进行电路线网的修改,从而有效地提高了电路划分的效率。The method for dividing large-scale integrated circuits based on the multi-level division method of the present invention realizes the conversion from the circuit line network to the undirected graph file with weights, and then starts the multi-level division program of the undirected graph to carry out the weighted undirected graph generated Division, thus avoiding the division method to directly divide the circuit network, and after obtaining a better division result by setting the parameters of the division method, modify the circuit network, thereby effectively improving the efficiency of circuit division.
2、提高了电路划分的性能2. Improved the performance of circuit division
本发明基于多水平划分法的大规模集成电路划分方法,由于在多水平划分法的粗化阶段,借助结点属性按照一定规则进行匹配,从而将连接性好的结点合并在一起,最大化减少边的条数以及边权值之和,从而有利于初始划分阶段得到一个好的初始划分、在优化阶段对初始划分的投影优化。本发明基于多水平划分法的大规模集成电路划分方法,在多水平划分法的优化阶段,采用免疫克隆优化程序改进贪心原则的局部搜索方法,在每一水平层图投影的划分进行优化,有效地找到比现有技术更优的电路划分结果,最终显著地提高了电路划分的性能。The large-scale integrated circuit division method based on the multi-level division method of the present invention, because in the coarsening stage of the multi-level division method, the node attributes are used to match according to certain rules, so that the nodes with good connectivity are combined to maximize Reduce the number of edges and the sum of edge weights, which is conducive to obtaining a good initial division in the initial division stage, and optimizing the projection of the initial division in the optimization phase. The present invention is based on the large-scale integrated circuit division method of the multi-level division method. In the optimization stage of the multi-level division method, the immune cloning optimization program is used to improve the local search method of the greedy principle, and the division of the map projection of each level is optimized, which is effective. Find better circuit division results than the existing technology, and finally significantly improve the performance of circuit division.
附图说明:Description of drawings:
通过以下对本发明基于多水平划分法的大规模集成电路划分方法的实例结合其附图的描述,可以进一步理解本发明的目的、具体结构特征和优点。Through the following description of the large-scale integrated circuit division method based on the multi-level division method in conjunction with the accompanying drawings, the purpose, specific structural features and advantages of the present invention can be further understood.
图1是现有技术的电路划分系统中电路划分方法的程序框图。FIG. 1 is a program block diagram of a circuit division method in a prior art circuit division system.
图2是本发明基于多水平划分法的大规模集成电路划分方法的程序框图。Fig. 2 is a program block diagram of the large-scale integrated circuit division method based on the multi-level division method of the present invention.
图3是本发明的对赋权无向图文件进行存储的压缩存储格式的程序框图。Fig. 3 is a program block diagram of the compressed storage format for storing the weighted undirected graph file in the present invention.
图4是本发明的粗化阶段实施的匹配程序的流程图。Figure 4 is a flow chart of the matching procedure implemented in the coarsening phase of the present invention.
图5是本发明的优化阶段实施免疫克隆优化程序的流程图。Fig. 5 is a flow chart of the immune cloning optimization program implemented in the optimization phase of the present invention.
图6是本发明的实施接种免疫疫苗操作的流程图。Fig. 6 is a flow chart of the operation of implementing the immunization vaccine of the present invention.
图7是本发明与现有技术基于多水平划分法的无向图划分程序MeTiS相比较的实验结果表。Fig. 7 is a table of experimental results comparing the present invention with the prior art undirected graph partition program MeTiS based on the multi-level partition method.
具体实施方式:Detailed ways:
为了能够更清楚地理解本发明基于多水平划分法的大规模集成电路划分方法的技术内容,特举以下实例详细说明。In order to understand more clearly the technical content of the large-scale integrated circuit division method based on the multi-level division method of the present invention, the following examples are given in detail.
请参阅图2所示,用硬件描述语言描述被划分的电路201,得到电路源代码202;词法分析电路的源代码,得到对应的单词符号203;在词法分析基础上进行语法分析,得到对应的语法短语204;在语法分析基础上进行语义分析,得到对应的类型信息205;在语义分析基础上,构造对应的内部中间代码206;基于内部中间代码构造文本描述的电路对应的线网207,经过电路线网到无向图的转换之后,保存为带权值的无向图文件210;启动无向图多水平划分程序216,读取带权值的无向图文件,得到采用压缩存储格式存储的图212;进入到多水平划分法的粗化阶段,调用匹配程序217,将某些图结点结合在一起,得到每一水平层的粗化图213;进入到多水平划分法的初始划分阶段,调用划分程序218对最小图进行对分,得到最小图初始二划分214;进入到多水平划分法的优化阶段,从最小图投影回初始图,在每一水平层的细化图中,调用优化程序219对划分进行优化,得到每一水平层细化图的优化划分215;将最终得到的初始图划分结果存储为无向图划分文件211;在检测到无向图划分程序完成划分之后,从无向图划分文件中读取相应的划分结果,根据划分信息修改电路对应的线网,得到划分结果对应的修改后线网208;遍历修改后的线网,将得到的电路划分结果以硬件描述语言存储为电路描述文件209。Please refer to shown in Figure 2, describe the divided circuit 201 with a hardware description language, and obtain the circuit source code 202; lexically analyze the source code of the circuit to obtain the corresponding word symbol 203; perform grammatical analysis on the basis of the lexical analysis to obtain the corresponding Grammatical phrase 204; perform semantic analysis on the basis of grammatical analysis to obtain corresponding type information 205; construct corresponding internal intermediate code 206 on the basis of semantic analysis; construct a line network 207 corresponding to a circuit described in text based on internal intermediate code, and pass After the conversion of the circuit line network to the undirected graph, save it as an undirected graph file 210 with weights; start the undirected graph multi-level division program 216, read the undirected graph file with weights, and obtain the compressed storage format storage Figure 212 of the multi-level division method; enter the coarsening stage of the multi-level division method, call the matching program 217, combine some graph nodes together, and obtain the coarser diagram 213 of each horizontal layer; enter the initial division of the multi-level division method stage, call the division program 218 to divide the minimum graph into two parts, and obtain the initial two-partition 214 of the minimum graph; enter the optimization stage of the multi-level partition method, project the minimum graph back to the initial graph, and in the refinement graph of each horizontal layer, Call the optimization program 219 to optimize the division, and obtain the optimized division 215 of each horizontal layer refinement graph; store the final initial graph division result as an undirected graph division file 211; after detecting that the undirected graph division program completes the division , read the corresponding division result from the undirected graph division file, modify the network corresponding to the circuit according to the division information, and obtain the modified network 208 corresponding to the division result; traverse the modified network, and obtain the circuit division result as The hardware description language is stored as a circuit description file 209 .
对于多水平划分法的带权值的无向图文件,本实施例的压缩存储格式如图3所示。存储结构使用xadj数组303存储结点的信息,使用adjncy数组302存储邻接结点的信息。假设数组地址从零开始,结点编号从零开始,则第i个结点的邻接结点列表存储在数组adjncy中,位置从数组adjncy[xadj[i]]到adjncy[xadj[i+1]-1]。图例301包含总共7个结点和12条边,adjncy数组302存储每个结点的邻接结点列表,因此大小为24。xadj数组303指定每个结点对应邻接结点列表的起始和终止位置,第i个结点的起始位置为第i-1个结点的终止位置,因此大小为8。当图为带权值的无向图,压缩存储结构使用vwgt数组305存储结点的权值信息,大小为结点的个数;使用adjwgt数组304存储边权值的信息,大小为边数目的两倍,且和存储邻接结点信息的数组adjncy配合使用。第i个结点的权值存放在vwgt[i],与邻接结点adjncy[j]之间边的权值信息存放在adjwgt[j]。For the weighted undirected graph file of the multi-level division method, the compressed storage format of this embodiment is shown in FIG. 3 . The storage structure uses the
对于多水平划分法的粗化阶段,本实施例的匹配程序具体流程如图4所示,步骤如下:For the coarsening stage of the multi-level division method, the specific flow of the matching program in this embodiment is shown in Figure 4, and the steps are as follows:
A01:标注图中所有结点处于未匹配状态;A01: All nodes in the annotation graph are in an unmatched state;
A02:基于结点属性进行图中所有结点的核值求解,结点的属性可以采用结点的入度、出度、度、结点边权值之和,结点边权值中的最大值等;A02: Solve the kernel values of all nodes in the graph based on node attributes. The attributes of nodes can be the in-degree, out-degree, degree, sum of node edge weights, and the largest node edge weight. value etc;
A03:按照结点的核值进行非严格降序排序;A03: Sort in non-strict descending order according to the core value of the node;
A04:按照该次序访问处于未匹配状态的结点是否结束;如果访问未结束,即存在结点v未被访问,则转步骤A05;否则访问结束,则匹配程序结束;A04: According to this order, whether the visit to the unmatched nodes is finished; if the visit is not finished, that is, there is a node v that has not been visited, then go to step A05; otherwise, the visit ends, and the matching procedure ends;
A05:结点v所有邻接结点是否处于匹配状态;如果存在邻接结点未被匹配,转步骤A06;否则结点v所有邻接结点都处于匹配状态,转步骤A11;A05: Whether all the adjacent nodes of node v are in the matching state; if there are adjacent nodes that are not matched, go to step A06; otherwise, all the adjacent nodes of node v are in the matching state, go to step A11;
A06:选取处于没有匹配状态的且权值最大的边的邻接结点为候选结点;A06: Select the adjacent node that is in the non-matching state and has the largest weight as the candidate node;
A07:如果存在着多个候选结点,则转步骤A08,否则只有单个候选邻接结点,转步骤A10;A07: If there are multiple candidate nodes, go to step A08, otherwise there is only a single candidate adjacent node, go to step A10;
A08:在多个候选结点中选择核值更大的那个邻接结点u;A08: Select the adjacent node u with the larger kernel value among multiple candidate nodes;
A09:结点v和邻接结点u匹配并进行合并,合并后的结点权值为结点v和邻接结点u权值相加,合并后结点的边为结点v和邻接结点u边的合并,转步骤A04;A09: The node v and the adjacent node u are matched and merged. The weight of the merged node is the sum of the weight of the node v and the adjacent node u. The edge of the merged node is the node v and the adjacent node. Merge of side u, go to step A04;
A10:选择单个候选邻接结点u,转步骤A09;A10: Select a single candidate adjacent node u, go to step A09;
A11:结点v仍处于未匹配状态,在粗化过程中直接拷贝到粗化图中,转步骤A04。A11: The node v is still in the unmatched state, and it is directly copied to the coarsening graph during the coarsening process, and then go to step A04.
对于多水平划分法的优化阶段,本实施例的免疫克隆优化程序具体流程如图5所示,步骤如下:For the optimization stage of the multi-level division method, the specific flow of the immune cloning optimization program in this embodiment is shown in Figure 5, and the steps are as follows:
B01:将上一水平层粗化图抗体种群优化后的划分投影回当前层的细化图,作为当前层的抗体种群初始划分;B01: Project the optimized division of the antibody population in the coarsening map of the previous level back to the refined map of the current layer as the initial division of the antibody population in the current layer;
B02:设置抗体种群初始划分中最优的划分为种群最优划分BEST;B02: Set the optimal division in the initial division of the antibody population as the optimal division of the population BEST;
B03:免疫克隆程序的循环计数器COUNTER置为零;B03: The cycle counter COUNTER of the immune cloning program is set to zero;
B04:如果循环计数器COUNTER到达给定的上限,则优化程序结束,否则转步骤B05;B04: If the loop counter COUNTER reaches the given upper limit, the optimization program ends, otherwise go to step B05;
B05:计算抗体种群的亲合度;B05: Calculate the affinity of the antibody population;
B06:依据设定的抗体克隆规模参数,对抗体种群中每个抗体进行克隆操作;B06: Perform cloning operation on each antibody in the antibody population according to the set antibody cloning scale parameters;
B07:抗体种群中每个抗体进行克隆变异操作;B07: Perform clonal mutation operation for each antibody in the antibody population;
B08:抗体种群中每个抗体进行接种免疫疫苗操作;B08: Each antibody in the antibody population is immunized with vaccines;
B09:抗体种群按照最优划分原则进行克隆选择操作;B09: The antibody population is cloned and selected according to the principle of optimal division;
B10:如果新抗体种群中最优的划分优于种群最优划分BEST,则转步骤B11,否则转步骤B12;B10: If the optimal division in the new antibody population is better than the optimal division BEST of the population, then go to step B11, otherwise go to step B12;
B15:更新种群最优划分BEST为新抗体种群中最优的划分;B15: Update the optimal division of the population BEST to the optimal division in the new antibody population;
B16:循环计数器COUNTER加一,转步骤B06;B16: Add one to the loop counter COUNTER, go to step B06;
步骤B05计算两抗体之间的相似度时可供参考的一种计算公式如下:A calculation formula that can be used for reference when calculating the similarity between the two antibodies in step B05 is as follows:
上式中DA1A2表示抗体A1和A2之间的相似度,V表示无向图的结点集合,PA1和PA2分别表示抗体A1和A2存储的划分;In the above formula, D A1A2 represents the similarity between antibodies A 1 and A 2 , V represents the node set of the undirected graph, and P A1 and P A2 represent the storage division of antibodies A 1 and A 2 respectively;
步骤B06对抗体种群中每个个体进行第k代克隆操作时,抗体Ai的克隆规模qi(k)可供参考的一种计算公式如下:When the k-th generation cloning operation is performed on each individual in the antibody population in step B06, a calculation formula for the cloning scale q i (k) of the antibody A i can be referred to as follows:
上式中qi(k)表示第k代抗体Ai的克隆规模,nc表示克隆规模有关的设定值,f(Ai(k))表示为Ai抗体抗原亲合度,可用抗体Ai存储划分的割切值计算;In the above formula, q i (k) represents the cloning scale of the kth generation antibody A i , n c represents the setting value related to the cloning scale, and f(A i (k)) represents the antigen affinity of the antibody A i . i stores and divides the cut value calculation;
Θi表示为抗体Ai和其他抗体的亲合力,Int(x)表示大于x的最小整数。Θ i represents the affinity between antibody A i and other antibodies, and Int(x) represents the smallest integer greater than x.
对于多水平划分法的初始划分阶段和优化阶段,本实施例的抗体接种免疫疫苗操作,通过分析基于当前划分的特征信息即边界结点的收益值,按照贪心原则制作并接种疫苗,使得在接种免疫疫苗操作后的新抗体质量得到提高,可供参考的一种实现方法具体流程如图6所示,步骤如下:For the initial division phase and optimization phase of the multi-level division method, the antibody inoculation immunization vaccine operation in this embodiment, by analyzing the characteristic information based on the current division, that is, the income value of the boundary node, is made and vaccinated according to the principle of greed, so that in the vaccination The quality of the new antibody after the immunization vaccine operation is improved. A specific implementation method for reference is shown in Figure 6. The steps are as follows:
C01:将抗体当前保存的划分作为初始划分P;C01: Use the currently saved division of the antibody as the initial division P;
C02:设置抗体最优划分GOOD置为初始划分P并将循环计数器I置为零;C02: Set the antibody optimal division GOOD to the initial division P and set the cycle counter I to zero;
C03:基于给定的初始划分P计算出所有结点的内联度和外联度;C03: Based on the given initial partition P, calculate the degree of in-connection and out-of-connection of all nodes;
C04:计算所有边界结点的迁移收益值;C04: Calculate the migration income value of all boundary nodes;
C05:将所有边界结点的收益值分别插入到两个结点子集的散列数据结构中;C05: Insert the revenue values of all boundary nodes into the hash data structures of the two node subsets;
C06:如果循环计数器I到达给定的上限,则程序结束,否则转步骤C07;C06: If the loop counter I reaches the given upper limit, the program ends, otherwise go to step C07;
C07:进入迁移过程,迁移方向为划分中结点子集之和重的一侧到轻的一侧;C07: Enter the migration process, and the migration direction is from the heavy side to the light side of the sum of the node subsets in the division;
C08:从当前迁移方向起点所在一侧的散列数据结构中,根据贪心原则选择收益值最大的结点为被迁移结点;C08: From the hash data structure on the side where the starting point of the current migration direction is located, select the node with the largest profit value as the migrated node according to the greedy principle;
C09:将结点v迁移并计算新划分的割切;C09: Migrate the node v and calculate the cut of the new division;
C10:重新计算结点v的邻接结点内联度和外联度;C10: Recalculate the in-connection degree and out-of-connection degree of adjacent nodes of node v;
C12:在散列结构中更新邻接结点的收益值;如果邻接结点结点u因为结点v的迁移成为边界结点,那么将收益值插入到结点u所在的结点子集散列结构中;如果结点u因为结点v的迁移成为非边界结点,那么将收益值从结点u所在的结点子集散列结构中删除;如果结点u迁移前后始终为边界结点,则只需更新处于散列结构的收益值;C12: Update the income value of adjacent nodes in the hash structure; if the adjacent node u becomes a boundary node due to the migration of node v, then insert the income value into the hash structure of the node subset where node u is located ; If node u becomes a non-boundary node due to the migration of node v, then delete the income value from the node subset hash structure where node u is located; if node u is always a boundary node before and after migration, then only need Update the revenue value in the hash structure;
C14:如果当前划分割切优于抗体最优划分GOOD,则转步骤C15,否则转步骤C16;C14: If the current division is better than the antibody optimal division GOOD, then go to step C15, otherwise go to step C16;
C15:更新抗体最优划分GOOD为当前划分;C15: Update the antibody optimal division GOOD to the current division;
C16:循环计数器I加一,转步骤C06;C16: add one to the
本实施例中,基于多水平划分法的大规模集成电路划分方法采用ANSIC来实现,操作系统为WIN2000,运行在1800MHZ的AMD公司的Althon2200芯片上,内存为512M。实验方案所用的测试基准电路为1998年IBM公司Austin研究实验室的Alpert教授给出的18组电路测试基准ISPD98。ISPD98是基于IBM公司Austin、Burlington、Rochester设计部门给出的一系列内部电子产品经过转换得到,包括总线仲裁器、总线电桥芯片、内存及周边元件扩展总线接口、通讯适配器、内存控制器、处理器和图形适配器等。评价本发明的现有对比技术是著名的基于多水平划分法的无向图划分程序MeTiS,为Minnesota大学Karypis教授所提供。实验方案针为了保证实验结果的可重复性和公正性,对每组电路测试基准图进行了20次对比实例验证,并固定选用随机数种子和免疫克隆优化程序参数,其中种群规模为8,克隆变异系数为0.3,克隆规模参数为24即每个抗体平均克隆3次。由于抗体接种疫苗操作收集特征信息等计算量较大,因此为了在合理时间内获得最优近似划分,设迭代次数为15。对于实验结果,我们采用的评估指标为20次实例验证中得到的划分割切最小值(MinCut)和划分割切平均值(AveCut)。在图7的表格中的“结点”为该测试基准电路中基本电路逻辑单元的个数,“边”为信号权值的累加。实验结果展示了本发明基于多水平划分法的大规模集成电路划分方法良好的性能,相比MeTiS在划分割切最小值获得了35.0%的改进,在划分割切平均值获得了55.1%的改进。In this embodiment, the large-scale integrated circuit division method based on the multi-level division method is realized by using ANSIC, the operating system is WIN2000, runs on the 1800MHZ AMD Althon2200 chip, and the memory is 512M. The test reference circuit used in the experimental program is the 18-group circuit test reference ISPD98 given by Professor Alpert of IBM's Austin Research Laboratory in 1998. ISPD98 is obtained through conversion based on a series of internal electronic products given by IBM's Austin, Burlington, and Rochester design departments, including bus arbitrators, bus bridge chips, memory and peripheral component expansion bus interfaces, communication adapters, memory controllers, processing and graphics adapters, etc. The existing comparative technology for evaluating the present invention is the well-known undirected graph partition program MeTiS based on the multi-level partition method, provided by Professor Karypis of the University of Minnesota. In order to ensure the repeatability and impartiality of the experimental results, 20 comparative example verifications were carried out on each set of circuit test benchmark diagrams, and random number seeds and immune cloning optimization program parameters were fixedly selected. The population size was 8, and the cloning The coefficient of variation is 0.3, and the clone scale parameter is 24, that is, each antibody is cloned an average of 3 times. Since the collection of characteristic information and other calculations in the antibody vaccination operation is relatively large, in order to obtain the optimal approximate division within a reasonable time, the number of iterations is set to 15. For the experimental results, the evaluation indicators we use are the minimum value of the division cut (MinCut) and the average value of the division cut (AveCut) obtained in 20 instance verifications. In the table of FIG. 7, "node" is the number of basic circuit logic units in the test reference circuit, and "side" is the accumulation of signal weights. Experimental results have shown the good performance of the large-scale integrated circuit division method based on the multi-level division method of the present invention. Compared with MeTiS, the minimum value of division and division has been improved by 35.0%, and the average value of division and division has been improved by 55.1%. .
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100437653A CN100492377C (en) | 2007-07-13 | 2007-07-13 | Large scale integrated circuit division method based on multi-level division method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100437653A CN100492377C (en) | 2007-07-13 | 2007-07-13 | Large scale integrated circuit division method based on multi-level division method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101101610A true CN101101610A (en) | 2008-01-09 |
CN100492377C CN100492377C (en) | 2009-05-27 |
Family
ID=39035882
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2007100437653A Expired - Fee Related CN100492377C (en) | 2007-07-13 | 2007-07-13 | Large scale integrated circuit division method based on multi-level division method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100492377C (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663216A (en) * | 2012-05-16 | 2012-09-12 | 孙凌宇 | Core value calculating method of large-scale integrated circuit based on node attribute function |
CN102682176A (en) * | 2012-05-18 | 2012-09-19 | 冷明 | Method for dividing large-scale integrated circuit based on cellular automaton and empowerment hypergraph |
CN103310071A (en) * | 2013-06-26 | 2013-09-18 | 福州大学 | Circuit dividing method for VLSI based on GRASP |
CN103714385A (en) * | 2013-12-30 | 2014-04-09 | 北京航天测控技术有限公司 | Analogue circuit fault diagnosis method based on improved type clone selection algorithm |
CN103870342A (en) * | 2014-04-06 | 2014-06-18 | 冷明 | Task core value calculating method on the basis of node attribute function in cloud computing environment |
CN103885839B (en) * | 2014-04-06 | 2017-02-22 | 孙凌宇 | Cloud computing task scheduling method based on multilevel division method and empowerment directed hypergraphs |
CN110853327A (en) * | 2019-11-02 | 2020-02-28 | 杭州雅格纳科技有限公司 | Ship cabin equipment data field debugging and collecting method and device based on single chip microcomputer |
CN112784510A (en) * | 2021-03-10 | 2021-05-11 | 国微集团(深圳)有限公司 | Conditional cycle circuit segmentation method based on balanced weight and minimum edge segmentation |
-
2007
- 2007-07-13 CN CNB2007100437653A patent/CN100492377C/en not_active Expired - Fee Related
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663216B (en) * | 2012-05-16 | 2013-10-16 | 孙凌宇 | Core value calculating method of large-scale integrated circuit based on node attribute function |
CN102663216A (en) * | 2012-05-16 | 2012-09-12 | 孙凌宇 | Core value calculating method of large-scale integrated circuit based on node attribute function |
CN102682176A (en) * | 2012-05-18 | 2012-09-19 | 冷明 | Method for dividing large-scale integrated circuit based on cellular automaton and empowerment hypergraph |
CN103310071B (en) * | 2013-06-26 | 2016-01-06 | 福州大学 | A kind of VLSI circuit partitioning method based on multistage GRASP |
CN103310071A (en) * | 2013-06-26 | 2013-09-18 | 福州大学 | Circuit dividing method for VLSI based on GRASP |
CN103714385A (en) * | 2013-12-30 | 2014-04-09 | 北京航天测控技术有限公司 | Analogue circuit fault diagnosis method based on improved type clone selection algorithm |
CN103714385B (en) * | 2013-12-30 | 2017-02-01 | 北京航天测控技术有限公司 | Analogue circuit fault diagnosis method based on improved type clone selection algorithm |
CN103870342A (en) * | 2014-04-06 | 2014-06-18 | 冷明 | Task core value calculating method on the basis of node attribute function in cloud computing environment |
CN103870342B (en) * | 2014-04-06 | 2016-12-07 | 冷明 | Task core value calculating method based on node attribute function in cloud computing environment |
CN103885839B (en) * | 2014-04-06 | 2017-02-22 | 孙凌宇 | Cloud computing task scheduling method based on multilevel division method and empowerment directed hypergraphs |
CN110853327A (en) * | 2019-11-02 | 2020-02-28 | 杭州雅格纳科技有限公司 | Ship cabin equipment data field debugging and collecting method and device based on single chip microcomputer |
CN110853327B (en) * | 2019-11-02 | 2021-04-02 | 杭州雅格纳科技有限公司 | Ship cabin equipment data field debugging and collecting method and device based on single chip microcomputer |
CN112784510A (en) * | 2021-03-10 | 2021-05-11 | 国微集团(深圳)有限公司 | Conditional cycle circuit segmentation method based on balanced weight and minimum edge segmentation |
CN112784510B (en) * | 2021-03-10 | 2025-01-24 | 国微集团(深圳)有限公司 | Conditional cyclic circuit partitioning method based on balanced weight and minimum edge cut |
Also Published As
Publication number | Publication date |
---|---|
CN100492377C (en) | 2009-05-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100492377C (en) | Large scale integrated circuit division method based on multi-level division method | |
US11514324B2 (en) | Methods of optimization of computational graphs of neural networks | |
CN106919769B (en) | Hierarchical FPGA (field programmable Gate array) layout and wiring method based on multi-level method and empowerment hypergraph | |
US9244810B2 (en) | Debugger graphical user interface system, method, and computer program product | |
CN111124487B (en) | Code clone detection method and device and electronic equipment | |
JP2004005674A (en) | Efficient bound model inspecting method | |
US9171115B2 (en) | System, method, and computer program product for translating a common hardware database into a logic code model | |
CN102693340B (en) | Large scale integrated circuit partitioning method on basis of multilevel partitioning method and weighted hypergraph | |
US9015646B2 (en) | System, method, and computer program product for translating a hardware language into a source database | |
US8943448B2 (en) | System, method, and computer program product for providing a debugger using a common hardware database | |
CN118171609B (en) | Key path delay optimization method based on logic netlist | |
Chen et al. | Routability-driven blockage-aware macro placement | |
CN117077583B (en) | Resource estimation method and device for register transmission stage circuit design | |
CN108563561B (en) | A method and system for extracting program implicit constraints | |
CN118627080A (en) | A software vulnerability detection method based on data quality enhancement and code attribute graph simplification | |
CN114638184B (en) | Simulation method, system, storage medium and device for gate-level circuit | |
CN115758952A (en) | Resource estimation method for acquiring RTL (real time language) containing level | |
US9021408B2 (en) | System, method, and computer program product for translating a source database into a common hardware database | |
CN102663216B (en) | Core value calculating method of large-scale integrated circuit based on node attribute function | |
US20230214574A1 (en) | Extended regular expression matching in a directed acyclic graph by using assertion simulation | |
CN113065298B (en) | A method and system for converting a very large-scale netlist into a DAG graph | |
Aminof et al. | Synthesis of hierarchical systems | |
Christensen et al. | PyLSE: A pulse-transfer level language for superconductor electronics | |
CN117242451A (en) | Parallel and scalable computation of strongly connected components in circuit design | |
US20050240387A1 (en) | Gate-level netlist reduction for simulating target modules of a design |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090527 Termination date: 20120713 |