An Iterative Method for Network-on-Chip IP Core Mapping Problem

By using a strategy model to guide iterative search in the on-chip network IP core mapping problem, the performance and inefficiency problems caused by the iterative improvement method relying on random search is solved, and more efficient mapping solution improvement is achieved.

CN119363649BActive Publication Date: 2025-02-25JIMEI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411932394.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-02-25
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In the prior art, when iterative improvement methods are used to solve the problem of on-chip IP core mapping, they rely on random search technology, resulting in low performance and search efficiency.

Method used

The strategy model is used to guide the iterative search process, and the strategy model is implemented by defining the mapping solution and the exchange sequence, using neural networks, and using reinforcement learning to train model parameters, select the exchange sequence and update its probability to improve the mapping solution.

Benefits of technology

The performance and search efficiency of iterative improvement methods are improved, the quality of the initial mapping solution can be more effectively improved, and the method is more flexible and generalized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363649B_ABST
    Figure CN119363649B_ABST
Patent Text Reader

Abstract

The present invention proposes an iterative method for the on-chip network IP core mapping problem, including constructing a strategy model, wherein the strategy model includes defining a mapping solution and an exchange sequence, wherein the exchange sequence includes an exchange operation, and the exchange operation is used to exchange the values ​​of two different positions in the mapping solution, wherein one mapping solution corresponds to more than one exchange sequence, and one exchange sequence is assigned a probability; selecting an exchange sequence for the current mapping solution according to the probability of the exchange sequence; applying the selected exchange sequence to the current mapping solution to generate a new mapping solution; and updating the probability of the exchange sequence, specifically including: judging whether the new mapping solution is a better mapping solution according to the communication cost of the mapping solution, and if so, assigning a probability higher than the previous probability to the selected exchange sequence; if not, assigning a probability lower than the previous probability to the selected exchange sequence. The strategy model is used to guide the iterative search process, thereby more effectively improving the quality of the initial solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network on chip technology, and in particular to an iterative method for network on chip IP core mapping problem. Background Art

[0002] With the development of large-scale integrated circuit technology, the number of IP cores on a chip and the communication requirements are increasing. In the face of the high-speed communication requirements between multiple IP cores on a chip, network-on-chip (NoC) came into being and became a candidate for on-chip communication architecture.

[0003] The main goal of the IP core mapping problem is to reasonably allocate a given set of IP cores to the nodes of the NoC. A high-quality mapping solution can significantly improve performance indicators, such as reducing the communication cost and communication energy consumption of the on-chip network. Therefore, IP core mapping is a key step in the design of on-chip networks.

[0004] However, the IP core mapping problem has been proven to be an NP-hard problem. Because the IP core mapping problem is an important and challenging problem, exploring efficient solutions to the IP core mapping problem has become a research hotspot in the field of on-chip networks. Traditional heuristic algorithms are favored and paid attention to by researchers because of their versatility.

[0005] In the constructive heuristic algorithm, an initial mapping solution is generally constructed based on nodes or edges, and then the quality of the initial mapping solution is further improved through iterative improvement methods. Due to the complexity of the IP core mapping problem, the constructed initial mapping solution is generally still a certain distance away from the optimal mapping solution. The iterative improvement method can improve the initial mapping solution by executing a specific search strategy and find a better mapping solution within a reasonable time. However, the iterative improvement method usually requires a lot of trial and error, and the mapping solution obtained depends largely on the random search technology, which also greatly limits the overall performance of the iterative improvement method. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to propose an iterative method for the on-chip network IP core mapping problem, using a strategy model to guide the iterative search process, and improving the performance and search efficiency of the iterative improvement method in the existing IP core mapping problem.

[0007] In order to achieve the above object, the technical solution adopted by the present invention is:

[0008] A strategy model for on-chip network IP core mapping problem, including:

[0009] Define the mapping solution and the exchange sequence:

[0010] The mapping solution is expressed as ,in, is the mapping solution, is the size of the IP core mapping problem, Indicates that the IP core Assigned to NoC topology nodes It should be noted that in the present invention Indicates the position in the corresponding sequence and is used as an index when traversing the elements in the sequence. , For the mapping solution The position in the sequence can be inferred similarly for different sequences.

[0011] The exchange sequence is represented as ,in, For the exchange sequence, is a swap operation, which means swapping the first Position and The value of the position, is the number of swap operations, is the sequence number of the exchange operation; one mapping solution corresponds to more than one exchange sequence, and one exchange sequence is assigned a probability;

[0012] Selecting an exchange sequence for the current mapping solution according to the probability of the exchange sequence;

[0013] Apply the selected exchange sequence to the current mapping solution to generate a new mapping solution;

[0014] Updating the probability of the exchange sequence specifically includes: judging whether the new mapping solution is a better mapping solution according to the communication cost of the mapping solution, and if so, assigning a probability higher than the previous probability to the selected exchange sequence; if not, assigning a probability lower than the previous probability to the selected exchange sequence.

[0015] Optionally, the exchange sequence corresponding to the mapping solution is obtained according to the mapping solution and the required number of exchange operations.

[0016] Optionally, the probability of the exchange sequence is obtained by multiplying the probabilities of each exchange operation in the exchange sequence.

[0017] Another technical solution adopted by the present invention is:

[0018] An iterative method for a network-on-chip IP core mapping problem, comprising:

[0019] S1: Build the above strategy model;

[0020] S2: pre-training the strategy model;

[0021] S3: setting an initial mapping solution for the on-chip network IP core mapping to be iterated as the global optimal solution;

[0022] S4: Use the trained strategy model to select the exchange sequence for the global optimal solution;

[0023] S5: Applying the selected exchange sequence to the global optimal solution to obtain a new mapping solution;

[0024] S6: updating the global optimal solution, specifically including: determining whether the new mapping solution is a better mapping solution, if so, updating the new mapping solution to the global optimal solution; if not, maintaining the previous global optimal solution;

[0025] S7: Check the termination condition, which is that the preset maximum number of iterations is reached, or the number of consecutive times of not updating the global optimal solution reaches a preset number. If the termination condition is met, the iteration ends. If the termination condition is not met, return to step S4.

[0026] Optionally, the strategy model is implemented by a neural network, and step S1 includes:

[0027] The GAT network is used to encode the mapping solution to obtain the state vector of each NoC topology node under the mapping solution;

[0028] Select the initial matching degree of any two NoC topology nodes according to the state vector calculation of the NoC topology nodes;

[0029] The initial matching degree is processed by a softmax function to obtain a matching degree; two NoC topology nodes are selected to correspond to the exchange operation, and the matching degree is the probability of the exchange operation;

[0030] The probability of the swap sequence is obtained by multiplying the probabilities of each swap operation in the swap sequence.

[0031] Optionally, a GAT network is used to encode the mapping solution to obtain a state vector of each NoC topology node under the mapping solution, specifically including:

[0032] definition IP cores and Representation of NoC topology nodes;

[0033] Two GAT networks are used to The representation and The representation of each NoC topology node is processed to obtain a processed representation;

[0034] Add the representation of the NoC topology node processed by the GAT network to the representation of the IP core assigned to the NoC topology node to obtain the initial state vector of each NoC topology node under the mapping solution;

[0035] The initial state vector of each NoC topology node under the mapping solution is processed by more than two modules with the same structure but different parameters to obtain the state vector of each NoC topology node under the mapping solution; the structure of the module includes: a multi-head self-attention layer and a fully connected layer, the initial state vector of each NoC topology node under the mapping solution is first input into the multi-head self-attention layer, and then enters the fully connected layer, after the multi-head self-attention layer and the fully connected layer, skip connections are respectively used, and finally layer normalization is performed to output the state vector of each NoC topology node under the mapping solution.

