CN103136334A - Fast ergodic synchronous data flow system node parameter processing method based on graphs - Google Patents

Fast ergodic synchronous data flow system node parameter processing method based on graphs Download PDF

Info

Publication number
CN103136334A
CN103136334A CN2013100340954A CN201310034095A CN103136334A CN 103136334 A CN103136334 A CN 103136334A CN 2013100340954 A CN2013100340954 A CN 2013100340954A CN 201310034095 A CN201310034095 A CN 201310034095A CN 103136334 A CN103136334 A CN 103136334A
Authority
CN
China
Prior art keywords
node
val
limit
res
sdf
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
Application number
CN2013100340954A
Other languages
Chinese (zh)
Other versions
CN103136334B (en
Inventor
龙翔
杨经纬
高小鹏
万寒
姜博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201310034095.4A priority Critical patent/CN103136334B/en
Publication of CN103136334A publication Critical patent/CN103136334A/en
Application granted granted Critical
Publication of CN103136334B publication Critical patent/CN103136334B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a fast ergodic synchronous data flow (SDF) system node parameter processing method based on graphs. The fast ergodic synchronous data flow system node parameter processing method includes that an SDF graph is built for a real-time system, communication parameters of nodes connected at two ends on the side are marked at the two ends of each side in the graph, a node needed to be temporarily stored in the SDF graph stacking and storing ergodic process is built, any one node in the SDF is selected and operation parameters of the selected node are initialized, scanning is started, whether rings exist in the graph can be judged when each node is scanned, operation parameter consistency judgment is performed on yes judgment, otherwise, the operation parameters of the node are determined on the basis of communication parameters of the node, and the operation parameters of the scanned nodes in the graph are subjected to overall normalized adjustment. The fast ergodic synchronous data flow system node parameter processing method is few in processing steps, small in calculating amount, high in efficiency and accurate in calculating result, has the universalizaion advantage of being capable of processing parameters in different attributes, and improves speed and efficiency of computers for processing real-time SDF system node operation parameters.

Description

The synchronous data flow system node parameter immediate processing method of graph-based traversal
Technical field
The present invention relates to the structure of synchronous data flow system model in the real-time system scheduling, be specifically related to the immediate processing method of node parameter in a kind of synchronous data flow (Synchronous Data Flow is abbreviated as SDF) system model.
Background technology
The SDF system model is proposed in 1987 by Edward Ashford doctor Lee of Berkeley, and it is mainly used and each computing unit (node) and communication behavior thereof are carried out modeling and analysis towards DSP.In the SDF model, program or system are divided into a plurality of modules, have data communications context between module, and each module just begins to carry out after the data of demand arrive via data path.Program is described by the data flow diagram mode, this data flow diagram is digraph, node representation module in figure, directed edge between node is the data path between representation module, the data volume that the connected node operation of the head of every directed edge mark institute is once extracted from this path, and the data volume that the connected node operation of the afterbody of directed edge mark institute once sends on this path.Different from the traditional data streaming system is, data communication behavior pattern between the described node of SDF is fixed, be that the data volume that the every operation of node once consumes or produces is fixed, the operation action of system just can be determined when compiling, therefore can effectively avoid run-time overhead, and improve system resource utilization efficient.Except DSP, also be used in a large number other has general-purpose system (CPU) modeling analysis of requirement of real-time to the SDF model, the target of analyzing mainly is to determine the important parameters such as the running frequency of node and the cycle of operation, this process becomes one of real-time system lexical analysis link the most key and consuming time, although be integrated at present the computer aided development environment, still had many worth improvements.
At present, great majority are often set up corresponding topological matrix according to interconnect architecture and the messaging parameter (data throughput, data consumes rate) of computing node based on the mathematical analysis of the real-time system of SDF model, then find the solution the kernel vector of this topological matrix, thereby draw number of run (frequency) demand of each node, and based on this, through determining the cycle of operation of each node after a series of processing procedures, for the Real-Time Scheduling of system provides the parameter foundation.The equivalent method for solving of kernel vector commonly used in SDF model analysis process comprises the method for solving equation and graph traversal method mode, and the method for solving equation is due to a large amount of processor time of needs consumption, and people are more prone to adopt the graph traversal method.No matter adopt which kind of method, for the processing of the real-time task cycle of operation, the running frequency by first setting the tasks, then launch global association according to the frequency of all tasks to the cycle of each task and derive often, this kind method is too roundabout and waste computational resource, need to be improved.In addition, in existing figure traversal, the processing procedure of system node operational factor is separated with the Schedulability Analysis process and is carried out, for discontented system that can the requirement of scheduling property, due to the nonuniformity that can't find its parameter in processing procedure and premature termination calculating, thereby computational resource is caused unnecessary waste.System's (as avionics system, automotive electronics) for the function complexity, because system module is numerous, the node data amount is comparatively huge, and the method for solving equation has the inferior positions such as result is inaccurate, serious, poor expandability consuming time, and existing figure traversal also demonstrates the large weakness of storage demand amount.
Summary of the invention
The present invention is directed in traditional SDF system model figure the node parameter disposal route and have that the wasting of resources, result are inaccurate, serious, the problem such as the storage demand amount is large consuming time, provide a kind of synchronous data flow system node parameter immediate processing method of graph-based traversal, to improve performance and the efficient of computing machine when processing corresponding problem.
The synchronous data flow system node parameter immediate processing method of graph-based traversal provided by the invention comprises the steps:
Step 1: for real-time system builds SDF figure, in SDF figure, each node represents single calculation task, the messaging parameter of the two ends on limit mark institute's connected node on this limit between node, and described messaging parameter is communication frequency or communication cycle.Described communication frequency represents that two connected nodes need the traffic carried number of times separately within the unit interval; Described communication cycle represents that each node completes once the unit interval number of communication needs.
Step 2: the initialization setting, the value of setting the operational factor of all nodes in SDF figure is 0, all limits are scanning mode not.
Step 3: initialization storehouse Stack is empty, and storehouse Stack is used for being stored in SDF figure ergodic process and needs the node of keeping in.
Step 4: arbitrary node in selected SDF, be labeled as v, set the operational factor res (v)=1 of node v.
Whether step 5: decision node v also has the not adjacent side of scanning, if having, gets the adjacent side e that one of them does not scan, and enter step 6 and carry out, otherwise, execution in step 13.
Step 6: the adjacent side e that will not scan is labeled as and scans.
Step 7: another vertex ticks that will be connected with limit e is v '.
The operational factor res of step 8: decision node v ' (v ') whether be 0, if, execution in step 9, otherwise, there are ring, execution in step 12 in figure.
Step 9: node v ' is pressed into storehouse Stack.
Step 10: the messaging parameter of new node v and node v ' more: determine node v at the messaging parameter val (v, e) on the e of limit and node v ' the messaging parameter val on the e of limit (v ', highest common factor gcd e); Then more new node v and the messaging parameter of node v ' on the e of limit: val (v, e)=val (v, e)/gcd; Val (v ', and e)=val (v ', e)/gcd.
Step 11: according to the messaging parameter ratio relation, the messaging parameter on the e of limit between v and v ' is carried out global normalization with the node operational factor of having tried to achieve adjust and obtain operational factor.Concrete grammar is: the lowest common multiple lcm that determines the operational factor res (v) of the messaging parameter val (v, e) of node v on the e of limit and node v; Upgrade the operational factor that has obtained each node vo of operational parameter value in SDF figure G: res (vo)=res (vo) * lcm/res (v); Determine the operational factor res (v ') of node v '=val (v ', e) * lcm/val (v, e).Going to step 5 carries out.
Whether the operational factor of step 12: decision node v and node v ' place ring satisfies coherence request, if, turn step 5 and carry out, otherwise, method ends.
Step 13: judge in storehouse Stack whether also have node, if having, execution in step 14, otherwise method ends.
Step 14: from the storehouse Stack top node of popping of being hit by a bullet, and to establish this node be v, then turns step 5 and carry out.
Advantage and the good effect of the inventive method are:
(1) in the constructed SDF figure of the inventive method, input node communication parameter on the limit, has the diversified advantage of node communication parameter type, not only can the processing node running frequency by the inventive method, the all right processing node cycle of operation and other property parameters have unitized benefit.
(2) the inventive method existence of detection ring simultaneously and verify the consistance of node on the ring parameter in traversal SDF scheme and processes the process of each node operational factor, in concrete processing procedure, if find to exist in SDF the ring that does not satisfy the parameter consistency requirement can in time stop processing procedure, avoid follow-up unnecessary calculation of parameter, improve system effectiveness.
(3) traditional SDF model is in the process of the processing node cycle of operation, generally first determine each node running frequency in system based on node communication speed, and then on this basis, utilize the cycle of operation of real-time task and the relation of frequency, obtain successively the cycle of operation of each node by the lowest common multiple method.And in the methods of the invention, as pervasive parameter input processing process, the result that finally draws is the node cycle of operation to the communication cycle of node, has avoided unnecessary extra computation process by directly, accelerate calculation procedure, improved computing machine processing speed and efficient.
(4) intermediate result of the inventive method is all integer, has avoided the data precision that in the process of solving an equation, the decimal result causes to lose.In the processing procedure based on SDF figure traversal, the result of calculation of node parameter often adopts fractional form to preserve, and does not lose to guarantee precision, need to take two integer storage spaces of molecule and denominator.And the present invention is in specifically carrying out processing procedure to each node parameter, adjust owing in time carrying out global normalization, avoided the appearance of mark, each node only needs a round values to preserve intermediate result, according to each step latest computed demand, the node operational factor that has obtained being carried out iteration upgrades, exchange the space for the time, guaranteeing in the strict situation accurately of result of calculation it to be reduced to the demand of storage space half of classic method, the real time system modelling analysis in the situation such as larger for node, that storage space is nervous has certain realistic meaning.
Description of drawings
Fig. 1 is SDF node parameter disposal system operational flow diagram of the present invention;
Fig. 2 is the flow chart of steps of SDF node parameter immediate processing method of the present invention;
Fig. 3 is the exemplary plot of the constructed SDF of the embodiment of the present invention;
Fig. 4 is the exemplary plot that the embodiment of the present invention is carried out cycle of operation parameter consistency judgement;
Fig. 5 is the exemplary plot that the embodiment of the present invention is carried out the judgement of running frequency parameter consistency;
Fig. 6 adopts the inventive method traversal SDF figure processing node operational factor exemplary plot for adopting in the embodiment of the present invention; Wherein, Fig. 6-1 is by node v 1Initial and scan node v 2Schematic diagram, Fig. 6-2 are scan node v 3Schematic diagram, Fig. 6-3 are detection node v 1, v 2, v 3The conforming schematic diagram of operational factor, Fig. 6-4 are scan node v 6Schematic diagram, Fig. 6-5 are scan node v 4Schematic diagram, Fig. 6-6 are scan node v 5Schematic diagram.
Embodiment
In following concrete exemplifying embodiment, by reference to the accompanying drawings the present invention is described in further detail.By these exemplifying embodiments of enough detailed description, make those skilled in the art can understand and put into practice the present invention.In the situation that do not break away from the spirit and scope of the invention, can to implement to make logic, realize with other change.Therefore, below describe in detail and should not be understood to limited significance, scope of the present invention is only limited by claim.
As shown in Figure 1, be the SDF node parameter disposal system operational flow diagram that foundation the inventive method builds, build SDF node parameter disposal system and comprise as lower module: detection, node parameter consistency detection and the output of SDF node operational factor that the input of SDF node topology structure and parameters, node operational factor are found the solution, encircle in SDF figure.Wherein, the detection that encircles in SDF figure and node parameter consistency detection are decided according to SDF node topology structure, and be optional.Adopt the inventive method, build follow-on SDF figure to describe each node and the communication behavior thereof in application system according to application characteristic in advance, according to content to be processed, input corresponding node communication parameter on each limit.When being the node running frequency as processing target, input the communication frequency of node, it is the cycle of operation as processing target, input the communication cycle of node, as processing simultaneously two kinds of parameters, due to the correlativity between both, only need wherein a kind of messaging parameter of input, wait to try to achieve the another kind of operational factor of can deriving after corresponding operational factor.
As shown in Figure 2, be the step of the synchronous data flow system node parameter immediate processing method of graph-based of the present invention traversal.
Step 1: for real-time system builds SDF figure, in SDF figure, each node represents single calculation task, the messaging parameter of the two ends on limit mark institute's connected node on this limit between node in SDF figure, and messaging parameter is communication frequency or communication cycle.
The present invention launches modeling to each computing node of real-time system and inter-node communication, and each node be real-time task periodically, and the fixing cycle of operation or frequency constraint are arranged, and possesses between the node of correspondence connected with nonoriented edge or directed edge.The communication frequency of two ends mark institute's connected node on this limit on limit, perhaps communication cycle, represent that respectively two connected nodes need traffic carried number of times and each node to complete the once unit interval number of communication needs within the unit interval separately, this is different from traditional SDF figure only can mark a kind of dimension data on directed edge: traffic rate (data that operation is once produced/consumed).In the inventive method, to scheme the key property of the parameter on each limit be towards communication to SDF but not calculate, and the characteristics with localization, the overall situation operation attribute that can't directly reflect each node, therefore need to communication attributes be converted to the operation attribute by graph traversal and corresponding calculating, and carry out global normalization and adjust.SDF figure represents with symbol G, and the symbol and the implication thereof that relate in SDF figure are as shown in table 1:
Table 1SDF figure symbol used and implication thereof
Symbol Implication Symbol Implication
V Node set in G E The set on limit in G
v Node e The limit
res(v) The operational factor of v (cycle, frequency etc.) src(e) The source node of e
val(v,e) The messaging parameter (cycle, frequency etc.) of node v on the e of limit snk(e) The destination node of e
gcd(a,b) The highest common factor of integer a, b lcm(a,b) The lowest common multiple of integer a, b
Take the processing node cycle of operation as example, at e two ends, limit, communication cycle need to be set.Upper adjacent two summits of limit e in SDF figure are respectively src (e), snk (e), the data throughput of node and consumption rate are respectively prd (e) and cns (e), the meaning is: src (e) is source node, every operation is once toward the upper individual metadata of prd (e) that sends of channel e, snk (e) is destination node, and every operation is once read the individual metadata of cns (e) from channel e.For the average memory space of the data on e is maintained a constant, guarantee that overflowing does not appear in communication buffer or foot phenomenon not, communication (operation) periodic ratio val (src (e) of two summits of limit e on the e of limit, e) (snk (e) e) equals prd (e)/cns (e) to/val.so, can establish node src (e) and limit e completes a communication process and needs val (src (e), e) individual chronomere, produce simultaneously the individual unit data of prd (e), and node snk (e) and limit e complete a communication process and need val (snk (e), e) individual chronomere, consume simultaneously the individual unit data of cns (e) (in subsequent descriptions, as without special requirement, corresponding numerical value unit is handed in description to cycle and data no longer especially), so the traffic rate of two nodes (data volume of transmitting in the unit interval) equates, that is: prd (e)/val (src (e), e)=cns (e)/val (snk (e), e), thereby guarantee the constancy of the upper average memory space of communication buffer of limit e.Therefore in SDF figure, but the upper corresponding local communication cycle parameter initialization of e arranges as follows:
val(src(e),e)=prd(e),val(snk(e),e)=cns(e)。
When the messaging parameter on the e of limit is labeled as communication frequency, the initial setting up method is: the communication frequency val (src (e) of node src (e) on the e of limit is set, e)=cns (e), communication frequency val (snk (e), the e)=prd (e) of node snk (e) on the e of limit.No matter the inventive method is for the processing node cycle of operation or running frequency, and after the initialization of completing the respective communication parameter, its subsequent process is consistent.
The purpose of the inventive method is: according to the SDF figure G that constructs and the related communication parameter val (v, e) of input, determine the operational factor res (v) of each node in SDF figure G.After the messaging parameter input, a node in optional SDF figure is starting point on completing SDF figure structure and limit, and the strategy that mixes with breadth First based on depth-first carries out traversal search to each node in SDF figure, calculates corresponding operational factor.
Step 2: the initialization setting, the value of setting the operational factor of all nodes in SDF figure is 0, namely arrange the operational factor vector res (V) of all nodes=[0,0,0 ..., 0].All limits of setting in SDF figure are scanning mode not.
Step 3: initialization storehouse Stack is empty.Storehouse Stack is used for being stored in SDF figure ergodic process and needs the node of keeping in.Scanned certain node that is connected with present node in ergodic process after, be pressed into storehouse, then continue scan other nodes that are connected with present node and be pressed into storehouse, to be scanned complete all with node that present node is connected after, eject the stack top node, and continue take it as starting point according to above other nodes of strategy scanning.And so forth, until there is no node (or in figure, all node scans are complete) in storehouse, stop.
Step 4: select any node v in SDF, set the operational factor res (v)=1 of this node.
Whether step 5: decision node v also has the not adjacent side of scanning, if having, gets the adjacent side e that one of them does not scan, execution in step 6, otherwise, execution in step 13.
Step 6: the adjacent side e that will not scan is labeled as and scans.
Step 7: another vertex ticks that will be connected with limit e is v '.
The operational factor res of step 8: decision node v ' (v ') whether be 0, if, execution in step 9, otherwise, there are ring, execution in step 12 in figure.
Step 9: node v ' is pressed into storehouse Stack.
Step 10: the messaging parameter of new node v and node v ' more.Concrete grammar is:
Step 10-1: obtain node v and node v ' on the e of limit messaging parameter val (v, e) and val (v ', e), then determine highest common factor gcd:gcd=gcd (val (v, e), the val (v ', e)) of two messaging parameters;
Step 10-2: the messaging parameter val (v, e) of new node v on the e of limit=val (v, e)/gcd more;
Step 10-3: the messaging parameter val of new node v ' on the e of limit (v ', e)=val (v ', e)/gcd more.
Step 11: operational factor is adjusted and obtained to the local communication parameter between v and v ' with the node operational factor global normalization of having tried to achieve.Concrete grammar is:
Step 11-1: the lowest common multiple lcm:lcm=lcm (val (v, e), res (v)) that determines the operational factor res (v) of the messaging parameter val (v, e) of node v on the e of limit and node v;
Step 11-2: upgrade the operational factor that has obtained each node vo of operational parameter value in SDF figure G: res (vo)=res (vo) * lcm/res (v); The node of having obtained operational parameter value refers to that all operational parameter values in current G are not 0 node;
Step 11-3: determine the operational factor res (v ') of node v '=val (v ', e) * lcm/val (v, e).Going to step 5 carries out.
Whether the operational factor of step 12: decision node v and node v ' place ring satisfies coherence request, if, turn step 5 and carry out, otherwise, the inventive method finished.
Because the consistance of node on the ring parameter in SDF figure is to satisfy the necessary condition that the real-time application system schedulability requires, therefore in the real-time application system development environment, except wanting the computing node operational factor, also need to test the consistance of the node operational factor that is positioned on ring.Whether the operational factor of decision node v and node v ' place ring satisfies coherence request, specifically: establish node v ' in ring by limit e sConnected node v s, by limit e dConnected node v d, according to node v sOperational factor and node v ', v sAt limit e sOn messaging parameter obtain the operational factor res ' (v ') of node v ', according to node v dOperational factor and node v ', v dAt limit e dOn messaging parameter obtain the operational factor res (v ') of node v ', judge whether res ' (v ') and res (v ') equate, if equate, the operational factor of node v and node v ' place ring satisfies coherence request, if unequal, the operational factor of node v and node v ' place ring does not satisfy coherence request.
As shown in Figure 4, for be that consistance in the communication cycle situation judges exemplary plot in two ends, limit inputs in the inventive method.Fig. 4 is one and comprises 3 node v 1~v 3Ring, T 1~T 6Be communication cycle, in SDF node of graph operational factor processing procedure, the existence of this ring can be detected based on the traversal search algorithm, suppose node v 1The cycle of operation be t, the ratio relation of the messaging parameter of 1. going up by the limit is node v as can be known 2The cycle of operation be t*T 2/ T 1, the messaging parameter of 3. going up based on the limit can obtain node v 3The cycle of operation be t*T 2/ T 1* T 4/ T 3Based on node v 1Cycle t and the messaging parameter 2. gone up of limit also can try to achieve node v 3The cycle of operation be t*T 5/ T 6, in order to keep parameter consistency, t*T 2/ T 1* T 4/ T 3=t*T 5/ T 6Must set up, that is: T 1* T 3* T 5=T 2* T 4* T 6, for the example in Fig. 4, the value of substitution communication cycle judges exactly whether 1*3*4=2*3*2 sets up, obviously the ring in this example satisfies coherence request.
To in the inventive method two ends, limit inputs be that consistance in the communication frequency situation judges, be consistent on principle with Rule of judgment in Fig. 4.Example as shown in Figure 5 is for node v 1~v 3The ring that forms, F 1~F 6Be communication frequency.If node v 1Running frequency be f, the ratio relation of the messaging parameter of 1. going up by the limit is node v as can be known 2Running frequency be f*F 2/ F 1, the messaging parameter of 3. going up based on the limit can obtain node v 3Running frequency be f*F 2/ F 1* F 4/ F 3, based on node v 1Running frequency f and the messaging parameter 2. gone up of limit try to achieve node v 3Running frequency be f*F 5/ F 6, in order to keep parameter consistency, f*F 2/ F 1* F 4/ F 3=f*F 5/ F 6Must set up, that is: F 1* F 3* F 5=F 2* F 4* F 6, the value of substitution communication frequency judges exactly whether 2*3*2=1*3*4 sets up, obviously the ring in this example satisfies coherence request.
Existing method is separately carried out calculation of parameter and consistency detection thereof, calculate in advance each node parameter in SDF figure, and then the consistance of unified each node on the ring parameter of test, in case find not satisfy the ring of coherence request, whole system is non-scheduling, calculation of parameter result has before been wasted a large amount of processor time also without any meaning.Consideration based on efficient, the inventive method is the simultaneously existence of detection ring and the consistance of detection node operational factor in good time in the process that travels through and calculate each node operational factor, in concrete processing procedure, if find to exist in SDF the ring that does not satisfy the parameter consistency condition, can in time stop calculating, avoid follow-up unnecessary parameter calculation procedure, improved system effectiveness.
Step 13: judge in storehouse Stack whether also have node, if having, execution in step 14, otherwise finish the inventive method.
Step 14: from the storehouse Stack top node of popping of being hit by a bullet, and to establish this node be v, then turns step 5 and carry out.
The Main Basis that SDF analyzes is internodal data flow communication, classic method is take SDF figure and node communication speed as input, only can realize the direct processing of node running frequency, the present invention has the diversified advantage of node communication parameter type, same flow and method not only can the processing node running frequency, the all right processing node cycle of operation and other property parameters have unitized benefit.
Take the SDF figure that builds as certain real-time system shown in Figure 3 as example, have 6 real-time task node v in this SDF figure 1~v 6, internodal interconnecting relation represents with directed edge, and the numerical value (as 1,2,3) of the two ends mark on limit be node communication parameter (mark in the embodiment of the present invention be communication cycle), and what mark in the middle of the limit is limit sequence number (as 1., 2., 3.).To process each node cycle of operation as example, as shown in Fig. 6-1, select at random node v 1For starting point travels through SDF figure, node v 1Cycle of operation res (v 1) be set to 1.According to traversal rule, by the limit 1. with node v 1The node v that connects 2Meeting first be scanned and by pop down, 1. the limit is made as scanning mode.Val (v 1, 1.)=1, val (v 2, 1.)=2, node v 1With node v 2Communication cycle than for val (v 1, 1.)/val (v 2, 1.)=1/2 occurs because the once complete communication behavior of node is accompanied by an entire run process, and communication cycle is the cycle of operation, so res (v is arranged 1)/res (v 2)=val (v 1, 1.)/val (v 2, 1.).Find the solution gcd (val (v 1, 1.), val (v 2, 1.))=gcd (1,2)=1, successively with node v 1, v 2The local communication parameter that 1. goes up on the limit do following renewal:
val’(v 1,①)=val(v 1,①)/gcd(val(v 1,①),val(v 2,①))=1/1=1;
val’(v 2,①)=val(v 2,①)/gcd(val(v 1,①),val(v 2,①))=2/1=2。
Obviously, res (v here 1)/res (v 2)=val ' (v 1, 1.)/val ' (v 2, 1.) still set up node v 1And v 2The cycle of operation can tentatively be contemplated to val ' (v 11.) and val ' (v, 2, 1.), because the yojan processing has been done in the front, therefore can guarantee that the expection periodic quantity of two nodes is relatively prime.But this is only the local value of an expection, and its net result also needs (to comprise node v with other nodes of having tried to achieve 1Self) operational factor carry out global normalization and process and upgrade, detailed process is as follows:
Solution node v 1Communication cycle (that is expection cycle of operation) val ' (v 1, 1.) with the cycle of operation res (v that has tried to achieve 1) lowest common multiple lcm (val ' (v 1, 1.), res (v 1))=lcm (1,1)=1, after this, as follows by the same ratio amplification for the cycle of operation of all nodes that obtained:
res’(v 1)=res(v 1)*lcm(val’(v 1,①),res(v 1))/res(v 1)=1*1=1;
res’(v n)=res(v n)*lcm(val’(v 1,①),res(v 1))/res(v 1);
For the embodiment of the present invention, the current v that only obtains 1The cycle of operation, so only upgrade v 1The cycle of operation get final product.
According to the messaging parameter ratio relation, node v 2The cycle of operation be calculated as follows:
res(v 2)=val(v 2,①)*lcm(val’(v 1,①),res(v 1))/val’(v 1,①)=2*1/1=2。
The result of process global normalization and local desired value val ' (1,1.), val ' (2,1.) consistent.
Due to the processing that has incorporated minimum public number and highest common factor in processing procedure, therefore can guarantee that the operational factor of trying to achieve fractional form can not occur, and relatively prime between each parameter.In specific implementation process, if lcm (val ' (v 1, 1.), res (v 1))=res (v 1), the cycle of operation of the node that has obtained need not global normalization and upgrades, and node v 2Cycle of operation res (v 2)=val (v 2, 1.) * res (v 1)/val ' (v 1, 1.)=res (v 1) * val (v 2, 1.)/val ' (v 1, 1.)=2.The cycle of operation processing procedure of follow-up each node similarly, as no longer specifically describing without special circumstances, directly formulas for calculating and result.
For node v 1And v 2Although the cycle of operation determined, they also separately with other nodes (as v 3, v 4, v 5) have a correspondence, its final cycle of operation also to satisfy respectively and these nodes between the ratio restriction relation.As Fig. 6-2, this moment is with node v 1Be starting point, continue to scan other adjacent side, based on traversal strategy of the present invention, next 2. system can scan the limit, establishes its state for scanning, and 2. finds node v by the limit 3And with its pop down, node v 3With node v 1Communication cycle ratio be val (v 3, 2.)/val (v 1, 2.)=4/2=2/1=2, node v 3The cycle of operation be: res (v 3)=res (v 1) * val (v 3, 2.)/val (v 1, 2.)=1*2=2.
At this moment, node v 1The adjacent side of not scanned, next the stack top node v of pop-up a stack 3, and begin scanning by the limit 3. with node v 3The node v that is connected 2, limit state 3. is made as and scans.As Fig. 6-3, due to node v 2Be scanned before this, i.e. res ' (v 2) ≠ 0, so node v 2Not by pop down, but by node v 3Can get egress v 2Cycle of operation res (v 2)=res (v 3) * val (v 2, 3.)/val (v 3, 3.)=2*3/3=2.Node v 2Before be scanned and had ring in key diagram, with the current res (v that obtains 2) with the res ' (v that before calculated 2) value is compared and found both to equate, so in ring, node parameter satisfies coherence request.Determination methods is as shown in Figure 4 carried out the consistance judgement:
According to node v 33. the node v that determines with the limit 2The cycle of operation:
res(v 2)=res(v 3)*val(v 2,③)/val(v 3,③)=res(v 1)*val(v 3,②)/val(v 1,②)*val(v 2,③)/val(v 3,③);
According to node v 11. the node v that determines with the limit 2The cycle of operation:
res’(v 2)=res(v 1)*val(v 2,①)/val(v 1,①)
If res is (v 2)=res ' (v 2), have:
res(v 1)*val(v 3,②)/val(v 1,②)*val(v 2,③)/val(v 3,③)=res(v 1)*val(v 2,①)/val(v 1,①)
Obtain after abbreviation and arrangement:
Val (v 1, 1.) * val (v 2, 3.) * val (v 3, 2.)=val (v 2, 1.) * val (v 3, 3.) * val (v 1, 2.), this namely:
T 1*T 3*T 5=T 2*T 4*T 6
As seen res (v 2)=res ' (v 2) and T 1* T 3* T 5=T 2* T 4* T 6Of equal value.Be false if find to appeal consistency constraint, i.e. res (v 2) ≠ res ' (v 2), this SDF system of describing is discontented can scheduling property necessary condition, and computation process stops.
Complete node v 2Processing after, according to traversal rule, next scanning by the limit 6. with node v 3The node v that is connected 6, as Fig. 6-4,6. be made as the limit this moment scans, node v 6Pop down, val (v 6, 6.)=4, val (v 3, 6.)=3, both relatively prime, the result after yojan is constant, that is: val ' (v 6, 6.)=4, val ' (v 3, 6.)=3, but lcm (val ' (v 3, 6.), res (v 3))=lcm (3,2)=6, with res (v 3) value unequal, the node operational factor need to be carried out global normalization and adjusted, so node v 1, v 2, v 3The cycle of operation adjust as follows:
res(v 1)=res(v 1)*lcm(val’(v 3,⑥),res(v 3))/res(v 3)=1*6/2=3;
res(v 2)=res(v 2)*lcm(val’(v 3,⑥),res(v 3))/res(v 3)=2*6/2=6;
res(v 3)=res(v 3)*lcm(val’(v 3,⑥),res(v 3))/res(v 3)=2*6/2=6;
Node v 6Cycle of operation result of calculation as follows:
res(v 6)=val’(v 6,⑥)*lcm(val’(v 3,⑥),res(v 3))/val(v 3,⑥)=4*6/3=8。
After completing above-mentioned scanning, node v 3Do not scanned the adjacent side, the stack top node v of pop-up a stack 6, due to v 6Do not scan the adjacent side, then eject node v 2, for node v 2, due to the limit 1., 3. be scanned, next can scan the limit 4. and find node v 4, in the usual course, 4. the limit is made as and scans, node v 4Pop down as Fig. 6-5, can obtain res (v after this 4)=res (v 2) * val (v 4, 4.)/val (v 2, 4.)=6*2/3=4.The like, next 5. the node limit is made as and scans, node v 5Pop down, its cycle is res (v 5)=res (v 2) * val (v 5, 5.)/val (v 2, 5.)=6*3/2=9 is as Fig. 6-6.
So far, in SDF figure, the cycle of operation of each node is disposed, but also can continue operation, and this moment is due to node v 2The all of its neighbor limit be scanned completely, eject stack top node v 5, but node v 5Do not scan the adjacent side, continue to play stack and obtain node v 4, still do not scan the adjacent side, this moment, stack was empty, method ends.
Processed system satisfies the real-time system schedulability, and the cycle of operation of all nodes is as follows:
[res(v 1),res(v 2),res(v 3),res(v 4),res(v 5),res(v 6)]=[3,6,6,4,9,8]
Each node parameter is integer and relatively relatively prime, and namely highest common factor is 1.For running frequency, its processing procedure is also like this.

Claims (3)

1. the synchronous data flow system node parameter immediate processing method of a graph-based traversal, is characterized in that, comprises the steps:
Step 1: for real-time system builds synchronous data flow (SDF) figure, in SDF figure, each node represents single calculation task, the messaging parameter of the two ends on limit mark institute's connected node on this limit between node, described messaging parameter is communication frequency or communication cycle;
Step 2: the initialization setting, the value of setting the operational factor of all nodes in SDF figure is 0, all limits are scanning mode not;
Step 3: initialization storehouse Stack is empty;
Step 4: arbitrary node in selected SDF, be labeled as v, set the operational factor res (v)=1 of node v;
Whether step 5: decision node v also has the not adjacent side of scanning, if having, gets the adjacent side e that one of them does not scan, and enter step 6 and carry out, otherwise, execution in step 13;
Step 6: the adjacent side e that will not scan is labeled as and scans;
Step 7: another vertex ticks that will be connected with limit e is v ';
The operational factor res of step 8: decision node v ' (v ') whether be 0, if, execution in step 9, otherwise, there are ring, execution in step 12 in figure;
Step 9: node v ' is pressed into storehouse Stack;
Step 10: determine the messaging parameter val (v of node v on the e of limit, e) and the messaging parameter val of node v ' on the e of limit (v ', highest common factor gcd e), then more new node v and the messaging parameter of node v ' on the e of limit: val (v, e)=val (v, e)/gcd; Val (v ', and e)=val (v ', e)/gcd;
Step 11: determine the messaging parameter val (v of node v on the e of limit, e) with the lowest common multiple lcm of the operational factor res (v) of node v, then upgrade the operational factor of each the node vo that has obtained operational parameter value in SDF figure: res (vo)=res (vo) * lcm/res (v), determine at last the operational factor res (v ') of node v '=val (v ', e) * lcm/val (v, e); Turning step 5 carries out;
Whether the operational factor of step 12: decision node v and node v ' place ring satisfies coherence request, if, turn step 5 and carry out, otherwise, method ends;
Step 13: judge in storehouse Stack whether also have node, if having, execution in step 14, otherwise method ends;
Step 14: from the storehouse Stack top node of popping of being hit by a bullet, and to establish this node be v, then turns step 5 and carry out.
2. synchronous data flow system node parameter immediate processing method according to claim 1, it is characterized in that, the initial setting up method of the messaging parameter in described step 1 on the limit is: two summits of establishing limit e are respectively src (e) and snk (e), src (e) is source node, every operation is once toward the upper individual metadata of prd (e) that sends of channel e, snk (e) is destination node, and every operation is once read the individual metadata of cns (e) from channel e; When messaging parameter is communication cycle, communication cycle val (the src (e) of node src (e) on the e of limit is set, e)=prd (e), node snk (e) communication cycle val (snk (e), the e)=cns (e) on the e of limit; When messaging parameter is communication frequency, communication frequency val (the src (e) of node src (e) on the e of limit is set, e)=cns (e), node snk (e) communication frequency val (snk (e), the e)=prd (e) on the e of limit.
3. synchronous data flow system node parameter immediate processing method according to claim 1, it is characterized in that, in described step 12, whether the operational factor of decision node v and node v ' place ring satisfies coherence request, specifically: establish node v ' in ring by limit e sConnected node v s, by limit e dConnected node v d, according to node v sOperational factor and node v ', v sAt limit e sOn messaging parameter obtain the operational factor res ' (v ') of node v ', according to node v dOperational factor and node v ', v dAt limit e dOn messaging parameter obtain the operational factor res (v ') of node v ', judge whether res ' (v ') and res (v ') equate, if equate, the operational factor of node v and node v ' place ring satisfies coherence request, if unequal, the operational factor of node v and node v ' place ring does not satisfy coherence request.
CN201310034095.4A 2013-01-29 2013-01-29 Fast processing method of ergodic synchronous data flow system node parameter based on graphs Expired - Fee Related CN103136334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310034095.4A CN103136334B (en) 2013-01-29 2013-01-29 Fast processing method of ergodic synchronous data flow system node parameter based on graphs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310034095.4A CN103136334B (en) 2013-01-29 2013-01-29 Fast processing method of ergodic synchronous data flow system node parameter based on graphs

Publications (2)

Publication Number Publication Date
CN103136334A true CN103136334A (en) 2013-06-05
CN103136334B CN103136334B (en) 2014-04-16

Family

ID=48496160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310034095.4A Expired - Fee Related CN103136334B (en) 2013-01-29 2013-01-29 Fast processing method of ergodic synchronous data flow system node parameter based on graphs

Country Status (1)

Country Link
CN (1) CN103136334B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424319A (en) * 2013-09-10 2015-03-18 镇江金钛软件有限公司 Method for temporarily storing general data
CN107329828A (en) * 2017-06-26 2017-11-07 华中科技大学 A kind of data flow programmed method and system towards CPU/GPU isomeric groups
CN107592177A (en) * 2017-08-30 2018-01-16 江西昌河航空工业有限公司 A kind of clock synchronizing method of helicopter avionics system test network
CN111177486A (en) * 2019-12-19 2020-05-19 四川蜀天梦图数据科技有限公司 Message transmission method and device in distributed graph calculation process
CN111198766A (en) * 2020-01-06 2020-05-26 中科驭数(北京)科技有限公司 Database access operation deployment method, database access method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘国鑫等人: "同步数据流模型调度序列的空间优化", 《计算机工程与应用》 *
吴晖等人: "使用SDF图描述的嵌入式DSP系统存储优化", 《计算机辅助设计与图形学学报》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424319A (en) * 2013-09-10 2015-03-18 镇江金钛软件有限公司 Method for temporarily storing general data
CN107329828A (en) * 2017-06-26 2017-11-07 华中科技大学 A kind of data flow programmed method and system towards CPU/GPU isomeric groups
CN107329828B (en) * 2017-06-26 2019-10-08 华中科技大学 A kind of data flow programmed method and system towards CPU/GPU isomeric group
CN107592177A (en) * 2017-08-30 2018-01-16 江西昌河航空工业有限公司 A kind of clock synchronizing method of helicopter avionics system test network
CN111177486A (en) * 2019-12-19 2020-05-19 四川蜀天梦图数据科技有限公司 Message transmission method and device in distributed graph calculation process
CN111198766A (en) * 2020-01-06 2020-05-26 中科驭数(北京)科技有限公司 Database access operation deployment method, database access method and device
CN111198766B (en) * 2020-01-06 2021-02-05 中科驭数(北京)科技有限公司 Database access operation deployment method, database access method and device

Also Published As

Publication number Publication date
CN103136334B (en) 2014-04-16

Similar Documents

Publication Publication Date Title
CN103136334B (en) Fast processing method of ergodic synchronous data flow system node parameter based on graphs
Caron et al. A self-stabilizing k-clustering algorithm for weighted graphs
Deng et al. An efficient online direction-preserving compression approach for trajectory streaming data
Gmyr et al. Distributed monitoring of network properties: The power of hybrid networks
Jing et al. Energy-efficient scheduling on multi-FPGA reconfigurable systems
Campos et al. A fast algorithm for computing minimum routing cost spanning trees
Adineh et al. Maximum degree based heuristics for influence maximization
CN102427420B (en) Virtual network mapping method and device based on graph pattern matching
Gandhi et al. Performance comparison of parallel graph coloring algorithms on bsp model using hadoop
Xiao et al. An efficient algorithm for dynamic shortest path tree update in network routing
Alvarez-Hamelin et al. An Internet graph model based on trade-off optimization
CN108197186B (en) Dynamic graph matching query method applied to social network
Souravlas et al. Efficient community-based data distribution over multicast trees
Abshoff et al. Continuous aggregation in dynamic ad-hoc networks
Anoop et al. Exploitation whale optimization based optimal offloading approach and topology optimization in a mobile ad hoc cloud environment
CN110446239A (en) A kind of wireless sensor network cluster-dividing method and system based on multiple magic square
Gharajeh T*: a weighted double-heuristic search algorithm to find the shortest path
Yang et al. A distributed algorithm for balanced hypergraph partitioning
Yang et al. Parameter-optimized simulated annealing for application mapping on networks-on-chip
Bui et al. Self-stabilizing hierarchical construction of bounded size clusters
Wang et al. Spark load balancing strategy optimization based on internet of things
CN114661757B (en) Subgraph matching method and system based on heterogeneous computer FPGA
Tsiatas Diffusion and clustering on large graphs
Steffenel et al. A framework for adaptive collective communications for heterogeneous hierarchical computing systems
Qingqi et al. Multi-objective mapping for network-on-chip based on bio-inspired optimization algorithms

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140416

Termination date: 20170129

CF01 Termination of patent right due to non-payment of annual fee