Automotive chip PKI verification system and verification method based on UVM and Python

By combining UVM and Python platforms and using Python reference models to directly perform large number operations, the problem of low efficiency in large-bit-width data parameter operations in the UVM verification environment is solved, and efficient PKI module verification is achieved.

CN119728078BActive Publication Date: 2025-09-26上海芯钛信息科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the UVM verification environment, the SystemVerilog language cannot directly perform complex operations on large-bit-width data parameters, resulting in low verification efficiency of the PKI module.

Method used

Combining the UVM verification platform and Python platform, large number operations are directly performed through the Python reference model, and the monitoring thread script is used to continuously monitor the configuration data in the UVM simulation log file, avoiding the step of writing intermediate files in the UVM verification environment and directly passing the configuration data to the Python reference model for processing.

Benefits of technology

It improves the verification efficiency of the PKI module, simplifies the problem of complex operations on large numbers, and realizes the complete verification of the PKI module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728078B_ABST
    Figure CN119728078B_ABST
Patent Text Reader

Abstract

The present invention relates to a PKI verification system and method for automotive chips based on UVM and Python. Since the PKI module supports large number operations, SystemVerilog cannot directly implement complex large number operations and can only perform operations by breaking large numbers into decimals using specific algorithms, this solution was determined to combine the UVM verification platform with the Python platform. This cleverly utilizes the Python platform's ability to directly perform large number operations to write a dedicated Python reference model. A monitoring thread script continuously monitors configuration data in the UVM simulation log file, eliminating the need for the UVM verification environment to write the configuration data into an intermediate file. The Python reference model then reads the intermediate file for handshake, effectively improving verification efficiency and efficiently achieving complete verification of the PKI (algorithm) module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of chip verification, and relates to a UVM and Python-based automotive chip PKI verification system and verification method. Background Art

[0002] As automotive chips place increasing demands on security and become more connected, PKI (public key infrastructure) modules are becoming increasingly important. The PKI module implements functions such as public key encryption, private key decryption, digital signature verification, and basic mathematical operations. It protects secure communication between devices and protects data from man-in-the-middle attacks or other security threats. Through encryption and signing, it ensures device authentication, data encryption, and integrity. Furthermore, during remote firmware updates, it protects data transmission, ensures the integrity and security authentication of remote firmware update files, and prevents malware injection. PKI hardware supports hardware acceleration, making operations such as encryption, decryption, and signature verification more efficient. PKI can also reduce the CPU computing burden, improving system performance and response speed.

[0003] Therefore, comprehensive verification of the PKI module is essential. However, because the PKI module supports large number operations, the maximum supported parameter length is 4096 bits (bits), and even 8192 bits. The SystemVerilog language used in the UVM verification environment cannot directly perform complex operations on large-bit-width data parameters. The conventional approach is to split the large-bit-width data and then perform operations using specific algorithms, but this process is relatively complex. Therefore, how to achieve efficient PKI verification has become a technical problem to be solved. Summary of the Invention

[0004] In response to the problems existing in the above-mentioned traditional technologies, the present invention proposes a PKI verification system for automotive-grade chips based on UVM and Python, as well as a PKI verification method for automotive-grade chips based on UVM and Python, which can achieve efficient PKI verification of automotive-grade chips.

[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0006] On the one hand, a PKI verification system for automotive chips based on UVM and Python is provided, including a Python reference model and a top-level file of a UVM verification environment created based on the UVM verification methodology. The top-level file includes a test case base class and a design to be tested that is instantiated based on the design code of the PKI module to be tested. The test case base class is used to instantiate the PKI environment component and the PKI process task component. The Python reference model is communicated with the PKI process component.

[0007] The PKI process task component is used to start an external Python reference model and continuously attempt to read parameter data from the Python log file generated by the Python reference model until the agreed end symbol is read. It then obtains all parameter data of the selected large number operation algorithm and the address of the register of the design under test, and writes the obtained parameter data to the corresponding address through the backdoor method according to the address of the register. The PKI process task component is also used to write the random configuration data generated by its own internal PKI global configuration component into the register of the design under test through the register model, and print the random configuration data to the simulation log file. The PKI process task component is also used to check the interrupt and other flag bits of the design under test based on the random configuration data, and compare them with the expected results obtained from the Python log file to obtain the verification result.

