FPGA wiring method

文档序号:1098983 发布日期:2020-09-25 浏览:25次 中文

阅读说明:本技术 Fpga布线方法 (FPGA wiring method ) 是由 鞠瑜华 白利琼 刘乙力 于 2020-05-29 设计创作,主要内容包括:FPGA布线方法,涉及集成电路技术。本发明包括下述步骤:1)检测是否存在目标器件布线模型,若不存在则报告错误,反之则进入下一步;2)解析模型并构造布线资源图;3)初始布线;4)检查布线次数是否已满,如果已满则直接输出布线结果,反之则进入下一步;5)检查是否存在未处理的布线拥挤,若存在则拆线重布,更新拥挤度信息,再次检测是否存在拥挤;若不存在则将布线次数加1并转到步骤4);其特征在于,所述步骤3)包括:(3.1)根据时序分析和布线资源对每条网线进行优先级计算;(3.2)按照优先级顺序对线网进行布线。本发明使得布线工具的效率得到明显提高。(An FPGA wiring method relates to the integrated circuit technology. The invention comprises the following steps: 1) detecting whether a target device wiring model exists or not, if not, reporting an error, otherwise, entering the next step; 2) analyzing the model and constructing a wiring resource diagram; 3) initial wiring; 4) checking whether the wiring times are full, if so, directly outputting a wiring result, and if not, entering the next step; 5) checking whether unprocessed wiring congestion exists, if yes, removing the wiring and re-arranging, updating congestion degree information, and detecting whether the congestion exists again; if not, adding 1 to the wiring times and going to step 4); characterized in that the step 3) comprises: (3.1) calculating the priority of each network cable according to the time sequence analysis and the wiring resources; and (3.2) wiring the line network according to the priority order. The invention enables the efficiency of the wiring tool to be improved significantly.)

The FPGA wiring method comprises the following steps:

1) detecting whether a target device wiring model exists or not, if not, reporting an error, otherwise, entering the next step;

2) analyzing the model and constructing a wiring resource diagram;

3) initial wiring;

4) checking whether the wiring times are full, if so, directly outputting a wiring result, and if not, entering the next step;

5) checking whether unprocessed wiring congestion exists, if yes, removing the wiring and re-arranging, updating congestion degree information, and detecting whether the congestion exists again; if not, adding 1 to the wiring times and going to step 4);

it is characterized in that the preparation method is characterized in that,

the step 3) comprises the following steps:

(3.1) calculating the priority of each network cable according to the time sequence analysis and the wiring resources;

and (3.2) wiring the line network according to the priority order.

2. The FPGA routing method of claim 1,

the step (3.1) comprises:

(a) for a set of n mesh lines S ═ S0,s1,…,si,…,sn-1Obtaining a delay margin T ═ T of each network cable through time sequence analysis0,t1,…,ti,…,tn-1},tiIs a network cable siThe delay margin of (a);

obtaining the resource number of each network cable through wiring resource analysisR={r0,r1,…,ri,…,rn-1In which r isi=rin+routRepresenting network lines siThe number of resources of (a); r isinThe number of paths from other modules to the drain terminal is represented as the input resource number; r isoutThe number of the output resources represents the number of paths which can reach other modules through the paired wiring resource modules at the source end;

and calculating a network cable delay margin factor T' { T ═ according to T and R0′,t1′,…,ti′,…,t′n-1And a routing resource factor R ═ R0′,r1′,…,ri′,…,r′n-1};

(b) Calculating network cable priority G ═ G0,g1,…,gi,…,gn-1},giIs a network cable siNumber of priority weights, giThe smaller the value, the higher the priority; g is related to the delay margin factor T 'and the routing resource factor R', and the calculation formula is as follows:

wherein, WtAnd WrIs a preset weight constant.

Technical Field

The present invention relates to integrated circuit technology.

Background

