Simulation method and device, computer equipment and storage medium
By generating a streamlined top-level netlist file, the long simulation time and low efficiency caused by repeated functional units in the FPGA chip are solved, and efficient chip simulation is achieved.
Patent Information
- Application Number
- CN202410951222.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-22
AI Technical Summary
As the chip size increases, the repeated functional units in the FPGA chip lead to a long simulation time and low simulation efficiency.
By obtaining the functional units involved in the specified functions of the target chip, instantiation modules and top-level netlist files are generated to reduce the number of resources, thereby achieving efficient simulation of the specified functions of the target chip.
It shortens the simulation time, reduces the consumption of computing resources, and improves the simulation efficiency.
Smart Images

Figure CN119005084A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip simulation technology, and in particular to a simulation method, apparatus, computer equipment and storage medium. Background Art
[0002] Chip simulation is an effective verification method. However, as the scale of devices becomes larger and larger, the resources included in the chip are also increasing. Taking the field-programmable gate array (FPGA) chip as an example, it includes a large number of repeated functional units, such as look-up table (LUT) resources, wiring resources, on-chip storage resources, on-chip computing resources, etc. Correspondingly, the instantiation modules corresponding to the functional units involved in the FPGA chip also include a large number of repeated parts. When simulating a function of the FPGA chip, the redundant and repeated instantiation modules will make the simulation time longer and the simulation efficiency low. Summary of the invention
[0003] The present application proposes a simulation method, apparatus, computer device and storage medium.
[0004] In a first aspect, an embodiment of the present application provides a simulation method, the method comprising: obtaining identification information of a first target module corresponding to a target test case, the target test case being used to verify a specified function of a target chip, the first target module referring to an instantiated module corresponding to a functional unit involved in the specified function of the target chip; obtaining a top-level netlist file of the target chip, the top-level netlist file including instantiated modules corresponding to functional units involved in the target chip; generating a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file of the target chip, the number of resources included in the simplified top-level netlist file being less than the number of resources included in the top-level netlist file; and realizing simulation of the specified function of the target chip based on the simplified top-level netlist file and the target test case.
[0005] In a second aspect, an embodiment of the present application provides a simulation device, which includes: a first acquisition module, used to obtain identification information of a first target module corresponding to a target test case, the target test case is used to verify a specified function of a target chip, and the first target module refers to an instantiation module corresponding to a functional unit involved in the specified function of the target chip; a second acquisition module, used to obtain a top-level netlist file of the target chip, the top-level netlist file including instantiation modules corresponding to functional units involved in the target chip; a file generation module, used to generate a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file of the target chip, the number of resources included in the simplified top-level netlist file being less than the number of resources included in the top-level netlist file; a simulation module, used to realize simulation of the specified function of the target chip based on the simplified top-level netlist file and the target test case.
[0006] In a third aspect, an embodiment of the present application provides a computer device, comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method described in the first aspect.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, characterized in that computer program instructions are stored in the computer-readable storage medium, and the computer program instructions can be called by a processor to execute the method described in the first aspect.
[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when instructions in the computer program product are executed, is used to implement the method described in the first aspect.
[0009] Compared with the prior art, the technical solution provided by the embodiment of the present application is that when simulating and testing the specified function of the target chip, the simulation device will obtain the instantiation modules corresponding to the functional units involved in the specified function, as well as the instantiation modules corresponding to the functional units involved in the target chip, to generate a streamlined top-level netlist. Since the data volume of the streamlined top-level netlist is much smaller than the data volume of the top-level netlist, when the specified function of the target chip is subsequently simulated and tested based on the streamlined top-level netlist, on the one hand, the computing resources consumed by the simulation process can be reduced, and on the other hand, the simulation time can be shortened and the simulation efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1 It is a schematic diagram of the implementation environment provided by the embodiment of the present application.
[0012] Figure 2 It is a flowchart of a simulation method provided by an embodiment of the present application.
[0013] Figure 3 It is a flowchart of a simulation method provided by another embodiment of the present application.
[0014] Figure 4 It is a block diagram of a simulation device provided by an embodiment of the present application.
[0015] Figure 5 It is a structural block diagram of an electronic device provided by an embodiment of the present application.
[0016] Figure 6 It is a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. DETAILED DESCRIPTION
[0017] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0018] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0019] Please refer to Figure 1, which shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment includes a simulation device 100. The simulation device 100 is used to simulate a chip, and simulation is a computer-aided design technology for verifying and evaluating the design performance of a chip, and is used to verify whether the output result matches the expected function of the circuit. The chip to be simulated can be an FPGA chip, a programmable array logic (Programmable Array Logic, PAL chip), a complex programmable logic device (Complex Programmable Logic Device, CPLD) chip, etc. In the embodiment of the present application, only the chip to be simulated is an FPGA chip as an example for explanation. Optionally, the simulation device 100 is equipped with a simulation tool, and the simulation of the chip is realized by the simulation tool, wherein the simulation tool can be a compiled Verilog simulator.
[0020] When simulating and verifying a function of a target chip, the simulation device 100 obtains the identification information of the instantiation module (i.e., the first target module) corresponding to the functional unit involved in the function and the top-level netlist file of the target chip, and generates a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file. Since the data volume of the simplified top-level netlist file is much smaller than the data volume of the top-level netlist file, when simulating based on the simplified top-level netlist file, the simulation time can be shortened and the simulation efficiency can be improved without affecting the simulation results. In addition, the computing resources consumed by the simulation process can be reduced.
[0021] In some embodiments, the simulation device 100 also includes a first script, which is an identification information extraction script. The first script is used to extract the identification information of the instantiation module corresponding to the functional unit involved in the target chip, for example, the identification information may be the instantiation name information of the instantiation module. In an embodiment of the present application, the first script can determine the instantiation module to be shielded (i.e., the second target module) based on the instantiation module corresponding to the functional unit involved in the specified function of the target chip (i.e., the first target module) and the instantiation module corresponding to the functional unit involved in the target chip, and extract the identification information of the above-mentioned second target module.
[0022] In some embodiments, the simulation device 100 further includes a second script, which is a shielding processing script. The second script can read the identification information of the second target module and perform shielding processing on the second target module. The second target module is not included in the simplified top-level netlist file obtained by shielding the second target module.
[0023] In some embodiments, the simulation device 100 further includes a third script, which is a compilation process control script. The third script is used to prepare files required for the first script (i.e., files input to the first script), prepare files required for the second script (i.e., files input to the second script), and perform subsequent compilation simulation work. The above-mentioned first script, second script, and third script can be written by a technician, and the embodiments of the present application are not limited to this.
[0024] Please refer to Figure 2 , which shows a flow chart of a simulation method provided by an embodiment of the present application. The method includes the following process.
[0025] S201, obtaining identification information of a first target module corresponding to a target test case.
[0026] A test case is a set of test inputs, execution conditions, and expected results compiled for a specific purpose. It is used to verify whether a specific software requirement is met. Its contents include test objectives, test environment, input data, test steps, expected results, test scripts, etc. Test cases can include input test cases, output test cases, boundary test cases, compatibility test cases, performance test cases, etc.
[0027] The target test case is used to verify the specified function of the target chip. The target test case can be any of the above test cases, which can be determined by the technician. Taking the target test case as an input test case as an example, it is used to test the input function of the target chip to verify whether the target chip can correctly receive and input signals.
[0028] The target chip can be any one of an FPGA chip, a PAL chip, and a CPLD chip. In the embodiment of the present application, only the target chip is an FPGA chip as an example for explanation.
[0029] The first target module is an instantiation module corresponding to the functional unit involved in the specified function of the target chip. The above-mentioned functional unit refers to the hardware functional unit required to realize the specified function of the target chip, which can be determined according to the specified function. Exemplarily, the functional unit may include a clock divider, a counter, a state machine, etc. The simulation device performs an instantiation process on the functional unit to obtain a corresponding instantiation module. The instantiation process refers to creating an independent instance for the functional unit and communicating with other modules by connecting input and output ports. The identification information of the first target module is used to uniquely identify the first target module. Optionally, the identification information of the first target module is the instantiation name information of the first target module. Different test cases correspond to different first target modules.
[0030] The simulation device can obtain the identification information of the first target module by itself, or can obtain the identification information of the first target module input by a technician, or can combine the two methods. The specific implementation method will be described in the following embodiments.
[0031] S202, obtaining the top-level netlist file of the target chip.
[0032] The top-level netlist file includes instantiation modules corresponding to the functional units involved in the target chip. In FPGA design, the top-level netlist refers to the logic functions defined in the hardware description language (HDL). It is the top-level view of the hardware design and is used to describe the connections between logic gates, operations, and other components. In the implementation phase, these netlists are converted into a vendor-specific format by the FPGA compiler for actual hardware configuration.
[0033] During the chip design process, the chip designer designs the FPGA schematic diagram through the computer device, and then uses the FPGA synthesis tool in the computer device to perform FPGA synthesis on the FPGA schematic diagram to obtain a top-level netlist file. In the embodiment of the present application, the simulation device can directly read the above top-level netlist file from the local computer when performing simulation.
[0034] S203 , generating a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file of the target chip.
[0035] The number of resources included in the simplified top-level netlist file is less than the number of resources included in the top-level netlist file. The generation process of the simplified top-level netlist file will be described in the following embodiments.
[0036] Since the target chip (such as an FPGA chip) often includes a large number of repeated functional units, such as a large number of LUT resources, wiring resources, on-chip storage resources, and on-chip computing resources, accordingly, the instantiation modules corresponding to the functional units involved in the target chip also include a large number of repeated parts. When the designated function of the target chip is simulated and tested, the redundant and repeated instantiation modules will consume more computing resources, lengthen the simulation time, and reduce the simulation efficiency. In an embodiment of the present application, when the designated function of the target chip is simulated and tested, the simulation device will obtain the instantiation modules corresponding to the functional units involved in the designated function, as well as the instantiation modules corresponding to the functional units involved in the target chip, to generate a simplified top-level netlist. Since the amount of data in the simplified top-level netlist is much smaller than the amount of data in the top-level netlist, when the designated function of the target chip is subsequently simulated and tested based on the simplified top-level netlist, on the one hand, the computing resources consumed by the simulation process can be reduced, and on the other hand, the simulation time can be shortened and the simulation efficiency can be improved.
[0037] It should be noted that different test cases correspond to different first target modules. By adopting the technical solution provided in the embodiment of the present application, the simplified top-level netlist files generated for different test cases are different, that is, differentiated simplification of the top-level netlist is achieved.
[0038] S204, based on the streamlined top-level netlist file and the target test case, the simulation of the designated function of the target chip is realized.
[0039] The simulation device compiles the target test case based on the streamlined top-level netlist file and executes the compiled target test case to verify the specified functions of the target chip.
[0040] In summary, according to the technical solution provided by the embodiment of the present application, when simulating and testing the specified function of the target chip, the simulation device will obtain the instantiation modules corresponding to the functional units involved in the specified function, as well as the instantiation modules corresponding to the functional units involved in the target chip, to generate a streamlined top-level netlist. Since the data volume of the streamlined top-level netlist is much smaller than the data volume of the top-level netlist, when the specified function of the target chip is subsequently simulated and tested based on the streamlined top-level netlist, on the one hand, the computing resources consumed by the simulation process can be reduced, and on the other hand, the simulation time can be shortened and the simulation efficiency can be improved.
[0041] Please refer to Figure 3 , which shows a flow chart of a simulation method provided by an embodiment of the present application. The method includes the following process.
[0042] S301, obtaining identification information of a first target module corresponding to a target test case.
[0043] The target test case is used to verify the specified function of the target chip, and the first target module refers to the instantiation module corresponding to the functional unit involved in the specified function of the target chip.
[0044] In a possible implementation, the simulation device obtains an available resource file and a specified mapping table of a target test case, and obtains identification information of the first target module based on the available resource file and the specified mapping table.
[0045] The available resource file of the target test case indicates the functional units required to implement the specified functions of the target chip. The specified mapping table includes the mapping relationship between different functional units of the target chip and different instantiation modules. The simulation device can read the available resource file of the target test case and the specified mapping table locally.
[0046] The simulation device searches for instantiation modules corresponding to the functional units required to implement the specified functions of the chip based on the specified mapping table as the first target modules, and then obtains the identification information of each first target module. This implementation method can also be called automatic mode.
[0047] Optionally, the simulation device obtains a method for generating a bitstream file of the target chip. If the method for generating the bitstream file of the target chip is software generation, the simulation device starts with the steps of obtaining available resource files of the target test case and specifying a mapping table.
[0048] A bitstream file is a file containing the complete internal configuration state of a target chip, which is usually encoded in binary format and includes configuration bit information such as wiring, logic resources, and IO settings, and is usually generated by the development tool of the target chip. When the bitstream file is generated by software, the software usually generates an available resource file synchronously, so the simulation device can use the available resource file to obtain the identification information of the first target module.
[0049] Exemplarily, when the bit stream file is generated in a software generation manner, the simulation device determines the identification information used_title1 of the first target module based on the available resource file and the specified mapping table.
[0050] In another possible implementation, the simulation device displays an instantiated module list, which includes instantiated modules corresponding to functional units involved in the target chip; receives a selection signal acting on the instantiated module list; and obtains identification information of the first target module based on the selection signal.
[0051] The instantiation module list includes the instantiation modules corresponding to the functional units involved in the target chip. The selection signal is selected by the technician according to the target test case. Optionally, each instantiation module in the instantiation module list corresponds to a selection control, and the technician can operate the input device of the simulation device to trigger the selection control to select the instantiation module. This implementation method can be called "manual mode". "Manual mode" can be suitable for test cases with lower complexity, and can also be used as a supplement to "automatic mode", which can make the entire system more flexible and reliable.
[0052] Optionally, when the bitstream file of the target chip is not automatically generated by software, the simulation device starts from the step of displaying the instantiated module list. When the electronic device generates the bitstream file, some manually customized input items can be used. At this time, the bitstream file is not automatically generated by software but semi-automatically generated. The generation process will not synchronously generate available resource files, so it is necessary to use a manual mode to obtain the identification information of the first target module.
[0053] Exemplarily, when the bitstream file is generated in a software generation manner, the simulation device obtains the identification information used_title2 of the first target module based on a selection signal triggered by a technician.
[0054] In another possible implementation, the simulation device combines the above two possible implementations to obtain the identification information of the first target module corresponding to the target test case. Specifically, the simulation device first obtains the available resource file and the specified mapping table of the target test case, obtains the identification information of part of the first target module based on the available resource file and the specified mapping table, then displays the instantiated module list, receives the selection signal acting on the instantiated module list, and obtains the identification information of another part of the first target module based on the selection signal. This implementation is called "hybrid mode".
[0055] It should be noted that in this implementation, when the simulation device displays the list of instantiated modules, the first target module determined based on the available resource files and the specified mapping table is in a selected state and the selected state is locked. On the one hand, it can prevent the technician from repeatedly selecting the first target module. On the other hand, it can also prevent the technician from accidentally canceling the selected first target module.
[0056] In other possible implementations, the simulation device also obtains the instantiation module corresponding to the specified functional unit as the first target module, and then obtains the identification information of the first target module. The specified functional unit is a functional unit that cannot be identified by the simulation tool and is necessary to implement the specified function of the target chip. Similarly, when the technician selects the first target module based on the instantiation module list, the instantiation module corresponding to the specified functional unit is also in a selected state and the selected state is locked.
[0057] Exemplarily, the simulation device obtains identification information reserved_tile of the instantiation module corresponding to the specified functional unit.
[0058] When the simulation device adopts the automatic mode to obtain the identification information of the first target module, the simulation device uses the collection of used_title1 and reserved_tile as the identification information used_title_all of all the first target modules; when the simulation device adopts the manual mode to obtain the identification information of the first target module, the simulation device uses the collection of used_title2 and reserved_tile as the identification information used_title_all of all the first target modules; when the simulation device adopts the mixed mode to obtain the identification information of the first target module, the simulation device uses the collection of used_title1, used_title2 and reserved_tile as the identification information used_title_all of all the first target modules.
[0059] S302, obtaining the top-level netlist file of the target chip.
[0060] The top-level netlist file includes instantiation modules corresponding to the functional units involved in the target chip.
[0061] S303, obtaining a second target module in the top-level netlist file that is not the first target module.
[0062] The simulation device compares the top-level netlist file with the identification information of the first target module one by one, thereby determining the second target module. Exemplarily, the simulation device determines the difference between the top-level netlist file title_all and the identification information used_title_all of all the first target resources as all the second target modules mask_tile.
[0063] S304, adding comments to the second target module in the top-level netlist file.
[0064] Optionally, the annotated second target module will not be output to the streamlined top-level netlist file. In addition, adding annotations can also serve as a marker to achieve comparison with the top-level netlist file.
[0065] S305 , based on the identification information of the first target module, output the first target module in the top-level netlist file to the simplified top-level netlist file; and do not output the second target module in the top-level netlist file to the simplified top-level netlist file.
[0066] For each instantiated module in the top-level netlist, the simulation device detects whether it is the first target module or the second target module. If it is the first target module, the instantiated module is output to the streamlined top-level netlist file. If it is the second target module, it is discarded and not output to the streamlined top-level netlist file, thereby shielding the second target module. The streamlined top-level netlist file generated in this way does not include the second target module, and the data volume is greatly reduced compared to the top-level netlist file. When subsequent simulation is performed based on the streamlined top-level netlist file, on the one hand, the computing resources consumed by the simulation process can be reduced, and on the other hand, the simulation time can be shortened and the simulation efficiency can be improved.
[0067] S306, based on the streamlined top-level netlist file and the target test case, the simulation of the designated function of the target chip is realized.
[0068] To sum up, the technical solution provided by the embodiment of the present application is that when simulating and testing the specified function of the target chip, the simulation device will obtain the instantiation modules corresponding to the functional units involved in the specified function, as well as the instantiation modules corresponding to the functional units involved in the target chip, to generate a streamlined top-level netlist. Since the data volume of the streamlined top-level netlist is much smaller than the data volume of the top-level netlist, when the specified function of the target chip is subsequently simulated and tested based on the streamlined top-level netlist, on the one hand, the computing resources consumed by the simulation process can be reduced, and on the other hand, the simulation time can be shortened and the simulation efficiency can be improved.
[0069] Please refer to Figure 4 , which shows a schematic diagram of a simulation device provided in some embodiments of the present application. The simulation device includes: a first acquisition module 410, a second acquisition module 420, a file generation module 430 and a simulation module 440.
[0070] The first acquisition module 410 is used to obtain identification information of a first target module corresponding to a target test case, where the target test case is used to verify a specified function of a target chip, and the first target module refers to an instantiation module corresponding to a functional unit involved in the specified function of the target chip.
[0071] The second acquisition module 420 is used to acquire a top-level netlist file of the target chip, where the top-level netlist file includes instantiation modules corresponding to functional units involved in the target chip.
[0072] The file generation module 430 is used to generate a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file of the target chip, wherein the number of resources included in the simplified top-level netlist file is less than the number of resources included in the top-level netlist file.
[0073] The simulation module 440 is used to simulate the specified functions of the target chip based on the simplified top-level netlist file and the target test case.
[0074] In some embodiments, the file generation module 430 is used to obtain a second target module in the top-level netlist file that is not the first target module; based on the identification information of the first target module, output the first target module in the top-level netlist file to a simplified top-level netlist file; and not output the second target module in the top-level netlist file to the simplified top-level netlist file.
[0075] In some embodiments, the file generation module 430 is used to add comments to the second target module in the top-level netlist file.
[0076] In some embodiments, the first acquisition module 410 is used to obtain an available resource file and a specified mapping table of a target test case, where the available resource file indicates the functional units required to implement the specified functions of the target chip, and the specified mapping table includes a mapping relationship between different functional units of the target chip and different instantiated modules; based on the available resource file and the specified mapping table, identification information of the first target module is obtained.
[0077] In some embodiments, the first acquisition module 410 is used to obtain a method for generating a bitstream file of a target chip; when the method for generating the bitstream file of the target chip is software generation, the steps of obtaining an available resource file of the chip and specifying a mapping table are executed.
[0078] In some embodiments, the first acquisition module 410 is used to display an instantiated module list, which includes instantiated modules corresponding to functional units involved in the target chip; receive a selection signal acting on the instantiated module list; and obtain identification information of the first target module based on the selection signal.
[0079] In some embodiments, the first acquisition module 410 is configured to display an instantiated module list if the bitstream file of the target chip is not generated by software.
[0080] To sum up, the technical solution provided by the embodiment of the present application is that when simulating and testing the specified function of the target chip, the simulation device will obtain the instantiation modules corresponding to the functional units involved in the specified function, as well as the instantiation modules corresponding to the functional units involved in the target chip, to generate a streamlined top-level netlist. Since the data volume of the streamlined top-level netlist is much smaller than the data volume of the top-level netlist, when the specified function of the target chip is subsequently simulated and tested based on the streamlined top-level netlist, on the one hand, the computing resources consumed by the simulation process can be reduced, and on the other hand, the simulation time can be shortened and the simulation efficiency can be improved.
[0081] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0082] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0083] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0084] See also Figure 5 , which shows that an embodiment of the present application further provides an electronic device 500, which includes: one or more processors 510, a memory 520, and one or more applications. Among them, the one or more applications are stored in the memory 520 and are configured to be executed by the one or more processors 510, and the one or more applications are configured to execute the method described in the above embodiment.
[0085] The processor 510 may include one or more processing cores. The processor 510 uses various interfaces and lines to connect various parts of the entire battery management system, and executes various functions and processes data of the battery management system by running or executing instructions, programs, code sets or instruction sets stored in the memory 520, and calling data stored in the memory 520. Optionally, the processor 510 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 510 can integrate one or more combinations of a central processing unit 510 (CPU), a graphics processing unit 510 (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 510, but may be implemented separately through a communication chip.
[0086] The memory 520 may include a random access memory 520 (Random Access Memory, RAM), and may also include a read-only memory 520 (Read-Only Memory). The memory 520 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 520 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created by the electronic device during use (such as a phone book, audio and video data, chat record data), etc.
[0087] See also Figure 6 , which shows that an embodiment of the present application also provides a computer-readable storage medium 600, in which computer program instructions 610 are stored. The computer program instructions 610 can be called by a processor to execute the method described in the above embodiment.
[0088] The computer-readable storage medium 600 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has storage space for computer program instructions 610 for executing any method steps in the above method. These computer program instructions 610 may be read from or written to one or more computer program products. The computer program instructions 610 may be compressed in an appropriate form.
[0089] The above are only preferred embodiments of the present application, and are not intended to limit the present application in any form. Although the present application has been disclosed as above with preferred embodiments, it is not intended to limit the present application. Any technical personnel in the field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present application. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A simulation method, characterized in that: The method comprises: Obtain identification information of a first target module corresponding to a target test case, wherein the target test case is used to verify a specified function of a target chip, and the first target module refers to an instantiation module corresponding to a functional unit involved in the specified function of the target chip; Obtaining a top-level netlist file of the target chip, wherein the top-level netlist file includes instantiation modules corresponding to functional units involved in the target chip; Generate a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file of the target chip, wherein the number of resources included in the simplified top-level netlist file is less than the number of resources included in the top-level netlist file; Based on the simplified top-level netlist file and the target test case, simulation of the designated function of the target chip is implemented.
2. The method according to claim 1, characterized in that The generating a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file of the target chip includes: Acquire a second target module in the top-level netlist file that is not the first target module; Based on the identification information of the first target module, the first target module in the top-level netlist file is output to a simplified top-level netlist file; and the second target module in the top-level netlist file is not output to the simplified top-level netlist file.
3. The method according to claim 2, characterized in that After obtaining the second target module in the top-level netlist which is not the first target module, the method further includes: Adding comments to the second target module in the top-level netlist file.
4. The method according to any one of claims 1 to 3, characterized in that The obtaining identification information of the first target module corresponding to the target test case includes: Obtaining an available resource file and a specified mapping table of the target test case, wherein the available resource file indicates the functional units required to implement the specified functions of the target chip, and the specified mapping table includes mapping relationships between different functional units of the target chip and different instantiated modules; Based on the available resource file and the specified mapping table, identification information of the first target module is obtained.
5. The method according to claim 4, characterized in that Before obtaining the available resource files of the target test case and specifying the mapping table, the method further includes: Obtaining a method for generating a bitstream file of the target chip; In the case where the bitstream file of the target chip is generated in a software generation mode, the steps of obtaining the available resource file of the chip and specifying the mapping table are performed.
6. The method according to any one of claims 1 to 3, characterized in that: The obtaining identification information of the first target module corresponding to the target test case includes: Displaying an instantiated module list, the instantiated module list including instantiated modules corresponding to functional units involved in the target chip; receiving a selection signal acting on the list of instantiated modules; The identification information of the first target module is acquired based on the selection signal.
7. The method according to claim 6, characterized in that The display instantiated module list includes: When the bitstream file of the target chip is not generated by software, the instantiated module list is displayed.
8. A simulation device, characterized in that: The device comprises: A first acquisition module is used to acquire identification information of a first target module corresponding to a target test case, wherein the target test case is used to verify a specified function of a target chip, and the first target module refers to an instantiation module corresponding to a functional unit involved in the specified function of the target chip; A second acquisition module is used to acquire a top-level netlist file of the target chip, wherein the top-level netlist file includes instantiation modules corresponding to functional units involved in the target chip; A file generation module, configured to generate a simplified top-level netlist file based on the identification information of the first target module and the top-level netlist file of the target chip, wherein the number of resources included in the simplified top-level netlist file is less than the number of resources included in the top-level netlist file; A simulation module is used to simulate the specified functions of the target chip based on the simplified top-level netlist file and the target test case.
9. A computer device, characterized in that: include: one or more processors; Memory; One or more applications, wherein one or more of the applications are stored in the memory and configured to be executed by one or more of the processors, and one or more of the applications are configured to execute the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and the computer program instructions can be called by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
FPGA signal observation method, system, device and equipment and storage medium
CN120670244A