[0008] The Python reference model includes a monitoring thread script, a dictionary, and a data processing module. The monitoring thread script is used to monitor all configuration data in the UVM simulation log and write all configuration data into the dictionary. The dictionary is used to pass the configuration data to the data processing module for processing. Finally, all parameter data, addresses, and expected results of the selected large number operation algorithm are written into the Python log file.

[0009] On the other hand, a UVM and Python-based automotive chip PKI verification method is also provided, which is applied to a UVM and Python-based automotive chip PKI verification system. The automotive chip PKI verification system includes a Python reference model and a top-level file of a UVM verification environment created based on the UVM verification methodology. The top-level file includes a test case base class and a design to be tested instantiated based on the design code of the PKI module to be tested. The test case base class is used to instantiate the PKI environment component and the PKI process task component. The Python reference model is communicated with the PKI process component.

[0010] The Python reference model includes a monitoring thread script, a dictionary, and a data processing module. The monitoring thread script is used to monitor all configuration data in the UVM simulation log and write all configuration data into the dictionary. The dictionary is used to pass the configuration data to the data processing module for processing. Finally, all parameter data, addresses, and expected results of the selected large number operation algorithm are written into the Python log file.

[0011] The above-mentioned UVM and Python-based automotive chip PKI verification method includes the following steps:

[0012] After the UVM verification environment completes the clock initialization, it starts the created test case and enters the verification process;

[0013] Generate random configuration data through the PKI process task component and print it in the UVM simulation log;

[0014] Start the Python reference model through the PKI process task component;

[0015] When the PKI process task component reads the agreed end sign from the Python log file, it obtains all the parameter data of the selected large number operation algorithm and the address of the register of the design to be tested, and writes the obtained parameter data to the corresponding address through the backdoor method according to the address of the register;

[0016] The PKI process task component writes the random configuration data generated by the PKI global configuration component within itself into the register of the design under test through the register model, and prints the random configuration data into the simulation log file;

[0017] After checking the interrupt and other flags of the design to be tested based on the random configuration data through the PKI process task component, the verification result is compared with the expected result obtained from the Python log file.

[0018] One of the above technical solutions has the following advantages and beneficial effects:

[0019] The above-mentioned automotive chip PKI verification system and verification method based on UVM and Python, because the PKI module supports large number operations, and SystemVerilog cannot directly implement large number complex operations, it can only use specific algorithms to split large numbers into decimals for operations. Therefore, this algorithm tends to hardware design and is not convenient for verification. After research, this solution decided to combine the UVM verification platform and the Python platform, and cleverly use the feature of the Python platform that can directly perform large number operations to write a dedicated Python reference model. The configuration data in the UVM simulation log file is continuously monitored through the monitoring thread script. The UVM verification environment does not need to write the configuration data into an intermediate file, and the Python reference model reads the intermediate file for handshake, thereby effectively improving the verification efficiency. The problem that SystemVerilog cannot directly perform large number complex operations is solved in a relatively simple and efficient way, and the complete verification of the PKI (algorithm) module is efficiently realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the conventional technology, the following briefly introduces the drawings required for use in the embodiments or the conventional technology descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 This is a structural block diagram of a PKI verification system for automotive chips based on UVM and Python in one embodiment;

[0022] Figure 2 This is a schematic diagram of the verification workflow of a PKI verification system for automotive-grade chips based on UVM and Python in one embodiment;

[0023] Figure 3 A flow chart showing the interaction between a python reference model and a UVM verification environment of a UVM verification platform in one embodiment;

[0024] Figure 4 The figure is a flowchart of a PKI verification method for automotive chips based on UVM and Python in one embodiment. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the description of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0026] It should be noted that the reference to "embodiment" in this document means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of this phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be understood by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0027] The following describes the embodiments of the present invention in detail with reference to the accompanying drawings.