With the increase of logic scale and performance requirement of the FPGA device, the wiring algorithm gradually becomes a bottleneck of operation time in the FPGA compiling flow. In the process of designing matched supporting software, wiring determines the connection between logic units, which is one of the most critical steps, and not only affects the performances in the aspects of time delay, power consumption and the like, but also is the most time-consuming step in the flow of supporting software of the FPGA.

Most of the routing engines in the industry and academia at present are based on a path searcher (pathfinder) algorithm, and a balance point is mainly found between two goals of reducing routing resource conflict and optimizing timing sequence. The time sequence critical path is set with higher weight so as to use the time sequence critical resource preferentially to achieve time sequence optimization when the resource conflicts, and the time sequence non-critical path is gradually pushed away so as to solve the congestion problem. As shown in fig. 1, under the basic cost of routing resource nodes, all nets are routed for the first time, each connection line is routed with the minimum delay as the target, and if there is a routing reuse conflict after the first routing is finished, the cost of routing resource nodes is first raised instead of routing only for nets with routing conflicts, and then all nets are routed one by one again. In the iterative process, the cost of raising a routing resource node is to decide which net a certain routing resource node is most suitable to be allocated to through a negotiation mechanism. This is repeated to disconnect and reroute each net in the circuit until all congestion problems are resolved.

Although the existing pathfinder routing algorithm can better consider congestion degree and delay, the number of times of clearing and redistributing in the routing process is too large, a large amount of memory space is consumed to store all node information and a long execution time is needed to generate a routing result in the multiple times of clearing and redistributing iteration processes, the routing time is too long, and the efficiency of a routing tool is reduced.

Disclosure of Invention

The technical problem to be solved by the invention is to provide an FPGA (field programmable gate array) wiring algorithm based on network cable (source end to drain end) priority classification aiming at the problem of excessive times of disconnecting and redistributing in the pathfinder wiring method, and the wiring priority sequence of each network cable is determined by calculating the delay allowance and the number of available wiring resources of the network cable, so that the times of wiring iteration in the wiring process are reduced, and the operation efficiency of a wiring tool is improved.

The technical scheme adopted by the invention for solving the technical problems is that the FPGA wiring method comprises the following steps:

1) detecting whether a target device wiring model exists or not, if not, reporting an error, otherwise, entering the next step;

2) analyzing the model and constructing a wiring resource diagram;

3) initial wiring;

4) checking whether the wiring times are full, if so, directly outputting a wiring result, and if not, entering the next step;

5) checking whether there is unprocessed wiring congestion, if so, removing the wiring and re-laying, updating the congestion degree information,

detecting whether congestion exists again; if not, adding the wiring times together and transferring to the step 4);

it is characterized in that the preparation method is characterized in that,

the step 3) comprises the following steps:

(3.1) calculating the priority of each network cable according to the time sequence analysis and the wiring resources;

and (3.2) wiring the line network according to the priority order.

The step (3.1) comprises:

(a) for a set of n mesh lines S ═ S0,s1,…,si,…,sn-1Obtaining a delay margin T ═ T of each network cable through time sequence analysis0,t1,…,ti,…,tn-1},tiIs a network cable siThe delay margin of (a);

obtaining the resource number R ═ { R ] of each network cable through wiring resource analysis0,r1,…,ri,…,rn-1In which r isi=rin+routRepresenting network lines siThe number of resources of (a); r isinThe number of paths from other modules to the drain terminal is represented as the input resource number; r isoutThe number of the output resources represents the number of paths which can reach other modules through the paired wiring resource modules at the source end;

and calculating a network cable delay margin factor T' { T ═ according to T and R0′,t1′,…,ti′,…,t′n-1And a routing resource factor R ═ R0′,r1′,…,ri′,…,r′n-1};

Figure BDA0002516161230000021

(b) Calculating network cable priority G ═ G0,g1,…,gi,…,gn-1},giIs a network cable siNumber of priority weights, giThe smaller the value, the higher the priority; g is related to the delay margin factor T 'and the routing resource factor R', and the calculation formula is as follows:

Figure BDA0002516161230000031

wherein, WtAnd WrIs a preset weight constant.

The invention calculates the priority of each network cable, and sequentially arranges the cables according to the priority order, so that the network cables with higher priority are arranged earlier (the right of resources which are preferentially selected with higher priority is larger), thereby greatly reducing the times of disconnecting and redistributing in the process of arranging the cables, reducing the times of arranging the cables and the times of iteration of arranging the cables, and finally obviously improving the efficiency of a cable arranging tool.

Drawings

Fig. 1 is a flow chart of the prior art.

Fig. 2 is a flow chart of the present invention.

Fig. 3 is a schematic diagram of an embodiment.

Fig. 4 is a schematic diagram of the internal structure of the switch box of the embodiment.

Detailed Description

The invention has the following advantages:

adopting a priority calculation mode, and combining the time sequence analysis result and the wiring resource analysis result;

and wiring each network cable according to the priority sequence to ensure that the network cable with the highest priority adopts the path with the shortest delay to start wiring at first, and the network cable with the low priority does not occupy the network cable with the high priority, so that the wiring iteration times in the wiring process are reduced.

Wiring cost and net wire priority hooks.

The wiring system module of the present invention can be divided into four modules according to functions, a timing analysis module, a wiring resource resolver and a router. The time sequence analysis module is responsible for time sequence analysis to obtain the delay allowance of each network cable; the wiring resource analysis module is responsible for analyzing wiring resources to obtain the number of resources of each network cable; the wiring resource analyzer is responsible for analyzing the wiring resource model to generate a wiring resource diagram; the wiring device utilizes the wiring resource diagram, combines the network cable delay allowance and the resource number level obtained by the timing analysis module and the wiring resource analysis module to calculate the priority order of the network cable and sequentially wires, and is responsible for congestion processing, cost updating and wiring iteration in the wiring process.

The general flow chart of the routing algorithm of the present invention is shown in FIG. 2, with the following steps:

1. detecting whether a target device wiring model exists or not, if not, reporting an error, otherwise, entering the next step;

2. analyzing the model and constructing a wiring resource diagram;

3. performing priority calculation on each network cable according to time sequence analysis and wiring resources;

4. wiring the line network according to the priority order;

5. checking whether the wiring times are full, if so, directly outputting a wiring result, and if not, entering the next step;

6. checking whether unprocessed wiring congestion exists, if yes, removing the wiring and re-arranging, updating congestion degree information, and detecting whether the congestion exists again; if not, go to 5).

Step 3 needs to calculate the priority of each network cable according to the static timing sequence analysis result and the wiring resource analysis, and is specifically implemented as follows:

let n net lines set as S ═ S0,s1,…,si,…,sn-1Obtaining the time delay margin of each network cable through time sequence analysisT={t0,t1,…,ti,…,tn-1},tiIs a network cable siThe delay margin of (a). Obtaining the resource number R ═ { R ] of each network cable through wiring resource analysis0,r1,…,ri,…,rn-1},ri=rin+routIs a network cable siThe number of resources of (c). Wherein r isinAnd inputting the resource number, which represents the number of paths from other modules to the drain terminal. r isoutThe output resource number represents the number of paths that the source end can reach other modules through the paired routing resource modules.

The route between the two determined end points (starting point to end point) is the network cable to be laid. E.g., O of FIG. 3, logic block L00I Point to logic Block L51The path between the points is a network cable. The determination of the parameter S, T is well known in the art and will not be described in detail.

Fig. 3 is a schematic diagram of logic blocks interconnected by switch boxes. Wherein L0-L5 are functional logic blocks, and M0-M5 are switch boxes. The same numbers refer to the same group.