[0036] Optionally, the initial matching degree of any two NoC topology nodes is selected according to the state vector calculation of the NoC topology nodes, specifically including:

[0037] The information point value and attention point value are calculated for the state vector of each NoC topology node respectively. The calculation formula is as follows:

[0038]

[0039] in, To select NoC topology nodes The focus value of NoC, For The learning parameters of To select NoC topology nodes The information point value, For The learning parameters of Solve NoC topology nodes for mapping The state vector of Solve NoC topology nodes for mapping The state vector of

[0040] According to the information point value and the focus point value, the initial matching degree of any two NoC topology nodes is calculated and selected. The calculation formula is as follows:

[0041]

[0042] in, To select NoC topology nodes NoC topology nodes The initial matching degree, For control range, Indicates if.

[0043] Optionally, step S2 specifically uses the REINFORCE algorithm and the Adam optimizer to pre-train the strategy model, and the calculation formulas of the training target and the gradient of the training target are as follows:

[0044]

[0045]

[0046] in, are the model parameters of the strategy model, is the difference in communication cost between the current mapping solution and the new mapping solution generated by the current mapping solution and the exchange sequence, For training goals, Express request expectations, is the gradient of the training target, is the number of IP core mapping problems sampled independently each time during the training process. For a sampled IP core mapping problem, is the current mapping solution, For the exchange sequence, For selection The probability of is the difference in communication cost between the current mapping solution and the new mapping solution generated by the current mapping solution and the exchange sequence, is the baseline function, express The logarithm of the gradient.

[0047] Optionally, if the number of exchange sequences selected in step S4 is more than two, the number of new mapping solutions obtained in step S5 is more than two, and step S6 is:

[0048] It is determined whether there is a better mapping solution in the new mapping solution obtained in step S5. If so, the new mapping solution is updated to the global optimal solution; if not, the previous global optimal solution is maintained.

[0049] The beneficial effects of the present invention are:

[0050] The strategy model selects an exchange sequence based on the probability of the current mapping solution and the exchange sequence, and the selected exchange sequence acts on the current mapping solution to generate a new mapping solution. The probability of the exchange sequence is continuously updated to estimate how to operate the current mapping solution to obtain a higher quality solution.

[0051] The iterative method uses the empirical knowledge in the strategy model to determine the exchange sequence, and constantly moves towards the direction of the optimal solution, which can more effectively improve the quality of the initial mapping solution. In addition, the iterative method of the present invention does not directly use the model to generate the optimal mapping solution, but uses the model to guide the direction of mapping solution improvement. Due to the complexity of the IP core mapping problem, it is very difficult to directly generate the optimal mapping solution through the model. Using the model to guide the direction of mapping solution improvement is more flexible and generalizable. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram showing that a swap sequence according to an embodiment of the present invention acts on a mapping solution to generate a new mapping solution;

[0053] Figure 2 FIG. 1 is a flow chart of an iterative method for solving the IP core mapping problem of a network on chip according to an embodiment of the present invention;

[0054] Figure 3 FIG. 4 is a schematic diagram of the architecture of the policy model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to more clearly understand the technical content, achieved purposes and effects of the present invention, the present invention is described in detail below in conjunction with specific implementation methods and in conjunction with the accompanying drawings. It should be noted that, in the absence of conflict, the implementation methods of the present invention and the features in the implementation methods can be combined with each other. In the following description, many specific details are set forth in order to fully understand the present invention. The described implementation methods are only part of the implementation methods of the present invention, rather than all implementation methods. Based on the implementation methods in the present invention, all other implementation methods obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.

[0056] Please refer to Figure 1 As shown, the first embodiment of the present invention is:

[0057] A strategy model for on-chip network IP core mapping problem, including:

[0058] Define the mapping solution and the exchange sequence:

[0059] The mapping solution is expressed as ,in, is the mapping solution, ( is a positive integer greater than or equal to 2) is the scale of the IP core mapping problem, Indicates that the IP core Assigned to NoC topology nodes The mapping of For the mapping solution Position in the sequence.

[0060] The exchange sequence is represented as ,in, For the exchange sequence, is a swap operation, which means swapping the first Position and The value of the position is kept constant while the values ​​of other positions are kept constant. ( is a positive integer greater than or equal to 1) is the number of swap operations, is the sequence number of the exchange operation; one mapping solution corresponds to more than one exchange sequence, and the exchange sequence corresponding to the mapping solution is obtained according to the mapping solution and the number of exchange operations required. A probability is assigned to an exchange sequence, and the probability of the exchange sequence represents the probability of the exchange sequence being selected by the mapping solution. The probability of the exchange sequence is obtained by multiplying the probabilities of each exchange operation in the exchange sequence.

[0061] For the convenience of subsequent explanation, the mapping solution is defined as , exchange sequence , exchange sequence Probability , exchange sequence Acting on the mapping solution Generate mapping solution , the conversion process is expressed as For example, if and ,but ,like Figure 1 Assume that the exchange sequence In Swap Operation are determined one by one, and the Switch operation selection The possibility is expressed as probability Then, the mapping solution Select the exchange sequence Probability It can be expressed as shown in formula (1):

[0062] (1)

[0063] According to the probability of exchanging sequences Solution for the current mapping Select the exchange sequence .

[0064] The selected exchange sequence Acts on the current mapping solution Generate new mapping solutions .

[0065] Update exchange sequence The probability of The communication cost of determining the new mapping solution Is it a better mapping solution? If so, what is the exchange sequence selected? Assign a probability higher than the previous probability; if not, then the selected exchange sequence Assign a lower probability than the previous probability. Therefore, the probability Describes the mapping solution The probability distribution of the optimal exchange sequence.

[0066] Please refer to Figure 2 and Figure 3 , Embodiment 2 of the present invention is:

[0067] An iterative method for a network-on-chip IP core mapping problem, comprising:

[0068] S1: Construct the strategy model described in Example 1, wherein the strategy model is implemented by a neural network, and its network architecture includes two parts: encoding and node pair selection.

[0069] The encoding part is used to deconstruct the mapping Convert to a form more suitable for network processing. Specifically:

[0070] S11: Definition The IP core is represented as ,in, for IP cores, IP Core Communication requirements with other IP cores, For the mapping solution Position in the sequence; The representation of a NoC topology node is ,in, for NoC topology nodes, NoC topology node The routing distance to other NoC topology nodes, For the mapping solution The size of the IP core mapping problem is The mapping solution Indicates that IP cores are allocated to NoC topology nodes.

[0071] S12: Two GAT networks (graph attention network) are used to analyze the The representation and The representation of each NoC topology node is processed to obtain the processed The IP core is represented by , The NoC topology nodes are represented as , for The GAT network is used to represent the IP core and NoC topology nodes. The GAT network uses the attention mechanism to weight the contribution of adjacent nodes and can better represent the characteristics of the nodes.

[0072] S13: Next, the encoding mapping solution Representation of . Mapping solution is through Swap Operation Acting on the mapping solution Therefore, the NoC topology nodes processed by the GAT network are Representation With the NoC topology node Assigned IP core Representation Add, the calculation method is shown in formula (2), and the mapping solution is obtained The state vector of each NoC topology node is (corresponding to the initial state vector mentioned above).

[0073] (2)

[0074] S14: The state vector of each NoC topology node The state vector of each NoC topology node under the mapping solution is obtained by processing K (K is an integer greater than or equal to 2) modules with the same structure but different parameters. ; The structure of the module includes: a multi-head self-attention layer and a fully connected layer, and the mapping solves the state vector of each NoC topology node First, it is input into the multi-head self-attention layer, and then enters the fully connected layer. After the multi-head self-attention layer and the fully connected layer, skip connections are used, specifically residual connections. Finally, the state vector of each NoC topology node is mapped and solved after layer normalization. .like Figure 3 FIG. 4 is a schematic diagram of the architecture of the policy model of this embodiment, where K× represents K.