[0028] In one embodiment, Figure 1As shown, a PKI verification system for automotive-grade chips based on UVM and Python is provided. The system includes a Python reference model and a top-level file for the UVM verification environment, created based on the UVM verification methodology. The top-level file includes a test case base class and a design under test (DUT) instantiated based on the design code of the PKI module under test. The test case base class is used to instantiate the PKI environment component and the PKI process task component. The Python reference model communicates with the PKI process component. The PKI process task component initiates an external Python reference model and continuously attempts to read parameter data from a Python log file generated by the Python reference model until a predetermined end marker is reached. It then obtains all parameter data for the selected large number arithmetic algorithm and the register addresses of the DUT. Based on the register addresses, the obtained parameter data is written to the corresponding addresses using a backdoor method. The PKI process task component also writes random configuration data generated by its internal PKI global configuration component to the DUT registers using a register model and prints the random configuration data to a simulation log file. The PKI process task component also checks the interrupt and other flags of the DUT based on the random configuration data and compares them with the expected results obtained from the Python log file to obtain a verification result.

[0029] The Python reference model consists of a monitoring thread script, a dictionary, and a data processing module. The monitoring thread script monitors all configuration data in the UVM simulation log and writes it to the dictionary. The dictionary then passes the configuration data to the data processing module for processing. Finally, all the parameter data, addresses, and expected results of the selected large number operation algorithm are written to the Python log file.

[0030] It can be understood that the design of each component in the above-mentioned UVM and Python-based automotive chip PKI verification system follows the existing UVM verification methodology. According to the detailed verification requirements of the PKI module functions, the verification system is built based on the UVM verification platform to configure the components of the corresponding functions, and complete basic operations such as connection and connectivity testing between the components to ensure normal data flow between the components during the verification process. This embodiment sends the data and configuration of the PKI module to a Python reference model outside the UVM verification environment (i.e., a reference model component written in the Python programming language), uses the Python reference model to perform large number operations, and obtains the configuration of the PKI module through a monitoring thread script. There is no need to introduce additional intermediate files, thereby improving efficiency as a whole and solving the problem that the SystemVerilog language cannot perform large-bitwidth data operations in the UVM verification environment.

[0031] Specifically, such as Figure 1As shown in the figure, the top-level file (TB) of the UVM verification environment created based on the UVM verification methodology includes a test case base class (pki_base_test) and a design under test (DUT) instantiated based on the design code of the PKI module under test. The test case base class is used to instantiate the PKI environment component (pki_env) and the PKI process task component (pki_process). The clock and reset signals required during the operation of the UVM verification environment can be provided by the existing clock and reset components in the UVM verification environment. After the UVM verification environment initializes the clock, the created test case is launched to verify the design under test. The Python reference model outside the UVM verification environment is a reference model component written by taking advantage of the ability of Python scripts to directly perform large number operations. The Python reference model communicates with the PKI process component.

[0032] The PKI process task component launches an external Python reference model (this task flow is denoted as run_pki_ref_py). The Python reference model uses its internal monitoring thread script to continuously monitor the UVM simulation log of the UVM verification environment during simulation. After launching the external Python reference model, the PKI process task component continuously attempts to read parameter data from the Python log file generated by the Python reference model until a predetermined end marker is reached. This task component obtains all parameter data for the selected algorithm and the addresses of one or more registers (memory). Based on the register addresses, the obtained parameter data is written to the corresponding addresses using a backdoor method (this task flow is denoted as set_mem_param_from_py). The PKI process task component then writes random configuration data generated by its internal PKI global configuration component (pki_global_cfg) into the registers of the design under test using the UVM verification environment's register model. The random configuration data is then printed to the simulation log file (a type of UVM simulation log file) for monitoring by the monitoring thread script in the Python reference model (this task flow is denoted as reg_cfg). Finally, the PKI process task component will be used to check the interruption and other flags of the design under test based on the random configuration data (which can be called the actual result), and then compare it with the expected result of the Python reference model obtained from the Python log file (that is, the interruption and other flags expected by the Python reference model based on the random configuration data) to determine whether the two results are consistent, thereby obtaining the verification result; Figure 2 The following figure shows the verification workflow of the automotive chip PKI verification system based on UVM and Python.

