Security design method of chip, electronic equipment and storage medium
By performing security simulation and module diagnostic coverage calculations during the chip design stage, and iteratively adjusting functional safety modules, the problem that the existing technology cannot verify chip safety in the design stage is solved, and the security and efficiency improvement is achieved.
Patent Information
- Application Number
- CN202411012015.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art cannot perform security verification in the chip design stage, resulting in extended design cycles, increased costs and inability to meet the chip's security needs.
By performing security simulation on the chip, the diagnostic coverage of each module is determined, and the total diagnostic coverage of the chip is calculated based on the weight of the module, and iteratively adjusts the functional safety module until the preset diagnostic coverage threshold is reached.
Implement safety verification during the chip design stage, shorten the design cycle, reduce costs, and ensure that the chip's safety complies with preset functional safety levels.
Smart Images

Figure CN118966096A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of chip design technology, and in particular to a chip security design method, electronic device and storage medium. Background Art
[0002] A chip, also known as an integrated circuit (IC), is an electronic device that integrates multiple electronic components (such as transistors, resistors, capacitors, etc.) on a tiny piece of semiconductor material (usually a silicon wafer). The design and manufacture of chips represent the core of modern electronic technology. Chips usually play a vital role in electronic devices. For example, the main control chip of a laser radar is the core component of the laser radar and is responsible for the information collection, processing and transmission of the laser radar.
[0003] At present, chip safety verification usually tests the implementation of safety mechanisms through fault injection and evaluates the diagnostic coverage of chip safety mechanisms, so as to determine whether the chip meets the functional safety level assessment and generate a chip functional safety assessment report.
[0004] In the process of implementing this application, the inventors found that there are at least the following problems in the prior art: the existing security verification method is based on testing of ready-made chips that have been produced, and generates a chip functional safety assessment report by judging whether the ready-made chips meet the predetermined indicators. This method usually conducts a safety assessment on the diagnostic coverage of the entire ready-made chip, and thus cannot meet the security verification of the chip in the design stage. Summary of the invention
[0005] The embodiments of the present application provide a chip security design method, an electronic device, and a storage medium, which can implement chip security verification during the chip design stage, thereby ensuring the security of the chip.
[0006] The embodiments of the present application provide the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a chip security design method, the chip includes multiple modules, and the method includes:
[0008] Perform security simulation on the chip to determine the diagnostic coverage of each module;
[0009] Based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, the diagnostic coverage corresponding to the chip is calculated;
[0010] If the diagnostic coverage corresponding to the chip is less than the diagnostic coverage threshold, the functional safety module corresponding to the module is iteratively adjusted until the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, wherein the diagnostic coverage threshold includes the diagnostic coverage corresponding to the preset functional safety level.
[0011] In some embodiments,
[0012] Each module corresponds to a functional safety module, and each functional safety module corresponds to a diagnostic coverage target;
[0013] Before calculating the diagnostic coverage corresponding to the chip, the method further includes:
[0014] Determine whether the diagnostic coverage of each module meets the corresponding diagnostic coverage target;
[0015] The method also includes:
[0016] If the diagnostic coverage corresponding to each module meets the corresponding diagnostic coverage target, the diagnostic coverage corresponding to the chip is calculated based on the diagnostic coverage corresponding to each module and the weight corresponding to each module;
[0017] If the diagnostic coverage corresponding to a certain module does not meet the corresponding diagnostic coverage target, the functional safety module corresponding to the module is adjusted so that the diagnostic coverage corresponding to the module meets the corresponding diagnostic coverage target.
[0018] In some embodiments,
[0019] The multiple modules include at least one first module, the first module corresponds to a first functional safety module, a first weight, and a first diagnostic coverage, the first functional safety module corresponds to a first diagnostic coverage target, wherein the first functional safety module is a standard functional safety module;
[0020] Determining the diagnostic coverage corresponding to each module includes: determining the diagnostic coverage corresponding to the first module;
[0021] The method also includes:
[0022] Determining whether the diagnostic coverage corresponding to the first module meets the first diagnostic coverage target;
[0023] If so, the diagnostic coverage corresponding to the chip is calculated based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, including: calculating the diagnostic coverage corresponding to the chip based on the first diagnostic coverage corresponding to the first module and the first weight;
[0024] If not, the first functional safety module is adjusted until the coverage diagnosis rate corresponding to the first module meets the first diagnosis coverage rate target.
[0025] In some embodiments,
[0026] The plurality of modules include a second module, the second module corresponds to a second functional safety module, a second weight, and a second diagnostic coverage, the second functional safety module corresponds to a second diagnostic coverage target, wherein the second functional safety module is a customized functional safety module;
[0027] Determining the diagnostic coverage corresponding to each module includes: determining a second diagnostic coverage corresponding to the second module;
[0028] After the diagnostic coverage corresponding to the chip calculated based on the first diagnostic coverage corresponding to the first module and the first weight is greater than or equal to the diagnostic coverage threshold, the method further includes:
[0029] Determining whether a second diagnostic coverage rate corresponding to the second module meets a second diagnostic coverage rate target;
[0030] If yes, then based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, the diagnostic coverage corresponding to the chip is calculated, including: calculating the diagnostic coverage corresponding to the chip according to the first diagnostic coverage, the first weight, the second diagnostic coverage, and the second weight;
[0031] If not, the second functional safety module is adjusted until the diagnostic coverage corresponding to the second module meets the second diagnostic coverage target.
[0032] In some embodiments,
[0033] Determining a second diagnostic coverage corresponding to the second module includes:
[0034] Perform functional simulation on the chip to determine whether the row coverage corresponding to the second module meets the row coverage target;
[0035] If yes, performing an error injection simulation on the second module to determine a second diagnostic coverage corresponding to the second module;
[0036] If not, the second functional safety module is adjusted until the row coverage corresponding to the second module meets the row coverage target.
[0037] In some embodiments, performing an error injection simulation on the chip to determine a second diagnostic coverage corresponding to the second module includes:
[0038] Output error list based on functional safety analysis tools;
[0039] Based on the error list, a real fault coverage simulation is performed to output a second diagnostic coverage corresponding to the second module.
[0040] In some embodiments,
[0041] The multiple modules include at least two second modules, each second module corresponds to a second diagnostic coverage target;
[0042] The method also includes:
[0043] After determining that the second diagnostic coverage corresponding to the current second module meets the corresponding second diagnostic coverage target, enter the next second module and determine whether the second diagnostic coverage corresponding to the second module meets the second diagnostic coverage target until all second modules are traversed.
[0044] In some embodiments,
[0045] The method also includes:
[0046] According to the first parameter of each second module, all the second modules are sorted in descending order of the first parameter, wherein the first parameter includes the number of standard circuit units;
[0047] According to the sequence of the second modules, the second functional safety module is customized for each second module in turn to generate a second functional safety module corresponding to each second module, and all the second modules are traversed based on the order of the first parameter.
[0048] In some embodiments,
[0049] The method also includes:
[0050] After determining that all second modules meet the corresponding second diagnostic coverage target, the diagnostic coverage corresponding to the chip is calculated according to the first diagnostic coverage, the first weight, the second diagnostic coverage, and the second weight, specifically including:
[0051] The diagnostic coverage corresponding to the chip is calculated based on the first diagnostic coverage and the first weight corresponding to the first module, and the second diagnostic coverage and the second weight corresponding to each second module.
[0052] In some embodiments,
[0053] The functional safety modules corresponding to the iterative adjustment modules include:
[0054] The first functional safety module and / or the second functional safety module are iteratively adjusted.
[0055] In some embodiments, the method further comprises:
[0056] Determine the weight of each module, including:
[0057] Get the circuit RTL code;
[0058] Perform RTL synthesis on the circuit RTL code to obtain the circuit netlist;
[0059] Determine a first parameter of each module according to the circuit netlist, wherein the first parameter includes the number of standard circuit units;
[0060] According to the first parameter of each module, the weight of each module is calculated.
[0061] In some embodiments,
[0062] The module includes submodules, and the method further includes:
[0063] Calculate the diagnostic coverage of each module, including:
[0064] Determine the diagnostic coverage corresponding to each submodule in the module;
[0065] The diagnostic coverage corresponding to the module is calculated according to the diagnostic coverage corresponding to each submodule and the weight corresponding to each submodule, wherein the diagnostic coverage corresponding to the module is the weighted sum of the diagnostic coverage of all submodules of the module.
[0066] In some embodiments, the method further comprises:
[0067] Calculate the weight corresponding to each submodule, including:
[0068] Acquire a first parameter and a second parameter of the submodule, wherein the first parameter includes the number of standard circuit units, and the second parameter includes a preset importance value;
[0069] The weight of the submodule is determined according to the first parameter and / or the second parameter of the submodule.
[0070] In a second aspect, an embodiment of the present application provides an electronic device, including:
[0071] A processor and a memory, the processor is used to execute the executable program code in the memory, and when the executable program code is executed, the processor executes the instructions of the chip security design method as described in the first aspect.
[0072] In a third aspect, an embodiment of the present application further provides a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed, the chip security design method of the first aspect is implemented.
[0073] The beneficial effect of the embodiments of the present application is: different from the prior art, the embodiments of the present application provide a chip security design method, the chip includes multiple modules, the method includes: performing security simulation on the chip to determine the diagnostic coverage corresponding to each module; based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, calculating the diagnostic coverage corresponding to the chip; if the diagnostic coverage corresponding to the chip is less than the diagnostic coverage threshold, iteratively adjusting the functional safety module corresponding to the module until the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, wherein the diagnostic coverage threshold includes the diagnostic coverage corresponding to the preset functional safety level.
[0074] By performing functional safety simulation during the chip design process, determining the diagnostic coverage corresponding to each module of the chip, and further calculating the diagnostic coverage corresponding to the chip, and iteratively adjusting the functional safety module corresponding to the module, the diagnostic coverage corresponding to the chip meets the preset functional safety level. This application can realize chip safety verification in the chip design stage, thereby ensuring the safety of the chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0076] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
[0077] Figure 2 is a schematic diagram of the structure of a chip provided in an embodiment of the present application;
[0078] Figure 3 It is a flowchart of a chip security design method provided in an embodiment of the present application;
[0079] Figure 4 It is a flowchart of another chip security design method provided in an embodiment of the present application;
[0080] Figure 5 is a schematic diagram of the structure of another chip provided in an embodiment of the present application;
[0081] Figure 6 This is a schematic diagram of the overall process of a chip security design method provided by an embodiment of the present application;
[0082] Figure 7 yes Figure 6 A detailed flow chart of step S606 in FIG.
[0083] Figure 8 yes Figure 7 A detailed flow chart of step S664 in FIG.
[0084] Fig. 9 It is a flowchart of a weight corresponding to a calculation module provided in an embodiment of the present application;
[0085] Fig.10 It is a schematic diagram of a flow chart of a diagnostic coverage rate corresponding to a calculation module provided in an embodiment of the present application;
[0086] Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0087] Description of Figure Numbers:
[0088] Label name Label name 100 Application Environment 220 Functional safety module 101 Architecture design tools 211 Module 1 102 RTL code 212 Module 2 103 Logic Synthesis Tools 221 First functional safety module 104 Circuit Netlist 222 Second functional safety module 105 Physical Implementation Tools 110 Electronic devices 106 territory 111 processor 200 chip 112 Memory 210 Modules DETAILED DESCRIPTION
[0089] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0090] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a sequence different from the module division in the device or the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.
[0091] The technical solution of this application is described in detail below with reference to the accompanying drawings:
[0092] See also Figure 1 , Figure 1 It is a schematic diagram of an application environment provided by an embodiment of the present application.
[0093] like Figure 1As shown, the application environment 100 includes: architecture design tool 101, RTL code 102, logic synthesis tool 103, circuit netlist 104, physical implementation tool 105 and layout 106. The architecture design tool 101, logic synthesis tool 103 and physical implementation tool 105 can be different EDA software, or they can be units or modules in the same EDA software for performing different functions.
[0094] Specifically, the architecture design tool 101 is used to receive chip design requirements associated with chip design, for example: module information determined based on the design requirements, the module information including at least one of the module's function, number, area, location, hierarchical relationship between modules, or interconnection relationship between modules. It should be noted that the module in this application may refer to various functional modules, macro units, etc. in digital chip design.
[0095] Specifically, the architecture design tool 101 is also used to output the architecture design of the chip and the RTL code 102 corresponding to the architecture design. The architecture design can indicate the logical information and physical information of the chip. In some embodiments, the architecture design can be a physical architecture planning design, for example, including at least one of the following: the design of the shape, position, insertion of a register module for time synchronization, or routing between modules. The architecture design can also be a design exchange format (DEF).
[0096] In some embodiments, the architecture design tool 101 may have a graphical user interface (GUI) and may interact with user input using the GUI. For example, the architecture design tool 101 may receive user input based on gestures, contacts, stylus, or mouse pointers. Alternatively or additionally, the architecture design tool 101 may receive user input based on code instructions. For example, a user may input operations for modules to the architecture design tool 101 in the form of code commands, such as operations to increase or decrease modules, to generate an architecture design and output RTL code.
[0097] Specifically, the logic synthesis tool 103 is used to receive the RTL code 102 and output a circuit netlist 104 based on the RTL code.
[0098] Specifically, the physical implementation tool 105 is used to receive the circuit netlist 104 and perform steps such as layout and routing and clock tree synthesis based on the circuit netlist 104 to generate a layout 106 for chip manufacturing.
[0099] It is understandable that Electronic Design Automation (EDA) software is widely used in the functional design, synthesis, verification, simulation and other processes of chips. With the help of EDA software, engineers can easily carry out the design process of digital chips, such as: architecture design and register transfer level (RTL) code design, logic synthesis, design for test (DFT), physical development and signoff. In the architecture design and RTL code design stage, engineers determine the architecture design of the chip based on design requirements, such as the functions and initial layout planning of each module, and use hardware description languages (such as Verilog or VHDL) to write RTL code for describing the logic function of the circuit. In the logic synthesis stage, considering the specific way to realize the logic function of the circuit (for example, suitable units and processes), the RTL code is converted into a circuit netlist in the form of logic gates. In the physical implementation stage, engineers determine a more sophisticated physical layout plan and corresponding layout and routing based on the circuit netlist, thereby determining the final chip design, that is, generating a layout for chip manufacturing.
[0100] At present, chip safety verification usually tests the implementation of safety mechanisms through fault injection and evaluates the diagnostic coverage of chip safety mechanisms, so as to determine whether the chip meets the functional safety level assessment and generate a chip functional safety assessment report.
[0101] However, the existing safety verification method is to test ready-made chips after production. By judging whether the ready-made chips meet the predetermined indicators, a chip functional safety assessment report is generated. This method usually conducts a safety assessment on the diagnostic coverage of the entire ready-made chip, which cannot meet the safety verification of the chip in the design stage.
[0102] Moreover, since the chip design process is a complex and iterative process involving multiple stages and multiple cycles, for example, the chip design process includes multiple cycles such as tape-out-testing and verification-correction-re-tape-out, and each cycle includes the process from test verification to correction and then to re-tape-out, the current solution evaluates the security of the chip by performing test verification during the cycle. This method will lengthen the design cycle and increase design costs.
[0103] In view of this, an embodiment of the present application provides a chip security design method, which can shorten the design cycle, reduce design costs, and ensure the security of the chip by implementing chip security verification in the chip design stage.
[0104] See also Figure 2 , Figure 2 It is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
[0105] like Figure 2 As shown, the chip 200 includes a plurality of modules 210 , wherein each module 210 corresponds to a functional safety module 220 .
[0106] It should be noted that the present application performs security design before chip production. Therefore, the chip 200 corresponds to the architecture design output by the architecture design tool. Therefore, the module 210 or the functional safety module 220 in the chip 200 are modules or functional safety modules in the architecture design, and the architecture design corresponding to the chip is used for chip simulation.
[0107] In some embodiments, chip 200 includes processor chips, memory chips, application-specific integrated circuit chips, network and communication chips, sensor chips, lidar chips and other chips.
[0108] In some embodiments, module 210 refers to a hardware module or a functional module of a chip, such as an arithmetic logic unit (ALU), a cache, a bus, a processor, a network-on-Chip (NoC), an I / O controller (e.g., USB, PCIe), and other modules.
[0109] In some embodiments, the functional safety module 220 refers to a functional protection module set for the module 210. The functional safety module 220 may include various circuits and / or electronic units for implementing a functional safety mechanism (Safety Mechanism, SM), which is used to protect the module 210. For example, the functional safety mechanism may include an ECC (Error-Correcting Code, ECC) protection mechanism, a lock-step protection mechanism (Lock_step protection mechanism), a parity protection mechanism, and the like.
[0110] See also Figure 3 , Figure 3 It is a flowchart of a chip security design method provided in an embodiment of the present application.
[0111] like Figure 3 As shown, the security design method of the chip includes:
[0112] Step S301: Perform security simulation on the chip to determine the diagnostic coverage corresponding to each module.
[0113] In some embodiments, performing security simulation on a chip refers to performing security simulation on the architectural design of the chip, that is, performing security simulation on the architectural design of the chip through an EDA tool.
[0114] During the safety simulation process of the EDA tool, the EDA tool can generate the diagnostic coverage (Diagnostic Coverage) corresponding to each module.
[0115] It is understandable that diagnostic coverage usually refers to the proportion of faults or defects that can be detected during chip simulation. Diagnostic coverage is used to measure the ability of the test program to find potential problems in the chip. The goal of diagnostic coverage is to ensure the reliability of the chip during the production process and in actual use. High diagnostic coverage means that more potential faults can be detected and repaired, thereby improving the quality and safety of the chip.
[0116] In some embodiments, the diagnostic coverage can be evaluated by means of fault models, test vectors, fault simulation, etc. Among them, the fault model refers to the use of a specific fault model to simulate potential faults in the chip; the test vector refers to the design of a test vector to activate the fault model and verify whether the test vector can be detected; the fault simulation refers to the use of a fault simulation tool to evaluate the effectiveness of the test vector and determine which faults can be detected.
[0117] Step S302: Based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, calculate the diagnostic coverage corresponding to the chip.
[0118] Specifically, the diagnostic coverage corresponding to the chip is the weighted sum of the diagnostic coverage corresponding to each module, that is, the product of the diagnostic coverage corresponding to each module and its corresponding weight is calculated, and the products of all modules are added together to obtain the weighted sum of the diagnostic coverage corresponding to each module, thereby obtaining the diagnostic coverage corresponding to the chip. It can be understood that the sum of the weights of all modules of the chip is 1.
[0119] In an embodiment of the present application, by utilizing the diagnostic coverage corresponding to each module and the weight corresponding to each module, a weighted sum is calculated, and the weighted sum is used as the diagnostic coverage corresponding to the chip. This can better integrate the diagnostic coverage of each module and make the diagnostic coverage corresponding to the chip more accurate.
[0120] Step S303: Determine whether the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold.
[0121] Specifically, the diagnostic coverage threshold is a preset threshold, which is related to the functional safety level, and each functional safety level corresponds to a diagnostic coverage threshold, which is represented in the form of a percentage. It can be understood that the higher the functional safety level, the higher the diagnostic coverage threshold.
[0122] If the diagnostic coverage corresponding to the chip is less than the diagnostic coverage threshold, the process proceeds to step S304.
[0123] If the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, proceed to step S305.
[0124] Step S304: adjusting the functional safety module corresponding to the module.
[0125] Specifically, if the diagnostic coverage corresponding to the chip is less than the diagnostic coverage threshold, it means that the chip has not reached the corresponding functional safety level. At this time, it is necessary to adjust the functional safety module corresponding to at least one module to improve the diagnostic coverage corresponding to the chip, and return to step S301 to perform safety simulation on the chip again, determine the diagnostic coverage corresponding to each module, and calculate the diagnostic coverage corresponding to the chip again, and iterate until the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold.
[0126] By performing functional safety simulation during the chip design process, determining the diagnostic coverage corresponding to each module of the chip, and further calculating the diagnostic coverage corresponding to the chip, and iteratively adjusting the functional safety module corresponding to the module, the diagnostic coverage corresponding to the chip meets the preset functional safety level. This application can realize chip safety verification in the chip design stage, thereby ensuring the safety of the chip.
[0127] Step S305: Determine whether the chip meets a preset functional safety level.
[0128] Specifically, if the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, it is determined that the chip reaches a preset functional safety level.
[0129] In some embodiments, the preset functional safety level includes an ASIL (Automotive Safety Integrity Level) level, which is an automotive safety integrity level, a key concept defined in the ISO 26262 standard, used to evaluate and classify the safety requirements of automotive electronic systems and components. Among them, the ASIL level includes ASIL A, ASIL B, ASIL C and ASIL D. Among them, ASIL A corresponds to the lowest safety requirements and is applicable to functions with lower risks; ASIL B corresponds to medium safety requirements and is applicable to functions with medium risks; ASIL C corresponds to higher safety requirements and is applicable to functions with high risks; ASIL D corresponds to the highest safety requirements and is applicable to functions with extremely high risks.
[0130] Among them, each ASIL level corresponds to a diagnostic coverage threshold. For example, the diagnostic coverage threshold corresponding to ASIL C is 95%.
[0131] In some embodiments, before calculating the diagnostic coverage corresponding to the chip, it is necessary to confirm whether each module meets the corresponding diagnostic coverage target. After each module meets the corresponding diagnostic coverage target, the diagnostic coverage corresponding to the chip is calculated; if there is at least one module that does not meet the corresponding diagnostic coverage target, the functional safety module corresponding to the at least one module is adjusted until each module meets the corresponding diagnostic coverage target.
[0132] For details, please refer to Figure 4 , Figure 4 It is a flowchart of another chip security design method provided in an embodiment of the present application;
[0133] like Figure 4 As shown, the process of the chip security design method includes:
[0134] Step S401: Perform security simulation on the chip to determine the diagnostic coverage corresponding to each module.
[0135] Step S402: Determine whether the diagnostic coverage corresponding to each module meets the corresponding diagnostic coverage target.
[0136] Specifically, each module corresponds to a diagnostic coverage target, and the diagnostic coverage target corresponds to a diagnostic coverage threshold, which is used to characterize the proportion of detected faults that the module needs to meet. If the diagnostic coverage corresponding to a module is greater than or equal to its corresponding diagnostic coverage threshold, it is determined that the diagnostic coverage corresponding to the module meets the corresponding diagnostic coverage target; if the diagnostic coverage corresponding to a module is less than its corresponding diagnostic coverage threshold, it is determined that the diagnostic coverage corresponding to the module does not meet the corresponding diagnostic coverage target.
[0137] If the diagnostic coverage corresponding to each module meets the corresponding diagnostic coverage target, the process proceeds to step S403.
[0138] If there is at least one module whose corresponding diagnostic coverage does not meet the corresponding diagnostic coverage target, the process goes to step S405.
[0139] Step S403: Based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, calculate the diagnostic coverage corresponding to the chip.
[0140] Step S404: determine whether the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold.
[0141] Step S405: adjusting the functional safety module corresponding to the module.
[0142] Specifically, after adjusting the functional safety module corresponding to the module, return to step S401 to re-simulate the chip for safety, determine the diagnostic coverage corresponding to each module, and repeat subsequent steps S402-S404 until it is determined that the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, so as to determine that the chip meets the preset functional safety level.
[0143] Step S406: Determine whether the chip meets a preset functional safety level.
[0144] By judging whether each module meets the corresponding diagnostic coverage target before calculating the corresponding diagnostic coverage of the chip, and if not, adjusting the functional safety module corresponding to the module until each module meets the corresponding diagnostic coverage target, and then calculating the corresponding diagnostic coverage of the chip, this application can better meet the needs of chip design, thereby better realizing chip safety verification, and is conducive to improving the stability of subsequently produced chips.
[0145] It is understandable that the chip includes a variety of different modules, and different modules require different functional safety mechanisms to be designed. Therefore, different modules correspond to different functional safety modules. For example: standard functional modules use standard functional safety modules, and non-standard functional modules use customized functional safety modules.
[0146] Please refer to Figure 5 , Figure 5 It is a schematic diagram of the structure of another chip provided in an embodiment of the present application.
[0147] like Figure 5 As shown, the chip 200 includes: a first module 211 and a second module 212 , wherein the first module 211 corresponds to a first functional safety module 221 , and the second module 212 corresponds to a second functional safety module 222 .
[0148] In some embodiments, the first module 211 is a standard functional module, for example, a processor module, and the first functional safety module 221 is a standard functional safety module, wherein the standard functional safety module corresponds to a standard functional safety mechanism, for example, an ECC protection mechanism, a lock-step protection mechanism (Lock_step protection mechanism), and a parity protection mechanism.
[0149] In some embodiments, the second module 212 is a customized functional module, and the second functional safety module 222 is a customized functional safety module, wherein the customized functional safety module corresponds to a customized functional safety mechanism. The customized functional modules correspond to different customized designs, and different customization methods are used for different test technologies. For example, for STL (Software Test Library, STL) test technology, more software configurations and running programs can be added to allow more circuits to run, thereby improving the diagnostic coverage; for BIST (Built-InSelf-Test, BIST) test technology, more test stimulus data can be added to allow more circuits to run, thereby improving the diagnostic coverage; for PGC (Programmable Gate Array, PGC) test technology, more pattern test stimulus and corresponding inspection data can be added to allow more circuits to run, thereby improving the diagnostic coverage.
[0150] In some embodiments, since the functional safety modules corresponding to the first module and the second module are different, the first module and the second module need to be considered comprehensively when calculating the diagnostic coverage of the chip. Similarly, to iteratively adjust the functional safety module corresponding to the module, it is necessary to adjust the first functional safety module corresponding to the first module and / or the second functional safety module corresponding to the second module, that is, iteratively adjust the first functional safety module and / or the second functional safety module.
[0151] For details, please refer to Figure 6 , Figure 6 It is a schematic diagram of the overall process of a chip security design method provided in an embodiment of the present application.
[0152] like Figure 6As shown in the figure, the overall process of the chip's security design method includes:
[0153] Step S601: Determine the diagnostic coverage corresponding to the first module.
[0154] It should be noted that the method of calculating the diagnostic coverage corresponding to the first module is the same as the method of calculating the diagnostic coverage corresponding to each module mentioned above, which will not be repeated here.
[0155] Step S602: Determine whether the diagnostic coverage corresponding to the first module meets the first diagnostic coverage target.
[0156] Specifically, the first diagnostic coverage target corresponds to a first diagnostic coverage threshold. If the diagnostic coverage corresponding to the first module is greater than or equal to the first diagnostic coverage threshold, it is determined that the diagnostic coverage corresponding to the first module meets the first diagnostic coverage target; if the diagnostic coverage corresponding to the first module is less than the first diagnostic coverage threshold, it is determined that the diagnostic coverage corresponding to the first module does not meet the first diagnostic coverage target.
[0157] If the diagnostic coverage corresponding to the first module meets the first diagnostic coverage target, the process proceeds to step S603.
[0158] If the diagnostic coverage corresponding to the first module does not meet the first diagnostic coverage target, proceed to step S605.
[0159] By first determining whether the first module meets its corresponding diagnostic coverage target, it is beneficial to customize the functional safety modules of other modules after the first module meets the diagnostic coverage target to ensure the safety of the chip. That is, first determine whether the standard functional module meets the corresponding diagnostic coverage target, and then further customize the functional safety modules of other functional modules, so as to meet the design requirements of the chip.
[0160] Step S603: Calculate the diagnostic coverage corresponding to the chip based on the diagnostic coverage corresponding to the first module and the first weight.
[0161] Specifically, the diagnostic coverage corresponding to the chip is the weighted sum of the diagnostic coverage corresponding to the first module. It should be noted that in step S603, the diagnostic coverage of all modules that have been functionally designed is calculated. Since only the first module is functionally designed at this time, and the second module is not functionally customized, the sum of the first weights of all the first modules is 1. Therefore, the diagnostic coverage corresponding to the chip can be calculated based on the diagnostic coverage corresponding to the first module and the first weight.
[0162] Step S604: determine whether the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold.
[0163] Specifically, the diagnostic coverage corresponding to the chip is obtained by calculating the weighted sum of the diagnostic coverage corresponding to the first module.
[0164] If the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold, the process proceeds to step S605.
[0165] If the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, proceed to step S606.
[0166] In an embodiment of the present application, the diagnostic coverage corresponding to the chip is calculated by using the diagnostic coverage corresponding to the first module and the first weight, and the diagnostic coverage corresponding to the chip is used to confirm whether the chip meets the corresponding target functional safety level. The present application can determine that under all standard functional modules, the chip can meet the target functional safety level, which is conducive to further customization of functional safety modules for other modules.
[0167] Step S605: Adjust the first functional safety module.
[0168] Specifically, when the diagnostic coverage corresponding to the first module does not meet the first diagnostic coverage target, the first functional safety module is adjusted. When the diagnostic coverage corresponding to a certain first module does not meet the first diagnostic coverage target, the first functional safety module corresponding to the first module is adjusted in a targeted manner, for example: the circuit design of the first functional safety module is adjusted to improve the diagnostic coverage of the first module.
[0169] Alternatively, when the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold, the first functional safety module is adjusted, wherein when the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold, the first functional safety module corresponding to at least one first module is adjusted, and the diagnostic coverage rate corresponding to the chip is repeatedly calculated until the diagnostic coverage rate corresponding to the chip is greater than or equal to the diagnostic coverage rate threshold. It can be understood that in the process of adjusting the first functional safety module, multiple first functional safety modules may be adjusted, and the first functional safety module currently adjusted may be set to be partially different or completely different from the first functional safety module adjusted last time, so as to improve the adjustment efficiency of the functional safety module.
[0170] After adjusting the first functional safety module, return to step S601, that is, re-perform safety simulation on the chip to determine the diagnostic coverage corresponding to the first module, and repeat subsequent steps S602-S604 until it is determined that the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, then enter step S606.
[0171] Step S606: Determine the second diagnostic coverage corresponding to the second module.
[0172] Please refer to Figure 7, Figure 7 yes Figure 6 Detailed flowchart of step S606 in FIG.
[0173] like Figure 7 As shown, step S606 includes:
[0174] Step S661: Perform functional simulation on the chip.
[0175] Specifically, after completing the circuit design of the second functional safety module corresponding to the second module, the chip is functionally simulated, including: performing functional simulation on the second module of the chip, for example: using a simulation tool to run the HDL code and test cases of the chip together, the simulation tool is used to simulate the behavior of the chip under all possible inputs and generate functional simulation results, wherein the functional simulation results include line coverage.
[0176] Step S662: Determine whether the row coverage corresponding to the second module meets the row coverage target.
[0177] Specifically, the row coverage target corresponds to a row coverage threshold. After obtaining the functional simulation results, the row coverage corresponding to the second module is obtained to determine whether the row coverage corresponding to the second module is greater than the row coverage threshold. If so, it is determined that the row coverage corresponding to the second module meets the row coverage target; if not, it is determined that the row coverage corresponding to the second module does not meet the row coverage target.
[0178] If the row coverage corresponding to the second module does not meet the row coverage target, proceed to step S663.
[0179] If the row coverage corresponding to the second module meets the row coverage target, proceed to step S664.
[0180] Step S663: Adjust the second functional safety module.
[0181] Specifically, if the row coverage corresponding to the second module does not meet the row coverage target, the second functional module is adjusted, for example: the circuit design of the second functional safety module is adjusted to improve the row coverage of the second module until the row coverage of the second module meets the row coverage target, that is, the row coverage of the second module is greater than or equal to the row coverage threshold.
[0182] In some embodiments, the row coverage target, ie, the row coverage threshold, is expressed as a percentage, for example, the row coverage threshold is set to 90%.
[0183] It can be understood that the row coverage threshold is related to the functional safety level. The higher the functional safety level, the larger the row coverage threshold. For example, the functional safety level includes the ASIL (Automotive Safety Integrity Level) level, and the ASIL level includes ASIL A, ASIL B, ASIL C, and ASIL D. The row coverage threshold corresponding to ASIL A is 85%, the row coverage threshold corresponding to ASIL B is 90%, the row coverage threshold corresponding to ASIL C is 95%, and the row coverage threshold corresponding to ASIL D is 98%.
[0184] Step S664: perform an error injection simulation on the second module to determine a second diagnostic coverage corresponding to the second module.
[0185] Specifically, if the row coverage corresponding to the second module meets the row coverage target, an error injection simulation is performed on the second module to determine the second diagnostic coverage corresponding to the second module.
[0186] Please refer to Figure 8 , Figure 8 yes Figure 7 A detailed flowchart of step S664 in FIG.
[0187] like Figure 8 As shown, step S664 includes:
[0188] Step S6641: Output an error list based on the functional safety analysis tool.
[0189] Specifically, the functional safety analysis tool includes an EDA tool, such as functional safety analysis EDA software, which simulates the behavior of the chip and executes test cases to output an error list (fault_list), which is used to identify and correct problems in the architectural design.
[0190] Step S6642: Based on the error list, perform a real fault coverage simulation to output a second diagnostic coverage corresponding to the second module.
[0191] Specifically, the functional safety analysis tool performs real fault coverage simulation based on the error list, including: establishing a fault model, generating test vectors, running a design with inserted faults in a simulation tool, executing all test vectors, and recording which faults are detected to generate a coverage report. The coverage report includes diagnostic coverage. Therefore, through the coverage report, the second diagnostic coverage corresponding to the second module can be output.
[0192] It should be noted that functional simulation is a simulation under normal circuit functions, while error injection simulation is a simulation under the condition of simulated circuit failure. Since error injection simulation needs to traverse the circuit error situation, the number of simulations is large and the simulation time is long. By first performing functional simulation on the second module of the chip to determine whether the row coverage corresponding to the second module meets the row coverage target, since the time required for functional simulation is shorter, the iteration time of error injection simulation can be saved, and due to the advantage of faster functional simulation speed, the row coverage of functional simulation can be used to improve the design iteration speed during the iterative optimization of architectural design.
[0193] Step S607: Determine whether the diagnostic coverage corresponding to the second module meets the second diagnostic coverage target.
[0194] Specifically, the second diagnostic coverage target corresponds to the second diagnostic coverage threshold. If the diagnostic coverage corresponding to the second module is greater than or equal to the second diagnostic coverage threshold, it is determined that the diagnostic coverage corresponding to the second module meets the second diagnostic coverage target; if the diagnostic coverage corresponding to the second module is less than the second diagnostic coverage threshold, it is determined that the diagnostic coverage corresponding to the second module does not meet the second diagnostic coverage target.
[0195] If the diagnostic coverage corresponding to the second module meets the second diagnostic coverage target, proceed to step S608.
[0196] If the diagnostic coverage corresponding to the second module does not meet the second diagnostic coverage target, proceed to step S610.
[0197] Step S608: Calculate the diagnostic coverage corresponding to the chip based on the first diagnostic coverage and the first weight as well as the second diagnostic coverage and the second weight.
[0198] Specifically, the diagnostic coverage corresponding to the chip is the weighted sum of the first diagnostic coverage of all first modules + the product of the second diagnostic coverage of the second module and the second weight, that is,
[0199]
[0200] Among them, T is the diagnostic coverage of the chip, X i is the first diagnostic coverage of the i-th first module, W i is the first weight of the i-th first module, Y is the second diagnostic coverage of the second module, Z is the second weight of the second module, and M is the number of first modules.
[0201] Step S609: Determine whether the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold.
[0202] Specifically, after the diagnostic coverage corresponding to the chip is calculated based on the first diagnostic coverage and the first weight as well as the second diagnostic coverage and the second weight, it is determined whether the diagnostic coverage corresponding to the chip is less than a diagnostic coverage threshold.
[0203] If the diagnostic coverage corresponding to the chip is less than the diagnostic coverage threshold, the process proceeds to step S610.
[0204] If the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, proceed to step S611.
[0205] Step S610: Adjust the second functional safety module.
[0206] Specifically, when the diagnostic coverage corresponding to the second module does not meet the second diagnostic coverage target, the second functional safety module is adjusted. When the diagnostic coverage corresponding to a certain second module does not meet the second diagnostic coverage target, the second functional safety module corresponding to the second module is adjusted in a targeted manner, for example: the circuit design of the second functional safety module is adjusted to improve the diagnostic coverage of the second module.
[0207] Alternatively, when the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold, the second functional safety module is adjusted, wherein when the diagnostic coverage rate corresponding to the chip is less than the diagnostic coverage rate threshold, the second functional safety module corresponding to at least one second module is adjusted, and the diagnostic coverage rate corresponding to the chip is repeatedly calculated until the diagnostic coverage rate corresponding to the chip is greater than or equal to the diagnostic coverage rate threshold. It can be understood that in the process of adjusting the second functional safety module, multiple second functional safety modules may be adjusted, and the second functional safety module currently adjusted may be set to be partially different or completely different from the second functional safety module adjusted last time, so as to improve the adjustment efficiency of the functional safety module.
[0208] Specifically, after adjusting the second functional safety module, return to step S606, that is, re-simulate the chip for safety to determine the diagnostic coverage corresponding to the second module, and repeat the subsequent steps S607-S611 until it is determined that the chip meets the preset functional safety level.
[0209] In some embodiments, the multiple modules of the chip include at least two second modules, wherein each second module corresponds one-to-one to a second diagnostic coverage target.
[0210] Since each second module corresponds to a second functional safety module, it is necessary to traverse all the second modules to determine whether the chip meets the preset functional safety level under all the second functional safety modules.
[0211] Specifically, the method further includes:
[0212] After determining that the second diagnostic coverage corresponding to the current second module meets the corresponding second diagnostic coverage target, enter the next second module and determine whether the second diagnostic coverage corresponding to the second module meets the second diagnostic coverage target until all second modules are traversed.
[0213] Furthermore, since the circuit design of each second module is different, in order to better perform the traversal, all the second modules need to be sorted.
[0214] Specifically, according to the first parameter of each second module, all the second modules are sorted in descending order of the first parameter, wherein the first parameter includes the number of standard circuit units, and the standard circuit unit includes a two-input NAND gate circuit, a multiplexer, an adder, a subtractor, a multiplier, a divider, an encoder, a decoder, etc.
[0215] After all the second modules are sorted according to the number of standard circuit units, the second functional safety module is customized for each second module in turn according to the order of the second modules to generate a second functional safety module corresponding to each second module, and all the second modules are traversed based on the sorting of the first parameter.
[0216] By sorting all the second modules, the second functional safety module can be customized based on the priority, wherein a second module with more standard circuit units has a higher priority, thereby enabling better circuit design and verification.
[0217] Step S611: Whether to traverse all second modules.
[0218] Specifically, determine whether to traverse all the second modules of the chip. If so, enter step S612; if not, enter the next second module and repeat determining the second diagnostic coverage corresponding to the second module and the subsequent steps S606-S609 until all the second modules are traversed.
[0219] For example, the diagnostic coverage of the chip is calculated starting from the first second module. At this time, the diagnostic coverage of the chip is:
[0220]
[0221] Among them, T is the diagnostic coverage of the chip, X i is the first diagnostic coverage of the i-th first module, W i is the first weight of the i-th first module, Y1 is the second diagnostic coverage of the first second module, Z1 is the second weight of the first second module, and M is the number of first modules.
[0222] If the diagnostic coverage rate corresponding to the first second module is greater than or equal to the diagnostic coverage rate threshold, the second second module is entered. At this time, the diagnostic coverage rate corresponding to the chip is:
[0223]
[0224] Among them, T2 is the second diagnostic coverage of the second second module, and Z2 is the second weight of the second second module.
[0225] And so on, until the N-1th second module is reached, where N is the number of second modules. At this time, the diagnostic coverage of the chip is:
[0226]
[0227] Among them, T is the diagnostic coverage of the chip, X i is the first diagnostic coverage of the i-th first module, W i is the first weight of the i-th first module, T j is the second diagnostic coverage of the jth second module, Z j is the second weight of the j-th second module, M is the number of first modules, and N is the number of second modules.
[0228] At this time, if the diagnostic coverage rate corresponding to the chip is greater than or equal to the diagnostic coverage rate threshold, the process proceeds to step S611: whether to traverse all the second modules;
[0229] Obviously, at this time, there is still one last second module that has not participated in the calculation, that is, all the second modules have not been traversed yet, then continue to return to step S606, and execute steps S606-step S610 to traverse all the second modules. After traversing all the second modules and determining that all the second modules meet the corresponding second diagnostic coverage target, calculate the diagnostic coverage corresponding to the chip according to the first diagnostic coverage, the first weight, the second diagnostic coverage, and the second weight, specifically including:
[0230] The diagnostic coverage corresponding to the chip is calculated based on the first diagnostic coverage and the first weight corresponding to the first module, and the second diagnostic coverage and the second weight corresponding to each second module.
[0231] Specifically, the diagnostic coverage corresponding to the chip is the weighted sum of the first diagnostic coverage of all first modules and the weighted sum of the second diagnostic coverage of all second modules, that is,
[0232]
[0233] Among them, T is the diagnostic coverage of the chip, X iis the first diagnostic coverage of the i-th first module, W i is the first weight of the i-th first module, Y j is the second diagnostic coverage of the jth second module, Z j is the second weight of the jth second module, M is the number of first modules, and N is the number of second modules. The sum of the first weights of all first modules and the second weights of all second modules is 1, that is,
[0234] Step S612: Determine whether the chip meets a preset functional safety level;
[0235] Specifically, if the diagnostic coverage of the chip calculated based on the first module and the diagnostic coverage of the chip calculated by the second module both meet the preset functional safety level, it is determined that the chip meets the preset functional safety level.
[0236] In an embodiment of the present application, functional safety simulation is performed during the chip design process to determine the diagnostic coverage corresponding to each module of the chip, and the diagnostic coverage corresponding to the chip is further calculated. The functional safety module corresponding to the module is iteratively adjusted to make the diagnostic coverage corresponding to the chip meet the preset functional safety level. The present application can realize chip safety verification in the chip design stage, thereby ensuring the safety of the chip.
[0237] For details, please refer to Fig. 9 , Fig. 9 It is a flowchart of a weight corresponding to a calculation module provided in an embodiment of the present application.
[0238] like Fig. 9 As shown, the weight calculation process corresponding to the calculation module includes:
[0239] Step S901: Obtain circuit RTL code.
[0240] It can be understood that RTL (Register Transfer Level) code is a hardware description language (HDL) code that describes the logical functions of digital circuits. It defines data transmission and logical operations between registers and is the basis of digital circuit design.
[0241] Step S902: Perform RTL synthesis on the circuit RTL code to obtain a circuit netlist.
[0242] It is understood that RTL synthesis is a key step in digital circuit design, which converts a high-level abstract design written in a hardware description language (HDL) into a specific gate-level logic representation. In some embodiments, RTL synthesis is performed by a professional synthesis tool, such as Synopsys' Design Compiler or Cadence's Genus. By performing RTL synthesis on the circuit RTL code through the synthesis tool, a circuit netlist (netlist), that is, a gate-level netlist, can be obtained.
[0243] Step S903: Determine the first parameter of each module according to the circuit netlist.
[0244] It is understood that the circuit netlist is used to describe how to use specific logic gates and connections to implement the functions described in the original RTL. In addition, the circuit netlist is used to show in detail how the logic function is implemented through a series of standard circuit units (such as logic gates, triggers, etc.) and the connections between the standard circuit units.
[0245] In an embodiment of the present application, the first parameter includes the number of standard circuit units, and the number of standard circuit units can be obtained through a circuit netlist.
[0246] Step S904: Calculate the weight of each module according to the first parameter of each module.
[0247] Specifically, the weight of each module may be calculated according to the number of standard circuit units of each module, wherein the weight of each module=the number of standard circuit units of the module / the number of all standard circuit units of the chip.
[0248] In some embodiments, the chip module may include multiple sub-modules, for example: CPU module: Cache sub-module, ALU sub-module, instruction reading sub-module, decoding sub-module and other sub-modules, and each sub-module also corresponds to a diagnostic coverage rate. The diagnostic coverage rate of the module can be calculated through the diagnostic coverage rate of each sub-module.
[0249] Please refer to Fig.10 , Fig.10 It is a schematic diagram of a flow chart of a diagnostic coverage rate corresponding to a calculation module provided in an embodiment of the present application;
[0250] like Fig.10 As shown, the process of the diagnostic coverage corresponding to the calculation module includes:
[0251] Step S1001: Determine the diagnostic coverage corresponding to each submodule in the module.
[0252] Specifically, each sub-module in the module corresponds to a sub-functional safety module. During the chip simulation process, the diagnostic coverage corresponding to each sub-module can be determined through fault models, test vectors, fault simulation, etc.
[0253] Step S1002: Calculate the diagnostic coverage corresponding to the module according to the diagnostic coverage corresponding to each submodule and the weight corresponding to each submodule.
[0254] Specifically, the weight of each sub-module of the module is unique, and the diagnostic coverage corresponding to the module can be calculated through the diagnostic coverage corresponding to each sub-module and the weight corresponding to each sub-module. That is, the diagnostic coverage corresponding to the module is the weighted sum of the diagnostic coverage of all the sub-modules of the module.
[0255] In some embodiments, the weight of each submodule is related to the number of standard circuit units of the submodule. Specifically, the weight of the submodule=the number of standard circuit units of the submodule / the number of all standard circuit units of the module.
[0256] In some embodiments, the method further includes: calculating the weight corresponding to each submodule, specifically including:
[0257] Acquire a first parameter and a second parameter of the submodule, wherein the first parameter includes the number of standard circuit units, and the second parameter includes a preset importance value;
[0258] The weight of the submodule is determined according to the first parameter and / or the second parameter of the submodule.
[0259] Specifically, the preset importance value is used to characterize the importance of the submodule. For example, if the number of standard circuit units of a submodule is small, but the importance of the submodule is high, the weight of the submodule is adjusted by the preset importance value. For example, if the importance of the ALU submodule in the CPU module is high, but the number of standard circuit units of the ALU submodule is small, then a higher importance value is pre-set for the ALU submodule, and the importance value is added to the number of standard circuit units of the ALU submodule / the number of all standard circuit units of the module to obtain the weight of the ALU submodule. It can be understood that the preset importance value can be set according to specific needs, for example, the value range of the preset importance value is set to [0,0.5].
[0260] For example: the weight of a sub-module = (the number of standard circuit units of the sub-module / the number of all standard circuit units of the module) * the first coefficient + (the preset importance value / the sum of the preset importance values) * the second coefficient, where the first coefficient + the second coefficient = 1, for example: the first coefficient and the second coefficient are both 0.5.
[0261] By combining the number of standard circuit units of the submodule and the preset importance value corresponding to the submodule, the weight of the submodule can be better determined.
[0262] See also Fig.11 , Fig.11 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0263] like Fig.11 As shown, the electronic device 110 includes one or more processors 111 and a memory 112. Fig.11 A processor 111 is taken as an example.
[0264] The processor 111 and the memory 112 may be connected via a bus or other means. Fig.11 The example of connecting through bus is taken in the following.
[0265] Processor 111 is used to perform safety simulation on the chip and determine the diagnostic coverage corresponding to each module; calculate the diagnostic coverage corresponding to the chip based on the diagnostic coverage corresponding to each module and the weight corresponding to each module; if the diagnostic coverage corresponding to the chip is less than the diagnostic coverage threshold, iteratively adjust the functional safety module corresponding to the module until the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, wherein the diagnostic coverage threshold includes the diagnostic coverage corresponding to the preset functional safety level.
[0266] By performing functional safety simulation during the chip design process, determining the diagnostic coverage corresponding to each module of the chip, and further calculating the diagnostic coverage corresponding to the chip, and iteratively adjusting the functional safety module corresponding to the module, the diagnostic coverage corresponding to the chip meets the preset functional safety level. This application can realize chip safety verification in the chip design stage, thereby ensuring the safety of the chip.
[0267] The processor 111 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0268] The memory 112, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the chip security design method in the embodiment of the present application. The processor 111 can implement the chip security design method in any of the above method embodiments by running the non-transitory software programs, instructions and modules stored in the memory 112. Specifically, the memory 112 may include a volatile memory (volatile memory, VM), such as a random access memory (random access memory, RAM); the memory 112 may also include a non-volatile memory (non-volatile memory, NVM), such as a read-only memory (read-only memory, ROM), a flash memory (flash memory), a hard disk drive (hard disk drive, HDD) or a solid-state drive (solid-state drive, SSD) or other non-transitory solid-state storage devices; the memory 112 may also include a combination of the above types of memories.
[0269] The memory 112 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 112 may optionally include a memory remotely arranged relative to the processor 111, and these remote memories may be connected to the processor 111 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0270] One or more modules are stored in the memory 112, and when executed by one or more processors 1011, the chip security design method in any of the above method embodiments is executed, for example, the above described Figure 3 The steps shown.
[0271] An embodiment of the present application also provides a non-volatile computer storage medium, which stores computer executable instructions, and the computer executable instructions are executed by one or more processors. For example, the one or more processors can execute the chip security design method in any of the above method embodiments, for example, execute the various steps described above.
[0272] The above-described device or equipment embodiments are merely illustrative, wherein the unit modules described as separate components may or may not be physically separated, and the components displayed as module units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network module units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0273] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution can be essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute various embodiments or certain parts of the embodiments.
[0274] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A chip security design method, characterized in that: The chip includes multiple modules, and the method includes: Performing security simulation on the chip to determine the diagnostic coverage corresponding to each module; Based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, calculating the diagnostic coverage corresponding to the chip; If the diagnostic coverage corresponding to the chip is less than the diagnostic coverage threshold, the functional safety module corresponding to the module is iteratively adjusted until the diagnostic coverage corresponding to the chip is greater than or equal to the diagnostic coverage threshold, wherein the diagnostic coverage threshold includes the diagnostic coverage corresponding to a preset functional safety level.
2. The method according to claim 1, characterized in that Each module corresponds to a functional safety module, and each functional safety module corresponds to a diagnostic coverage target; Before calculating the diagnostic coverage corresponding to the chip, the method further includes: Determine whether the diagnostic coverage of each module meets the corresponding diagnostic coverage target; The method further comprises: If the diagnostic coverage corresponding to each module meets the corresponding diagnostic coverage target, then based on the diagnostic coverage corresponding to each module and the weight corresponding to each module, the diagnostic coverage corresponding to the chip is calculated; If the diagnostic coverage corresponding to a certain module does not meet the corresponding diagnostic coverage target, the functional safety module corresponding to the module is adjusted so that the diagnostic coverage corresponding to the module meets the corresponding diagnostic coverage target.
3. The method according to claim 1, characterized in that The plurality of modules include at least one first module, the first module corresponds to a first functional safety module, a first weight, and a first diagnostic coverage, the first functional safety module corresponds to a first diagnostic coverage target, wherein the first functional safety module is a standard functional safety module; The determining the diagnostic coverage corresponding to each module includes: determining the diagnostic coverage corresponding to the first module; The method further comprises: Determining whether the diagnostic coverage corresponding to the first module meets the first diagnostic coverage target; If yes, then the step of calculating the diagnostic coverage corresponding to the chip based on the diagnostic coverage corresponding to each module and the weight corresponding to each module includes: calculating the diagnostic coverage corresponding to the chip based on the first diagnostic coverage corresponding to the first module and the first weight; If not, the first functional safety module is adjusted until the coverage diagnostic rate corresponding to the first module meets the first diagnostic coverage rate target.
4. The method according to claim 3, characterized in that The plurality of modules include a second module, the second module corresponds to a second functional safety module, a second weight, and a second diagnostic coverage, the second functional safety module corresponds to a second diagnostic coverage target, wherein the second functional safety module is a customized functional safety module; The determining of the diagnostic coverage corresponding to each module includes: determining a second diagnostic coverage corresponding to the second module; After the diagnostic coverage corresponding to the chip calculated based on the first diagnostic coverage corresponding to the first module and the first weight is greater than or equal to the diagnostic coverage threshold, the method further includes: Determining whether a second diagnostic coverage rate corresponding to the second module meets a second diagnostic coverage rate target; If so, the step of calculating the diagnostic coverage corresponding to the chip based on the diagnostic coverage corresponding to each module and the weight corresponding to each module includes: calculating the diagnostic coverage corresponding to the chip according to the first diagnostic coverage, the first weight, the second diagnostic coverage, and the second weight; If not, adjust the second functional safety module until the diagnostic coverage corresponding to the second module meets the second diagnostic coverage target.
5. The method according to claim 4, characterized in that The determining a second diagnostic coverage corresponding to the second module includes: Performing functional simulation on the chip to determine whether the row coverage corresponding to the second module meets the row coverage target; If yes, performing an error injection simulation on the second module to determine a second diagnostic coverage corresponding to the second module; If not, the second functional safety module is adjusted until the row coverage corresponding to the second module meets the row coverage target.
6. The method according to claim 5, characterized in that The performing error injection simulation on the chip to determine a second diagnostic coverage corresponding to the second module includes: Output error list based on functional safety analysis tools; Based on the error list, a real fault coverage simulation is performed to output a second diagnostic coverage corresponding to the second module.
7. The method according to claim 4, characterized in that The plurality of modules include at least two second modules, each second module corresponding to a second diagnostic coverage target; The method further comprises: After determining that the second diagnostic coverage corresponding to the current second module meets the corresponding second diagnostic coverage target, enter the next second module and determine whether the second diagnostic coverage corresponding to the second module meets the second diagnostic coverage target until all second modules are traversed.
8. The method according to claim 7, characterized in that The method further comprises: According to a first parameter of each second module, sorting all the second modules in descending order of the first parameter, wherein the first parameter includes the number of standard circuit units; According to the order of the second modules, the second functional safety module is customized for each second module in turn to generate a second functional safety module corresponding to each second module, and all the second modules are traversed based on the order of the first parameters.
9. The method according to claim 7, characterized in that: The method further comprises: After determining that all second modules meet the corresponding second diagnostic coverage target, calculating the diagnostic coverage corresponding to the chip according to the first diagnostic coverage, the first weight, the second diagnostic coverage, and the second weight, specifically includes: The diagnostic coverage corresponding to the chip is calculated based on the first diagnostic coverage and the first weight corresponding to the first module, and the second diagnostic coverage and the second weight corresponding to each of the second modules.
10. The method according to claim 4, characterized in that The iterative adjustment of the functional safety module corresponding to the module includes: The first functional safety module and / or the second functional safety module are iteratively adjusted.
11. The method according to claim 1, characterized in that: The method further comprises: Determine the weight of each module, including: Get the circuit RTL code; Performing RTL synthesis on the circuit RTL code to obtain a circuit netlist; Determine a first parameter of each module according to the circuit netlist, wherein the first parameter includes the number of standard circuit units; According to the first parameter of each module, the weight of each module is calculated.
12. The method according to claim 1, characterized in that The module includes submodules, and the method further includes: Calculate the diagnostic coverage of each module, including: Determine the diagnostic coverage corresponding to each submodule in the module; The diagnostic coverage corresponding to the module is calculated according to the diagnostic coverage corresponding to each submodule and the weight corresponding to each submodule, wherein the diagnostic coverage corresponding to the module is the weighted sum of the diagnostic coverages of all submodules of the module.
13. The method according to claim 12, characterized in that The method further comprises: Calculate the weight corresponding to each submodule, including: Acquire a first parameter and a second parameter of the submodule, wherein the first parameter includes the number of standard circuit units, and the second parameter includes a preset importance value; The weight of the submodule is determined according to the first parameter and / or the second parameter of the submodule.
14. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is used to execute an executable program code in the memory, and when the executable program code is executed, the processor executes instructions of the chip security design method as described in any one of claims 1 to 13.
15. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed, the chip security design method as described in any one of claims 1 to 13 is implemented.
Citation Information
Cited By
Method and device for improving diagnosis coverage rate in gate-level netlist stage
CN119378463A
