A method for verifying KVM based on a UVM verification platform and related components
Patent Information
- Application Number
- CN202310316032.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-03-24
AI Technical Summary
[0062]综上,本发明公开了一种基于UVM验证平台验证KVM的方法及相关组件,包括生成验证数据,并获取UVM验证平台中的验证平台待测模块根据验证数据生成的验证平台输出数据,然后获取KVM中的KVM待测模块根据与验证数据一致的数据输出的KVM输出数据,其中,KVM待测模块为KVM中与验证平台待测模块对应的模块,最终通过对比验证平台输出数据与KVM输出数据是否一致对KVM中的KVM待测模块的功能进行验证,能够实现对KVM的自动化验证,满足芯片流片验证要求。
Smart Images

Figure CN116340078B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chip verification, and in particular to a method and related components for verifying KVM based on a UVM verification platform. Background Technology
[0002] KVM is an abbreviation for Keyboard, Video, and Mouse. KVM allows control of multiple devices using a single keyboard, video monitor, and mouse, playing a crucial role in remote scheduling and monitoring. Please refer to [link / reference]. Figure 1 , Figure 1 This is a schematic diagram of a KVM structure in the prior art. After receiving input data (data sent from the keyboard port, video monitor port, or mouse port) from the host operating system, the PCIe RP module writes it into the DDR (Double Data Rage RAM) module through the PCIe EP module. The VGA (Video Graphic Array) module and the JPEG (Joint Photographic Experts Group) module actively read the input data from the DDR module and perform related processing. In order to avoid errors in the input data transmission and processing process that would prevent remote scheduling and monitoring of the device, it is necessary to verify the process of KVM transmitting input data.
[0003] UVM (Universal Verification Methodology) is a verification platform development framework based on the SystemVerilog class library. Verification engineers use its reusable components to build functional verification environments with standardized hierarchical structures and interfaces. Therefore, how to use the UVM verification platform to achieve automated verification of KVM is a very important issue. Summary of the Invention
[0004] The purpose of this invention is to provide a method and related components for verifying KVM based on a UVM verification platform. This method can automatically verify the data transmission process of KVM using a UVM verification platform. It is easy to implement, has a simple process, and high verification efficiency, and can meet the verification requirements of chip tape-out.
[0005] To address the aforementioned technical problems, this invention provides a method for verifying KVM based on a UVM verification platform, comprising:
[0006] Generate verification data and obtain the verification platform output data generated by the module under test in the UVM verification platform based on the verification data;
[0007] Obtain KVM output data from the KVM module under test, which is consistent with the verification data. The KVM module under test is the module in KVM that corresponds to the module under test in the verification platform.
[0008] The functionality of the KVM module under test is verified by comparing the output data of the verification platform with the output data of the KVM.
[0009] Preferably, the modules to be tested in the verification platform include a PCIe RP module, a PCIe EP module, a VGA module, and a JPEG module;
[0010] The PCIe RP module is used to receive the verification data and send the verification data to the PCIe EP module through the interface in the UVM verification platform.
[0011] The PCIe EP module is used to store the verification data in the DDR module of the UVM verification platform so that the VGA module and JPEG module can read the verification data from the DDR module and perform corresponding functions.
[0012] Preferably, the generated verification data includes:
[0013] Write register models and attribute codes based on the PCIe EP protocol and configuration space register description, VGA general register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address;
[0014] A data generator component is established based on the register model and the attribute code, and the data generator component is controlled to generate the verification data.
[0015] Preferably, after writing the register model and attribute code according to the PCIe EP protocol and configuration space register description, VGA general-purpose register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address, it also includes:
[0016] Generate transaction protocol packets of different protocols, wherein the transaction protocol packets include PCIe protocol packets, VGA protocol packets and JPEG protocol packets;
[0017] After generating the verification data, the transaction protocol packet and the verification data are populated into the register model;
[0018] The verification data is sent to the PCIe driver component via the adapter component in the register model, so that the PCIe driver component forwards the verification data to the PCIe RP module through the interface.
[0019] Preferably, before generating verification data, the process also includes:
[0020] The automated script executes and enters the UVM_TEST option when selecting KVM module simulation. It then selects the option to be verified from the UVM_TEST option. The UVM_TEST option includes the UVM_TEST_PCIe option for verifying the PCIe RP module and the PCIe EP module, the UVM_TEST_VGA option for verifying the VGA module, and the UVM_TEST_JPEG option for verifying the JPEG module.
[0021] Print out the UVM_TEST_SEQUENCE variable corresponding to the option to be verified, and select and execute the TEST_SEQUENCE variable to be executed from the UVM_TEST_SEQUENCE variable;
[0022] Select the configuration options for the UVM verification platform, wherein the configuration options include host resolution, image data type, and transmission rate;
[0023] Determine the test mode and run the simulation according to the test mode, wherein the test mode includes single sequence test, multi-sequence random test without repetition, and test to fill in randomly generated new sequence.
[0024] Preferably, before generating verification data, the process also includes:
[0025] The automated script is executed to print the UVM_TEST_LIST corresponding to the module under test of the verification platform when KVM subsystem simulation is selected, and to select the ID to be verified from the UVM_TEST_SEQUENCE, which includes the ID of the verification personnel.
[0026] Select the UVM_TEST_SEQUENCE corresponding to the module to be tested in the verification platform, and select and execute the TEST_SEQUENCE corresponding to the ID to be verified.
[0027] Preferably, after generating the verification data, the process also includes:
[0028] Coverage is collected when the verification data is generated;
[0029] Each time the verification data passes through a module under test of the verification platform, the external assertion and setup / hold timing check of the interface are triggered, and the coverage is updated.
[0030] If the updated coverage rate is less than a preset coverage threshold, proceed to the step of generating verification data.
[0031] This application also provides a system for verifying KVM based on the UVM verification platform, including:
[0032] The verification platform output data acquisition unit is used to generate verification data and acquire the verification platform output data generated by the verification platform module under test in the UVM verification platform based on the verification data.
[0033] KVM output data acquisition unit is used to acquire KVM output data output by the KVM module under test in KVM based on data consistent with the verification data, wherein the KVM module under test is the module in KVM corresponding to the module under test in the verification platform;
[0034] The comparison and verification unit is used to verify the functionality of the KVM module under test by comparing whether the output data of the verification platform is consistent with the output data of the KVM.
[0035] Preferably, the modules to be tested in the verification platform include a PCIe RP module, a PCIe EP module, a VGA module, and a JPEG module;
[0036] The PCIe RP module is used to receive the verification data and send the verification data to the PCIe EP module through the interface in the UVM verification platform.
[0037] The PCIe EP module is used to store the verification data in the DDR module of the UVM verification platform so that the VGA module and JPEG module can read the verification data from the DDR module and perform corresponding functions.
[0038] Preferably, the verification platform output data acquisition unit includes:
[0039] The register attribute writing unit is used to write register models and attribute codes based on the PCIe EP protocol and configuration space register description, VGA general register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address.
[0040] A verification data generation unit is used to establish a data generator component based on the register model and the attribute code, and to control the data generator component to generate the verification data.
[0041] The first acquisition subunit is used to acquire the verification platform output data generated by the verification platform module under test in the UVM verification platform based on the verification data.
[0042] Preferred options also include:
[0043] The protocol packet generation unit is used to generate transaction protocol packets of different protocols after writing register models and attribute codes based on the protocol and configuration space register description of PCIe EP, VGA general register description, JPEG register description, and the mapping space range and base address of DDR to PCIe RP. The transaction protocol packets include PCIe protocol packets, VGA protocol packets and JPEG protocol packets.
[0044] A data filling unit is used to fill the transaction protocol packet and the verification data into the register model after the verification data is generated;
[0045] The verification data sending unit is used to send the verification data to the PCIe driver component through the adapter component in the register model so that the PCIe driver component can forward the verification data to the PCIe RP module through the interface.
[0046] Preferred options also include:
[0047] The first automated script execution unit is used to execute automated scripts before generating verification data. When selecting KVM module simulation, it enters the UVM_TEST option and selects the option to be verified from the UVM_TEST option. The UVM_TEST option includes the UVM_TEST_PCIe option for verifying the PCIe RP module and the PCIe EP module, the UVM_TEST_VGA option for verifying the VGA module, and the UVM_TEST_JPEG option for verifying the JPEG module.
[0048] The second automated script execution unit is used to print out the UVM_TEST_SEQUENCE variable corresponding to the option to be verified, and to select and execute the TEST_SEQUENCE variable to be executed from the UVM_TEST_SEQUENCE variable.
[0049] The third automated script execution unit is used to select the configuration options of the UVM verification platform, wherein the configuration options include host resolution, image data type and transmission rate;
[0050] The fourth automated script execution unit is used to determine the test mode and perform simulation operation according to the test mode, wherein the test mode includes single sequence test, multi-sequence non-repeating random test, and random generation of new sequence filling test.
[0051] Preferred options also include:
[0052] The fifth automated script execution unit is used to execute automated scripts before generating verification data, print the UVM_TEST_LIST corresponding to the module under test of the verification platform when selecting KVM subsystem simulation, and select the ID to be verified from the UVM_TEST_SEQUENCE, wherein the UVM_TEST_LIST includes the ID of the verification personnel;
[0053] The sixth automated script execution unit is used to select the UVM_TEST_SEQUENCE corresponding to the module to be tested in the verification platform, and select and execute the TEST_SEQUENCE corresponding to the ID to be verified.
[0054] Preferred options also include:
[0055] The coverage initial collection unit is used to collect coverage after the verification data is generated, or when the verification data is generated.
[0056] The coverage update unit is used to trigger external assertions and setup / hold timing checks of the interface and update the coverage whenever the verification data passes through a module under test of the verification platform.
[0057] An automatic execution unit is used to trigger the verification platform output data acquisition unit when the updated coverage is less than a preset coverage threshold.
[0058] This application also provides an apparatus for verifying KVM based on a UVM verification platform, comprising:
[0059] Memory, used to store computer programs;
[0060] A processor, used to execute the computer program to implement the steps of the method for verifying KVM based on the UVM verification platform as described above.
[0061] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for verifying KVM based on the UVM verification platform.
[0062] In summary, this invention discloses a method and related components for verifying KVM based on a UVM verification platform. The method includes generating verification data, acquiring verification platform output data generated by the verification platform module under test (DUT) based on the verification data, acquiring KVM output data from the KVM module under test (DUT) based on data consistent with the verification data, wherein the KVM module under test is the module in KVM corresponding to the verification platform module under test (DUT). Finally, the functionality of the KVM module under test (DUT) in KVM is verified by comparing the verification platform output data with the KVM output data. This method enables automated verification of KVM and meets chip tape-out verification requirements. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the prior art and embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a schematic diagram of the structure of a KVM in the prior art;
[0065] Figure 2 A flowchart of a method for verifying KVM based on a UVM verification platform provided by the present invention;
[0066] Figure 3 This is a schematic diagram of the architecture of a UVM verification platform provided by the present invention;
[0067] Figure 4 This invention provides a schematic diagram of the structure of a system for verifying KVM based on the UVM verification platform.
[0068] Figure 5 A schematic diagram of a device for verifying KVM based on a UVM verification platform provided by the present invention;
[0069] Figure 6 This is a schematic diagram of the structure of a computer-readable storage medium provided by the present invention. Detailed Implementation
[0070] The core of this invention is to provide a method and related components for verifying KVM based on a UVM verification platform. This method can automatically verify the data transmission process of KVM using a UVM verification platform. It is easy to implement, has a simple process, and high verification efficiency, which can meet the verification requirements of chip tape-out.
[0071] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0072] KVM is an abbreviation for Keyboard, Video Monitor, and Mouse. The overall architecture of KVM can be found in [reference needed]. Figure 1 In the KVM, the PCIeRP module receives input data (from the keyboard port, video monitor port, or mouse port) sent by the host operating system and writes it to the DDR module via the PCIe EP module. The VGA and JPEG modules actively read the input data from the DDR module and perform related processing. To avoid errors during input data transmission and processing that could prevent remote scheduling and monitoring of the device, the KVM input data transmission process needs to be verified. This application utilizes the UVM verification platform to automate the verification of the aforementioned input data transmission and processing process.
[0073] Please refer to Figure 2 , Figure 2 A flowchart of a method for verifying KVM based on a UVM verification platform provided by the present invention, the method comprising:
[0074] S1: Generate verification data and obtain the verification platform output data generated by the module under test in the UVM verification platform based on the verification data;
[0075] To automate the verification of KVM data transmission using the UVM verification platform, this embodiment provides a method for verifying KVM based on the UVM verification platform. This method is implemented using the UVM verification platform provided in this embodiment. Please refer to [link / reference]. Figure 3 , Figure 3This is a schematic diagram of the architecture of a UVM verification platform provided by the present invention. The UVM verification platform includes a UVM_TEST module, a PCIe RP module, a PCIe EP module, an interface, a VGA module, a JPEG module, and a DDR module. The overall architecture of the UVM verification platform and the process of processing verification data are largely the same as those of KVM. The execution entity of the method for verifying KVM based on the UVM verification platform provided in this embodiment is the UVM_TEST module in the UVM verification platform. This module first generates verification data, and then sends the verification data to the PCIe RP module and the interface. The interface then sends the verification data to the PCIe EP module and the DDR module. The PCIe EP module stores the verification data in the DDR module. The VGA module and the JPEG module actively read the verification data from the DDR module and perform corresponding operations based on the verification data. This application verifies one step or the entire process of the above-mentioned verification data transmission.
[0076] It should also be noted that the verification data in this application is consistent with the input data sent by the host operating system to KVM. That is, when verifying KVM using the UVM verification platform, the data input to the UVM verification platform must be consistent with the data input to KVM. The verification platform module under test in this application refers to one or more of the modules included in the UVM verification platform, and the verification platform module under test is also consistent with the KVM module under test. For example, when performing functional verification on the VGA module in KVM, the aforementioned verification platform module under test is the VGA module in the UVM verification platform.
[0077] When the modules to be tested on the specified verification platform are different, the output data of the corresponding verification platform will be different because the functions of the modules to be tested on each verification platform are different. The way to obtain the output data of the verification platform will also be different. Different drivers and monitors can be designed in the UVM verification platform to complete the collection of output data of the modules to be tested on different verification platforms.
[0078] S2: Obtain the KVM output data of the KVM module under test in KVM, which is consistent with the verification data. The KVM module under test is the module in KVM that corresponds to the module under test in the verification platform.
[0079] Each module under test included in KVM has a corresponding verification platform module under test in the UVM verification platform. To perform functional verification of KVM, verification data needs to be input into KVM, and KVM output data generated by the KVM module under test based on the verification data needs to be obtained, so that the KVM output data can be compared with the verification platform output data.
[0080] S3: Verify the functionality of the KVM module under test by comparing and verifying whether the output data of the verification platform is consistent with the output data of KVM.
[0081] After obtaining the output data from the verification platform and the KVM output data, compare whether the two are consistent. If the output data from the verification platform and the KVM output data are consistent, it proves that the KVM module under test is functioning normally. If the output data from the verification platform and the KVM output data are inconsistent, it proves that the KVM module under test is not functioning normally.
[0082] In summary, this invention discloses a method for verifying KVM based on a UVM verification platform. The method includes generating verification data, acquiring verification platform output data generated by the verification platform module under test (DUT) based on the verification data, acquiring KVM output data from the KVM module under test (DUT) based on data consistent with the verification data, wherein the KVM module under test is the module in KVM corresponding to the verification platform module under test (DUT). Finally, the functionality of the KVM module under test (DUT) in KVM is verified by comparing the verification platform output data with the KVM output data. This method enables automated verification of KVM, meets chip tape-out verification requirements, and has the advantages of convenient implementation, simple process, and high efficiency and stability.
[0083] Based on the above embodiments:
[0084] In one preferred embodiment, the verification platform includes a PCIe RP module, a PCIe EP module, a VGA module, and a JPEG module.
[0085] The PCIe RP module is used to receive verification data and send the verification data to the PCIe EP module through the interface in the UVM verification platform.
[0086] The PCIe EP module is used to store verification data in the DDR module of the UVM verification platform so that the VGA module and JPEG module can read the verification data from the DDR module and perform the corresponding functions.
[0087] Please refer to Figure 3 , Figure 3This is a schematic diagram of the architecture of a UVM verification platform provided by the present invention. The UVM_TEST module in the UVM verification platform first generates verification data, then sends the verification data to the PCIe RP module and the interface. The interface then sends the verification data to the PCIe EP module and the DDR module. The PCIe EP module stores the verification data in the DDR module. The VGA module and JPEG module actively read the verification data from the DDR module and perform corresponding operations based on the verification data. Functional verification of KVM typically refers to verifying the PCIe RP module, PCIe EP module, VGA module, and JPEG module within the KVM. Therefore, in this embodiment, the modules under test in the UVM verification platform include the PCIe RP module, PCIe EP module, VGA module, and JPEG module, ensuring a one-to-one correspondence with each module under test in the KVM. This allows for both overall functional verification of the KVM and functional verification of individual modules under test within the KVM, making the verification of the KVM more comprehensive.
[0088] Specifically, the input data sent from the keyboard interface, mouse interface, and image interface is sent to the DDR module through the PCIe RP module and PCIe EP module in KVM. The verification data is processed by VGA and can be displayed and operated on the local machine through the DVI interface. The JPEG module can remove redundant image data in the verification data using lossy compression, so as to obtain good image quality with less disk space.
[0089] When using the UVM verification platform to perform functional verification on the PCIe RP and PCIe EP modules in KVM, the UVM_TEST module obtains the data stored in the DDR module by the PCIe RP and PCIe EP modules through the interface, and compares it with the KVM output data of the PCIe RP and PCIe EP modules in KVM obtained by the UVM_TEST module. If the two are consistent, it is determined that the PCIe RP and PCIe EP modules in KVM are functioning normally.
[0090] When using the UVM verification platform to verify the functionality of the VGA module in the KVM, the UVM_TEST module obtains the verification platform output data written by the VGA module in the DDR module through the interface. The verification platform output data is the data generated by the VGA module in the UVM verification platform based on the verification data, which can be displayed on the monitor. Then, it obtains the KVM output data generated by the VGA module in the KVM and compares the verification platform output data with the KVM output data. If the two are consistent, it is determined that the VGA module in the KVM is functioning normally.
[0091] When using the UVM verification platform to verify the functionality of the JPEG module in KVM, the UVM_TEST module obtains the verification platform output data written by the JPEG module in the DDR module through the interface. The verification platform output data is the image data generated by the JPEG module by compressing the image data in the verification data. Then, it obtains the KVM output data generated by the JPEG module in KVM and compares the verification platform output data with the KVM output data. If the two are consistent, it is determined that the JPEG module in KVM is functioning normally.
[0092] In summary, the UVM verification platform in this embodiment has a simple overall architecture. Based on this UVM verification platform, it can perform functional verification of the entire KVM as well as functional verification of a single module under test in KVM, making the verification of KVM more thorough.
[0093] As a preferred embodiment, generating verification data includes:
[0094] Write register models and attribute codes based on the PCIe EP protocol and configuration space register description, VGA general register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address;
[0095] A data generator component is established based on the register model and attribute code, and the data generator component is controlled to generate verification data.
[0096] In this embodiment, the generation of verification data is specifically based on the framework of the UVM verification platform. By filling in the register descriptions and other information, a data generator component is established in the UVM_TEST module. The data generator is then used to generate verification data. Establishing the data generator component is also the initial process of building the UVM verification platform. Specifically, the filled content includes PCIeEP protocol and configuration space register descriptions, VGA general-purpose register descriptions, JPEG register descriptions, and the DDR to PCIe RP mapping space range and base address. These descriptions can be found in the corresponding user manuals and will not be elaborated upon in this application.
[0097] As a preferred embodiment, after writing the register model and attribute code according to the PCIe EP protocol and configuration space register description, VGA general-purpose register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address, the method further includes:
[0098] Generate transaction protocol packets for different protocols, including PCIe protocol packets, VGA protocol packets, and JPEG protocol packets;
[0099] After generating the verification data, the transaction protocol packet and the verification data are populated into the register model;
[0100] The verification data is sent to the PCIe driver component via the adapter component in the register model, so that the PCIe driver component can forward the verification data to the PCIe RP module through the interface.
[0101] Considering the different communication protocols between different KVM modules under test, different transaction protocol packets are also required when building the UVM verification platform. Therefore, in this embodiment, after establishing the data generator component, the subsequent UVM verification platform construction process also includes generating transaction protocol packets with different protocols, including PCIe, VGA, and JPEG protocol packets. These transaction protocol packets and verification data are then combined and populated into the register model. Therefore, when transmitting verification data in the UVM verification platform, data transmission can be performed according to the aforementioned transaction protocol packets. The specific process of sending verification data to the modules under test on the verification platform is as follows: the adapter component in the register model sends the verification data to the PCIe driver component. Then, the PCIe driver component forwards the verification data to the PCIe RP module through the interface. Afterward, the interface can send the verification data to the DDR module, and the PCIe RP module can send the verification data to the PCIe EP module. This ensures that each module under test in the UVM verification platform can perform corresponding functional operations based on the verification data, thereby achieving functional verification of KVM.
[0102] As a preferred embodiment, before generating verification data, the following steps are also included:
[0103] The automated script executes and enters the UVM_TEST option when selecting KVM module simulation. It then selects the option to be verified from the UVM_TEST option. The UVM_TEST option includes the UVM_TEST_PCIe option for verifying PCIe RP and PCIe EP modules, the UVM_TEST_VGA option for verifying VGA modules, and the UVM_TEST_JPEG option for verifying JPEG modules.
[0104] Print the UVM_TEST_SEQUENCE variable corresponding to the option to be verified, and select and execute the TEST_SEQUENCE variable to be executed from the UVM_TEST_SEQUENCE variable;
[0105] Select the configuration options for the UVM verification platform, including host resolution, image data type, and transmission rate.
[0106] Determine the test mode and run the simulation according to the test mode. The test modes include single sequence test, multi-sequence random test without repetition, and test to fill in randomly generated new sequences.
[0107] This embodiment, after building the UVM verification platform, can also automate its configuration. Specifically, it first executes an automated script, then enters the first-level menu: print the sim-list. The sim-list includes KVM module simulation and KVM subsystem simulation. KVM module simulation refers to using the UVM verification platform to perform functional verification on one of the PCIe RP, PCIe EP, VGA, and JPEG modules. KVM subsystem verification refers to performing functional verification on the entire KVM architecture. This application provides an automated configuration process for selecting the corresponding KVM module for simulation from the sim-list using the stdin function.
[0108] After selecting the KVM module for simulation from the stdin function, proceed to the second-level menu: print the corresponding UVM_TEST options. These UVM_TEST options are categorized into UVM_TEST_PCIe, UVM_TEST_VGA, and UVM_TEST_JPEG options based on different submodules. Select the option to be verified from the UVM_TEST options and proceed to the third-level menu: print the corresponding UVM_TEST_SEQUENCE variable. Select the TEST_SEQUENCE variable to be executed. In the UVM verification platform, the test sequence corresponding to the TEST_SEQUENCE variable will be suspended and executed. After completing the above steps, proceed to the fourth-level menu: select the UVM verification platform configuration options, including host resolution, image data type, and transmission rate. Finally, proceed to the fifth-level menu: determine the test mode and run the simulation according to the test mode. Test modes include single-sequence testing, multi-sequence non-repeating random testing, and randomly generated new sequence filling testing. Finally, select the simulation run mode, command-line run mode, or simulation tool interface run mode for automated execution.
[0109] In summary, the above steps automate the configuration for functional verification of a single KVM module using the UVM verification platform, thereby improving the verification efficiency of KVM.
[0110] As a preferred embodiment, before generating verification data, the following steps are also included:
[0111] The automated script prints the UVM_TEST_LIST corresponding to the module under test on the verification platform when selecting KVM subsystem simulation, and selects the ID to be verified from UVM_TEST_SEQUENCE. The UVM_TEST_LIST includes the ID of the verification personnel.
[0112] Select the UVM_TEST_SEQUENCE corresponding to the module to be tested on the verification platform, and select and execute the TEST_SEQUENCE corresponding to the ID to be verified.
[0113] This embodiment, after building the UVM verification platform, can also automate its configuration. Specifically, it first executes an automated script, then enters the first-level menu: print the sim-list. The sim-list includes KVM module simulation and KVM subsystem simulation. KVM module simulation refers to using the UVM verification platform to perform functional verification on one of the PCIe RP, PCIe EP, VGA, and JPEG modules. KVM subsystem verification refers to performing functional verification on the entire KVM architecture. This application provides an automated configuration process for selecting the corresponding KVM subsystem simulation from the sim-list using the stdin function.
[0114] After selecting the KVM subsystem simulation from the stdin function, you will enter the second-level menu: Print and Verify the UVM_TEST_LIST corresponding to the module under test in the platform. The UVM_TEST_LIST includes the IDs of the verification personnel. Select the ID to be verified from UVM_TEST_SEQUENCE to enter the third-level menu. Execute the third-level menu: Print the corresponding UVM_TEST_SEQUENCE, select the TEST_SEQUENCE corresponding to the ID to be verified, and the corresponding test aqueue in the UVM verification platform will be suspended for execution. Finally, select the simulation run mode, command-line run mode, or simulation tool interface run mode for automated execution.
[0115] In summary, the above steps automate the configuration for functional verification of KVM using the UVM verification platform, thereby improving the efficiency of KVM functional verification.
[0116] As a preferred embodiment, after generating the verification data, the method further includes:
[0117] Collect coverage when generating validation data;
[0118] Each time the verification data passes through a module under test on the verification platform, external assertions and setup / hold timing checks of the interface are triggered, and the coverage is updated.
[0119] If the updated coverage is less than the preset coverage threshold, proceed to the step of generating verification data.
[0120] In this embodiment, to automate the UVM verification platform and ensure the correctness of KVM functional verification using the UVM platform, coverage is collected synchronously after verification data generation. Coverage is a means of measuring test integrity and effectiveness, represented by executed code, and used for evaluating reliability, stability, and performance. Each time verification data passes through a module under test on the verification platform, external assertions and setup / hold timing checks of the interface are triggered, and the coverage is updated. It is then determined whether the updated coverage is less than a preset coverage threshold. If the updated coverage is less than the preset threshold, it indicates that the UVM verification platform needs to continue transmitting and processing the verification data. Therefore, the process returns to the step of generating verification data, thereby automating the UVM verification platform and improving the correctness of KVM functional verification using the UVM platform.
[0121] Furthermore, the method for verifying KVM based on the UVM verification platform provided in this application can be applied to the Avatar chip, and this application does not make any special limitations on it.
[0122] In summary, the overall execution flow of the UVM verification platform can be represented as follows:
[0123] 1. Establish a data generator;
[0124] 2. Fill the register model with the verification data generated by the data generator and the transaction protocol packet;
[0125] 3. The verification data is sent to the PCIe driver via the adapter in the register model;
[0126] 4. The PCIe driver sends the verification data to the PCIe RP through the interface.
[0127] 5. The PCIe RP performs read and write operations on the PCIe EP through memory mapping and sends verification data to the PCIe EP;
[0128] 6. The verification data is fed into the various verification platform modules under test within the UVM verification platform;
[0129] 7. Collect coverage once when generating verification data; trigger external assertions and setup / hold timing checks of the interface every time the module under test passes through a verification platform, and update the coverage; if the updated coverage is less than the preset coverage threshold, proceed to the step of generating verification data.
[0130] Therefore, the UVM verification platform used in this embodiment innovates upon the framework of the original UVM verification platform, establishing a verification test case configuration structure suitable for KVM, and designing scripts and simulation environments for KVM simulation verification. It possesses the advantages of rapid platform setup, simple system simulation execution, and high efficiency and stability. The configuration process simulates the process of configuring KVM on a host computer, which is basically consistent with the actual situation. Based on KVM, verification test cases, verification personnel, and verification directions are designed to form an automated UVM verification platform that meets the requirements of chip project tape-out verification and coverage collection.
[0131] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a system for verifying KVM based on a UVM verification platform, provided by the present invention. The system for verifying KVM based on a UVM verification platform includes:
[0132] The verification platform output data acquisition unit 11 is used to generate verification data and acquire the verification platform output data generated by the verification platform module under test in the UVM verification platform based on the verification data.
[0133] KVM output data acquisition unit 12 is used to acquire KVM output data output by the KVM module under test in KVM based on data consistent with the verification data, wherein the KVM module under test is the module in KVM corresponding to the module under test in the verification platform.
[0134] The comparison verification unit 13 is used to verify the functionality of the KVM module under test by comparing whether the output data of the comparison verification platform is consistent with the output data of KVM.
[0135] This invention discloses a system for verifying KVM based on a UVM verification platform. The system includes generating verification data, acquiring verification platform output data generated by the verification platform module under test (DUT) based on the verification data, and then acquiring KVM output data from the KVM module under test (DUT) based on data consistent with the verification data. The KVM module under test is the module in KVM corresponding to the verification platform module under test. Finally, the system verifies the functionality of the KVM module under test by comparing the verification platform output data with the KVM output data. This system enables automated verification of KVM and meets chip tape-out verification requirements.
[0136] For a detailed description of the system for verifying KVM based on the UVM verification platform provided in this application, please refer to the embodiments of the method for verifying KVM based on the UVM verification platform. This application will not repeat the details here.
[0137] Based on the above embodiments:
[0138] In one preferred embodiment, the verification platform includes a PCIe RP module, a PCIe EP module, a VGA module, and a JPEG module.
[0139] The PCIe RP module is used to receive verification data and send the verification data to the PCIe EP module through the interface in the UVM verification platform.
[0140] The PCIe EP module is used to store verification data in the DDR module of the UVM verification platform so that the VGA module and JPEG module can read the verification data from the DDR module and perform the corresponding functions.
[0141] As a preferred embodiment, the verification platform output data acquisition unit 11 includes:
[0142] The register attribute writing unit is used to write register models and attribute codes based on the PCIe EP protocol and configuration space register description, VGA general register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address.
[0143] The verification data generation unit is used to establish a data generator component based on the register model and attribute code, and to control the data generator component to generate verification data.
[0144] The first acquisition subunit is used to acquire the verification platform output data generated by the verification platform module under test in the UVM verification platform based on the verification data.
[0145] As a preferred embodiment, it also includes:
[0146] The protocol packet generation unit is used to generate transaction protocol packets for different protocols after writing register models and attribute codes based on the protocol and configuration space register description of PCIe EP, VGA general register description, JPEG register description, and the mapping space range and base address of DDR to PCIe RP. The transaction protocol packets include PCIe protocol packets, VGA protocol packets and JPEG protocol packets.
[0147] The data filling unit is used to fill the transaction protocol packet and the verification data into the register model after the verification data is generated;
[0148] The verification data sending unit is used to send verification data to the PCIe driver component through the adapter component in the register model so that the PCIe driver component can forward the verification data to the PCIe RP module through the interface.
[0149] As a preferred embodiment, it also includes:
[0150] The first automated script execution unit is used to execute automated scripts before generating verification data. When selecting KVM module simulation, it enters the UVM_TEST option and selects the option to be verified from the UVM_TEST option. The UVM_TEST option includes the UVM_TEST_PCIe option for verifying PCIe RP module and PCIe EP module, the UVM_TEST_VGA option for verifying VGA module, and the UVM_TEST_JPEG option for verifying JPEG module.
[0151] The second automated script execution unit is used to print out the UVM_TEST_SEQUENCE variable corresponding to the option to be verified, and select and execute the TEST_SEQUENCE variable to be executed from the UVM_TEST_SEQUENCE variable.
[0152] The third automated script execution unit is used to select the configuration options of the UVM verification platform, including host resolution, image data type, and transmission rate.
[0153] The fourth automated script execution unit is used to determine the test mode and perform simulation operation according to the test mode. The test modes include single sequence test, multi-sequence random test without repetition, and test that randomly generates new sequences to fill the test.
[0154] As a preferred embodiment, it also includes:
[0155] The fifth automated script execution unit is used to execute automated scripts before generating verification data. When selecting KVM subsystem simulation, it prints the UVM_TEST_LIST corresponding to the module under test of the verification platform and selects the ID to be verified from UVM_TEST_SEQUENCE. The UVM_TEST_LIST includes the ID of the verification personnel.
[0156] The sixth automated script execution unit is used to select the UVM_TEST_SEQUENCE corresponding to the module under test on the verification platform, and to select and execute the TEST_SEQUENCE corresponding to the ID to be verified.
[0157] As a preferred embodiment, it also includes:
[0158] The initial coverage collection unit is used to collect coverage data after the validation data is generated, or while the validation data is being generated.
[0159] The coverage update unit is used to trigger external assertions and setup / hold timing checks of the interface and update the coverage every time the verification data passes through a module under test of the verification platform.
[0160] An automatic execution unit is used to trigger the verification platform output data acquisition unit 11 when the updated coverage is less than a preset coverage threshold.
[0161] Please refer to Figure 5 , Figure 5 This is a schematic diagram of a device for verifying KVM based on a UVM verification platform provided by the present invention. The device for verifying KVM based on a UVM verification platform includes:
[0162] Memory 21 is used to store computer programs;
[0163] The processor 22 is used to implement the steps of the method described above for verifying KVM based on the UVM verification platform when executing a computer program.
[0164] The processor 22 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 22 may be implemented using at least one of the following hardware forms: DSP (Digital Signal Processor), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 22 may also include a main processor and a coprocessor. The main processor, also known as the central processing unit, is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0165] The memory 21 may include one or more computer-readable storage media, which may be non-transitory. The memory 21 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 21 is used to store at least the following computer program, which, after being loaded and executed by the processor 22, is capable of implementing the relevant steps of the method for verifying KVM based on the UVM verification platform disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may also include operating systems and data, and the storage method may be temporary or permanent storage. The operating system may include Windows, Unix, Linux, etc. The data may include, but is not limited to, data related to the method for verifying KVM based on the UVM verification platform.
[0166] It will be understood by those skilled in the art that Figure 5 The structure shown does not constitute a limitation on the apparatus for verifying KVM based on the UVM verification platform and may include more or fewer components than shown.
[0167] In summary, this invention discloses an apparatus for verifying KVM based on a UVM verification platform. When the processor 22 executes the computer program stored in the memory 21, it can perform the following steps: generating verification data, obtaining the verification platform output data generated by the verification platform module under test in the UVM verification platform according to the verification data, and then obtaining the KVM output data output by the KVM module under test in the KVM according to the data consistent with the verification data. The KVM module under test is the module in the KVM that corresponds to the verification platform module under test. Finally, the function of the KVM module under test in the KVM is verified by comparing whether the verification platform output data and the KVM output data are consistent. This can realize automated verification of KVM and meet the chip tape-out verification requirements.
[0168] Please refer to Figure 6 , Figure 6 This is a schematic diagram of a computer-readable storage medium provided by the present invention. The computer-readable storage medium 31 stores a computer program, which, when executed by a processor, implements the steps of the above-described method for verifying KVM based on the UVM verification platform.
[0169] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0170] This invention discloses a computer-readable storage medium 31. The computer program stored in the computer-readable storage medium 31 can perform the following steps: generating verification data, obtaining the verification platform output data generated by the verification platform module under test in the UVM verification platform based on the verification data, then obtaining the KVM output data output by the KVM module under test in the KVM based on the data consistent with the verification data, wherein the KVM module under test is the module in KVM corresponding to the verification platform module under test, and finally verifying the function of the KVM module under test in KVM by comparing whether the verification platform output data and the KVM output data are consistent, thereby realizing automated verification of KVM and meeting the chip tape-out verification requirements.
[0171] For a detailed description of the computer-readable storage medium 31 provided in this application, please refer to the embodiments of the method for verifying KVM on the UVM verification platform; this application will not repeat the details here.
[0172] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0173] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0174] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for validating KVM based on a UVM validation platform, characterized in that, include: Generate verification data and obtain the verification platform output data generated by the verification platform module under test in the UVM verification platform based on the verification data. The UVM verification platform includes the verification platform module under test corresponding to the KVM module under test in KVM. KVM is the KVM switch after tape-out. The verification data is input into KVM, and the KVM output data output by the KVM module under test in KVM according to the verification data is obtained, wherein the KVM module under test is the module in KVM corresponding to the verification platform module under test; The functionality of the KVM module under test is verified by comparing the output data of the verification platform with the output data of the KVM. The modules to be tested in the verification platform include a PCIe RP module, a PCIe EP module, a VGA module, and a JPEG module; The PCIe RP module is used to receive the verification data and send the verification data to the PCIe EP module through the interface in the UVM verification platform. The PCIe EP module is used to store the verification data in the DDR module of the UVM verification platform so that the VGA module and JPEG module can read the verification data from the DDR module and perform corresponding functions.
2. The method for verifying KVM based on the UVM verification platform as described in claim 1, characterized in that, The generated verification data includes: Write register models and attribute codes based on the PCIe EP protocol and configuration space register description, VGA general register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address; A data generator component is established based on the register model and the attribute code, and the data generator component is controlled to generate the verification data.
3. The method for verifying KVM based on the UVM verification platform as described in claim 2, characterized in that, After writing the register model and attribute code based on the PCIe EP protocol and configuration space register description, VGA general-purpose register description, JPEG register description, and the DDR to PCIe RP mapping space range and base address, it also includes: Generate transaction protocol packets of different protocols, wherein the transaction protocol packets include PCIe protocol packets, VGA protocol packets and JPEG protocol packets; After generating the verification data, the transaction protocol packet and the verification data are populated into the register model; The verification data is sent to the PCIe driver component via the adapter component in the register model, so that the PCIe driver component forwards the verification data to the PCIe RP module through the interface.
4. The method for verifying KVM based on the UVM verification platform as described in claim 1, characterized in that, Before generating verification data, the following is also included: The automated script executes and enters the UVM_TEST option when selecting KVM module simulation. It then selects the option to be verified from the UVM_TEST option. The UVM_TEST option includes the UVM_TEST_PCIe option for verifying the PCIe RP module and the PCIe EP module, the UVM_TEST_VGA option for verifying the VGA module, and the UVM_TEST_JPEG option for verifying the JPEG module. Print out the UVM_TEST_SEQUENCE variable corresponding to the option to be verified, and select and execute the TEST_SEQUENCE variable to be executed from the UVM_TEST_SEQUENCE variable; Select the configuration options for the UVM verification platform, wherein the configuration options include host resolution, image data type, and transmission rate; Determine the test mode and run the simulation according to the test mode, wherein the test mode includes single sequence test, multi-sequence random test without repetition, and test to fill in randomly generated new sequence.
5. The method for verifying KVM based on the UVM verification platform as described in claim 1, characterized in that, Before generating verification data, the following is also included: The automated script is executed to print the UVM_TEST_LIST corresponding to the module under test of the verification platform when KVM subsystem simulation is selected, and to select the ID to be verified from the UVM_TEST_SEQUENCE, which includes the ID of the verification personnel. Select the UVM_TEST_SEQUENCE corresponding to the module to be tested in the verification platform, and select and execute the TEST_SEQUENCE corresponding to the ID to be verified.
6. The method for verifying KVM based on the UVM verification platform as described in any one of claims 1 to 5, characterized in that, After generating the verification data, the following is also included: Coverage is collected when the verification data is generated; Each time the verification data passes through a module under test of the verification platform, the external assertion and setup / hold timing check of the interface are triggered, and the coverage is updated. If the updated coverage rate is less than a preset coverage threshold, proceed to the step of generating verification data.
7. A system for validating KVM based on a UVM validation platform, characterized in that, include: The verification platform output data acquisition unit is used to generate verification data and acquire the verification platform output data generated by the verification platform module under test in the UVM verification platform based on the verification data. The UVM verification platform includes a verification platform module under test corresponding to the KVM module under test in KVM, and KVM is a KVM switch after tape-out. The KVM output data acquisition unit is used to input the verification data into the KVM and acquire the KVM output data output by the KVM module under test in the KVM according to the verification data, wherein the KVM module under test is the module in the KVM that corresponds to the module under test of the verification platform. The comparison and verification unit is used to verify the functionality of the KVM module under test by comparing whether the output data of the verification platform is consistent with the output data of the KVM; The modules to be tested in the verification platform include a PCIe RP module, a PCIe EP module, a VGA module, and a JPEG module; The PCIe RP module is used to receive the verification data and send the verification data to the PCIe EP module through the interface in the UVM verification platform. The PCIe EP module is used to store the verification data in the DDR module of the UVM verification platform so that the VGA module and JPEG module can read the verification data from the DDR module and perform corresponding functions.
8. An apparatus for verifying KVM based on a UVM verification platform, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the method for verifying KVM based on the UVM verification platform as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method for verifying KVM based on the UVM verification platform as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Establishment method for KVM ASIC functional verification platform
CN105068908A
Video stream data encryption device, method and equipment of KVM system
CN113709493A