[0033] The Python reference model includes a monitoring thread script, a dictionary, and a data processing module. The monitoring thread script is used to monitor all configuration data in the UVM simulation log and write all configuration data into the dictionary. The dictionary is used to pass the configuration data to the data processing module for processing. Finally, all parameter data, addresses, and expected results of the selected algorithm (i.e., the existing large number operation algorithm) are written into the Python log file.

[0034] The above-mentioned automotive chip PKI verification system based on UVM and Python, because the PKI module supports large number operations, while SystemVerilog cannot directly implement complex large number operations, it can only split large numbers into decimals for operations through specific algorithms. Therefore, this algorithm tends to hardware design and is not convenient for verification. After research, this solution decided to combine the UVM verification platform and the Python platform, and cleverly utilize the feature of the Python platform that can directly perform large number operations to write a dedicated Python reference model. The configuration data in the UVM simulation log file is continuously monitored through the monitoring thread script. The UVM verification environment does not need to write the configuration data into an intermediate file, and the Python reference model reads the intermediate file for handshake, thereby effectively improving the verification efficiency. In a relatively concise and efficient way, it solves the problem that SystemVerilog cannot directly perform complex large number operations, and efficiently realizes the complete verification of the PKI (algorithm) module.

[0035] It should be noted that the specific flow chart of the interaction between the Python reference model and the UVM verification environment of the UVM verification platform can be as follows Figure 3 As shown, the monitoring thread of Python corresponds to the monitoring thread maintained by the monitoring thread script. The specific description can be understood by referring to the existing implementation process of the monitoring thread and Python script based on Python in UVM verification, and will not be elaborated in this manual.

[0036] In one embodiment, a PKI environment component includes a PKI global configuration component, a coverage component, and a PKI monitor. The PKI global configuration component is used to impose basic constraints on access to all registers of the design under test. These constraints include the type of random large number arithmetic algorithm, the algorithm bit width, the adjustment factor, and its security configuration. The coverage component is used to generate functional coverage for the design under test. The PKI monitor is used to check for alarm signals from the design under test.

[0037] It is understandable that Figure 1As shown, the PKI environment component Pki_env in this embodiment creates the PKI global configuration component pki_global_cfg, the coverage component (i.e., cov), and the PKI monitor (i.e., pki_mon). The PKI global configuration component Pki_global_cfg is used to impose basic constraints on access to all registers of the design under test, including constraints such as the type of random large number arithmetic algorithm, the algorithm bit width, the adjustment factor, and its security configuration. The coverage component is used to generate functional coverage for the design under test, further ensuring the functional verification completeness of the design under test. The PKI monitor is used to check for DMA (Direct Memory Access) alarms in the design under test.

[0038] In one embodiment, the above-mentioned automotive chip PKI verification system based on UVM and Python can also include a written Makefile file, which is used to connect the file list of the design to be tested and the file list of the UVM verification environment. The Makefile file adds compilation macros and coverage collection options.

[0039] It can be understood that in this embodiment, a Makefile file is also written and a corresponding compilation tool is selected to connect the file list (filelist) of the design to be tested and the file list (filelist) of the UVM verification environment, and options such as compilation macros and coverage collection are added. Through this Makefile file script, the automatic running of the test case in the UVM verification environment for a specified number of times can also be realized. The specific Makefile file script writing and running implementation process can be understood by referring to the relevant implementation process of the existing Makefile file in the art, and will not be elaborated in this specification.

[0040] Each component of the aforementioned UVM- and Python-based automotive chip PKI verification system can be implemented in whole or in part through software, hardware, or a combination thereof. These components can be embedded in or independent of a data processing device in hardware form, or stored in the memory of the aforementioned device in software form, allowing the processor to call and execute the corresponding operations of each module. The aforementioned device can be, but is not limited to, various types of chip verification computers known in the art.

