Nothing Special   »   [go: up one dir, main page]

CN117291145A - Verification method and system of system on chip and electronic device - Google Patents

Verification method and system of system on chip and electronic device Download PDF

Info

Publication number
CN117291145A
CN117291145A CN202311576405.5A CN202311576405A CN117291145A CN 117291145 A CN117291145 A CN 117291145A CN 202311576405 A CN202311576405 A CN 202311576405A CN 117291145 A CN117291145 A CN 117291145A
Authority
CN
China
Prior art keywords
code
verification
chip
template
embedded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311576405.5A
Other languages
Chinese (zh)
Inventor
刘兵
邓庆文
胡守雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202311576405.5A priority Critical patent/CN117291145A/en
Publication of CN117291145A publication Critical patent/CN117291145A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/39Circuit design at the physical level
    • G06F30/398Design verification or optimisation, e.g. using design rule check [DRC], layout versus schematics [LVS] or finite element methods [FEM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • G06F30/3308Design verification, e.g. functional simulation or model checking using simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2115/00Details relating to the type of the circuit
    • G06F2115/02System on chip [SoC] design
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

本申请涉及一种片上系统的验证方法、系统和电子装置,其中,该验证方法包括:根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,测试向量中包含逻辑相对应的嵌入式C代码、序列发生器代码以及参考模型代码的;基于嵌入式C代码和序列发生器代码,对片上系统进行仿真,得到目标仿真数据;基于参考模型代码,生成参考数据;将目标仿真数据和参考数据进行比较,并基于比较结果得到针对片上系统的目标验证结果;本实施例在测试向量中引入嵌入式C代码,在验证片上系统中的各功能IP模块之外,还实现了对总线以上的系统级功能的验证,从而解决了相关技术中片上系统的验证效率较低的问题,提高了片上系统的验证效率。

The present application relates to a system-on-chip verification method, system and electronic device, wherein the verification method includes: generating a test vector for verification based on a preset parameter configuration file and a code template file, wherein the test vector contains logic The corresponding embedded C code, sequencer code and reference model code; based on the embedded C code and sequencer code, simulate the on-chip system to obtain the target simulation data; based on the reference model code, generate reference data; The target simulation data is compared with the reference data, and the target verification results for the on-chip system are obtained based on the comparison results; this embodiment introduces embedded C code into the test vector, and in addition to verifying each functional IP module in the on-chip system, it also implements It verifies the system-level functions above the bus, thereby solving the problem of low verification efficiency of the system-on-chip in related technologies and improving the verification efficiency of the system-on-chip.

Description

片上系统的验证方法、系统和电子装置System-on-chip verification method, system and electronic device

技术领域Technical field

本申请涉及集成电路验证领域,特别是涉及片上系统的验证方法、系统和电子装置。The present application relates to the field of integrated circuit verification, and in particular to verification methods, systems and electronic devices for systems on a chip.

背景技术Background technique

随着半导体技术的飞速发展,集成电路(IC)的设计和制造,特别是片上系统(SoC)的设计与制造也越来越复杂,验证逐渐成为集成电路产业中的关键环节。With the rapid development of semiconductor technology, the design and manufacturing of integrated circuits (ICs), especially the design and manufacturing of systems on a chip (SoC), are becoming more and more complex, and verification has gradually become a key link in the integrated circuit industry.

验证的主要目的是检验芯片的各方面功能是否达到设计要求,其中,验证平台的搭建与测试向量的编写是芯片验证的核心。通过搭建验证平台,构建一个能够和待测设计进行交互的验证环境,利用测试向量对待测设计施加激励约束,进而实施验证。现有技术中,通常使用2011年推出的通用验证方论UVM(Universal Verification Methodology)构建验证平台,而用于验证的测试向量由验证工程师结合具体需求自主编写。然而,现有的芯片验证方法通常是针对芯片中的各个功能模块而进行的,而针对片上系统的验证方法不够完善,难以直接从系统层面实现验证,且测试向量的编写难度大,从而导致验证效率较低。The main purpose of verification is to check whether all aspects of the chip's functions meet the design requirements. Among them, the construction of the verification platform and the writing of test vectors are the core of chip verification. By building a verification platform, we build a verification environment that can interact with the design under test, and use test vectors to impose incentive constraints on the design under test, and then implement verification. In the existing technology, the Universal Verification Methodology (UVM) launched in 2011 is usually used to build a verification platform, and the test vectors used for verification are written independently by verification engineers based on specific needs. However, existing chip verification methods are usually conducted for each functional module in the chip, while the verification method for the system-on-chip is not perfect enough, making it difficult to directly implement verification from the system level, and it is difficult to write test vectors, which leads to verification problems. Less efficient.

针对相关技术中存在片上系统的验证效率较低的问题,目前还没有提出有效的解决方案。Regarding the problem of low verification efficiency of system-on-chip in related technologies, no effective solution has been proposed yet.

发明内容Contents of the invention

在本实施例中提供了一种片上系统的验证方法、系统和电子装置,以解决相关技术中片上系统的验证效率较低的问题。This embodiment provides a system-on-chip verification method, system, and electronic device to solve the problem of low verification efficiency of system-on-chip in related technologies.

第一个方面,在本实施例中提供了一种片上系统的验证方法,包括:In the first aspect, this embodiment provides a system-on-chip verification method, including:

根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,所述测试向量中包含嵌入式C代码、序列发生器代码以及参考模型代码,所述嵌入式C代码、所述序列发生器代码以及所述参考模型代码的逻辑相对应;According to the preset parameter configuration file and code template file, a test vector for verification is generated, wherein the test vector contains embedded C code, sequencer code and reference model code. The embedded C code, all The logic of the sequence generator code and the reference model code corresponds;

基于所述嵌入式C代码和所述序列发生器代码,对待测设计进行仿真,得到所述待测设计的目标仿真数据,其中,所述待测设计为片上系统;Based on the embedded C code and the sequencer code, the design under test is simulated to obtain target simulation data of the design under test, where the design under test is a system on a chip;

基于所述参考模型代码,生成参考数据;Generate reference data based on the reference model code;

将所述目标仿真数据和所述参考数据进行比较,并基于比较结果得到针对所述待测设计的目标验证结果。The target simulation data is compared with the reference data, and a target verification result for the design under test is obtained based on the comparison result.

在其中的一些实施例中,所述根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,包括:In some embodiments, generating test vectors for verification based on preset parameter configuration files and code template files includes:

基于所述参数配置文件,获取参数配置信息;Obtain parameter configuration information based on the parameter configuration file;

基于所述代码模板文件,获取嵌入式C模板、序列发生器模板以及参考模型模板;Based on the code template file, obtain the embedded C template, sequencer template and reference model template;

基于所述嵌入式C模板与所述参数配置信息,生成所述嵌入式C代码;Generate the embedded C code based on the embedded C template and the parameter configuration information;

基于所述序列发生器模板与所述参数配置信息,生成所述序列发生器代码;Generate the sequencer code based on the sequencer template and the parameter configuration information;

基于所述参考模型模板与所述参数配置信息,生成所述参考模型代码。The reference model code is generated based on the reference model template and the parameter configuration information.

在其中的一些实施例中,所述基于所述嵌入式C代码和所述序列发生器代码,对待测设计进行仿真,得到所述待测设计的目标仿真数据,包括:In some embodiments, the design under test is simulated based on the embedded C code and the sequencer code to obtain target simulation data of the design under test, including:

基于所述序列发生器代码,产生激励信号;generating an excitation signal based on the sequencer code;

在所述激励信号的作用下,基于所述待测设计运行所述嵌入式C代码,得到运行产生的所述目标仿真数据。Under the action of the excitation signal, the embedded C code is run based on the design to be tested, and the target simulation data generated by the operation is obtained.

第二个方面,在本实施例中提供了一种片上系统的验证系统,所述验证系统包括测试向量生成组件、外部信号组件以及验证控制组件,其中:In the second aspect, this embodiment provides a system-on-chip verification system, which includes a test vector generation component, an external signal component, and a verification control component, wherein:

所述测试向量生成组件,用于根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,所述测试向量中包含嵌入式C代码、序列发生器代码以及参考模型代码,所述嵌入式C代码、所述序列发生器代码以及所述参考模型代码的逻辑相对应;The test vector generation component is used to generate a test vector for verification according to the preset parameter configuration file and code template file, wherein the test vector contains embedded C code, sequencer code and reference model code , the logic of the embedded C code, the sequencer code and the reference model code corresponds;

所述外部信号组件,用于基于所述嵌入式C代码和所述序列发生器代码,对待测设计进行仿真,得到所述待测设计的目标仿真数据;基于所述参考模型代码,生成参考数据;其中,所述待测设计为片上系统;The external signal component is used to simulate the design under test based on the embedded C code and the sequencer code to obtain target simulation data of the design under test; and generate reference data based on the reference model code. ; Wherein, the design to be tested is a system on a chip;

所述验证控制组件,用于将所述目标仿真数据和所述参考数据进行比较,并基于比较结果得到针对所述待测设计的目标验证结果。The verification control component is used to compare the target simulation data and the reference data, and obtain a target verification result for the design under test based on the comparison result.

在其中的一些实施例中,所述验证系统还包括顶层设计组件;所述顶层设计组件连接所述外部信号组件和所述验证控制组件;In some embodiments, the verification system further includes a top-level design component; the top-level design component connects the external signal component and the verification control component;

所述顶层设计组件用于提供信号接口、系统时钟和复位信号;还用于实例化所述验证系统中的各所述组件;The top-level design components are used to provide signal interfaces, system clocks and reset signals; and are also used to instantiate each component in the verification system;

所述顶层设计组件基于UVM验证方法论中的类而实现。The top-level design components are implemented based on classes in the UVM verification methodology.

在其中的一些实施例中,所述测试向量生成组件包括第一获取模块、第二获取模块、第一生成模块、第二生成模块以及第三生成模块,其中:In some embodiments, the test vector generation component includes a first acquisition module, a second acquisition module, a first generation module, a second generation module and a third generation module, wherein:

所述第一获取模块,用于基于所述参数配置文件,获取参数配置信息;The first acquisition module is used to acquire parameter configuration information based on the parameter configuration file;

所述第二获取模块,用于基于所述代码模板文件,获取嵌入式C语言模板、序列发生器模板以及参考模型模板;The second acquisition module is used to acquire the embedded C language template, sequence generator template and reference model template based on the code template file;

所述第一生成模块,用于基于所述嵌入式C语言模板与所述参数配置信息,生成所述嵌入式C代码;The first generation module is used to generate the embedded C code based on the embedded C language template and the parameter configuration information;

所述第二生成模块,用于基于所述序列发生器模板与所述参数配置信息,生成所述序列发生器代码;The second generation module is used to generate the sequencer code based on the sequencer template and the parameter configuration information;

所述第三生成模块,用于基于所述参考模型模板与所述参数配置信息,生成所述参考模型代码。The third generation module is configured to generate the reference model code based on the reference model template and the parameter configuration information.

在其中的一些实施例中,所述外部信号组件包括代理模块,所述代理模块包括序列发生器、驱动器、监测器以及参考模型,其中:In some embodiments, the external signal component includes an agent module, which includes a sequencer, a driver, a monitor, and a reference model, where:

所述序列发生器用于根据所述序列发生器代码,产生激励事务,并将所述激励事务传送至所述驱动器;The sequencer is configured to generate a stimulus transaction according to the sequencer code and transmit the stimulus transaction to the driver;

所述驱动器用于将所述激励事务转化为所述激励信号,并将所述激励信号发送至所述待测设计;The driver is used to convert the stimulus transaction into the stimulus signal, and send the stimulus signal to the design under test;

所述监测器用于采集来自所述待测设计的响应信号,并将所述响应信号转化为响应事务,并将所述响应事务发送至所述验证控制组件;The monitor is used to collect response signals from the design under test, convert the response signals into response transactions, and send the response transactions to the verification control component;

所述参考模型用于基于所述参考模型代理,生成参考事务,并将所述参考事务发送至所述验证控制组件。The reference model is used to generate a reference transaction based on the reference model agent, and send the reference transaction to the verification control component.

在其中的一些实施例中,所述验证控制组件包括计分板;In some of these embodiments, the verification control component includes a scoreboard;

所述计分板用于比较所述响应信号中的所述目标仿真数据与所述参考事务中的所述参考数据,根据比较结果得出所述目标验证结果。The scoreboard is used to compare the target simulation data in the response signal with the reference data in the reference transaction, and obtain the target verification result according to the comparison result.

第三个方面,在本实施例中提供了一种电子装置,包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述第一个方面所述的片上系统的验证方法。In a third aspect, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the computer program. The program implements the system-on-chip verification method described in the first aspect above.

第四个方面,在本实施例中提供了一种存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述第一个方面所述的片上系统的验证方法。In a fourth aspect, this embodiment provides a storage medium on which a computer program is stored. When the program is executed by a processor, the verification method of the system-on-chip described in the first aspect is implemented.

与相关技术相比,在本实施例中提供的片上系统的验证方法,通过根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,测试向量中包含嵌入式C代码、序列发生器代码以及参考模型代码,嵌入式C代码、序列发生器代码以及参考模型代码的逻辑相对应;基于嵌入式C代码和序列发生器代码,对待测设计进行仿真,得到待测设计的目标仿真数据,其中,待测设计为片上系统;基于参考模型代码,生成参考数据;将目标仿真数据和参考数据进行比较,并基于比较结果得到针对待测设计的目标验证结果,解决了相关技术中片上系统的验证效率较低的问题,提高了片上系统的验证效率。Compared with related technologies, the verification method of the system-on-chip provided in this embodiment generates a test vector for verification according to the preset parameter configuration file and code template file, where the test vector contains embedded C code , sequencer code and reference model code, the logic correspondence between the embedded C code, sequencer code and reference model code; based on the embedded C code and sequencer code, simulate the design under test and obtain the design under test Target simulation data, in which the design to be tested is an on-chip system; reference data is generated based on the reference model code; the target simulation data and the reference data are compared, and the target verification results for the design to be tested are obtained based on the comparison results, solving related technologies In order to solve the problem of low verification efficiency of the system on chip, the verification efficiency of the system on chip is improved.

本申请的一个或多个实施例的细节在以下附图和描述中提出,以使本申请的其他特征、目的和优点更加简明易懂。The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more concise and understandable.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the attached picture:

图1是本实施例的片上系统的验证方法的终端的硬件结构框图;Figure 1 is a hardware structure block diagram of a terminal of the verification method of the system-on-chip in this embodiment;

图2是本实施例的片上系统的验证方法的流程图;Figure 2 is a flow chart of the verification method of the system-on-chip of this embodiment;

图3是本实施例的用于片上系统验证的测试向量生成方法的流程图;Figure 3 is a flow chart of the test vector generation method for on-chip system verification in this embodiment;

图4是本实施例的片上系统的验证系统的结构示意图;Figure 4 is a schematic structural diagram of the verification system of the system-on-chip of this embodiment;

图5是本实施例的测试向量生成组件的结构示意图;Figure 5 is a schematic structural diagram of the test vector generation component of this embodiment;

图6是应用本实施例的片上系统的验证方法的验证平台的结构示意图。FIG. 6 is a schematic structural diagram of a verification platform applying the system-on-chip verification method of this embodiment.

具体实施方式Detailed ways

为更清楚地理解本申请的目的、技术方案和优点,下面结合附图和实施例,对本申请进行了描述和说明。In order to understand the purpose, technical solutions and advantages of the present application more clearly, the present application is described and illustrated below in conjunction with the drawings and embodiments.

除另作定义外,本申请所涉及的技术术语或者科学术语应具有本申请所属技术领域具备一般技能的人所理解的一般含义。在本申请中的“一”、“一个”、“一种”、“该”、“这些”等类似的词并不表示数量上的限制,它们可以是单数或者复数。在本申请中所涉及的术语“包括”、“包含”、“具有”及其任何变体,其目的是涵盖不排他的包含;例如,包含一系列步骤或模块(单元)的过程、方法和系统、产品或设备并未限定于列出的步骤或模块(单元),而可包括未列出的步骤或模块(单元),或者可包括这些过程、方法、产品或设备固有的其他步骤或模块(单元)。在本申请中所涉及的“连接”、“相连”、“耦接”等类似的词语并不限定于物理的或机械连接,而可以包括电气连接,无论是直接连接还是间接连接。在本申请中所涉及的“多个”是指两个或两个以上。“和/或”描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。通常情况下,字符“/”表示前后关联的对象是一种“或”的关系。在本申请中所涉及的术语“第一”、“第二”、“第三”等,只是对相似对象进行区分,并不代表针对对象的特定排序。Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by a person with ordinary skills in the technical field to which this application belongs. In this application, "a", "an", "an", "the", "these" and other similar words do not indicate a quantitative limitation, and they may be singular or plural. The terms "comprising", "comprising", "having" and any variations thereof, as used in this application, are intended to cover a non-exclusive inclusion; for example, processes, methods and Systems, products, or devices are not limited to the steps or modules (units) listed, but may include steps or modules (units) not listed, or may include other steps or modules inherent to such processes, methods, products, or devices (unit). Words such as "connected", "connected", "coupled" and the like mentioned in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" mentioned in this application means two or more. "And/or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and/or B" can mean: A alone exists, A and B exist simultaneously, and B exists alone. Normally, the character "/" indicates that the related objects are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application only distinguish similar objects and do not represent a specific ordering of the objects.

在本实施例中提供的方法实施例可以在终端、计算机或者类似的运算装置中执行。比如在终端上运行,图1是本实施例的片上系统的验证方法的终端的硬件结构框图。如图1所示,终端可以包括一个或多个(图1中仅示出一个)处理器102和用于存储数据的存储器104,其中,处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置。上述终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述终端的结构造成限制。例如,终端还可包括比图1中所示更多或者更少的组件,或者具有与图1所示出的不同配置。The method embodiments provided in this embodiment can be executed in a terminal, computer or similar computing device. For example, when running on a terminal, FIG. 1 is a hardware structure block diagram of the terminal of the system-on-chip verification method of this embodiment. As shown in Figure 1, the terminal may include one or more (only one is shown in Figure 1) processors 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a microprocessor MCU or Processing device for programming logic devices such as FPGA. The above-mentioned terminal may also include a transmission device 106 and an input and output device 108 for communication functions. Persons of ordinary skill in the art can understand that the structure shown in Figure 1 is only illustrative, and it does not limit the structure of the above-mentioned terminal. For example, the terminal may also include more or fewer components than shown in FIG. 1 , or have a different configuration than that shown in FIG. 1 .

存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如在本实施例中的片上系统的验证方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the verification method of the system-on-chip in this embodiment. The processor 102 runs the computer program stored in the memory 104, thereby Execute various functional applications and data processing, that is, implement the above methods. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely relative to the processor 102, and these remote memories may be connected to the terminal through a network. Examples of the above-mentioned networks include but are not limited to the Internet, intranets, local area networks, mobile communication networks and combinations thereof.

传输设备106用于经由一个网络接收或者发送数据。上述的网络包括终端的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(NetworkInterface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(RadioFrequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 106 is used to receive or send data via a network. The above-mentioned network includes the wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet wirelessly.

在本实施例中提供了一种片上系统的验证方法,图2是本实施例的片上系统的验证方法的流程图,如图2所示,该流程包括如下步骤:This embodiment provides a system-on-chip verification method. Figure 2 is a flow chart of the system-on-chip verification method in this embodiment. As shown in Figure 2, the process includes the following steps:

步骤S201,根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,测试向量中包含嵌入式C代码、序列发生器代码以及参考模型代码,嵌入式C代码、序列发生器代码以及参考模型代码的逻辑相对应。Step S201: Generate a test vector for verification based on the preset parameter configuration file and code template file. The test vector includes embedded C code, sequencer code and reference model code. The embedded C code, sequencer code and reference model code are included in the test vector. The logic corresponds to the processor code and reference model code.

具体地,测试向量是根据设计需求和设计原理,针对待验证的集成电路设计即待测设计(Design Under Test,简称为DUT)而编写的一组测试输入、执行条件以及预期结果,用于验证待测设计是否满足设计要求。本实施例提供的验证方法可以高效生成测试向量,该测试向量包括嵌入式C代码、序列发生器代码以及参考模型代码三个部分。预先编写代码模板文件,根据代码模板中的嵌入式C模板、序列发生器模板以及参考模型模板,结合参数配置文件中的参数配置信息,通过自动化脚本程序生成嵌入式C代码、序列发生器代码以及参考模型代码。其中,嵌入式C代码由C语言或嵌入式汇编语言写成,具有完整的嵌入式架构和自动化编译文件(Makefile),可以单命令完成程序生成和构建,并生成仿真加载需要的目标文件。Specifically, the test vector is a set of test inputs, execution conditions and expected results written for the integrated circuit design to be verified, that is, the Design Under Test (DUT), based on the design requirements and design principles. It is used for verification. Whether the design to be tested meets the design requirements. The verification method provided in this embodiment can efficiently generate a test vector, which includes three parts: embedded C code, sequencer code, and reference model code. Pre-write the code template file. Based on the embedded C template, sequencer template and reference model template in the code template, combined with the parameter configuration information in the parameter configuration file, the embedded C code, sequencer code and Reference model code. Among them, the embedded C code is written in C language or embedded assembly language, and has a complete embedded architecture and automated compilation file (Makefile). It can complete program generation and construction with a single command, and generate the target files required for simulation loading.

步骤S202,基于嵌入式C代码和序列发生器代码,对待测设计进行仿真,得到待测设计的目标仿真数据,其中,待测设计为片上系统。Step S202: Simulate the design under test based on the embedded C code and sequencer code to obtain target simulation data of the design under test, where the design under test is a system on a chip.

具体地,本实施例以完整的片上系统(System on Chip,简称为SoC)作为待测设计进行检验,片上系统中包括系统复位管理单元、系统时钟管理单元、系统功耗管理单元、中央处理器单元、总线矩阵、存储单元、以及多个功能IP模块等,其中,中央处理器通过总线矩阵,与存储单元和功能IP模块单元相连。由测试向量中的嵌入式C代码和序列发生器代码共同对待测设计施加激励,得到待测设计在激励下的仿真运行数据,即目标仿真数据。Specifically, this embodiment uses a complete system on chip (SoC for short) as the design to be tested. The system on chip includes a system reset management unit, a system clock management unit, a system power consumption management unit, and a central processor. unit, bus matrix, storage unit, and multiple functional IP modules, among which the central processor is connected to the storage unit and functional IP module unit through the bus matrix. The embedded C code and sequencer code in the test vector jointly apply stimulation to the design under test, and the simulation running data of the design under test under stimulation is obtained, that is, the target simulation data.

相关技术通常基于通用验证方法论(Universal Verification Methodology,简称为UVM)实现对片上系统的验证,),UVM是一个以SystemVerilog类库为主体的验证平台开发框架,验证工程师可以利用其可重用组件构建具有标准化层次结构和接口的功能验证环境,是目前最具优势的验证方法。Related technologies are usually based on the Universal Verification Methodology (UVM) to implement the verification of on-chip systems. UVM is a verification platform development framework with the SystemVerilog class library as the main body. Verification engineers can use its reusable components to build The functional verification environment of standardized hierarchies and interfaces is currently the most advantageous verification method.

基于UVM的验证以序列发生器产生的序列信号作为激励,信号通过总线传输至片上系统的各功能IP模块,进而以每个功能IP模块作为待测设计,分别进行模块级的验证。例如,以总线信号和外部I/O信号作为激励,验证片上系统中的通用异步发生器(UniversalAsynchronous Receiver/Transmitter,简称为UART)模块。然而,此类验证方法仅能验证功能IP模块本身,而无法验证到片上系统中总线以上的部分。而在本实施例中,测试向量中的嵌入式C代码被实例化后,不再需要通过总线传输的信号输入激励,而是可以直接于整个片上系统上运行,因此能够对片上系统的每个部分施加激励,在验证功能IP模块的基础上,还覆盖到了片上系统中总线以上的中央处理器单元、总线矩阵连接等系统级单元和功能。UVM-based verification uses the sequence signal generated by the sequencer as an excitation. The signal is transmitted to each functional IP module of the on-chip system through the bus. Each functional IP module is then used as the design to be tested, and module-level verification is performed separately. For example, bus signals and external I/O signals are used as stimuli to verify the Universal Asynchronous Receiver/Transmitter (UART) module in the system-on-chip. However, this type of verification method can only verify the functional IP module itself, but cannot verify the part above the bus in the system on chip. In this embodiment, after the embedded C code in the test vector is instantiated, it no longer needs the signal input stimulus transmitted through the bus. Instead, it can run directly on the entire on-chip system, so it can control each of the on-chip systems. Partially applying incentives, on the basis of verifying functional IP modules, it also covers system-level units and functions such as the central processing unit above the bus in the system-on-chip, bus matrix connections, etc.

步骤S203,基于参考模型代码,生成参考数据。Step S203: Generate reference data based on the reference model code.

具体地,参考模型代码通过模拟待测设计的逻辑行为,生成参考数据,该参考数据为设计者对待测设计在测试向量激励下运行的理想预期结果。Specifically, the reference model code generates reference data by simulating the logical behavior of the design under test. The reference data is the designer's ideal expected result for the design under test to run under test vector stimulation.

步骤S204,将目标仿真数据和参考数据进行比较,并基于比较结果得到针对待测设计的目标验证结果。Step S204: Compare the target simulation data and the reference data, and obtain the target verification result for the design to be tested based on the comparison result.

具体地,通过比对目标仿真数据与参考数据,可以判断待测设计与设计需求的符合程度,目标仿真数据与参考数据的相似程度越高,则待测设计越符合设计需求,进一步地,结合设定的量化标准,对目标仿真数据与参考数据的相似程度进行具体量化,即可得出针对待测设计的目标验证结果。Specifically, by comparing the target simulation data and the reference data, the degree of compliance between the design to be tested and the design requirements can be determined. The higher the similarity between the target simulation data and the reference data, the more the design under test meets the design requirements. Further, combined with Based on the set quantification standards, the similarity between the target simulation data and the reference data is specifically quantified, and the target verification results for the design under test can be obtained.

通过上述步骤S201至S204,根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,测试向量中包含嵌入式C代码、序列发生器代码以及参考模型代码,嵌入式C代码、序列发生器代码以及参考模型代码的逻辑相对应;基于嵌入式C代码和序列发生器代码,对待测设计进行仿真,得到待测设计的目标仿真数据,其中,待测设计为片上系统;基于参考模型代码,生成参考数据;将目标仿真数据和参考数据进行比较,并基于比较结果得到针对待测设计的目标验证结果;本实施例在测试向量中引入嵌入式C代码,嵌入式C代码被实例化后,直接作用于整个片上系统,在验证片上系统中的各功能IP模块之外,还实现了对总线以上的中央处理器单元、总线矩阵连接等系统级功能的验证,从而解决了相关技术中片上系统的验证效率较低的问题,提高了片上系统的验证效率。Through the above steps S201 to S204, a test vector for verification is generated according to the preset parameter configuration file and code template file, where the test vector includes embedded C code, sequencer code and reference model code. Embedded C The logic of the code, sequencer code and reference model code corresponds; based on the embedded C code and sequencer code, the design under test is simulated to obtain the target simulation data of the design under test, where the design under test is a system-on-chip; Based on the reference model code, reference data is generated; the target simulation data and the reference data are compared, and the target verification results for the design under test are obtained based on the comparison results; this embodiment introduces embedded C code into the test vector, and the embedded C code After being instantiated, it directly affects the entire on-chip system. In addition to verifying each functional IP module in the on-chip system, it also realizes the verification of system-level functions such as the central processing unit above the bus and the bus matrix connection, thus solving the problem. In the related art, the verification efficiency of the system on chip is low, and the verification efficiency of the system on chip is improved.

图3是本实施例的用于片上系统验证的测试向量生成方法的流程图,如图3所示,在其中的一些实施例中,基于上述步骤S201,根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,具体可以包括:Figure 3 is a flow chart of the test vector generation method for on-chip system verification in this embodiment. As shown in Figure 3, in some embodiments, based on the above step S201, according to the preset parameter configuration file and code template file to generate test vectors for verification, which may include:

步骤S301,基于参数配置文件,获取参数配置信息;基于代码模板文件,获取嵌入式C模板、序列发生器模板以及参考模型模板;步骤S302,基于嵌入式C模板与参数配置信息,生成嵌入式C代码;步骤S303,基于序列发生器模板与参数配置信息,生成序列发生器代码;步骤S304,基于参考模型模板与参数配置信息,生成参考模型代码。Step S301, obtain parameter configuration information based on the parameter configuration file; obtain the embedded C template, sequencer template and reference model template based on the code template file; Step S302, generate embedded C based on the embedded C template and parameter configuration information Code; step S303, generate sequence generator code based on the sequence generator template and parameter configuration information; step S304, generate reference model code based on the reference model template and parameter configuration information.

其中,代码模板文件为预先编写的原子代码模板,包含针对特定功能IP模块的代码段,所有使用到同一功能IP模块的片上系统均可以利用对应的代码段进行验证。原子代码模板包括嵌入式C模板、序列发生器模板以及参考模型模板。序列发生器模板描述如何生成一个或多个事务,支持System Verilog语法的各种逻辑代码块;参考模型模板描述如何生成一个或多个事务,支持System Verilog语法的各种逻辑代码块;SystemVerilog是一种将硬件描述语言(Hardware Description Language,简称为HDL)与现代的高层级验证语言(HVL)结合起来的工业标准语言,集成了面向对象编程、动态线程和线程间通信等特性。Among them, the code template file is a pre-written atomic code template, which contains code segments for specific functional IP modules. All on-chip systems that use the same functional IP module can use the corresponding code segments for verification. Atomic code templates include embedded C templates, sequencer templates, and reference model templates. The sequencer template describes how to generate one or more transactions and supports various logical code blocks of System Verilog syntax; the reference model template describes how to generate one or more transactions and supports various logical code blocks of System Verilog syntax; SystemVerilog is a An industry-standard language that combines Hardware Description Language (HDL) with modern high-level verification language (HVL), integrating features such as object-oriented programming, dynamic threads, and inter-thread communication.

嵌入式C模板实现每一个能够完成独立操作的代码段,每一个代码段与序列发生器中描述的事务都有对应关系。此外,原子代码模板中定义实现自有事务类和驱动器类;驱动器可以将事务对象转化成信号,或者将信号转化成事务对象。The embedded C template implements each code segment that can complete independent operations, and each code segment has a corresponding relationship with the transaction described in the sequencer. In addition, the atomic code template defines and implements its own transaction class and driver class; the driver can convert transaction objects into signals, or signals into transaction objects.

参数配置文件以xml规范为基本格式,分别描述列发生器模板、参考模型模板以及嵌入式C模板所需要的参数配置信息;序列发生器参数配置信息包括需要生成的事务类型,及其匹配的参数;参考模型描述包括需要生成的事务类型,及其匹配的参数;嵌入式C代码描述包括需要生成的代码段,及其匹配参数;另外,序列发生器模板和嵌入式C模板具有共用配置参数,参数数量和类型均不固定。The parameter configuration file uses the XML specification as the basic format and describes the parameter configuration information required by the column generator template, reference model template and embedded C template respectively; the sequence generator parameter configuration information includes the transaction type that needs to be generated and its matching parameters. ; The reference model description includes the transaction type that needs to be generated, and its matching parameters; the embedded C code description includes the code segment that needs to be generated, and its matching parameters; in addition, the sequencer template and the embedded C template have common configuration parameters, The number and type of parameters are not fixed.

上述参数配置信息的形式可以包括:整型,32位整数,一般用于循环次数描述、通信数据长度描述等;浮点型,单精度浮点数,一般用于作为计算数据等;随机数,随机生成的32位整数,一般用于通信数据的生成,或寄存器配置数值的生成;二值参数,一般用于逻辑判断参数;字符串,即中英文字符串信息;数据包,即由各种基础数据类型组合形成的单个参数。The form of the above parameter configuration information can include: integer, 32-bit integer, generally used to describe the number of cycles, communication data length description, etc.; floating point, single-precision floating point number, generally used as calculation data, etc.; random number, random The generated 32-bit integers are generally used to generate communication data or register configuration values; binary parameters are generally used for logical judgment parameters; strings are Chinese and English string information; data packets are composed of various basic A single parameter formed by a combination of data types.

通过运行自动化脚本程序,基于嵌入式C模板与参数配置信息,生成嵌入式C代码;基于序列发生器模板与参数配置信息,生成序列发生器代码;基于参考模型模板与参数配置信息,生成参考模型代码;将生成的三类验证代码,根据向量名称,以相关的命名规则,复制到指定的向量保存路径中。其中,自动化脚本程序由主流解释语言实现,在此不做具体限定。By running the automated script program, the embedded C code is generated based on the embedded C template and parameter configuration information; the sequence generator code is generated based on the sequencer template and parameter configuration information; the reference model is generated based on the reference model template and parameter configuration information Code; copy the generated three types of verification codes to the specified vector storage path according to the vector name and relevant naming rules. Among them, the automated script program is implemented by mainstream interpreted languages and is not specifically limited here.

优选地,在一个实施例中,利用xml文件管理器获取参数配置文件中的配置字段信息;进一步地,检查配置文件字段中原子代码模板标志信息是否与命令参数匹配,不匹配则生成失败;解析序列发生器模板、参考模型模板以及嵌入式C模板模板;根据模板关键字定位上述各原子代码段模板内容;分别针对序列发生器模板、参考模型模板以及嵌入式C模板进行生成序列发生器代码、参考模型代码以及嵌入式C代码。Preferably, in one embodiment, an xml file manager is used to obtain the configuration field information in the parameter configuration file; further, check whether the atomic code template flag information in the configuration file field matches the command parameters. If they do not match, the generation fails; parsing Sequence generator template, reference model template and embedded C template template; locate the content of each atomic code segment template mentioned above according to the template keywords; generate sequence generator code, respectively for the sequence generator template, reference model template and embedded C template Reference model code as well as embedded C code.

具体地,根据参数设置信息中原子代码段信息,找到对应模板代码,将参数字段内容根据参数关键字进行替换;参数设置信息中原子代码段有重复关键字(repeat)的,根据重复次数,重复生成代码段;当参数为随机配置时,使用随机函数随机生成所需内容。当每一个原子模板文件中所有原子代码信息全部生成原子代码后,将新生成的文件保存到临时目录和文件中;当全部原子模板文件都完成代码生成后,统一按照行业命名规则,将生成文件拷贝到命令行参数指定的测试向量路径中。Specifically, according to the atomic code segment information in the parameter setting information, the corresponding template code is found, and the parameter field content is replaced according to the parameter keyword; if the atomic code segment in the parameter setting information has repeated keywords (repeat), repeat according to the number of repetitions. Generate code snippets; when the parameters are randomly configured, use a random function to randomly generate the required content. When all the atomic code information in each atomic template file is completely generated into the atomic code, the newly generated files will be saved in temporary directories and files; when all the atomic template files have completed code generation, the generated files will be unified according to industry naming rules. Copy to the test vector path specified by the command line parameter.

进一步地,在其中的一些实施例中,根据上述步骤S202,基于嵌入式C代码和序列发生器代码,对待测设计进行仿真,得到待测设计的目标仿真数据,具体可以包括:Further, in some embodiments, according to the above step S202, based on the embedded C code and the sequencer code, the design under test is simulated to obtain the target simulation data of the design under test, which may specifically include:

基于序列发生器代码,产生激励信号,通过调用驱动器类,可以将激励事务转换为;在激励信号的作用下,基述待测设计运行嵌入式C代码,得到运行产生的目标仿真数据。Based on the sequencer code, the excitation signal is generated. By calling the driver class, the excitation transaction can be converted into; under the action of the excitation signal, the design under test runs the embedded C code to obtain the target simulation data generated by the operation.

在本实施例中还提供了一种片上系统的验证系统,图4是本实施例的片上系统的验证系统的结构示意图,如图4所示,该验证系统包括测试向量生成组件41、外部信号组件42以及验证控制组件43,其中:This embodiment also provides a system-on-chip verification system. Figure 4 is a schematic structural diagram of the system-on-chip verification system in this embodiment. As shown in Figure 4, the verification system includes a test vector generation component 41, an external signal component 42 and verification control component 43, where:

测试向量生成组件41用于根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,测试向量中包含嵌入式C代码、序列发生器代码以及参考模型代码,嵌入式C代码、序列发生器代码以及参考模型代码的逻辑相对应;The test vector generation component 41 is used to generate a test vector for verification according to the preset parameter configuration file and code template file, where the test vector contains embedded C code, sequence generator code and reference model code. The embedded C code Logical correspondence between code, sequencer code, and reference model code;

外部信号组件42用于基于嵌入式C代码和序列发生器代码,对待测设计进行仿真,得到待测设计的目标仿真数据;基于参考模型代码,生成参考数据;其中,待测设计为片上系统;The external signal component 42 is used to simulate the design under test based on the embedded C code and sequencer code to obtain target simulation data of the design under test; and generate reference data based on the reference model code; wherein the design under test is a system on a chip;

验证控制组件43用于将目标仿真数据和所考数据进行比较,并基于比较结果得到针对待测设计的目标验证结果。The verification control component 43 is used to compare the target simulation data with the tested data, and obtain the target verification results for the design under test based on the comparison results.

此外,验证系统还包括顶层设计组件;顶层设计组件连接外部信号组件和验证控制组件;顶层设计组件用于提供信号接口、系统时钟和复位信号;还用于实例化验证系统中的各组件;顶层设计组件基于UVM验证方法论中的类而实现。例如,负责实例化和连接所有的功能组件的类派生自UVM中的环境类uvm_env。In addition, the verification system also includes top-level design components; the top-level design components connect external signal components and verification control components; the top-level design components are used to provide signal interfaces, system clocks and reset signals; they are also used to instantiate each component in the verification system; the top-level design components Design components are implemented based on classes in the UVM verification methodology. For example, the class responsible for instantiating and connecting all functional components is derived from the environment class uvm_env in UVM.

进一步地,图5是本实施例的测试向量生成组件的结构示意图,如图5所示,测试向量生成组件包括第一获取模块51、第二获取模块52、第一生成模块53、第二生成模块54以及第三生成模块55,其中:Further, Figure 5 is a schematic structural diagram of the test vector generation component of this embodiment. As shown in Figure 5, the test vector generation component includes a first acquisition module 51, a second acquisition module 52, a first generation module 53, and a second generation module. module 54 and a third generation module 55, where:

第一获取模块51用于基于参数配置文件,获取参数配置信息;第二获取模块52用于基于代码模板文件,获取嵌入式C语言模板、序列发生器模板以及参考模型模板;第一生成模块53用于基于嵌入式C语言模板与参数配置信息,生成嵌入式C代码;第二生成模块54用于基于序列发生器模板与参数配置信息,生成序列发生器代码;第三生成模块55用于基于参考模型模板与参数配置信息,生成参考模型代码。The first acquisition module 51 is used to acquire parameter configuration information based on the parameter configuration file; the second acquisition module 52 is used to acquire the embedded C language template, sequence generator template and reference model template based on the code template file; the first generation module 53 Used to generate embedded C code based on the embedded C language template and parameter configuration information; the second generation module 54 is used to generate the sequence generator code based on the sequence generator template and parameter configuration information; the third generation module 55 is used to generate the sequence generator code based on the sequence generator template and parameter configuration information. Refer to the model template and parameter configuration information to generate reference model code.

进一步地,本实施例的外部信号组件包括代理模块,代理模块包括序列发生器、驱动器、监测器以及参考模型,其中:Further, the external signal component of this embodiment includes an agent module. The agent module includes a sequencer, a driver, a monitor, and a reference model, where:

序列发生器用于根据序列发生器代码,产生激励事务,并将激励事务传送至驱动器;驱动器用于将激励事务转化为激励信号,并将激励信号发送至待测设计;监测器用于采集来自待测设计的响应信号,并将响应信号转化为响应事务,将响应事务发送至验证控制组件;参考模型用于基于参考模型代理,生成参考事务,并将参考事务发送至验证控制组件。The sequencer is used to generate stimulus transactions based on the sequencer code and transmit the stimulus transactions to the driver; the driver is used to convert the stimulus transactions into stimulus signals and sends the stimulus signals to the design under test; the monitor is used to collect data from the device under test Designed response signals, convert the response signals into response transactions, and send the response transactions to the verification control component; the reference model is used to generate reference transactions based on the reference model agent, and send the reference transactions to the verification control component.

进一步地,上述验证控制组件包括计分板;计分板用于比较响应信号中的目标仿真数据与参考事务中的参考数据,根据比较结果得出目标验证结果。Further, the above-mentioned verification control component includes a scoreboard; the scoreboard is used to compare the target simulation data in the response signal with the reference data in the reference transaction, and obtain the target verification result based on the comparison result.

需要说明的是,上述各个模块可以是功能模块也可以是程序模块,既可以通过软件来实现,也可以通过硬件来实现。对于通过硬件来实现的模块而言,上述各个模块可以位于同一处理器中;或者上述各个模块还可以按照任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules can be a functional module or a program module, and can be implemented by software or hardware. For modules implemented by hardware, each of the above-mentioned modules can be located in the same processor; or each of the above-mentioned modules can also be located in different processors in any combination.

特别地,图6是应用本实施例的片上系统的验证方法的验证平台的结构示意图,如图6所示,该验证平台包括控制UVC、外部信号UVC以及待测设计;控制UVC中包括计分板、虚拟序列发生器以及参数配置;外部信号UVC中包括输入代理和输出代理,输入代理中包括序列发生器、驱动器以及监测器,输出代理具有与输入代理相同的结构;待测设计中包括内存和外设接口。其中,UVC指该组件基于USB Video Class协议与外部信号进行交互。In particular, Figure 6 is a schematic structural diagram of a verification platform that applies the verification method of the system-on-chip of this embodiment. As shown in Figure 6, the verification platform includes control UVC, external signal UVC, and the design to be tested; the control UVC includes scoring Board, virtual sequencer and parameter configuration; the external signal UVC includes an input agent and an output agent. The input agent includes a sequencer, driver and monitor. The output agent has the same structure as the input agent; the design under test includes memory and peripheral interfaces. Among them, UVC means that the component interacts with external signals based on the USB Video Class protocol.

如图6中的箭头所示,嵌入式C代码和软件汇编环境加载至待测设计的内存中;待测设计中的外设接口将待测设计的信号发送至外部信号UVC,外部信号UVC将事务发送至控制UVC;控制UVC中的虚拟序列发生器将验证序列发送至外部信号UVC。As shown by the arrow in Figure 6, the embedded C code and software assembly environment are loaded into the memory of the design under test; the peripheral interface in the design under test sends the signal of the design under test to the external signal UVC, and the external signal UVC The transaction is sent to the control UVC; the virtual sequencer in the control UVC sends the verification sequence to the external signal UVC.

在本实施例中还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。This embodiment also provides an electronic device, including a memory and a processor. The memory stores a computer program. The processor is configured to run the computer program to perform the steps in any of the above method embodiments.

可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.

可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above-mentioned processor may be configured to perform the following steps through a computer program:

S1,根据预设的参数配置文件和代码模板文件,生成用于验证的测试向量,其中,测试向量中包含嵌入式C代码、序列发生器代码以及参考模型代码,嵌入式C代码、序列发生器代码以及参考模型代码的逻辑相对应;S1, based on the preset parameter configuration file and code template file, generate a test vector for verification. The test vector contains embedded C code, sequencer code and reference model code. Embedded C code, sequencer code Logical correspondence between code and reference model code;

S2,基于嵌入式C代码和序列发生器代码,对待测设计进行仿真,得到待测设计的目标仿真数据,其中,待测设计为片上系统;S2, based on the embedded C code and sequencer code, simulates the design under test to obtain the target simulation data of the design under test, where the design under test is a system-on-chip;

S3,基于参考模型代码,生成参考数据;S3, based on the reference model code, generates reference data;

S4,将目标仿真数据和参考数据进行比较,并基于比较结果得到针对待测设计的目标验证结果。S4: Compare the target simulation data with the reference data, and obtain the target verification results for the design under test based on the comparison results.

需要说明的是,在本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,在本实施例中不再赘述。It should be noted that for specific examples in this embodiment, reference may be made to the examples described in the above-mentioned embodiments and optional implementations, and details will not be described again in this embodiment.

此外,结合上述实施例中提供的片上系统的验证方法,在本实施例中还可以提供一种存储介质来实现。该存储介质上存储有计算机程序;该计算机程序被处理器执行时实现上述实施例中的任意一种片上系统的验证方法。In addition, in combination with the system-on-chip verification method provided in the above embodiment, a storage medium may also be provided in this embodiment for implementation. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the system-on-chip verification methods in the above embodiments is implemented.

应该明白的是,这里描述的具体实施例只是用来解释这个应用,而不是用来对它进行限定。根据本申请提供的实施例,本领域普通技术人员在不进行创造性劳动的情况下得到的所有其它实施例,均属本申请保护范围。It should be understood that the specific embodiments described here are only used to explain this application and are not used to limit it. According to the embodiments provided in this application, all other embodiments obtained by those of ordinary skill in the art without performing creative work shall fall within the protection scope of this application.

显然,附图只是本申请的一些例子或实施例,对本领域的普通技术人员来说,也可以根据这些附图将本申请适用于其他类似情况,但无需付出创造性劳动。另外,可以理解的是,尽管在此开发过程中所做的工作可能是复杂和漫长的,但是,对于本领域的普通技术人员来说,根据本申请披露的技术内容进行的某些设计、制造或生产等更改仅是常规的技术手段,不应被视为本申请公开的内容不足。Obviously, the accompanying drawings are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar situations based on these drawings, but no creative effort is required. In addition, it can be understood that although the work done in this development process may be complex and lengthy, for those of ordinary skill in the art, certain designs and manufacturing based on the technical content disclosed in this application Or production and other changes are only routine technical means and should not be regarded as insufficient content disclosed in this application.

“实施例”一词在本申请中指的是结合实施例描述的具体特征、结构或特性可以包括在本申请的至少一个实施例中。该短语出现在说明书中的各个位置并不一定意味着相同的实施例,也不意味着与其它实施例相互排斥而具有独立性或可供选择。本领域的普通技术人员能够清楚或隐含地理解的是,本申请中描述的实施例在没有冲突的情况下,可以与其它实施例结合。The term "embodiment" as used herein means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of this phrase in various places in the specification are not necessarily intended to be identical embodiments, nor are they meant to be mutually exclusive, independent, or alternative to other embodiments. Those of ordinary skill in the art will understand, explicitly or implicitly, that the embodiments described in this application may be combined with other embodiments without conflict.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对专利保护范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of patent protection. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all fall within the protection scope of the present application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims (10)

1. A method of verifying a system-on-chip, comprising:
generating a test vector for verification according to a preset parameter configuration file and a code template file, wherein the test vector comprises an embedded C code, a sequence generator code and a reference model code, and the logic of the embedded C code, the logic of the sequence generator code and the logic of the reference model code are corresponding;
simulating a design to be tested based on the embedded C code and the sequencer code to obtain target simulation data of the design to be tested, wherein the design to be tested is a system on chip;
generating reference data based on the reference model code;
and comparing the target simulation data with the reference data, and obtaining a target verification result aiming at the design to be tested based on a comparison result.
2. The method for verifying a system on a chip according to claim 1, wherein the generating a test vector for verification according to a preset parameter configuration file and a code template file comprises:
acquiring parameter configuration information based on the parameter configuration file;
acquiring an embedded C template, a sequencer template and a reference model template based on the code template file;
generating the embedded C code based on the embedded C template and the parameter configuration information;
generating the sequencer code based on the sequencer template and the parameter configuration information;
and generating the reference model code based on the reference model template and the parameter configuration information.
3. The method for verifying a system-on-chip according to claim 2, wherein the simulating the design to be tested based on the embedded C code and the sequencer code to obtain target simulation data of the design to be tested comprises:
generating an excitation signal based on the sequencer code;
and under the action of the excitation signal, operating the embedded C code based on the design to be tested to obtain the target simulation data generated by operation.
4. A verification system of a system-on-chip, the verification system comprising a test vector generation component, an external signal component, and a verification control component, wherein:
the test vector generation component is used for generating a test vector for verification according to a preset parameter configuration file and a code template file, wherein the test vector comprises an embedded C code, a sequencer code and a reference model code, and the logic of the embedded C code, the logic of the sequencer code and the logic of the reference model code are corresponding;
the external signal component is used for simulating a design to be tested based on the embedded C code and the sequencer code to obtain target simulation data of the design to be tested; generating reference data based on the reference model code; wherein the design to be tested is a system on chip;
the verification control component is used for comparing the target simulation data with the reference data and obtaining a target verification result aiming at the design to be tested based on a comparison result.
5. The system-on-chip verification system of claim 4, further comprising a top-level design component; the top layer design component is connected with the external signal component and the verification control component;
the top layer design component is used for providing a signal interface, a system clock and a reset signal; and for instantiating each of the components in the verification system;
the top-level design component is implemented based on classes in the UVM verification methodology.
6. The system-on-chip verification system of claim 4, wherein the test vector generation component comprises a first acquisition module, a second acquisition module, a first generation module, a second generation module, and a third generation module, wherein:
the first acquisition module is used for acquiring parameter configuration information based on the parameter configuration file;
the second acquisition module is used for acquiring an embedded C language template, a sequencer template and a reference model template based on the code template file;
the first generation module is used for generating the embedded C code based on the embedded C language template and the parameter configuration information;
the second generating module is used for generating the sequence generator code based on the sequence generator template and the parameter configuration information;
the third generation module is used for generating the reference model code based on the reference model template and the parameter configuration information.
7. The system-on-chip verification system of claim 6, wherein the external signal component comprises a proxy module comprising a sequencer, a driver, a monitor, and a reference model, wherein:
the sequencer is used for generating an excitation transaction according to the sequencer code and transmitting the excitation transaction to the driver;
the driver is used for converting the excitation transaction into an excitation signal and sending the excitation signal to the design to be tested;
the monitor is used for collecting a response signal from the design to be tested, converting the response signal into a response transaction and sending the response transaction to the verification control component;
the reference model is used for generating a reference transaction based on the reference model agent and sending the reference transaction to the verification control component.
8. The system-on-chip verification system of claim 7, wherein the verification control component comprises a scoreboard;
the score board is used for comparing the target simulation data in the response signal with the reference data in the reference transaction, and obtaining the target verification result according to a comparison result.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of verification of a system on chip as claimed in any one of claims 1 to 3.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the verification method of a system on chip of any one of claims 1 to 3.
CN202311576405.5A 2023-11-24 2023-11-24 Verification method and system of system on chip and electronic device Pending CN117291145A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311576405.5A CN117291145A (en) 2023-11-24 2023-11-24 Verification method and system of system on chip and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311576405.5A CN117291145A (en) 2023-11-24 2023-11-24 Verification method and system of system on chip and electronic device

Publications (1)

Publication Number Publication Date
CN117291145A true CN117291145A (en) 2023-12-26

Family

ID=89257450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311576405.5A Pending CN117291145A (en) 2023-11-24 2023-11-24 Verification method and system of system on chip and electronic device

Country Status (1)

Country Link
CN (1) CN117291145A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118376906A (en) * 2024-06-20 2024-07-23 中国人民解放军国防科技大学 Test method, system and equipment based on IP multiplexing test vector compression

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1784609A (en) * 2003-02-14 2006-06-07 爱德万测试株式会社 Method and structure to develop a test program for semiconductor integrated circuits
CN104899138A (en) * 2015-05-25 2015-09-09 浪潮集团有限公司 Method for multiplexing C program test vectors in UVM verification environment
US9690681B1 (en) * 2015-09-03 2017-06-27 Cadence Design Systems, Inc. Method and system for automatically generating executable system-level tests
CN113312879A (en) * 2021-07-28 2021-08-27 北京燧原智能科技有限公司 Chip circuit function verification system, method, device and storage medium
CN115828839A (en) * 2022-11-15 2023-03-21 杭州万高科技股份有限公司 System-level verification system and method for SOC (System on chip)
CN115841089A (en) * 2023-02-27 2023-03-24 合肥六角形半导体有限公司 System-on-chip verification platform and verification method based on UVM
WO2023207965A1 (en) * 2022-04-29 2023-11-02 上海商汤智能科技有限公司 Chip verification method and platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1784609A (en) * 2003-02-14 2006-06-07 爱德万测试株式会社 Method and structure to develop a test program for semiconductor integrated circuits
CN104899138A (en) * 2015-05-25 2015-09-09 浪潮集团有限公司 Method for multiplexing C program test vectors in UVM verification environment
US9690681B1 (en) * 2015-09-03 2017-06-27 Cadence Design Systems, Inc. Method and system for automatically generating executable system-level tests
CN113312879A (en) * 2021-07-28 2021-08-27 北京燧原智能科技有限公司 Chip circuit function verification system, method, device and storage medium
WO2023207965A1 (en) * 2022-04-29 2023-11-02 上海商汤智能科技有限公司 Chip verification method and platform
CN115828839A (en) * 2022-11-15 2023-03-21 杭州万高科技股份有限公司 System-level verification system and method for SOC (System on chip)
CN115841089A (en) * 2023-02-27 2023-03-24 合肥六角形半导体有限公司 System-on-chip verification platform and verification method based on UVM

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
何伟;张多利;周萌;高明伦;: "SoC验证环境搭建方法的研究", 中国集成电路, no. 08, pages 2 *
段青亚;黄士坦;靳荣利;张莎莎;苗硕;: "SoC自动化验证方法的研究与实现", 吉林大学学报(信息科学版), no. 03 *
马盼;靳旭;: "基于UVM实现SM4算法的自动化验证平台", 铁路通信信号工程技术, no. 08 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118376906A (en) * 2024-06-20 2024-07-23 中国人民解放军国防科技大学 Test method, system and equipment based on IP multiplexing test vector compression

Similar Documents

Publication Publication Date Title
CN113076227B (en) MCU verification method, system and terminal device
CN102508753B (en) IP (Internet protocol) core verification system
Mehta ASIC/SoC functional design verification
US6678645B1 (en) Method and apparatus for SoC design validation
CN100476837C (en) A Microprocessor FPGA Verification Device Supporting Random Instruction Test
CN113297017A (en) SOC verification system and method based on UVM
TWI837026B (en) Verification system, verification method, electronic device and storage medium
CN112463497A (en) Platform is verified to SPI based on UVM
US8479129B1 (en) Dynamic time domain randomization techniques for SOC and IP verification
CN103198042A (en) PCI (programmable communications interface) aviation serial bus board and dynamic data loading processing method
CN102521444A (en) Cooperative simulation/verification method and device for software and hardware
CN114880977A (en) Software and hardware joint simulation system, method, device, equipment and storage medium
CN113486625B (en) Chip verification method and verification system
CN116089281A (en) Chip testing method, testing platform and device
CN115952758A (en) Chip verification method and device, electronic equipment and storage medium
CN109885905B (en) Verification system for improving function verification efficiency of digital circuit
CN117785593A (en) System and method for realizing xHCI drive based on UVM
CN117291145A (en) Verification method and system of system on chip and electronic device
CN112241347A (en) The Method of Implementing SystemC Verification and the Architecture of Verification Platform Components
US6892154B1 (en) Method and apparatus for developing multiple test cases from a base test case
CN107526585B (en) Scala-based FPGA development platform and its debugging and testing methods
US9581643B1 (en) Methods and circuits for testing partial circuit designs
US11295051B2 (en) System and method for interactively controlling the course of a functional simulation
US6536020B2 (en) Efficient generation of optimum test data
CN116048952A (en) A method and device for instantiating module simulation verification based on tailorable IP

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20231226