CN102298653A - Method and device for configuring algorithm execution sequence number - Google Patents
Method and device for configuring algorithm execution sequence number Download PDFInfo
- Publication number
- CN102298653A CN102298653A CN2010102097376A CN201010209737A CN102298653A CN 102298653 A CN102298653 A CN 102298653A CN 2010102097376 A CN2010102097376 A CN 2010102097376A CN 201010209737 A CN201010209737 A CN 201010209737A CN 102298653 A CN102298653 A CN 102298653A
- Authority
- CN
- China
- Prior art keywords
- algorithm
- output
- module
- execution sequence
- index
- 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
- Logic Circuits (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and device for configuring an algorithm execution sequence number. The method comprises the following steps of: a, extracting and storing basic information; b, finding all the first and second algorithms, and configuring the execution sequence numbers thereof; c, traversing each output of the first half of algorithms and executing step d, and then executing step e; d, for an output of which output connecting line is not a tracker line and is not in a connection cycle, if the execution sequence number of the output algorithm is greater than that of the algorithm and is the minimum in the output algorithm greater than the algorithm, interchanging the execution sequence numbers of the output algorithm and the algorithm; e, traversing each input of each algorithm and executing step f, ending after completing the step f; f, for an input of which input connecting line is not a tracker line, if the execution sequence number of the algorithm is greater than that of the input algorithm of the input, and if the execution sequence number of the input algorithm is the maximum in all the input algorithms of which execution sequence numbers are less than that of the algorithm, interchanging the execution sequence number of the input algorithm with that of the algorithm.
Description
Technical field
The present invention designs industrial control field, relates in particular to the method and the device of a kind of placement algorithm execution sequence number.
Background technology
Algorithm execution sequence intelligent sequencing is a critical function of page configuration module in the control configuration instrument of EDPF NT+ system.
The algorithm execution sequence number is one of attribute of algorithm, is kept in the algorithm record, be used for writing down certain algorithm SAMA figure which by computing.The algorithm execution sequence of algorithm is number since 1 order assignment among SAMA figure (steering logic figure), each algorithm all must have continuous, unique algorithm execution sequence number, when this SAMA figure moves, will number carry out the algorithm computing successively according to the algorithm execution sequence in DPU (dispersion treatment unit).
The algorithm execution sequence number is to specify in the page configuration operation; The operation that the page configuration module will be done comprises: 1, to SAMA figure allocation domain number, station number, page number; 2, specify the execution sequence of SAMA figure in the control zone; 3, appointment SAMA figure can by which operation of equipment; 4, give algorithm assigns algorithm name; 5, be algorithm assigns algorithm execution sequence number.
At present, algorithm execution sequence number acquiescence be to be added to serial number on the SAMA figure with algorithm, be which individual being added among the SAMA figure algorithm is, how many algorithm execution sequences number is exactly, but this serial number is inaccurate usually, need artificial the appointment, promptly in the page configuration properties dialog, come the execution sequence number of assignment algorithm by in algorithm ordering dialog box, moving up and down algorithm.This pattern is also inconvenient, has also increased the consuming time of page configuration operation.
Summary of the invention
The technical problem to be solved in the present invention provides the method and the device of a kind of placement algorithm execution sequence number, can be algorithm configuration execution sequence number automatically in the process of page configuration, has improved the efficient of page configuration operation.
In order to address the above problem, the invention provides the method for a kind of placement algorithm execution sequence number, comprising:
A, extraction and the essential information of preserving algorithm among the steering logic figure comprise whether index, the I/O number of each algorithm, the index of I/O algorithm, the I/O line of algorithm is tracker wire;
B, according to the index ergodic algorithm, find all first, second algorithms; Be followed successively by execution sequence that each described first algorithm configuration begins to increase progressively from minimum index number according to indexed sequential; Be followed successively by execution sequence that each described second algorithm configuration begins to successively decrease from largest index number by the reverse indexing order;
Described first algorithm is perhaps exported the algorithm that line is a tracker wire for not output; Described second algorithm is not input, and perhaps input link is the algorithm of tracker wire;
C, begin each output, all carry out one time steps d when traversing each output of each algorithm by index traversal the first half algorithm from minimum index; Execution in step e after traversal is finished;
If the output algorithm of this output of d does not have execution sequence number, then, after the configuration described current minimum value is added 1 for this output algorithm configuration adds the execution sequence number of 1 beginning from described current minimum value;
The output line that judges whether this output is not that tracker wire and this output are not in the connection circulation, is not then to travel through next output;
If the execution sequence that then judges whether this output algorithm is number greater than this algorithm, and in output algorithm, be minimum greater than this algorithm, be then to travel through next output after the execution sequence number exchange with this output algorithm and this algorithm, export otherwise directly travel through the next one;
E, travel through each input of each algorithm according to described index, step f the time is all carried out one time in each input that traverses each algorithm; After finishing, traversal finishes;
F, when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence of the input algorithm of this input number, and the execution sequence of this input algorithm number is maximum in the input algorithm of all execution sequences number less than this algorithm, then will import the exchange of execution sequence number with this algorithm of algorithm; The next input of traversal then.
Further, in the described steps d, after the execution sequence number exchange with this output algorithm and this algorithm, also comprise step before the next output of traversal:
From this output algorithm,, all carry out one time step f when traversing each input of each algorithm according to execution sequence traversal each input of having distributed the algorithm of execution sequence number number back to front; After finishing, traversal exports by the index traversal is next.
Further, among the described step c, after traversal is finished, before execution in step e, also comprise step:
If the number of described second algorithm of g is greater than 0, be the algorithm that described maximum execution sequence number deducts described current minimum value then from index, travel through this algorithm and each output of each algorithm thereafter by index, steps d the time is all carried out one time in each output that traverses each algorithm; Execution in step e after traversal is finished.
Further, described step a comprises:
A1, travel through all algorithms in the steering logic figure in proper order according to picture, index, the initial value of preserving each algorithm in internal memory are 0 I/O number, temporary transient is the index of the I/O algorithm of sky, is defaulted as the trace labelling of each I/O of non-tracking;
A2, isolate tracker wire and be connected the pel that does not need algorithm execution sequence number, put out algorithm in order and carry out flow process trunk figure;
A3, carry out among the flow process trunk figure, travel through all connecting lines at described algorithm;
If the connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, the output number with the essential information of this algorithm in internal memory adds 1, increases the index of this connecting line output terminal algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this output is changed to; For the output terminal algorithm of this connecting line, the input number with the essential information of this algorithm in internal memory adds 1, increases the index of this connecting line input end algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this input is changed to.
Further, described step b comprises:
B1, with described minimum index as current minimum value, by all algorithms in the described index traversal internal memory, when finding first algorithm, the execution sequence of first algorithm that found number is configured to current minimum value, then current minimum value is added 1 back and continue traversal, finish up to traversal;
B2, with described largest index as current maximal value, by all algorithms in the described index traversal internal memory, when finding second algorithm, the execution sequence of second algorithm that found number is configured to current maximal value, then current maximal value is subtracted 1 back and continue traversal, finish up to traversal.
The present invention also provides the device of a kind of placement algorithm execution sequence number, comprising:
First, second configuration module, first, second spider module, memory module, first configuration module;
Extraction module is used for extracting the essential information of depositing steering logic figure algorithm, comprises whether index, the I/O number of each algorithm, the index of I/O algorithm, the I/O line of algorithm is tracker wire, and is kept in the described memory module; Start described configuration module just after finishing;
Described configuration module just is used for traveling through according to index the algorithm of described memory module, find all first, second algorithms, be followed successively by execution sequence that each described first algorithm configuration begins to increase progressively from minimum index number according to indexed sequential, be followed successively by execution sequence that each described second algorithm configuration begins to successively decrease from largest index number by the reverse indexing order, start described first spider module after finishing; Described first algorithm is perhaps exported the algorithm that line is a tracker wire for not output; Described second algorithm is not input, and perhaps input link is the algorithm of tracker wire;
Described first spider module is used for beginning to travel through by index each output of described memory module the first half algorithm from minimum index, and described first configuration module time is all called once in each output that traverses each algorithm; After finishing, traversal starts described second spider module;
Described first configuration module is used for when the output algorithm of this output does not have execution sequence, for the configuration of this output algorithm adds the execution sequence number of 1 beginning from described current minimum value, after the configuration described current minimum value is added 1; The output line that judges whether this output is not that tracker wire and this output are not in the connection circulation, is not then to notify the module traversal of calling this module next output; If the execution sequence that then judges whether this output algorithm is number greater than this algorithm, and in output algorithm, be minimum greater than this algorithm, be then the execution sequence of this output algorithm in the described memory module and this algorithm number to be exchanged, notice is called the next output of module traversal of this module then, otherwise direct notice is called the next output of module traversal of this module;
Described second spider module is used for traveling through according to described index each input of described each algorithm of memory module, and described second configuration module time is all called once in each input that traverses each algorithm;
Described second configuration module is used for when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence of the input algorithm of this input number, and the execution sequence of this input algorithm number is maximum in the input algorithm of all execution sequences number less than this algorithm, then with the exchange with this algorithm of execution sequence number that should the input algorithm in the described memory module, notice is called next input of module traversal of this module.
Further, described first configuration module also is used for after the execution sequence number exchange with output algorithm and this algorithm, before notice is called the next output of module traversal of this module, from this output algorithm, according to execution sequence traversal each input of having distributed the algorithm of execution sequence number number back to front, all call once described second configuration module when traversing each input of each algorithm; After finishing, traversal reinforms the next output of module traversal of calling this module.
Further, described device also comprises:
The 3rd spider module;
Described first spider module also is used for after traversal is finished, start second spider module before, if the number of described second algorithm, is then called described the 3rd spider module greater than 0; After receiving the notice that described the 3rd spider module traversal is finished, restart described second spider module;
It is the algorithm that described maximum execution sequence number deducts described current minimum value that described the 3rd spider module is used for from index, travel through this algorithm in the described memory module and each output of each algorithm thereafter by index, all call once described first configuration module when traversing each output of each algorithm; After finishing, traversal notifies described first spider module.
Further, described extraction module comprises:
Initialization unit, be used for traveling through all algorithms in the steering logic figure in proper order according to picture, index, the initial value of preserving each algorithm in described memory module are 0 I/O number, temporary transient is the index of the I/O algorithm of sky, is defaulted as the trace labelling of each I/O of non-tracking;
Separative element is used to isolate tracker wire and has been connected the pel that does not need algorithm execution sequence number, puts out algorithm in order and carries out flow process trunk figure;
Updating block is used for carrying out flow process trunk figure at described algorithm, travels through all connecting lines; If the connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, the output number with the essential information of this algorithm in described memory module adds 1, increases the index of this connecting line output terminal algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this output is changed to; For the output terminal algorithm of this connecting line, the input number with the essential information of this algorithm in described memory module adds 1, increases the index of this connecting line input end algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this input is changed to.
Further, described configuration module just comprises: first, second algorithm configuration unit;
The described first algorithm configuration unit is used for described minimum index as current minimum value, travel through all algorithms in the described memory module by described index, when finding first algorithm, the execution sequence of first algorithm that found number is configured to current minimum value, then current minimum value is added 1 back and continue traversal, start the second algorithm configuration unit after traversal is finished;
The described second algorithm configuration unit is used for described largest index as current maximal value, travel through all algorithms in the described memory module by described index, when finding second algorithm, the execution sequence of second algorithm that found number is configured to current maximal value, then current maximal value is subtracted 1 back and continue traversal, start described first spider module after finishing.
Technical scheme of the present invention can be carried out the algorithm execution sequence number configuration in the page configuration operation quickly and easily automatically, has saved the time of configuration flow process, has improved configuration speed, has also guaranteed the accuracy of algorithm execution sequence to a certain extent.
Description of drawings
Fig. 1 is the idiographic flow synoptic diagram of steps A among the embodiment one;
Fig. 2 is the idiographic flow synoptic diagram of step B1 among the embodiment one;
Fig. 3 is the idiographic flow synoptic diagram of step B2 among the embodiment one;
Fig. 4 is the idiographic flow synoptic diagram of step D among the embodiment one;
Fig. 5 is the idiographic flow synoptic diagram of step e among the embodiment one;
Fig. 6 is the schematic block diagram of the device of placement algorithm execution sequence number among the embodiment one.
Embodiment
Below in conjunction with drawings and Examples technical scheme of the present invention is described in detail.
Need to prove that if do not conflict, each feature among the embodiment of the invention and the embodiment can mutually combine, all within protection scope of the present invention.In addition, can in computer system, carry out in the step shown in the process flow diagram of accompanying drawing such as a set of computer-executable instructions, and, though there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.
Embodiment one, and the method for a kind of placement algorithm execution sequence number comprises:
The essential information of common algorithm comprises the index of algorithm, the input and/or the output information of each algorithm among A, extraction and the preservation SAMA figure; Described common algorithm is the algorithm that needs algorithm execution sequence number; Described I/O information comprises whether I/O number, the index of I/O algorithm, the I/O line of this algorithm are tracker wire;
In the present embodiment, described steps A specifically can comprise as shown in Figure 1:
A1, travel through all algorithms in the SAMA figure in proper order, in internal memory, preserve the essential information of each algorithm according to picture; The index of described algorithm can be the integer of expression traversal order, such as the index of first algorithm of traversal be 1, the second be 2...... by that analogy; At this moment, it is 0 that the I/O number of described algorithm is got initial value, and the index of I/O algorithm temporarily is empty, and the trace labelling of each I/O is defaulted as non-tracking;
A2, isolate tracker wire and be connected the pel that does not need algorithm execution sequence number, put out the algorithm of whole figure in order and carry out flow process trunk figure;
A3, carry out among the flow process trunk figure, travel through all connecting lines, upgrade the input and/or the output information of each algorithm, comprising at described algorithm:
If the connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, output number with the essential information of this algorithm in internal memory adds 1, in output information, increase the index that this connecting line output terminal algorithm is preserved in internal memory, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this output is changed to; Output terminal algorithm for this connecting line, input number with the essential information of this algorithm in internal memory adds 1, increase the index that this connecting line input end algorithm is preserved in internal memory in input information, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this input is changed to;
It is the pel that need not the allocation algorithm execution sequence that there is an end at the line two ends, and the common algorithm end of line do not process.
During practical application, do not get rid of with the mode beyond the trace labelling and represent whether connecting line is tracker wire.
B, according to the algorithm that index traversal is preserved, find first, second algorithm among all described SAMA figure;
Described first algorithm is that the upstream does not connect output (promptly exporting number is 0), and perhaps there is one or more output the upstream, but this output line is the algorithm of tracker wire (trace labelling is for following the tracks of);
Described second algorithm is that the downstream does not connect input (promptly importing number is 0), and perhaps the downstream is connected with one or more input, but this input link is the algorithm of tracker wire (trace labelling is for following the tracks of);
Be followed successively by execution sequence that each described first algorithm configuration begins to increase progressively from minimum index number according to indexed sequential; Be followed successively by execution sequence that each described second algorithm configuration begins to successively decrease from largest index (be the common algorithm number n deducts minimum index in the described SAMA figure then add 1) number by the reverse indexing order.
Minimum index described in the present embodiment can but be not limited to 1, this moment described largest index be n.
In the present embodiment, described step B specifically can comprise:
B1, with described minimum index as current minimum value, by all algorithms in the described index traversal internal memory, when finding first algorithm, the execution sequence of first algorithm that found number is configured to current minimum value, then current minimum value is added 1 back and continue traversal, finish up to traversal, as shown in Figure 2; At this moment, described current minimum value is the number of first algorithm;
When minimum index is 1, that is: travel through all algorithms according to described index, for described first algorithm that finds, for the execution sequence of first configuration number is 1, be that the order of second configuration carries out number be 2, be the order of the 3rd configuration carry out number for 3...... by that analogy;
B2, with described largest index as current maximal value, by all algorithms in the described index traversal internal memory, when finding second algorithm, the execution sequence of second algorithm that found number is configured to current maximal value, then current maximal value is subtracted 1 back and continue traversal, finish up to traversal, as shown in Figure 3; At this moment, described current maximal value is the number that largest index deducts second algorithm;
When largest index is n, that is: travel through (oppositely traversal) all described second algorithms that find back to front, for the execution sequence of first configuration number is n (a common algorithm number), be that the order of second configuration is carried out and number to be n-1, be the order of the 3rd configuration carry out number for n-2...... by that analogy; After assigning,
During practical application, the execution sequence of step B1, B2 can exchange, and also can walk abreast.
C, begin (, then to travel through preceding 10 such as having 20 algorithms by the first half algorithm the index traversal internal memory from minimum index; If there are 21, then travel through preceding 10 or preceding 11 all can) each output, step D the time is all carried out one time in each output that traverses each algorithm; Execution in step F after traversal is finished.
D, as shown in Figure 4 if the output algorithm of this output does not have execution sequence number, then for this output algorithm configuration adds the execution sequence number of 1 beginning from described current minimum value, adds 1 with described current minimum value after the configuration; So just guaranteed that in subsequent step the output algorithm of this output must be to have distributed execution sequence number;
The output line that judges whether this output is not that tracker wire (trace labelling is not to follow the tracks of) and this output are not in the connection circulation, is not then to travel through next output;
Be to continue then to judge whether that the execution sequence of this output algorithm is number greater than this algorithm (being the algorithm that is traversed), and in the output algorithm (only limiting to the output algorithm of this algorithm) greater than this algorithm is minimum, not the then directly next output of traversal, be then the execution sequence of this output algorithm and this algorithm number to be exchanged, after exchange from this output algorithm, according to execution sequence traversal each input of having distributed the algorithm of execution sequence number number back to front, all carry out one time step e when traversing each input of each algorithm; After finishing, traversal returns step C, the next output of traversal.
In the present embodiment, if the output line of this output is a tracker wire, maybe this output is in and connects in the circulation, the then next output of traversal, just traveling through the next one output of this algorithm, if the output of this algorithm all travels through, then is first output of the next algorithm of traversal.
In the present embodiment, check whether this output is in to connect in the circulation to be meant: if got back to again should output itself along the final line of the direction of line, judge then that this output is in to connect to circulate.
E, when the input link of this input during for tracker wire (trace labelling is not to follow the tracks of), if the execution sequence of this algorithm (being the algorithm that is traversed) number is greater than the execution sequence of the input algorithm of this input number, and the execution sequence of this input algorithm number is maximum in the input algorithm (only limiting to the input algorithm of this algorithm) of all execution sequences number less than this algorithm, then will import the exchange of execution sequence number with this algorithm of algorithm; The next input of traversal then, just travel through the next one input of this algorithm, if the input of this algorithm all travels through, then be that (if carry out this step in step D, then next algorithm is that execution sequence number subtracts 1 algorithm for this algorithm to the next algorithm of traversal; If carry out this step in step G, then next algorithm is that index adds 1 next algorithm for this algorithm) first input, as shown in Figure 5.
If the number of described second algorithm of F is greater than 0, be the algorithm that described maximum execution sequence number deducts described current minimum value then from index, travel through this algorithm and each output of each algorithm thereafter by index, step D the time is all carried out one time in each output that traverses each algorithm; Execution in step G after traversal is finished.
This step can prevent to omit in printing at there being the linkage unit that disperses in the figure.
If there is not second algorithm, then do not carry out step F, directly carry out step G.
G, according to each input of each algorithm in the described index traversal internal memory, all carry out one time step e when traversing each input of each algorithm; After finishing, traversal finishes.
Embodiment two, and the device of a kind of placement algorithm execution sequence number as shown in Figure 6, comprising:
First, second configuration module, first, second spider module, memory module, first configuration module;
Extraction module is used for extracting the essential information of steering logic figure algorithm, comprises whether index, the I/O number of each algorithm, the index of I/O algorithm, the I/O line of algorithm is tracker wire, and is kept in the described memory module; Start described configuration module just after finishing;
Described configuration module just is used for traveling through according to index the algorithm of described memory module, find all first, second algorithms, be followed successively by execution sequence that each described first algorithm configuration begins to increase progressively from minimum index number according to indexed sequential, be followed successively by execution sequence that each described second algorithm configuration begins to successively decrease from largest index number by the reverse indexing order, start described first spider module after finishing; Described first algorithm is perhaps exported the algorithm that line is a tracker wire for not output; Described second algorithm is not input, and perhaps input link is the algorithm of tracker wire;
Described first spider module is used for beginning to travel through by index each output of described memory module the first half algorithm from minimum index, and described first configuration module time is all called once in each output that traverses each algorithm; After finishing, traversal starts described second spider module;
Described first configuration module is used for when the output algorithm of this output does not have execution sequence, for the configuration of this output algorithm adds the execution sequence number of 1 beginning from described current minimum value, after the configuration described current minimum value is added 1; The output line that judges whether this output is not that tracker wire and this output are not in the connection circulation, is not then to notify the module traversal of calling this module next output; Be to continue then to judge whether that the execution sequence of this output algorithm is number greater than this algorithm, and in output algorithm, be minimum greater than this algorithm, not then to notify the module traversal of calling this module next output, be then the execution sequence of this output algorithm in the described memory module and this algorithm number to be exchanged, notice is called the next output of module traversal of this module after exchange; Can also be used for after execution sequence number exchange output algorithm and this algorithm, before notice is called the next output of module traversal of this module, from this output algorithm, according to execution sequence traversal each input of having distributed the algorithm of execution sequence number number back to front, described second configuration module time is all called once in each input that traverses each algorithm, reinforms the next output of module traversal of calling this module after traversal is finished.
Described second spider module is used for traveling through according to described index each input of described each algorithm of memory module, and described second configuration module time is all called once in each input that traverses each algorithm; Traversal is finished then, and configuration finishes;
Described second configuration module is used for when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence of the input algorithm of this input number, and the execution sequence of this input algorithm number is maximum in the input algorithm of all execution sequences number less than this algorithm, then with execution sequence that should the input algorithm in the described memory module number exchange with this algorithm; Notice is called the next input of module traversal of this module.
In the present embodiment, described device can also comprise: the 3rd spider module;
Described first spider module also is used for after traversal is finished, start second spider module before, if the number of described second algorithm, is then called described the 3rd spider module greater than 0; After receiving the notice that described the 3rd spider module traversal is finished, restart described second spider module;
It is the algorithm that described maximum execution sequence number deducts described current minimum value that described the 3rd spider module is used for from index, travel through this algorithm in the described memory module and each output of each algorithm thereafter by index, all call once described first configuration module when traversing each output of each algorithm; After finishing, traversal notifies described first spider module.
In the present embodiment, described extraction module specifically can comprise:
Initialization unit, be used for traveling through all algorithms in the steering logic figure in proper order according to picture, index, the initial value of preserving each algorithm in described memory module are 0 I/O number, temporary transient is the index of the I/O algorithm of sky, is defaulted as the trace labelling of each I/O of non-tracking;
Separative element is used to isolate tracker wire and has been connected the pel that does not need algorithm execution sequence number, puts out algorithm in order and carries out flow process trunk figure;
Updating block is used for carrying out flow process trunk figure at described algorithm, travels through all connecting lines; If the connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, the output number with the essential information of this algorithm in described memory module adds 1, increases the index of this connecting line output terminal algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this output is changed to; For the output terminal algorithm of this connecting line, the input number with the essential information of this algorithm in described memory module adds 1, increases the index of this connecting line input end algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this input is changed to.
In the present embodiment, described configuration module just specifically can comprise: first, second algorithm configuration unit;
The described first algorithm configuration unit is used for described minimum index as current minimum value, travel through all algorithms in the described memory module by described index, when finding first algorithm, the execution sequence of first algorithm that found number is configured to current minimum value, then current minimum value is added 1 back and continue traversal, traversal is finished and is started the described second algorithm configuration unit;
The described second algorithm configuration unit is used for described largest index as current maximal value, travel through all algorithms in the described memory module by described index, when finding second algorithm, the execution sequence of second algorithm that found number is configured to current maximal value, then current maximal value is subtracted 1 back and continue traversal, traversal is finished and is started described first spider module.
During practical application, also can the first second algorithm configuration cell operation, start the first algorithm configuration unit after finishing, described first spider module of the startup first algorithm configuration unit is finished after; Or first, second algorithm configuration unit concurrent working, start described first spider module after finishing.
Other realizes that details can be described with embodiment one.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and carry out by calculation element, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection domain of claim of the present invention.
Claims (10)
1. the method for a placement algorithm execution sequence number comprises:
A, extraction and the essential information of preserving algorithm among the steering logic figure comprise whether index, the I/O number of each algorithm, the index of I/O algorithm, the I/O line of algorithm is tracker wire;
B, according to the index ergodic algorithm, find all first, second algorithms; Be followed successively by execution sequence that each described first algorithm configuration begins to increase progressively from minimum index number according to indexed sequential; Be followed successively by execution sequence that each described second algorithm configuration begins to successively decrease from largest index number by the reverse indexing order;
Described first algorithm is perhaps exported the algorithm that line is a tracker wire for not output; Described second algorithm is not input, and perhaps input link is the algorithm of tracker wire;
C, begin each output, all carry out one time steps d when traversing each output of each algorithm by index traversal the first half algorithm from minimum index; Execution in step e after traversal is finished;
If the output algorithm of this output of d does not have execution sequence number, then, after the configuration described current minimum value is added 1 for this output algorithm configuration adds the execution sequence number of 1 beginning from described current minimum value;
The output line that judges whether this output is not that tracker wire and this output are not in the connection circulation, is not then to travel through next output;
If the execution sequence that then judges whether this output algorithm is number greater than this algorithm, and in output algorithm, be minimum greater than this algorithm, be then to travel through next output after the execution sequence number exchange with this output algorithm and this algorithm, export otherwise directly travel through the next one;
E, travel through each input of each algorithm according to described index, step f the time is all carried out one time in each input that traverses each algorithm; After finishing, traversal finishes;
F, when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence of the input algorithm of this input number, and the execution sequence of this input algorithm number is maximum in the input algorithm of all execution sequences number less than this algorithm, then will import the exchange of execution sequence number with this algorithm of algorithm; The next input of traversal then.
2. the method for claim 1 is characterized in that, in the described steps d, after the execution sequence number exchange with this output algorithm and this algorithm, also comprises step before the next output of traversal:
From this output algorithm,, all carry out one time step f when traversing each input of each algorithm according to execution sequence traversal each input of having distributed the algorithm of execution sequence number number back to front; After finishing, traversal exports by the index traversal is next.
3. the method for claim 1 is characterized in that, among the described step c, after traversal is finished, also comprises step before execution in step e:
If the number of described second algorithm of g is greater than 0, be the algorithm that described maximum execution sequence number deducts described current minimum value then from index, travel through this algorithm and each output of each algorithm thereafter by index, steps d the time is all carried out one time in each output that traverses each algorithm; Execution in step e after traversal is finished.
4. as each described method in the claim 1 to 3, it is characterized in that described step a comprises:
A1, travel through all algorithms in the steering logic figure in proper order according to picture, index, the initial value of preserving each algorithm in internal memory are 0 I/O number, temporary transient is the index of the I/O algorithm of sky, is defaulted as the trace labelling of each I/O of non-tracking;
A2, isolate tracker wire and be connected the pel that does not need algorithm execution sequence number, put out algorithm in order and carry out flow process trunk figure;
A3, carry out among the flow process trunk figure, travel through all connecting lines at described algorithm;
If the connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, the output number with the essential information of this algorithm in internal memory adds 1, increases the index of this connecting line output terminal algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this output is changed to; For the output terminal algorithm of this connecting line, the input number with the essential information of this algorithm in internal memory adds 1, increases the index of this connecting line input end algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this input is changed to.
5. as each described method in the claim 1 to 3, it is characterized in that described step b comprises:
B1, with described minimum index as current minimum value, by all algorithms in the described index traversal internal memory, when finding first algorithm, the execution sequence of first algorithm that found number is configured to current minimum value, then current minimum value is added 1 back and continue traversal, finish up to traversal;
B2, with described largest index as current maximal value, by all algorithms in the described index traversal internal memory, when finding second algorithm, the execution sequence of second algorithm that found number is configured to current maximal value, then current maximal value is subtracted 1 back and continue traversal, finish up to traversal.
6. the device of a placement algorithm execution sequence number is characterized in that, comprising:
First, second configuration module, first, second spider module, memory module, first configuration module;
Extraction module is used for extracting the essential information of depositing steering logic figure algorithm, comprises whether index, the I/O number of each algorithm, the index of I/O algorithm, the I/O line of algorithm is tracker wire, and is kept in the described memory module; Start described configuration module just after finishing;
Described configuration module just is used for traveling through according to index the algorithm of described memory module, find all first, second algorithms, be followed successively by execution sequence that each described first algorithm configuration begins to increase progressively from minimum index number according to indexed sequential, be followed successively by execution sequence that each described second algorithm configuration begins to successively decrease from largest index number by the reverse indexing order, start described first spider module after finishing; Described first algorithm is perhaps exported the algorithm that line is a tracker wire for not output; Described second algorithm is not input, and perhaps input link is the algorithm of tracker wire;
Described first spider module is used for beginning to travel through by index each output of described memory module the first half algorithm from minimum index, and described first configuration module time is all called once in each output that traverses each algorithm; After finishing, traversal starts described second spider module;
Described first configuration module is used for when the output algorithm of this output does not have execution sequence, for the configuration of this output algorithm adds the execution sequence number of 1 beginning from described current minimum value, after the configuration described current minimum value is added 1; The output line that judges whether this output is not that tracker wire and this output are not in the connection circulation, is not then to notify the module traversal of calling this module next output; If the execution sequence that then judges whether this output algorithm is number greater than this algorithm, and in output algorithm, be minimum greater than this algorithm, be then the execution sequence of this output algorithm in the described memory module and this algorithm number to be exchanged, notice is called the next output of module traversal of this module then, otherwise direct notice is called the next output of module traversal of this module;
Described second spider module is used for traveling through according to described index each input of described each algorithm of memory module, and described second configuration module time is all called once in each input that traverses each algorithm;
Described second configuration module is used for when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence of the input algorithm of this input number, and the execution sequence of this input algorithm number is maximum in the input algorithm of all execution sequences number less than this algorithm, then with the exchange with this algorithm of execution sequence number that should the input algorithm in the described memory module, notice is called next input of module traversal of this module.
7. device as claimed in claim 6 is characterized in that:
Described first configuration module also is used for after the execution sequence number exchange with output algorithm and this algorithm, before notice is called the next output of module traversal of this module, from this output algorithm, according to execution sequence traversal each input of having distributed the algorithm of execution sequence number number back to front, all call once described second configuration module when traversing each input of each algorithm; After finishing, traversal reinforms the next output of module traversal of calling this module.
8. device as claimed in claim 6 is characterized in that, also comprises:
The 3rd spider module;
Described first spider module also is used for after traversal is finished, start second spider module before, if the number of described second algorithm, is then called described the 3rd spider module greater than 0; After receiving the notice that described the 3rd spider module traversal is finished, restart described second spider module;
It is the algorithm that described maximum execution sequence number deducts described current minimum value that described the 3rd spider module is used for from index, travel through this algorithm in the described memory module and each output of each algorithm thereafter by index, all call once described first configuration module when traversing each output of each algorithm; After finishing, traversal notifies described first spider module.
9. as each described device in the claim 6 to 8, it is characterized in that described extraction module comprises:
Initialization unit, be used for traveling through all algorithms in the steering logic figure in proper order according to picture, index, the initial value of preserving each algorithm in described memory module are 0 I/O number, temporary transient is the index of the I/O algorithm of sky, is defaulted as the trace labelling of each I/O of non-tracking;
Separative element is used to isolate tracker wire and has been connected the pel that does not need algorithm execution sequence number, puts out algorithm in order and carries out flow process trunk figure;
Updating block is used for carrying out flow process trunk figure at described algorithm, travels through all connecting lines; If the connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, the output number with the essential information of this algorithm in described memory module adds 1, increases the index of this connecting line output terminal algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this output is changed to; For the output terminal algorithm of this connecting line, the input number with the essential information of this algorithm in described memory module adds 1, increases the index of this connecting line input end algorithm, if connecting line is a tracker wire, it is to follow the tracks of that the trace labelling of this input is changed to.
10. as each described device in the claim 6 to 8, it is characterized in that described configuration module just comprises: first, second algorithm configuration unit;
The described first algorithm configuration unit is used for described minimum index as current minimum value, travel through all algorithms in the described memory module by described index, when finding first algorithm, the execution sequence of first algorithm that found number is configured to current minimum value, then current minimum value is added 1 back and continue traversal, start the second algorithm configuration unit after traversal is finished;
The described second algorithm configuration unit is used for described largest index as current maximal value, travel through all algorithms in the described memory module by described index, when finding second algorithm, the execution sequence of second algorithm that found number is configured to current maximal value, then current maximal value is subtracted 1 back and continue traversal, start described first spider module after finishing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010209737.6A CN102298653B (en) | 2010-06-25 | 2010-06-25 | Method and device for configuring algorithm execution sequence number |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010209737.6A CN102298653B (en) | 2010-06-25 | 2010-06-25 | Method and device for configuring algorithm execution sequence number |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102298653A true CN102298653A (en) | 2011-12-28 |
CN102298653B CN102298653B (en) | 2015-07-22 |
Family
ID=45359067
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010209737.6A Active CN102298653B (en) | 2010-06-25 | 2010-06-25 | Method and device for configuring algorithm execution sequence number |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102298653B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108228409A (en) * | 2017-12-29 | 2018-06-29 | 南京国电南自维美德自动化有限公司 | A kind of algorithm performs based on signal stream are sequentially generated method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1423772A (en) * | 1999-11-22 | 2003-06-11 | 特博数据实验室公司 | Information processing system |
CN1488091A (en) * | 2000-12-21 | 2004-04-07 | Cp8技术公司 | Method for making secure a logical or mathematical operator in a microprocessor-based electronic module |
CN101617328A (en) * | 2006-12-22 | 2009-12-30 | 新加坡技术动态私人有限公司 | The automatic configuration method and the device that in problem solving environment, are used for meta-heuristic algorithms |
-
2010
- 2010-06-25 CN CN201010209737.6A patent/CN102298653B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1423772A (en) * | 1999-11-22 | 2003-06-11 | 特博数据实验室公司 | Information processing system |
CN1488091A (en) * | 2000-12-21 | 2004-04-07 | Cp8技术公司 | Method for making secure a logical or mathematical operator in a microprocessor-based electronic module |
CN101617328A (en) * | 2006-12-22 | 2009-12-30 | 新加坡技术动态私人有限公司 | The automatic configuration method and the device that in problem solving environment, are used for meta-heuristic algorithms |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108228409A (en) * | 2017-12-29 | 2018-06-29 | 南京国电南自维美德自动化有限公司 | A kind of algorithm performs based on signal stream are sequentially generated method |
Also Published As
Publication number | Publication date |
---|---|
CN102298653B (en) | 2015-07-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9769084B2 (en) | Optimizing placement of virtual machines | |
CN101685388B (en) | Method and device for executing comparison operation | |
CN105159777A (en) | Process memory collection method and apparatus | |
CN109101611A (en) | File system directories maximize test method, device, terminal and storage medium | |
CN104375866B (en) | The driving update method and device of a kind of veneer | |
CN104461710A (en) | Method and device for processing tasks | |
CN110399977A (en) | Pond arithmetic unit | |
CN101615130B (en) | Service function management system and method | |
CN105867944A (en) | Web front-end terminal operating layer and implementing method thereof | |
CN104572994B (en) | Method and apparatus for searching for data | |
CN110351397A (en) | A kind of method and device matching IP network section | |
CN103905310B (en) | Message processing method and forwarding device | |
CN108021405A (en) | The driving method and device of storage medium in a kind of SOC system starting process | |
CN109800074A (en) | Task data concurrently executes method, apparatus and electronic equipment | |
CN102298653A (en) | Method and device for configuring algorithm execution sequence number | |
CN111666150B (en) | Storage space allocation method and device, terminal and computer readable storage medium | |
CN104050189B (en) | The page shares processing method and processing device | |
CN117215491A (en) | Rapid data access method, rapid data access device and optical module | |
CN104461938B (en) | Method for reading data and device | |
CN102571965B (en) | Method and device for starting service group in high-availability cluster | |
US20170090820A1 (en) | Method and device for operating a many-core system | |
CN101546271B (en) | Register allocation method for super block in dynamic binary translation system. | |
CN106294143A (en) | The adjustment method of the depositor of chip and device | |
CN101191802B (en) | Electric energy metering chip creeping prevention method | |
CN106557430A (en) | A kind of data cached brush method and device |
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 |