[0041] In one embodiment, a UVM and Python-based automotive chip PKI verification method is provided, which is applied to a UVM and Python-based automotive chip PKI verification system. The automotive chip PKI verification system includes a python reference model and a top-level file of a UVM verification environment created based on the UVM verification methodology. The top-level file includes a test case base class and a design to be tested that is instantiated based on the design code of the PKI module to be tested. The test case base class is used to instantiate the PKI environment component and the PKI process task component. The python reference model is communicated with the PKI process component. The python reference model includes a monitoring thread script, a dictionary, and a data processing module. The monitoring thread script is used to monitor all configuration data in the UVM simulation log and write all configuration data into the dictionary. The dictionary is used to pass the configuration data to the data processing module for processing. Finally, all parameter data, addresses, and expected results of the selected large number operation algorithm are written into the python log file.

[0042] like Figure 4 As shown, the automotive chip PKI verification method based on UVM and Python includes the following steps S10 to S20:

[0043] S10, after the UVM verification environment completes the initialization clock, it starts the created test case to enter the verification process;

[0044] S12, generating random configuration data through the PKI process task component and printing it in the UVM simulation log;

[0045] S14, start the python reference model through the PKI process task component;

[0046] S16, when the PKI process task component reads the agreed end sign from the Python log file, it obtains all parameter data of the selected large number operation algorithm and the address of the register of the design to be tested, and writes the obtained parameter data to the corresponding address through the backdoor method according to the address of the register;

[0047] S18, using the PKI process task component to write the random configuration data generated by the PKI global configuration component within itself into the register of the design under test through the register model, and print the random configuration data into the simulation log file;

[0048] S20, after checking the interrupt and other flag bits of the design to be tested according to the random configuration data through the PKI process task component, compare them with the expected results obtained from the python log file to obtain the verification result.

[0049] The above-mentioned automotive chip PKI verification method based on UVM and Python, because the PKI module supports large number operations, while SystemVerilog cannot directly implement complex large number operations, and can only split large numbers into decimals for operations through specific algorithms, so this algorithm tends to hardware design and is not convenient for verification. After research, this solution decided to combine the UVM verification platform and the Python platform, and cleverly utilize the feature of the Python platform that can directly perform large number operations to write a dedicated Python reference model. The configuration data in the UVM simulation log file is continuously monitored through the monitoring thread script. The UVM verification environment does not need to write the configuration data into an intermediate file, and the Python reference model then reads the intermediate file for handshake, thereby effectively improving the verification efficiency. In a relatively concise and efficient way, it solves the problem that SystemVerilog cannot directly perform complex large number operations, and efficiently realizes the complete verification of the PKI (algorithm) module.

[0050] In one embodiment, the PKI environment component includes a PKI global configuration component, a coverage component, and a PKI monitor. The PKI global configuration component is used to impose basic constraints on access to all registers of the design under test. These constraints include the type of random large number arithmetic algorithm, the algorithm bit width, the adjustment factor, and its security configuration. The coverage component is used to generate functional coverage for the design under test, and the PKI monitor is used to check for alarm signals from the design under test.

[0051] In one embodiment, the above-mentioned automotive chip PKI verification system also includes a written Makefile file, which is used to connect the file list of the design to be tested and the file list of the UVM verification environment. The Makefile file adds compilation macros and coverage collection options.

[0052] For the specific limitations of the PKI verification method for automotive chips based on UVM and Python, please refer to the corresponding limitations of the automotive chip PKI verification system based on UVM and Python above, which will not be repeated here.

[0053] It should be understood that although Figure 4 The steps in the diagram are shown in the order indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Figure 4At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0054] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media used in the various embodiments provided herein may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus DRAM (RDRAM), and DDR DRAM.

[0055] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0056] The above embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that a person skilled in the art would be able to make numerous modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of the present invention. Therefore, the scope of the present invention shall be determined by the appended claims.

Claims