[0075] The node pair selection part is based on the mapping solution Generate the probability of selecting each node pair. Specifically include:

[0076] S15: Calculate the information point value and the attention point value for the state vector of each NoC topology node, as shown in formula (3):

[0077] (3)

[0078] in, To select NoC topology nodes The focus value of NoC, For The learning parameters of To select NoC topology nodes NoC The information point value, For The learning parameters of Solve NoC topology nodes for mapping The state vector of Solve NoC topology nodes for mapping The state vector of .

[0079] S16: According to the information point value and the focus point value, the matching degree of any two NoC topology nodes is selected by calculating the single-head attention formula (corresponding to the above initial matching degree), as shown in formula (4):

[0080] (4)

[0081] in, For control range, Indicates if.

[0082] S17: Using a softmax function (normalized exponential function) to process the initial matching degree to obtain a matching degree , as shown in formula (5); select two NoC topology nodes corresponding to the exchange operation, the matching degree Represents each node pair The probability of being selected is also used to indicate the selection of exchange operations The probability of . Then the probability , that is, by Swap Operation Acting on the mapping solution Get the mapping solution Select the swap operation The probability can be used It can be expressed as shown in formula (6).

[0083] (5)

[0084] (6)

[0085] S18: According to the mapping solution and the number of exchange operations required for the mapping solution, the corresponding exchange sequence can be obtained. , because it contains Swap Operation , and are determined one by one. Execute steps S13-S17 Then, according to formula (1), the exchange sequence can be calculated Probability .

[0086] In one embodiment, the exchange sequence is defined as ,at this time, , the swap sequence contains only one swap operation , then, according to formula (1), the mapping solution Select the exchange sequence Probability It can be expressed as shown in formula (7), combined with formula (6), to obtain the exchange sequence Probability .

[0087] (7)

[0088] (8)

[0089] S2: Pre-train the policy model; specifically, use the REINFORCE algorithm (Monte Carlo policy gradient algorithm) and the Adam optimizer to train the model parameters of the policy model , by training the model parameters Maximize the training goal. Defined as a mapping solution With mapping solution The difference in communication cost is shown in formula (9). The training goal is to maximize the expected value of the reward. The calculation method of the training goal is shown in formula (10). The training set contains 100,000 groups of instances, and they are all generated by the software TGFF (Task Graph For Free), where the number of nodes of the IP core ranges from 9 to 196. The classic constructive heuristic algorithm CastNet algorithm is selected to generate the initial solution of the instance. During the training process, each independent and identically distributed sampling Independent and identically distributed IP core mapping problems and initial solutions, the gradient of the training target It can be estimated using formula (11). Finally, the model parameters of the policy model are updated according to the Adam optimizer method.

[0090] (9)

[0091] (10)

[0092] (11)

[0093] in, For mapping solution The communication cost, For mapping solution The communication cost, For training goals, is the difference in communication cost between the current mapping solution and the new mapping solution generated by the current mapping solution and the exchange sequence, are the model parameters of the strategy model, Express request expectations, is the gradient of the training target, for a sampled IP core mapping problem, is the current mapping solution, For the exchange sequence, For selection The probability of is the difference in communication cost between the current mapping solution and the new mapping solution generated by the current mapping solution and the exchange sequence, is the baseline function, express The logarithm of the gradient.

[0094] S3: Set up an initial mapping solution for the iterative NOC IP core mapping problem , as the global optimal solution The initial mapping solution can be generated using the constructive heuristic algorithm CastNet algorithm (preferably corresponding to the initialization method in the S2 training process).

