IP core parameter updating method and device, terminal equipment and storage medium
By building a topology diagram to determine the node and directional relationship of IP core parameters, the automatic update of IP core parameters is achieved, the problem of low parameter configuration accuracy is solved, and the configuration accuracy is improved.
Patent Information
- Application Number
- CN202510522718.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-15
AI Technical Summary
During the existing IP core parameter configuration process, the parameters change unclearly when the parameter is updated, resulting in low configuration accuracy and difficulty in locate the root cause of the problem.
By building a topology diagram, the node and directional relationship of IP core parameters are determined based on the basic parameter source file and parameter relationship source file, and automated updates are achieved.
It improves the accuracy of IP core parameter configuration, quickly determines the path affected by the update parameters and synchronizes the relevant parameters, reducing the error of manual adjustment.
Smart Images

Figure CN120493833A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of FPGA technology, and in particular to an IP core parameter updating method, device, terminal equipment and storage medium. Background Art
[0002] Traditional electronic design automation software (EDA) contains multiple IP cores, which are pre-designed circuit function modules in integrated circuit chips in the semiconductor industry. When EDA software supports the IP core configuration function, the IP designer must first provide a detailed description document to describe the configuration items and provide source files, and then the software personnel must implement it with code based on the document. Since the source files involve many parameters and complex relationships, the existing IP core parameters can only be configured manually. When a certain parameter is updated, the user is not clear about the other parameters related to the updated parameter. When the IP core function has problems due to parameter updates, it is difficult for developers to locate the root cause of the problem. In summary, the existing IP cores have the problem of unclear parameter changes when updating parameters, resulting in a low accuracy rate in the IP core parameter configuration.
[0003] Therefore, there is an urgent need for an IP core parameter update strategy to solve the problem of low accuracy of IP core parameter configuration. Summary of the Invention
[0004] Embodiments of the present invention provide an IP core parameter updating method, apparatus, terminal device, and storage medium to solve the problem of low accuracy of IP core parameter configuration.
[0005] In order to solve the above problem, an embodiment of the present invention provides an IP core parameter updating method, comprising:
[0006] Responding to user operations, determining update parameters of the target IP core;
[0007] Determine the update path corresponding to the update parameter according to the topology map, and update each node on the update path in the topology map; wherein, obtaining the topology map includes: performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain a parameter relationship directed graph corresponding to the target IP core; performing point reduction processing on the parameter relationship directed graph through a preset algorithm to obtain a topology map corresponding to the target IP core; the topology map includes: a plurality of nodes; determining one or more parameters corresponding to each node according to the basic parameter source file, and determining the pointing relationship between each node according to the parameter relationship source file.
[0008] As an improvement to the above solution, the method of performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain a parameter relationship directed graph corresponding to the target IP core includes:
[0009] According to the parameter relationship source file, obtaining the parameter relationship between each parameter in the basic parameter source file;
[0010] Repeat the node division operation according to the parameter relationship between each parameter and each parameter. After the node division operation is performed on all parameters, the node division operation is stopped. Each parameter is used as a graph node, and the pointing relationship between each graph node is determined according to the type of each graph node. The types of graph nodes include: child nodes and parent nodes. The graph node of the parent node type points to the graph node of the child node type.
[0011] A parameter relationship directed graph is constructed based on each graph node and the directional relationship between each graph node.
[0012] As an improvement to the above solution, the node partitioning operation includes:
[0013] Selecting a target parameter from the parameters for which the node division operation has not been performed;
[0014] Divide the target parameter into graph nodes of the child node type, and determine whether the target parameter has dependent parameters based on the parameter relationship between each parameter; wherein the target parameter is determined based on the calculation results of the dependent parameters;
[0015] If so, then each dependent parameter that has not been divided into a graph node is used as a graph node of the child node type corresponding to the virtual root node, and the graph node corresponding to each dependent parameter that has been divided into a graph node is used as a graph node of the parent node type corresponding to the target parameter, and the next node division operation is performed;
[0016] If not, the virtual root node is used as the graph node of the parent node type corresponding to the target parameter, and the next node splitting operation is performed.
[0017] As an improvement to the above solution, the types of nodes include: single parameter nodes and ring nodes; the parameter relationship directed graph is subjected to point reduction processing by a preset algorithm to obtain a topology graph corresponding to the target IP core, including:
[0018] Determining a plurality of strongly connected components according to a directional relationship between each graph node in the parameter relationship directed graph;
[0019] All graph nodes in the same strongly connected component are shrunk using a preset algorithm to obtain ring nodes. Each strongly connected component containing multiple graph nodes corresponds to a ring node.
[0020] Treat the strongly connected component containing a single graph node as a single-parameter node;
[0021] Based on the pointing relationship between each graph node, each ring node, and each single parameter node in the parameter relationship directed graph, a topology graph corresponding to the target IP core is obtained.
[0022] As an improvement to the above solution, determining the update path corresponding to the update parameter according to the topology map, and updating each node on the update path in the topology map, includes:
[0023] Determining an update path for the update parameters according to the topological order of the topological graph;
[0024] According to the parameter calculation relationship between each node, the graph update operation is sequentially performed on each node on the update path of the updated parameters. After all nodes are updated, the graph update operation is stopped and the update of each node on the update path in the topology graph is completed;
[0025] The graph update operation is specifically as follows:
[0026] Judge the current node;
[0027] If it is a ring node, all graph nodes in the ring node are updated based on the parameter calculation relationship of each graph node in the ring node. After the ring node update is completed, the next graph update operation is executed;
[0028] If it is a single-parameter node, the single-parameter node is directly updated. After the single-parameter node is updated, the next graph update operation is executed.
[0029] As an improvement to the above solution, the updating of all graph nodes within the ring node includes:
[0030] The ring update operation is performed on all graph nodes in the ring node in sequence. When all graph nodes have been updated and the updated values of all graph nodes are the same as the values updated in the previous round, the ring update operation is stopped and the ring node update is completed.
[0031] The ring update operation is specifically as follows:
[0032] Selecting a graph node to be updated from the graph nodes that have not performed the ring update operation;
[0033] Determine whether all graph nodes of the parent node type corresponding to the graph node to be updated have been updated, or whether all graph nodes of the ring node where the graph node to be updated is located have been marked as visited;
[0034] If all graph nodes of the parent node type corresponding to the graph node to be updated have been updated and all graph nodes of the ring node where the graph node to be updated is located have been marked as visited, then the graph node to be updated is updated based on the parameter calculation relationship of each graph node in the ring node;
[0035] If all graph nodes of the parent node type corresponding to the graph node to be updated have not been updated, and all graph nodes of the ring node where the graph node to be updated is located have not been marked as visited, then the ID of the graph node to be updated is recorded and marked as visited.
[0036] As an improvement to the above solution, the updating of all graph nodes within the ring node also includes: when the updated value of a graph node is different from the value updated in the previous round, stopping the updating of each node on the update path in the topology graph and reporting an error.
[0037] Accordingly, an embodiment of the present invention further provides an IP core parameter updating device, comprising: a data response module and a data updating module;
[0038] The data response module is used to respond to user operations and determine the update parameters of the target IP core;
[0039] The data update module is used to determine the update path corresponding to the update parameters according to the topology map, and update each node on the update path in the topology map; wherein, the acquisition of the topology map includes: performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain the parameter relationship directed graph corresponding to the target IP core; performing point reduction processing on the parameter relationship directed graph through a preset algorithm to obtain the topology map corresponding to the target IP core; the topology map includes: a plurality of nodes; determining one or more parameters corresponding to each node according to the basic parameter source file, and determining the pointing relationship between each node according to the parameter relationship source file.
[0040] Correspondingly, an embodiment of the present invention also provides a computer terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements an IP core parameter update method as described in the present invention.
[0041] Correspondingly, an embodiment of the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute an IP core parameter update method as described in the present invention.
[0042] As can be seen from the above, the present invention has the following beneficial effects:
[0043] The present invention provides an IP core parameter update method, which determines each node of a topology diagram based on a basic parameter source file, and determines the directional relationship and parameter calculation relationship of each node in the topology diagram based on a parameter relationship source file, and represents the parameter relationship of each IP core parameter by constructing a topology diagram. After the update parameters are determined in response to user operations, the update path of the update parameters can be quickly obtained according to the constructed topology diagram, that is, the path that will affect the change of other parameters when the update parameters change, so that the parameters that the update parameters can affect can be quickly determined, and after the update parameters are updated, the parameters affected by the update parameter changes are synchronously updated, thereby realizing the automatic update of the IP core parameters. Compared with manual adjustment of IP core parameters, the present invention greatly improves the accuracy of IP core parameter configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 1 is a flow chart of an IP core parameter updating method provided by an embodiment of the present invention;
[0045] Figure 2 1 is a schematic structural diagram of an IP core parameter updating device provided by an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram of the structure of a terminal device provided by one embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram of the relationship between source files provided by an embodiment of the present invention;
[0048] Figure 5 This is a schematic diagram of the process of constructing a parameter relationship directed graph provided by one embodiment of the present invention;
[0049] Figure 6 This is a schematic diagram of parameter node construction directed edges provided by an embodiment of the present invention;
[0050] Figure 7 This is a schematic diagram of a directed graph of parameter relationships provided by an embodiment of the present invention;
[0051] Figure 8 This is a schematic diagram of a ring node provided by an embodiment of the present invention;
[0052] Figure 9 This is a schematic diagram of the ring node update classification provided by an embodiment of the present invention;
[0053] Figure 10 This is a flow chart of loading initial values into a dependency graph provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0055] Example 1
[0056] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for updating IP core parameters provided by an embodiment of the present invention. Figure 1 As shown, this embodiment includes steps 101 to 102, and each step is specifically as follows:
[0057] Step 101: In response to a user operation, determining update parameters of a target IP core.
[0058] In this embodiment, the updated parameters of the target IP core are determined based on the user modifying the selected parameters in the target IP core.
[0059] Step 102: Determine the update path corresponding to the update parameter according to the topology map, and update each node on the update path in the topology map; wherein, obtaining the topology map includes: performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain a parameter relationship directed graph corresponding to the target IP core; performing point reduction processing on the parameter relationship directed graph through a preset algorithm to obtain a topology map corresponding to the target IP core; the topology map includes: a plurality of nodes; determining one or more parameters corresponding to each node according to the basic parameter source file, and determining the pointing relationship and parameter calculation relationship between each node according to the parameter relationship source file.
[0060] In a specific embodiment, the currently designed parsing tool requires IP core developers to provide three files: Component.xml (i.e., basic parameter source file), Dependency.tcl (i.e., parameter relationship source file), and Layout.tcl. Component.xml is an XML file that complies with the IP-XACT description standard, which describes in detail the important information of each key configuration parameter of the current IP core; Dependency.tcl describes the logical relationship between each key configuration parameter in the Component.xml file; Layout.tcl describes the presentation of the software user interface. The current software can generate an IP core configuration interface by parsing three key files. During use, the behavior of parsing configuration parameters is triggered by the signals and slots of the user interface, and the TCL interpreter is used to assist in expression calculation, and the parameter change results caused by the user's behavior are displayed on the corresponding controls of the configuration interface. The Design.xml in the final result file describes the configuration of the key parameters, and the next time you can read back this file to perform re-customization operations. To better illustrate the relationship between the above three files, see Figure 4 、 Figure 4 (a) is an introduction to the functions of the three source files of the current tool. Component.xml defines the properties, initial values, enabled states, etc. for all basic parameters; Dependency.tcl describes the relationship between parameters and other parameters during the configuration process, whether they are affected by other parameter values, and there may be user-assisted intermediate parameters. This file is written in TCL syntax; Layout.tcl defines the interface presentation of all basic parameters, which may be an edit box or a drop-down box. This content is defined by the IP core developer using tool-defined TCL commands. By abstracting the entire workflow, we can get Figure 4 (b) The actual interface presentation can be implemented in many ways (tool parsing, code writing, etc.), but the data relationship defined by Component.xml and Dependency.tcl will not change.
[0061] As an improvement to the above solution, the method of performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain a parameter relationship directed graph corresponding to the target IP core includes:
[0062] According to the parameter relationship source file, obtaining the parameter relationship between each parameter in the basic parameter source file;
[0063] Repeat the node division operation according to the parameter relationship between each parameter and each parameter. After the node division operation is performed on all parameters, the node division operation is stopped. Each parameter is used as a graph node, and the pointing relationship between each graph node is determined according to the type of each graph node. The types of graph nodes include: child nodes and parent nodes. The graph node of the parent node type points to the graph node of the child node type.
[0064] A parameter relationship directed graph is constructed based on each graph node and the directional relationship between each graph node.
[0065] As an improvement to the above solution, the node partitioning operation includes:
[0066] Selecting a target parameter from the parameters for which the node division operation has not been performed;
[0067] Divide the target parameter into graph nodes of the child node type, and determine whether the target parameter has dependent parameters based on the parameter relationship between each parameter; wherein the target parameter is determined based on the calculation results of the dependent parameters;
[0068] If so, then each dependent parameter that has not been divided into a graph node is used as a graph node of the child node type corresponding to the virtual root node, and the graph node corresponding to each dependent parameter that has been divided into a graph node is used as a graph node of the parent node type corresponding to the target parameter, and the next node division operation is performed;
[0069] If not, the virtual root node is used as the graph node of the parent node type corresponding to the target parameter, and the next node splitting operation is performed.
[0070] In a specific embodiment, the construction basis of the parameter relationship directed graph is specifically as follows: the value of parameter B is calculated by parameter A and parameter C, then the pointing relationship is: node A and node C each point to node B, then nodes A and C are graph nodes of the parent node type, and node B is a graph node of the child node type; the parameter calculation relationship may be the four arithmetic operations of multiple or single parameters, or it may be that the parameters are passed into a function to obtain the return value. Since the definition of each parameter in the file is not filled in sequentially according to the topological order, for the convenience of management, the top of the entire graph is managed by a virtual root node. Each time a single parameter information is traversed, a list of all parameters that affect the current parameter (such as parameter A and parameter C) is obtained. If the current parameter is not affected by other parameters, the only parent node of the node is the virtual root node; if the current parameter is affected by other parameters, the obtained list is traversed, and the nodes of these parameters are found or newly created in the current directed graph, and all of them point to the current node as parent nodes. After parsing, a directed graph describing the relationship between all parameters will be obtained.
[0071] For a better explanation, see Figure 5 The graph construction process of the parameter relationship directed graph shown.
[0072] In a specific embodiment, see Figure 6 ,The parameter relationship is described by the parameter relationship source file, and the relationship between nodes can be summarized into the following categories: 1. One-way edge: a parameter depends on the calculation result of another parameter, and the calculation is usually based on the four basic operations or functions, such as Figure 6 (a) 2. Bidirectional edge: two parameters are dependent on each other, such as the sum of the two parameters is a constant, such as Figure 6 (b). Typically, users only describe unidirectional relationships in file descriptions, so bidirectional relationships are often described as two unidirectional relationships. As can be understood, as shown in the figure, when it is a unidirectional edge relationship, parameter A is the parent node of parameter B; when it is a bidirectional edge relationship, parameter A is the parent node of parameter B, and parameter B is also the parent node of parameter A. In this case, two unidirectional edges in opposite directions are constructed between parameters A and B.
[0073] As an improvement to the above solution, the types of nodes include: single parameter nodes and ring nodes; the parameter relationship directed graph is subjected to point reduction processing by a preset algorithm to obtain a topology graph corresponding to the target IP core, including:
[0074] Determining a plurality of strongly connected components according to a directional relationship between each graph node in the parameter relationship directed graph;
[0075] All graph nodes in the same strongly connected component are shrunk using a preset algorithm to obtain ring nodes. Each strongly connected component containing multiple graph nodes corresponds to a ring node.
[0076] Treat the strongly connected component containing a single graph node as a single-parameter node;
[0077] Based on the pointing relationship between each graph node, each ring node, and each single parameter node in the parameter relationship directed graph, a topology graph corresponding to the target IP core is obtained.
[0078] In a specific embodiment, after the parameter relationship directed graph is constructed, a loop may appear in the relationship between the parameters, such as Figure 7 In (a), the parameters A, B, and C, as well as the parameters E, F, and G, each ring parameter constitutes a strongly connected component. After the graph is built, all strongly connected components (SCCs) need to be shrunk using the Tarjan algorithm (i.e., the preset algorithm described in the present invention) to obtain a directed acyclic topology graph. According to the definition of strongly connected components, the rings and parameters themselves in the original graph are each a strongly connected component. Figure 7 (a) After the contraction point, it can be abstracted into Figure 7(b) The main reason for the reduction is as follows: Every time a user modifies a control on the configuration page, it will directly affect the parameter value corresponding to the control. All parameters in the entire dependency path affected by the parameter in the graph need to be calculated and updated twice, which means that a correct update path needs to be found in the current graph. A parameter is usually affected by multiple parameters, such as Figure 7 In (a), parameter D is affected by parameters A and G. Therefore, parameter D must wait until both A and G are updated before it can be updated. To obtain the correct update path, topological sorting is often used; however, topological sorting does not allow for loops. By abstracting a loop into a single point, the correct update path can be obtained. If a loop is encountered, the parameters within the loop can be updated separately.
[0079] As an improvement to the above solution, determining the update path corresponding to the update parameter according to the topology map, and updating each node on the update path in the topology map, includes:
[0080] Determining an update path for the update parameters according to the topological order of the topological graph;
[0081] According to the parameter calculation relationship between each node, the graph update operation is sequentially performed on each node on the update path of the updated parameters. After all nodes are updated, the graph update operation is stopped and the update of each node on the update path in the topology graph is completed;
[0082] The graph update operation is specifically as follows:
[0083] Judge the current node;
[0084] If it is a ring node, all graph nodes in the ring node are updated based on the parameter calculation relationship of each graph node in the ring node. After the ring node update is completed, the next graph update operation is executed;
[0085] If it is a single-parameter node, the single-parameter node is directly updated. After the single-parameter node is updated, the next graph update operation is executed.
[0086] As an improvement to the above solution, the updating of all graph nodes within the ring node includes:
[0087] The ring update operation is performed on all graph nodes in the ring node in sequence. When all graph nodes have been updated and the updated values of all graph nodes are the same as the values updated in the previous round, the ring update operation is stopped and the ring node update is completed.
[0088] The ring update operation is specifically as follows:
[0089] Selecting a graph node to be updated from the graph nodes that have not performed the ring update operation;
[0090] Determine whether all graph nodes of the parent node type corresponding to the graph node to be updated have been updated, or whether all graph nodes of the ring node where the graph node to be updated is located have been marked as visited;
[0091] If all graph nodes of the parent node type corresponding to the graph node to be updated have been updated and all graph nodes of the ring node where the graph node to be updated is located have been marked as visited, then the graph node to be updated is updated based on the parameter calculation relationship of each graph node in the ring node;
[0092] If all graph nodes of the parent node type corresponding to the graph node to be updated have not been updated, and all graph nodes of the ring node where the graph node to be updated is located have not been marked as visited, then the ID of the graph node to be updated is recorded and marked as visited.
[0093] In a specific embodiment, for updating the graph nodes within the ring node, Figure 8 For example, the in-degree of each point is at least 1, and the computational relationship between each point and other points is regarded as a multivariate equation. The entire ring can be simply described as a multivariate equation system. Figure 8 It can be described as formula (1):
[0094]
[0095] By substituting each variable into the simplification, for any node x, if x>k:
[0096]
[0097] If x <k:
[0098]
[0099] When the upper topology node finds that the current update node is a ring, it can start from any node and substitute the calculation and update each node in turn, and determine whether there is a logical contradiction based on whether the calculation results are contradictory. Through formula (2) and formula (3), it can be found that the calculation of the nodes in the ring will eventually circle back to a certain updated node. The updated node can be compared with the current calculation result to determine whether there is a contradiction. However, the node object to be determined is not necessarily the starting point of the ring update. For example, formula (2) finally converges to A x For comparative verification, formula (3) needs to be verified by A n Therefore, in the specific implementation process, whether a ring node is a legal ring can be judged by the following conditions:
[0100] 1. All nodes in the ring are successfully updated.
[0101] 2. There are no contradictory calculation results during the update process.
[0102] As an improvement to the above solution, the updating of all graph nodes within the ring node also includes: when the updated value of a graph node is different from the value updated in the previous round, stopping the updating of each node on the update path in the topology graph and reporting an error.
[0103] In actual use, the function of this method also needs to be provided to specific developers to debug the logic between parameters. Therefore, in order to facilitate debugging, a selection will be made for the update starting point of the ring node during the implementation process.
[0104] There are two selection criteria:
[0105] 1. The current parameter node is the starting point for updating the entire graph, referred to as in-loop update.
[0106] 2. The current parameter node is not the update node for the entire graph, and to obtain the calculation result, it is necessary to rely on the parameter node outside the current loop, which is referred to as out-of-loop update.
[0107] Figure 9 The following diagram shows the update of a ring after two zoomed-in points when a parameter changes. Assuming parameter D is the update node for the entire graph, the ring node containing D needs to be updated starting from D. For the ring containing parameter nodes A, B, and C, node A is the only node that depends on parameter D outside the ring. In this case, A is selected as the update starting point for the ring in which it resides. This helps developers quickly identify the most important changing parameters for each ring node from the output log, at the cost of an additional O(n) loop traversal. After each update, the executed update path is cached, preventing repeated traversals and excessive time complexity.
[0108] In a specific embodiment, Figure 10 The entire process of loading the initial value of the graph is fully demonstrated. If the user updates a specific parameter, the update process is also the same Figure 10 Consistent. In the topology graph composed of SCC nodes obtained after zooming in, each SCC node may have a single (i.e., single parameter node) or multiple parameter nodes (i.e., ring nodes). If an SCC node contains multiple parameter nodes, there is a ring dependency in the calculation logic between these parameter nodes, which are hereinafter referred to as ring nodes. When a parameter node is modified, the SCC node where the parameter node is located is first obtained each time. If it is a ring node, the starting point is obtained according to the above method, and the logical calculation update is started in the following manner:
[0109] 1. Check whether all graph nodes that are parent nodes and correspond to the parameters to be updated have been updated.
[0110] 2. If all graph nodes of the parent node type corresponding to the parameter to be updated have not been updated, but all parameter nodes in the current ring node have been visited once, the update is forced to be performed according to the current node value.
[0111] 3. If a previously updated graph node is encountered, check whether the current updated value is consistent with the result of the previous update. If they are inconsistent, it means that there is a contradiction in the calculation logic, which is an illegal cycle. An error is reported and the calculation is stopped.
[0112] 4. All graph nodes within the ring node have been updated without error, and the current ring is a legal ring.
[0113] This data parsing mechanism enables the creation of visual tools that allow IP developers to directly debug source file accuracy, including identifying which parameters fall within a loop after parsing. IP developers can edit and assign values to any parameter, with highlighting or prompts indicating which parameters were affected and successfully updated. Errors are also detected and displayed. Because this parsing solution automatically determines the correct update sequence and executes all parameter updates, it eliminates the need for additional hidden files for readback.
[0114] See also Figure 2 , Figure 2 2 is a schematic structural diagram of an IP core parameter updating device provided by an embodiment of the present invention, comprising: a data response module 201 and a data updating module 202;
[0115] The data response module is used to respond to user operations and determine the update parameters of the target IP core;
[0116] The data update module is used to determine the update path corresponding to the update parameters according to the topology map, and update each node on the update path in the topology map; wherein, the acquisition of the topology map includes: performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain the parameter relationship directed graph corresponding to the target IP core; performing point reduction processing on the parameter relationship directed graph through a preset algorithm to obtain the topology map corresponding to the target IP core; the topology map includes: a plurality of nodes; determining one or more parameters corresponding to each node according to the basic parameter source file, and determining the pointing relationship between each node according to the parameter relationship source file.
[0117] It can be understood that the above-mentioned system embodiment corresponds to the method embodiment of the present invention, and it can implement the IP core parameter updating method provided by any of the above-mentioned method embodiments of the present invention.
[0118] This embodiment determines each node of the topology diagram based on the basic parameter source file, and determines the directional relationship and parameter calculation relationship of each node in the topology diagram based on the parameter relationship source file, and represents the parameter relationship of each IP core parameter by constructing a topology diagram. After the update parameters are determined in response to user operations, the update path of the update parameters can be quickly obtained according to the constructed topology diagram, that is, the path that will affect the change of other parameters when the update parameters change, so that the parameters that the update parameters can affect can be quickly determined, and after the update parameters are updated, the parameters affected by the update parameter changes are synchronously updated, thereby realizing the automatic update of the IP core parameters. Compared with manual adjustment of IP core parameters, the present invention greatly improves the accuracy of IP core parameter configuration.
[0119] Example 2
[0120] See also Figure 3 , Figure 3 It is a schematic diagram of the terminal device structure provided by one embodiment of the present invention.
[0121] A terminal device of this embodiment includes: a processor 301, a memory 302, and a computer program stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program, the steps of the above-mentioned IP core parameter updating method in the embodiment are implemented, for example: Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules in the above-mentioned device embodiments are realized, for example: Figure 2 The IP core parameters shown update all modules of the device.
[0122] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the IP core parameter update method described in any of the above embodiments.
[0123] Those skilled in the art will understand that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the diagram, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0124] The processor 301 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor. The processor 301 is the control center of the terminal device, connecting various parts of the entire terminal device using various interfaces and lines.
[0125] The memory 302 can be used to store the computer programs and / or modules. The processor 301 implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory 302. The memory 302 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory can include a high-speed random access memory and can also include a non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0126] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0127] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement the present invention without inventive effort.
[0128] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for updating IP core parameters, characterized in that: include: Responding to user operations, determining update parameters of the target IP core; Determine the update path corresponding to the update parameter according to the topology map, and update each node on the update path in the topology map; wherein, the acquisition of the topology map includes: performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain the parameter relationship directed graph corresponding to the target IP core; performing point reduction processing on the parameter relationship directed graph through a preset algorithm to obtain the topology map corresponding to the target IP core; the topology map includes: a plurality of nodes; determining one or more parameters corresponding to each node according to the basic parameter source file, and determining the pointing relationship and parameter calculation relationship between each node according to the parameter relationship source file.
2. The IP core parameter updating method according to claim 1, wherein: The step of performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain a parameter relationship directed graph corresponding to the target IP core includes: According to the parameter relationship source file, obtaining the parameter relationship between each parameter in the basic parameter source file; Repeat the node division operation according to the parameter relationship between each parameter and each parameter. After the node division operation is performed on all parameters, the node division operation is stopped. Each parameter is used as a graph node, and the pointing relationship between each graph node is determined according to the type of each graph node. The types of graph nodes include: child nodes and parent nodes. The graph node of the parent node type points to the graph node of the child node type. A parameter relationship directed graph is constructed based on each graph node and the directional relationship between each graph node.
3. The IP core parameter updating method according to claim 2, wherein: The node partitioning operation includes: Selecting a target parameter from the parameters for which the node division operation has not been performed; Divide the target parameter into graph nodes of the child node type, and determine whether the target parameter has dependent parameters based on the parameter relationship between each parameter; wherein the target parameter is determined based on the calculation results of the dependent parameters; If so, then each dependent parameter that has not been divided into a graph node is used as a graph node of the child node type corresponding to the virtual root node, and the graph node corresponding to each dependent parameter that has been divided into a graph node is used as a graph node of the parent node type corresponding to the target parameter, and the next node division operation is performed; If not, the virtual root node is used as the graph node of the parent node type corresponding to the target parameter, and the next node splitting operation is performed.
4. The IP core parameter updating method according to claim 3, wherein: The types of nodes include: single parameter nodes and ring nodes; the parameter relationship directed graph is subjected to point reduction processing by a preset algorithm to obtain a topology graph corresponding to the target IP core, including: Determining a plurality of strongly connected components according to a directional relationship between each graph node in the parameter relationship directed graph; All graph nodes in the same strongly connected component are shrunk using a preset algorithm to obtain ring nodes. Each strongly connected component containing multiple graph nodes corresponds to a ring node. Treat the strongly connected component containing a single graph node as a single-parameter node; Based on the pointing relationship between each graph node, each ring node, and each single parameter node in the parameter relationship directed graph, a topology graph corresponding to the target IP core is obtained.
5. The IP core parameter updating method according to claim 4, wherein: Determining an update path corresponding to the update parameter according to the topology map, and updating each node on the update path in the topology map, includes: Determining an update path for the update parameters according to the topological order of the topological graph; According to the parameter calculation relationship between each node, the graph update operation is sequentially performed on each node on the update path of the updated parameters. After all nodes are updated, the graph update operation is stopped and the update of each node on the update path in the topology graph is completed; The graph update operation is specifically as follows: Judge the current node; If it is a ring node, all graph nodes in the ring node are updated based on the parameter calculation relationship of each graph node in the ring node. After the ring node update is completed, the next graph update operation is executed; If it is a single-parameter node, the single-parameter node is directly updated. After the single-parameter node is updated, the next graph update operation is executed.
6. The IP core parameter updating method according to claim 5, wherein: The updating of all graph nodes within the ring node includes: The ring update operation is performed on all graph nodes in the ring node in sequence. When all graph nodes have been updated and the updated values of all graph nodes are the same as the values updated in the previous round, the ring update operation is stopped and the ring node update is completed. The ring update operation is specifically as follows: Selecting a graph node to be updated from the graph nodes that have not performed the ring update operation; Determine whether all graph nodes of the parent node type corresponding to the graph node to be updated have been updated, or whether all graph nodes of the ring node where the graph node to be updated is located have been marked as visited; If all graph nodes of the parent node type corresponding to the graph node to be updated have been updated and all graph nodes of the ring node where the graph node to be updated is located have been marked as visited, then the graph node to be updated is updated based on the parameter calculation relationship of each graph node in the ring node; If all graph nodes of the parent node type corresponding to the graph node to be updated have not been updated, and all graph nodes of the ring node where the graph node to be updated is located have not been marked as visited, then the ID of the graph node to be updated is recorded and marked as visited.
7. The IP core parameter updating method according to claim 6, wherein: The updating of all graph nodes within the ring node further includes: when the updated value of a graph node is different from the value updated in the previous round, stopping the updating of each node on the update path in the topology graph and reporting an error.
8. An IP core parameter updating device, characterized in that: include: Data response module and data update module; The data response module is used to respond to user operations and determine the update parameters of the target IP core; The data update module is used to determine the update path corresponding to the update parameters according to the topology map, and update each node on the update path in the topology map; wherein, the acquisition of the topology map includes: performing parameter parsing on each parameter in the basic parameter source file according to the parameter relationship source file to obtain the parameter relationship directed graph corresponding to the target IP core; performing point reduction processing on the parameter relationship directed graph through a preset algorithm to obtain the topology map corresponding to the target IP core; the topology map includes: a plurality of nodes; determining one or more parameters corresponding to each node according to the basic parameter source file, and determining the pointing relationship between each node according to the parameter relationship source file.
9. A computer terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for updating IP core parameters according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the IP core parameter updating method according to any one of claims 1 to 7.