1. A PKI verification system for automotive chips based on UVM and Python, characterized by: The invention comprises a Python reference model and a top-level file of a UVM verification environment created based on the UVM verification methodology, wherein the top-level file comprises a test case base class and a design to be tested instantiated based on the design code of the PKI module to be tested, wherein the test case base class is used to instantiate a PKI environment component and a PKI process task component, and the Python reference model is communicatively connected with the PKI process component; The PKI process task component is used to start an external Python reference model, continuously attempt to read parameter data from the Python log file generated by the Python reference model, obtain all parameter data of the selected large number operation algorithm and the address of the register of the design to be tested after reading the agreed end mark symbol, and write the obtained parameter data to the corresponding address through the backdoor method according to the address of the register; the PKI process task component is also used to write the random configuration data generated by its own internal PKI global configuration component into the register of the design to be tested through the register model, and print the random configuration data to the simulation log file. The PKI process task component is also used to check the interrupt and other flag bits of the design to be tested according to the random configuration data, and compare them with the expected results obtained from the Python log file to obtain a verification result; The Python reference model includes a monitoring thread script, a dictionary, and a data processing module. The monitoring thread script is used to monitor all configuration data in the UVM simulation log and write all configuration data into the dictionary. The dictionary is used to pass the configuration data to the data processing module for processing. Finally, all parameter data, addresses, and expected results of the selected large number operation algorithm obtained are written into the Python log file.

2. The automotive chip PKI verification system based on UVM and Python according to claim 1 is characterized in that: The PKI environment component includes a PKI global configuration component, a coverage component, and a PKI monitor; The PKI global configuration component is used to impose basic constraints on all accesses to the registers of the design under test, wherein the basic constraints include the type of random large number operation algorithm, the algorithm bit width, the adjustment factor and its security configuration; The coverage component is used to generate functional coverage of the design to be tested, and the PKI monitor is used to check the alarm signal of the design to be tested.

3. The automotive chip PKI verification system based on UVM and Python according to claim 1 or 2 is characterized in that: The system also includes a prepared Makefile file, which is used to connect the file list of the design to be tested and the file list of the UVM verification environment, and the Makefile file is added with compilation macros and coverage collection options.

4. A PKI verification method for automotive chips based on UVM and Python, characterized in that: The invention is applied to a UVM- and Python-based PKI verification system for automotive chips. The system includes a Python reference model and a top-level file of a UVM verification environment created based on the UVM verification methodology. The top-level file includes a test case base class and a design to be tested instantiated based on the design code of the PKI module to be tested. The test case base class is used to instantiate a PKI environment component and a PKI process task component. The Python reference model is communicatively connected to the PKI process component. The python reference model includes a monitoring thread script, a dictionary and a data processing module, wherein the monitoring thread script is used to monitor all configuration data in the UVM simulation log and write all configuration data into the dictionary, the dictionary is used to pass the configuration data to the data processing module for processing, and finally all parameter data, addresses and expected results of the selected large number operation algorithm obtained are written into the python log file; The UVM and Python-based automotive chip PKI verification method includes the following steps: After the UVM verification environment completes the clock initialization, it starts the created test case and enters the verification process; Generate random configuration data through the PKI process task component and print it in the UVM simulation log; Start the python reference model through the PKI process task component; When the PKI process task component reads the agreed end sign from the Python log file, it obtains all parameter data of the selected large number operation algorithm and the address of the register of the design to be tested, and writes the obtained parameter data to the corresponding address through the backdoor method according to the address of the register; The PKI process task component writes the random configuration data generated by the PKI global configuration component within itself into the register of the design under test through the register model, and prints the random configuration data into the simulation log file; After checking the interrupt and other flag bits of the design to be tested according to the random configuration data through the PKI process task component, the verification result is compared with the expected result obtained from the python log file.

5. The automotive chip PKI verification method based on UVM and Python according to claim 4 is characterized in that: The PKI environment component includes a PKI global configuration component, a coverage component, and a PKI monitor; The PKI global configuration component is used to impose basic constraints on all accesses to the registers of the design under test, wherein the basic constraints include the type of random large number operation algorithm, the algorithm bit width, the adjustment factor and its security configuration; The coverage component is used to generate functional coverage of the design to be tested, and the PKI monitor is used to check the alarm signal of the design to be tested.

6. The automotive chip PKI verification method based on UVM and Python according to claim 4 or 5 is characterized in that: The automotive chip PKI verification system also includes a written Makefile file, which is used to connect the file list of the design to be tested and the file list of the UVM verification environment. The Makefile file adds compilation macros and coverage collection options.

Citation Information

Patent Citations

  • Hardware trust anchor

    CN102687118A

  • Electronic component authentication method, terminal and electronic component

    CN115913590A