[0095] S4: Use the trained strategy model to select the global optimal solution ( is a positive integer greater than or equal to 1) exchange sequence, Greater than or equal to 1; Use the strategy model to guide the selection of the exchange sequence acting on the global optimal solution: The current global optimal solution is , according to the probability sampling Exchange sequence In one specific example, .

[0096] S5: Select The exchange sequence acts on the global optimal solution to obtain a new mapping solution; the current global optimal solution is .Will Exchange sequence The global optimal solution is ,get Mapping Solution .

[0097] S6: Update the global optimal solution, specifically including: Calculate the solution generated in S6 A new mapping solution The communication cost of the new mapping solution is determined in turn to determine whether there is a better mapping solution. If so, the new mapping solution Update to the global optimal solution ; If not, keep the previous global optimal solution This process ensures the global optimal solution is the optimal mapping solution.

[0098] S7: Check the termination condition, which is that the preset maximum number of iterations is reached. , or continuously not updating the global optimal solution The number of times reaches the preset number If the termination condition is met, the iteration ends; if the termination condition is not met, the process returns to step S4.

[0099] In summary, the present invention estimates how to operate the current mapping solution through the strategy model to obtain a higher quality solution. The model-based iterative method improves the algorithm performance and search efficiency of the iterative improvement method. The existing iterative improvement method relies on random search technology, and the present invention relies on the strategy model. The present invention uses a neural network to implement the strategy model and uses reinforcement learning to train the model parameters. In the search process, the empirical knowledge in the strategy model is used to determine the exchange sequence, and the optimal solution is continuously approached, which can more effectively improve the quality of the initial mapping solution.

[0100] The present invention does not directly use the model to generate the optimal mapping solution, but uses the model to guide the direction of mapping solution improvement. Due to the complexity of the IP core mapping problem, it is very difficult to directly generate the optimal mapping solution through the model. Using the model to guide the direction of mapping solution improvement is more flexible and generalizable.

[0101] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Therefore, any modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. An iterative method for on-chip network IP core mapping problem, characterized in that: include: S1: Build a strategy model; The policy model includes: Define the mapping solution and the exchange sequence: The mapping solution is expressed as ,in, is the mapping solution, is the size of the IP core mapping problem, Indicates that the IP core Assigned to NoC topology nodes The mapping of For the mapping solution Position in the sequence; The exchange sequence is represented as ,in, For the exchange sequence, is a swap operation, which means swapping the first Position and The value of the position, is the number of swap operations, is the sequence number of the exchange operation; one mapping solution corresponds to more than one exchange sequence, and one exchange sequence is assigned a probability; Selecting an exchange sequence for the current mapping solution according to the probability of the exchange sequence; Apply the selected exchange sequence to the current mapping solution to generate a new mapping solution; Updating the probability of the exchange sequence, specifically comprising: judging whether the new mapping solution is a better mapping solution according to the communication cost of the mapping solution, and if so, assigning a probability higher than the previous probability to the selected exchange sequence; if not, assigning a probability lower than the previous probability to the selected exchange sequence; S2: pre-training the strategy model; S3: setting an initial mapping solution for the on-chip network IP core mapping to be iterated as the global optimal solution; S4: Use the trained strategy model to select the exchange sequence for the global optimal solution; S5: Applying the selected exchange sequence to the global optimal solution to obtain a new mapping solution; S6: updating the global optimal solution, specifically including: determining whether the new mapping solution is a better mapping solution, if so, updating the new mapping solution to the global optimal solution; if not, maintaining the previous global optimal solution; S7: Check the termination condition, which is that the preset maximum number of iterations is reached, or the number of consecutive times of not updating the global optimal solution reaches a preset number. If the termination condition is met, the iteration ends. If the termination condition is not met, return to step S4.

2. The iterative method for the on-chip network IP core mapping problem according to claim 1, characterized in that: The exchange sequence corresponding to the mapping solution is obtained according to the mapping solution and the required number of exchange operations.