Fig. 4 shows the internal structure of the switch case. Due to I of switch box M0And I2The port is connected with the output interface of the corresponding logic block L, so I should not be included when the resource number passing through the output port of the switch box is calculated0And I2. For the same reason, O of M1The port is connected to the input port corresponding to L, so when the number of resources of the source end passing through the input port of the switch box M is calculated, O should not be included1. All ports of M that need statistics should have an association with L, i.e. I0,I2And O1The resource number is as follows:

I0:2(I0-O0、I0-O2)

I2:1(I2-O2)

O1:2(I1-O1、I3-O1)

examples are: wire mesh L2O of (A) to (B)0The port needs to be connected to L4I of (A)1A port.

L2O of (A) to (B)0Connecting M2I of (A)0So that the number of resources r thereofoutIs 2; l is4I of (A)1Port is formed by M4O of (A) to (B)1Port input, hence resource number rinIs 2; the total number of resources is 4(2+ 2).

And calculating a network cable delay margin factor T' { T ═ according to T and R0′,t1′,…,t′i,…,t′n-1And a routing resource factor R ═ R0′,r1′,…,r′i,…,r′n-1}。

Figure BDA0002516161230000051

Figure BDA0002516161230000052

Calculating network cable priority G ═ G0,g1,…,gi,…,gn-1},giIs a network cable siG is related to the delay margin factor T 'and the routing resource factor R', and is calculated as follows

Wherein, WtAnd WrThe weight constant can be set according to specific conditions; g is a priority judgment standard, and the smaller the G value is, the higher the priority is. When t isiWhen' is 0, the delay margin of the net is 0, and the net priority standard is set to zero.

Step 4, the wiring is performed according to the priority of the network cable, and the difference from the current wiring strategy is that the higher the priority is, the more the wiring is performed (the higher the priority is, the more the right of the resource is selected preferentially). The wiring is performed from small to large according to the gi value.

Network cable siThe cost of routing using routing resource node m may be defined as

cost(m,i)=gi*delayElmore+ti′*b(m)*p(m)*h(m)

Wherein, delayElmoreFor the delay terms, b (m), p (m), h (m) represent the basic cost, current congestion cost and historical congestion cost of the node, respectively (calculated according to the conventional method, which is explained in detail below).

In order to save CPU running time, the basic cost values b (m) of the input pin and the drain terminal of the logic unit block are less than 1. Setting the cost of an interconnect segment to 1, regardless of length, results in the fastest circuits because it tends to use the least routing resources possible. p (m) is the current congestion degree, and the penalty factor of the current congestion degree is updated when one network cable is disconnected and rearranged, which can be expressed as

p(m)=1+max(0,[occupancy(m)+1-capacity(m)]pfac)

Where, occupancy (m) is the number of nets currently using the routing resource m, and capacity (m) is the maximum number of nets effectively using the node m. The historical congestion penalty factor is updated only after one complete routing iteration is completed. The value of the ith routing iteration is

Each time of routing iteration hfacAnd pfacA so-called routing strategy is defined, hfacCan be kept constant, and the effect is almost the same when any value is between 0.2 and 1. p is a radical offacThe initial value should be small so that the penalty for congestion is small, and then the penalty is slowly increased in the iterative process.

The routing resource analysis module can be further optimized, and when the resource number of the network cable is calculated, the resource number of the port is related to the specific device and the position of the port, so that the resource number of each port of the specific device can be calculated and stored. No matter how the user design changes, the table can be looked up and the value can be found only if the port position corresponds to the specific position of the device, and the priority calculation speed is improved. The memory table design should include: the port name is used as the number of available resources/resource factor at the input port, the number of available resources/resource factor at the output port, and the number of available resources/resource factor at the input/output port. In addition, the number of the available resources of the port can be simply calculated into the number of paths leading to other resources, the paths can be classified, and the classification calculation factors are increased, so that the time for calculating the number of the available wiring resources of the network cable is reduced.

9页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于三维地质勘查的高频雷达探测电路及其探测方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类