A logic synthesis processing method, device and computer-readable storage medium based on embedded simulation verification
By embedding simulation modules in logic synthesis tools to verify logic synthesis results in real time, the problem of lack of simulation verification in traditional methods is solved, the efficiency and accuracy of chip design are improved, the number of iterations between tools is reduced, and synthesis results are optimized.
Patent Information
- Application Number
- CN202410718599.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-05
AI Technical Summary
Traditional logic synthesis processing methods lack simulation verification, resulting in long chip design cycles, low design efficiency, and difficulty in accurately locating functional problems, affecting the accuracy and efficiency of synthesis results.
Embed simulation modules in logic synthesis tools, conduct consistency checks through shared data structures and simulation instructions, verify logic synthesis results in real time, reduce the number of iterations between tools, and improve verification efficiency.
It improves the verification accuracy and efficiency of logic synthesis tools, shortens the chip design cycle, enhances the ability to locate and solve functional problems, and optimizes synthesis results.
Smart Images

Figure CN118297009B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of simulation verification of synthesis tools, and more specifically, relates to a logic synthesis processing method, device and computer-readable storage medium based on embedded simulation verification. Background Art
[0002] At present, various EDA tools are needed in the chip design process, such as front-end logic synthesis tools, simulation tools, formal verification tools, layout and routing tools, etc. Each tool is relatively independent but interrelated. For example, the results of the logic synthesis tool need to be verified for correctness through simulation tools and formal verification tools. The result of the logic synthesis tool is one of the inputs of the layout and routing tool, which has a direct impact on the structure that the layout and routing tool needs to process. At the same time, the information of the layout and routing tool can be fed back to the logic synthesis for targeted optimization and improvement. During the chip design process, each EDA tool needs to continuously perform multiple iterations to meet the chip design requirements. The more iterations required, the longer the chip design cycle will be. Therefore, it can be seen that the coupling relationship between the various tools is very strong.
[0003] Chinese invention patent CN115858092A discloses a timing simulation method, device and system. The method includes: converting the target machine code into the executable code corresponding to the simulation host; in response to multiple simulation processes executing the executable code in parallel, recording the processing time of the simulation process processing the code, generating the processing sequence, and determining the virtual simulation time required for the simulation process to process the code according to the processing sequence; updating each virtual simulation time to keep the time synchronization between each simulation process; outputting the timing simulation result after executing the executable code; the timing simulation result is used to characterize the execution sequence of the simulation host for the target machine code.
[0004] In summary, the traditional logic synthesis processing method, on the one hand, cannot simulate and verify the logic design in the synthesis process, which may lead to undiscovered logic errors or functional problems, affecting the final synthesis results; on the other hand, it is difficult for developers to accurately locate functional problems in the synthesis process, and the ability to discover and solve logic errors or functional problems in compilation, mapping, optimization and other links will be reduced. In short, the traditional logic synthesis processing method lacks the connection between simulation verification and different links in the logic synthesis tool, making it difficult to track and analyze the verification results. It is difficult for developers to fully and accurately understand the processing of the synthesis tool in different links and find potential functional problems. At present, the various tools for chip design are independent of each other in terms of process. As the chip scale becomes larger and the chip process becomes more advanced, in order to shorten the chip design cycle and improve the chip design efficiency, the chip design process needs to reduce the number of iterations between various tools. Summary of the invention
[0005] The present invention aims to overcome at least one defect of the above-mentioned prior art and provide a logic synthesis processing method based on embedded simulation verification to solve the problems of long design cycle of prior art chips, low chip design efficiency, and the need to reduce the number of iterations between various tools in the chip design process. A logic synthesis processing method based on embedded simulation verification is proposed, which realizes the verification of logic synthesis results by embedding a simulation module in a logic synthesis tool, thereby improving the verification efficiency of the logic synthesis tool.
[0006] The detailed technical scheme of the present invention is as follows:
[0007] In order to shorten the chip design cycle and improve chip design efficiency, the number of iterations between various tools needs to be reduced in the chip design process. To achieve this goal, one approach is to make each EDA tool share the same set of data structures, that is, each tool is developed and implemented based on the same set of data structures, which facilitates information transmission and interface reuse between tools, and enables each EDA tool to interact through the underlying data structure, thereby reducing the number of iterations and shortening the chip design cycle.
[0008] Based on the development concept of sharing data structures among various EDA tools, and considering the verification needs of synthesis tools and the collaborative needs of synthesis tools and verification tools, the verification of logic synthesis results is realized by embedding simulation modules in logic synthesis tools based on the same set of data structures, thereby improving the verification efficiency of logic synthesis tools. In the present invention:
[0009] The present invention provides a logic synthesis processing method based on embedded simulation verification, and the specific steps are as follows:
[0010] S1, read RTL files, lib files, synthesis instructions and simulation instructions;
[0011] The simulation instruction is used to specify the optimization process that needs to be checked for consistency in the comprehensive process;
[0012] The design netlist contained in the RTL file has a value of a low level or a high level at the input port, and after being operated by the components in the netlist, it reaches the output port, and the value of the output port is a low level or a high level.
[0013] Specifically, the RTL file refers to a design file implemented in a hardware description language such as Verilog or VHDL;
[0014] The lib file refers to the target library and link library file required for the comprehensive process:
[0015] The link library is used to parse the components in the design netlist described by the RTL file. It contains the description of the basic components and sub-designs used in the netlist and is used to simulate and analyze the design. In the synthesis process, the synthesis tool will parse the design netlist based on the information in the link library to achieve the connection and parameter configuration of the components.
[0016] The target library contains the basic units required to implement the design functions, such as logic gates, registers, and memories. It defines the logical functions and characteristics of these basic units. During the synthesis process, a netlist will be generated based on the component information in the target library for subsequent layout and routing.
[0017] S2, read TB files and golden data files;
[0018] Among them, the TB (testbench) file is a simulation stimulus file, which is used to execute and verify the functional correctness of the hardware model during the simulation process;
[0019] The golden file is the correct output file expected for a test (usually an automated test).
[0020] First, determine whether the golden data file has been entered:
[0021] If it has been entered, the input golden data file will be used directly;
[0022] If not entered, the golden data file is regenerated using the design netlist and simulation stimulus contained in the RTL file.
[0023] S3, specifying the comprehensive process that needs to be checked for consistency through simulation instructions and specifying the execution order;
[0024] Further, the comprehensive process includes but is not limited to a compilation process, an optimization process and a mapping process;
[0025] The simulation instructions are used to specify the comprehensive flow that needs to be checked for consistency, so as to guide the execution of subsequent steps.
[0026] S4. Execute each process of the comprehensive process in sequence and perform consistency check according to the simulation instructions:
[0027] If a consistency check is not required, continue to the next step in the integrated process until all processes in the integrated process are completed;
[0028] If a consistency check is required, after performing the following consistency check steps, continue to the next step in the comprehensive process until each process of the comprehensive process is completed;
[0029] S41, obtain the TB file and golden data file in S2;
[0030] S42, calculate the current netlist simulation data based on TB data:
[0031] The calculation of the current netlist simulation data includes, starting from the input port of the netlist, traversing each device in the design in turn, and after obtaining a device, checking whether all input terminals of the device have input values according to the stimulus data in the TB file. If there is a missing in all the input values of the current device, continue to obtain the next device, and the current device is calculated later as an uncalculated device. If all the input values of the current device exist, the output value is calculated according to the input; according to this rule, after traversing the netlist, the simulation results of all output ports, i.e., the netlist simulation data, can be obtained.
[0032] S43. Compare the netlist simulation data and golden data, and retain inconsistent data information:
[0033] The process of comparing the netlist simulation data and the golden data includes traversing each of the golden data in turn, and querying whether there is data with the same input state in the calculated simulation data based on the input state of each data. If not, take the next golden data. If so, compare the data one by one. If the data is consistent, take the next golden data. If not, count the error information until all the golden data are compared.
[0034] S5. Complete the verification process of the embedded simulation synthesis tool, and report the synthesis process that failed the consistency check and the internal specific information.
[0035] The present invention also discloses a logic synthesis processing method based on embedded simulation verification, the device comprising:
[0036] processor;
[0037] a memory having stored thereon a computer program executable on the processor;
[0038] Wherein, when the computer program is executed by the processor, the steps of the logic synthesis processing method based on embedded simulation verification are implemented.
[0039] A computer-readable storage medium stores a logic synthesis processing program based on embedded simulation verification, and when the logic synthesis processing program based on embedded simulation verification is executed by the processor, the steps of the logic synthesis processing method based on embedded simulation verification are implemented.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention proposes a logic synthesis processing method, device and computer-readable storage medium based on embedded simulation verification. By embedding the processing method of the simulation tool in the synthesis process, it helps to ensure the correctness of the synthesis result and locate the functional problems of each link in the synthesis process, which can improve the accuracy, efficiency and reliability of the synthesis tool, optimize the results of logic synthesis, and shorten the debugging cycle. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic flow chart of the processing method of the present invention.
[0043] Figure 2 It is a design network representation of the design file described in the present invention.
[0044] Figure 3 It is a schematic diagram of a netlist after the design netlist executes the optimization process in the processing method of the present invention. DETAILED DESCRIPTION
[0045] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0046] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0047] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0048] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0049] Example 1
[0050] This embodiment provides a logic synthesis processing method based on embedded simulation verification, such as Figure 1 As shown, including:
[0051] S1, read RTL files, lib files, synthesis instructions and simulation instructions;
[0052] In S1, in order to simplify the analysis and reduce the complexity of using different libraries, the same library is used as the target library and the link library of this embodiment;
[0053] The following is the comprehensive instruction content:
[0054] The read_link_library example_lib command line indicates reading in the link library, where read_link_library is the command name for reading in the link library, and example_lib is the name of the link library to be read in;
[0055] The read_target_library example_lib command line indicates reading the target library, where read_target_library is the command name for reading the target library, and example_lib is the name of the target library to be read;
[0056] read_file example_design.v means reading the design file, where read_file is the command name for reading the design file, and example_design.v is the name of the design file to be read; compile means the command for executing the synthesis process;
[0057] Further, the simulation instruction is used to specify an optimization process that needs to be checked for consistency in the comprehensive process;
[0058] The design netlist contained in the RTL file has a low or high level value for the input port, and after being operated by the components in the netlist, it reaches the output port, and the value of the output port is also low or high. The number of input ports and output ports is not necessarily the same. Secondly, the value of the output port is affected by two factors: the value of the input port and the specific logical operation in the design netlist. Therefore, there is no direct dependency between the values of the input port and the output port, but the value of the output port is determined by the value of the input port and the structure of the actual design netlist.
[0059] The design netlist in actual application is relatively large and complex. Figure 2 The RTL design netlist shown, Figure 2 The design netlist contained in the RTL file is described in the figure; A, B and C represent the input ports of the netlist, and X and Y represent the output ports of the netlist. The value of the input port is low level (logic 0) or high level (logic 1). After the components in the netlist are operated, it reaches the output port, and the value of the output port is also low level (logic 0) or high level (logic 1).
[0060] Figure 2 The logic devices used in the operation include: logical AND, logical NOT and logical XOR:
[0061] The operational characteristic of logical AND-NOT is that the output is low (logic 0) when and only when all inputs are high (logic 1); as long as one or more inputs are low (logic 0), the output is high (logic 1).
[0062] The operational characteristic of logical NOT is that when the input is low (logic 0), the output is high (logic 1); when the input is high (logic 1), the output is low (logic 0).
[0063] The operation characteristic of logical XOR is that when the two inputs are the same, the output is low (logic 0); when the two inputs are different, the output is high (logic 1).
[0064] S2, read TB files and golden data files;
[0065] In S2, Tables 1 and 2 are given to describe Figure 2 The TB file and golden data file of the designed netlist, where 0 and 1 represent low level (logic 0) and high level (logic 1) respectively;
[0066] First, determine whether the golden data file has been entered:
[0067] If it has been entered, the input golden data file will be used directly;
[0068] If not entered, the golden data file is regenerated using the design netlist and simulation stimulus contained in the RTL file.
[0069] S3, specifying the optimization process in the comprehensive process for consistency check through simulation instructions and specifying the execution order;
[0070] The comprehensive process includes but is not limited to a compilation process, an optimization process and a mapping process; in this embodiment, the simulation instruction specifies that the optimization process in the comprehensive process needs to be checked for consistency, taking the example that the compilation process does not need to be checked for consistency, the optimization process needs to be checked for consistency, and the mapping process does not need to be checked for consistency.
[0071] S4, executing each process of the comprehensive process in sequence, and performing consistency check according to the simulation instructions;
[0072] If a consistency check is required, perform a consistency check;
[0073] If the consistency check is not required, the next optimization process of the comprehensive process is continued until all processes of the comprehensive process are completed.
[0074] In actual applications, the comprehensive process includes many processes. To facilitate the description and understanding of this embodiment, it is assumed that the comprehensive process includes three major processes: compilation, optimization, and mapping. The processing of the remaining processes is the same as in this embodiment, and this section will not further subdivide and elaborate on other processes.
[0075] First, the compilation process is executed. According to S3, this process does not require consistency check;
[0076] The next step is to execute the optimization process. According to S3, the process needs to be checked for consistency:
[0077] The steps to perform a consistency check on the optimization process are as follows:
[0078] S41, obtain the TB file in S2 (as described in Table 1) and the golden data file (as described in Table 2);
[0079] Table 1 TB file table
[0080]
[0081] Table 2golden data file table
[0082]
[0083] S42, calculating netlist simulation data according to TB data, specifically including:
[0084] S421. Obtain the netlist after the optimization process is completed:
[0085] Let the current netlist be Figure 3 As shown in the figure (the current netlist is the netlist after the optimization process is completed. In actual applications, the optimization process will perform multiple optimization steps such as logic optimization, timing optimization, power optimization, area optimization, and clock optimization. The netlist before and after the optimization process will change. Figure 3 The examples given are only in Figure 2 Some changes were made to show the difference between the netlist before and after the optimization process).
[0086] Similarly, in the figure, A, B, and C represent the input ports of the netlist, and X and Y represent the output ports of the netlist. The value of the input port is low (logic 0) or high (logic 1). After the components in the netlist are calculated, it reaches the output port, and the value of the output port is also low (logic 0) or high (logic 1). Figure 3 Compared to Figure 2The logical AND and logical OR are newly added to the logic devices. The operation characteristic of the logical AND is that the output is high (logical 1) when and only when all inputs are high (logical 1); as long as one or more inputs are low (logical 0), the output is low (logical 0). The operation characteristic of the logical OR is that as long as one or more inputs are high (logical 1), the output is high (logical 1); if and only when all inputs are low (logical 0), the output is low (logical 0).
[0087] S422, calculate the current Figure 3 Simulation data of the netlist:
[0088] according to Figure 3 The computing characteristics of the components in the TB file described in Table 1 show that:
[0089] When A=0, B=0, C=0, X=1, Y=0;
[0090] When A=0, B=0, C=1, X=1, Y=1;
[0091] When A=0, B=1, C=0, X=1, Y=1;
[0092] When A=0, B=1, C=1, X=0, Y=0;
[0093] When A=1, B=0, C=0, X=1, Y=1;
[0094] When A=1, B=0, C=1, X=1, Y=0;
[0095] When A=1, B=1, C=0, X=1, Y=0;
[0096] When A=1, B=1, C=1, X=0, Y=1.
[0097] S43. Compare the netlist simulation data and golden data, and retain inconsistent data information:
[0098] The process of comparing the netlist simulation data and the golden data includes traversing each of the golden data in turn, and querying whether there is data with the same input state in the calculated simulation data based on the input state of each data. If not, take the next golden data. If so, compare the data one by one. If the data is consistent, take the next golden data. If not, count the error information until all the golden data are compared.
[0099] According to this rule, the golden data information of items 1, 4, 5, 6, 7 and 8 are inconsistent.
[0100] Continue to execute the mapping process. According to S3, this process does not require consistency check;
[0101] Execute and complete all comprehensive processes;
[0102] S5. Complete the verification process of the embedded simulation synthesis tool, and report the synthesis process that failed the consistency check and the internal specific information.
[0103] The S5 completes the verification process of the embedded simulation synthesis tool. It can be seen that the optimization process in the synthesis process fails the consistency check, specifically, the 1st, 4th, 5th, 6th, 7th and 8th golden data information are inconsistent.
[0104] In specific applications, it can be seen that by embedding the simulation module in the logic synthesis tool, on the one hand, the logic synthesis results can be verified in real time without exporting and transferring data, which effectively improves the verification efficiency of the logic synthesis tool and saves time and resources; on the other hand, this collaborative design method can speed up the design iteration and help reduce errors and problems in the design.
[0105] Example 2
[0106] This embodiment provides a logic synthesis processing device based on embedded simulation verification;
[0107] The device comprises:
[0108] processor;
[0109] a memory having stored thereon a computer program executable on the processor;
[0110] Wherein, when the computer program is executed by the processor, the steps of the logic synthesis processing method based on embedded simulation verification are implemented.
[0111] This embodiment also provides a computer-readable storage medium of a logic synthesis processing method based on embedded simulation verification;
[0112] The computer-readable storage medium stores a logic synthesis processing program based on embedded simulation verification, and when the logic synthesis processing program based on embedded simulation verification is executed by the processor, the steps of the logic synthesis processing method based on embedded simulation verification are implemented.
[0113] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the technical solution of the present invention, and are not intended to limit the specific implementation methods of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A logic synthesis processing method based on embedded simulation verification, It is characterized in that include: S1, read RTL files, lib files, synthesis instructions and simulation instructions; The simulation instruction is used to specify the optimization process that needs to be checked for consistency in the comprehensive process; S2, read TB files and golden data files; Determine whether the golden data file has been entered: If it has been entered, the input golden data file will be used directly; If not entered, the golden data file is regenerated using the design netlist and simulation stimulus contained in the RTL file; S3, specifying the comprehensive process that needs to be checked for consistency through simulation instructions and specifying the execution order; S4. Execute each optimization process of the comprehensive process in sequence and perform consistency check according to the simulation instructions: If a consistency check is not required, continue to the next step in the integrated process until all processes in the integrated process are completed; If a consistency check is required, after performing the following consistency check steps, continue to the next step in the comprehensive process until each process of the comprehensive process is completed; S5. Complete the verification process of the embedded simulation synthesis tool, and report the synthesis process that failed the consistency check and the internal specific information.
2. A logic synthesis processing method based on embedded simulation verification according to claim 1, It is characterized in that The design netlist contained in the RTL file has a value of a low level or a high level at the input port, and after being operated by the components in the netlist, it reaches the output port, and the value of the output port is a low level or a high level.
3. A logic synthesis processing method based on embedded simulation verification according to claim 1, It is characterized in that The S4 specifically includes: S41, obtain the TB file and golden data file in S2; S42, calculating the current netlist simulation data according to the TB data; S43, comparing the netlist simulation data and the golden data, and retaining inconsistent data information; Traverse each of the golden data in turn, and query whether there is data with the same input state in the calculated simulation data based on the input state of each data: If it does not exist, take the next golden data, if it exists, compare the data one by one; If the data is consistent, the next golden data is taken; if the data is inconsistent, the error information is counted until all the golden data are compared.
4. A logic synthesis processing method based on embedded simulation verification according to claim 3, It is characterized in that The calculation of current netlist simulation data includes: Starting from the input port of the netlist, traverse each device in the design in turn. After obtaining a device, check whether all input ports of the device have input values according to the stimulus data in the TB file; If any of the input values of the current device is missing, the next device will be acquired and the current device will be treated as an uncalculated device and calculated later. If all input values of the current device exist, the output value is calculated based on the input; Through the above steps, the simulation results of all output ports can be obtained after traversing the netlist.
5. A logic synthesis processing method based on embedded simulation verification according to claim 1 or 4, It is characterized in that The comprehensive process includes but is not limited to a compilation process, an optimization process and a mapping process.
6. A logic synthesis processing device based on embedded simulation verification, It is characterized in that The device comprises: processor; a memory having stored thereon a computer program executable on the processor; Wherein, when the computer program is executed by the processor, the steps of the logic synthesis processing method based on embedded simulation verification as described in any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Time sequence simulation method, device and system
CN115858092A
Multi-core memory system simulator on basis of network-on-chip interconnection
CN103914333A
Chip simulation acceleration method and device, electronic equipment and storage medium
CN115470748A
Methods, systems, and computer program product for implementing an electronic design using connect modules with dynamic and interactive control
US11429773B1
System and Method for Improving Content Fetching by Selecting Tunnel Devices
US20200220746A1