3. The iterative method for the on-chip network IP core mapping problem according to claim 1, characterized in that: The probability of a swap sequence is obtained by multiplying the probabilities of each swap operation in the swap sequence.

4. The iterative method for the on-chip network IP core mapping problem according to claim 1, characterized in that: include: The strategy model is implemented by a neural network, and step S1 includes: The GAT network is used to encode the mapping solution to obtain the state vector of each NoC topology node under the mapping solution; Select the initial matching degree of any two NoC topology nodes according to the state vector calculation of the NoC topology nodes; The initial matching degree is processed by a softmax function to obtain a matching degree; two NoC topology nodes are selected to correspond to the exchange operation, and the matching degree is the probability of the exchange operation; The probability of the swap sequence is obtained by multiplying the probabilities of each swap operation in the swap sequence.

5. The iterative method for the on-chip network IP core mapping problem according to claim 4, characterized in that: The GAT network is used to encode the mapping solution to obtain the state vector of each NoC topology node under the mapping solution, including: definition IP cores and Representation of NoC topology nodes; Two GAT networks are used to The representation and The representation of each NoC topology node is processed to obtain a processed representation; Add the representation of the NoC topology node processed by the GAT network to the representation of the IP core assigned to the NoC topology node to obtain the initial state vector of each NoC topology node under the mapping solution; The initial state vector of each NoC topology node under the mapping solution is processed by more than two modules with the same structure but different parameters to obtain the state vector of each NoC topology node under the mapping solution; the structure of the module includes: a multi-head self-attention layer and a fully connected layer, the initial state vector of each NoC topology node under the mapping solution is first input into the multi-head self-attention layer, and then enters the fully connected layer, after the multi-head self-attention layer and the fully connected layer, skip connections are respectively used, and finally layer normalization is performed to output the state vector of each NoC topology node under the mapping solution.

6. The iterative method for the on-chip network IP core mapping problem according to claim 5, characterized in that: The initial matching degree of any two NoC topology nodes is selected based on the state vector calculation of the NoC topology nodes, specifically including: The information point value and attention point value are calculated for the state vector of each NoC topology node respectively. The calculation formula is as follows: in, To select NoC topology nodes The focus value, For The learning parameters of To select NoC topology nodes The information point value, For The learning parameters of Solve NoC topology nodes for mapping The state vector of Solve NoC topology nodes for mapping The state vector of According to the information point value and the focus point value, the initial matching degree of any two NoC topology nodes is calculated and selected. The calculation formula is as follows: in, To select NoC topology nodes NoC topology nodes The initial matching degree, For control range, Indicates if.

7. The iterative method for the on-chip network IP core mapping problem according to claim 5, characterized in that: In step S2, the REINFORCE algorithm and the Adam optimizer are used to pre-train the strategy model. The calculation formulas of the training target and the gradient of the training target are as follows: in, are the model parameters of the strategy model, is the difference in communication cost between the current mapping solution and the new mapping solution generated by the current mapping solution and the exchange sequence, For training goals, Express request expectations, is the gradient of the training target, is the number of IP core mapping problems sampled independently each time during the training process. For a sampled IP core mapping problem, is the current mapping solution, For the exchange sequence, For selection The probability of is the difference in communication cost between the current mapping solution and the new mapping solution generated by the current mapping solution and the exchange sequence, is the baseline function, express The logarithm of the gradient.

8. The iterative method for on-chip network IP core mapping problem according to claim 1, characterized in that: If the number of exchange sequences selected in step S4 is more than two, the number of new mapping solutions obtained in step S5 is more than two, and step S6 is: It is determined whether there is a better mapping solution in the new mapping solution obtained in step S5. If so, the new mapping solution is updated to the global optimal solution; if not, the previous global optimal solution is maintained.

Citation Information

Patent Citations

  • NoC (network-on-chip) mapping method based on discrete firefly algorithm

    CN104079439A

  • IP core mapping method, medium, device and system

    CN117873952A