[go: up one dir, main page]

CN116048887A - Chip verification method, device, system, electronic equipment and storage medium - Google Patents

Chip verification method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN116048887A
CN116048887A CN202210600599.7A CN202210600599A CN116048887A CN 116048887 A CN116048887 A CN 116048887A CN 202210600599 A CN202210600599 A CN 202210600599A CN 116048887 A CN116048887 A CN 116048887A
Authority
CN
China
Prior art keywords
information
behavior
chip
verified
instruction
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
CN202210600599.7A
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.)
Hygon Information Technology Co Ltd
Original Assignee
Hygon Information Technology Co Ltd
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 Hygon Information Technology Co Ltd filed Critical Hygon Information Technology Co Ltd
Priority to CN202210600599.7A priority Critical patent/CN116048887A/en
Publication of CN116048887A publication Critical patent/CN116048887A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • 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)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明实施例公开一种芯片验证方法及装置、系统、电子设备、存储介质,涉及电子设计自动化技术领域,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。所述方法基于硬件验证平台,包括:运行待验证芯片的硬件仿真程序;按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。本发明适用于各种芯片验证中。

Figure 202210600599

The embodiment of the invention discloses a chip verification method, device, system, electronic equipment, and storage medium, which relate to the technical field of electronic design automation and can facilitate defect detection while giving full play to the large-scale and fast verification advantages of a hardware verification platform. The method is based on a hardware verification platform, including: running a hardware simulation program of the chip to be verified; sending behavior information and behavior result information of the chip to be verified during program operation to the software verification platform according to a preset strategy, so that the The software verification platform performs a verification review on the chip to be verified according to the behavior information and the behavior result information. The invention is applicable to various chip verifications.

Figure 202210600599

Description

一种芯片验证方法及装置、系统、电子设备、存储介质A chip verification method and device, system, electronic equipment, storage medium

技术领域technical field

本发明涉及计算机领域,尤其涉及一种芯片验证方法及装置、系统、电子设备、存储介质。The invention relates to the field of computers, in particular to a chip verification method and device, system, electronic equipment, and storage medium.

背景技术Background technique

随着集成电路的发展和规模不断扩大,验证逐渐成为SOC(System on Chip,片上系统)开发的最大挑战之一。With the development and scale of integrated circuits, verification has gradually become one of the biggest challenges in SOC (System on Chip, System on Chip) development.

传统软件验证方式(simulation)可以对芯片模块级的验证覆盖很全面,可控性也很高。但随着芯片复杂度的提高,使用软件仿真工具去模拟整体芯片运行所花费的时间会相应增加,找到极端情况缺陷(corner case bug)的时间更是指数级的增加。The traditional software verification method (simulation) can cover the verification of the chip module level very comprehensively, and the controllability is also very high. However, as the complexity of the chip increases, the time spent using software simulation tools to simulate the overall chip operation will increase accordingly, and the time to find corner case bugs will increase exponentially.

为了解决这个验证难题,存在一种硬件仿真(emulation)技术,即通过硬件加速器(emulator)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)等来加快验证速度。具体而言,emulation可以在硬件加速器上移植待验证的电路设计、开发验证平台,从而实现几千赫兹到几兆赫兹的仿真速度,相比于传统软件仿真工具实现了最高十万倍的提速。In order to solve this verification problem, there is a hardware emulation (emulation) technology, that is, to speed up the verification speed through a hardware accelerator (emulator), FPGA (Field-Programmable Gate Array, Field Programmable Gate Array), etc. Specifically, emulation can transplant the circuit design to be verified on the hardware accelerator and develop a verification platform, so as to achieve a simulation speed of several kilohertz to several megahertz, which is up to 100,000 times faster than traditional software simulation tools.

Emulator的引入解决了芯片在流片前大规模测试时的测试速度慢和测试指令规模小的问题,但相比于传统验证simulation,硬件仿真中很多检测手段,例如checker(检查站)、monitor(监视器)等是无法综合成具体电路的,因此,硬件仿真中可供利用的错误检测手段较少,难以发现待验证芯片的一些设计缺陷。The introduction of the Emulator solves the problems of slow test speed and small scale of test instructions when the chip is tested on a large scale before tape-out. However, compared with traditional verification simulation, many detection methods in hardware simulation, such as checker (checkpoint), monitor ( monitor) etc. cannot be synthesized into a specific circuit, therefore, there are few error detection methods available in hardware simulation, and it is difficult to find some design defects of the chip to be verified.

发明内容Contents of the invention

有鉴于此,本发明实施例提供一种芯片验证方法及装置、系统、电子设备、计算机可读存储介质,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。In view of this, embodiments of the present invention provide a chip verification method and device, system, electronic equipment, and computer-readable storage medium, which can facilitate defect detection while giving full play to the advantages of large-scale and fast verification of a hardware verification platform.

第一方面,本发明的实施例提供一种芯片验证方法,基于硬件验证平台,包括:运行待验证芯片的硬件仿真程序;按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。In the first aspect, embodiments of the present invention provide a chip verification method based on a hardware verification platform, including: running a hardware simulation program of the chip to be verified; The behavior information and behavior result information in, so that the software verification platform performs verification review on the chip to be verified according to the behavior information and the behavior result information.

在一种实施方式中,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:在所述硬件仿真程序中的每条指令运行结束后,向所述软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。In one embodiment, the sending the behavior information and behavior result information of the chip to be verified to the software verification platform during program execution according to a preset policy includes: the execution of each instruction in the hardware emulation program ends Afterwards, the behavior information and behavior result information of the chip to be verified during program running are sent to the software verification platform.

在一种实施方式中,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。In an implementation manner, the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information.

在一种实施方式中,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息。In one embodiment, the memory access information of the instruction includes at least one of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, memory access information lost due to an abnormal situation , Memory information updated due to speculative execution of instructions.

在一种实施方式中,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:将所述指令的实际执行顺序所对应的实际存储器访问次序,以及指令的顺序调整信息向所述软件验证平台发送;或者,根据所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序,将所述规定执行顺序对应的规定存储器访问次序向所述软件验证平台发送。In one embodiment, the actual execution order of the instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order corresponds to the actual execution order of the instructions in the hardware emulation program the actual memory access sequence; the sending to the software verification platform the behavior information and behavior result information of the chip to be verified during the program operation includes: the actual memory access sequence corresponding to the actual execution sequence of the instruction, and the instruction Sequence adjustment information is sent to the software verification platform; or, according to the actual execution order of the instructions and the order adjustment information of the instructions, the specified execution sequence of the instructions is determined, and the specified memory access sequence corresponding to the specified execution sequence is sent to the The software verification platform sends.

在一种实施方式中,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:将所述基于处理器核心各自时钟的访问次序以及各处理器核心的时钟差异向所述软件验证平台发送,或者,根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序,将所述同步次序向所述软件验证平台发送。In one embodiment, the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the clock frequency of the first processor core is the same as the clock frequency of the The clock frequency of the second processor core is different; the access sequence of the at least two processor cores to the memory is an access sequence based on the respective clocks of the processor cores; the sending of the chip to be verified to the software verification platform is in the process of program operation The behavior information and behavior result information include: sending the access sequence based on the respective clocks of the processor cores and the clock difference of each processor core to the software verification platform, or, according to the clock difference of each processor core, Synchronize based on the access sequence of the respective clocks of the processor cores to obtain a synchronization sequence, and send the synchronization sequence to the software verification platform.

在一种实施方式中,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,所述方法还包括:确定所述行为信息和所述行为结果信息对应的指令是否为预测执行的指令;响应于所述指令为预测执行的指令,确定所述预测执行的指令是否预测成功;所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:在预测成功的情况下,向软件验证平台发送所述行为信息和所述行为结果信息;在预测失败的情况下,拒绝向软件验证平台发送所述行为信息和所述行为结果信息。In one embodiment, before sending the behavior information and behavior result information of the chip to be verified to the software verification platform according to the preset strategy, the method further includes: determining the behavior information and the Whether the instruction corresponding to the behavior result information is a predictively executed instruction; in response to the fact that the instruction is a predictively executed instruction, determine whether the prediction of the predictively executed instruction is successful; according to the preset strategy, send the described The behavior information and behavior result information of the chip to be verified during program operation include: if the prediction is successful, send the behavior information and the behavior result information to the software verification platform; The platform sends the behavior information and the behavior result information.

在一种实施方式中,所述行为结果信息包括以下至少一项:指令退出后的定点寄存器信息,指令退出后的浮点寄存器信息、指令退出后的状态寄存器信息。In one embodiment, the behavior result information includes at least one of the following: fixed-point register information after the instruction exits, floating-point register information after the instruction exits, and status register information after the instruction exits.

在一种实施方式中,所述运行待验证芯片的硬件仿真程序之后,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,所述方法还包括:在执行所述硬件仿真程序中的每条指令时,获取该条指令的行为信息;在执行所述硬件仿真程序中的每条指令后,获取该条指令对应的行为结果信息;按照预设协议,将所述行为信息和所述行为结果信息生成验证数据包;所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:向所述软件验证平台发送所述验证数据包。In one embodiment, after running the hardware simulation program of the chip to be verified, before sending the behavior information and behavior result information of the chip to be verified to the software verification platform according to the preset policy, the The method further includes: when executing each instruction in the hardware emulation program, obtaining the behavior information of the instruction; after executing each instruction in the hardware emulation program, obtaining the behavior result information corresponding to the instruction ; According to a preset protocol, generating a verification data packet from the behavior information and the behavior result information; the sending the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform includes: sending the behavior information to the software verification platform; The software verification platform sends the verification data packet.

在一种实施方式中,所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:通过DPI(Direct Programming Interface,直接编程接口)向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。In one embodiment, the sending to the software verification platform the behavior information and behavior result information of the chip to be verified during program operation includes: sending the software verification platform through DPI (Direct Programming Interface, direct programming interface) Behavior information and behavior result information of the chip to be verified during program operation.

第二方面,本发明的实施例还提供一种芯片验证方法,基于软件验证平台,包括:接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息;根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息;根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。In the second aspect, the embodiment of the present invention also provides a chip verification method based on a software verification platform, including: receiving behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform; Running the reference model corresponding to the chip to be verified according to the behavior information to obtain corresponding model result information; performing verification review on the chip to be verified according to the behavior result information and the model result information.

在一种实施方式中,所述接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息包括:接收硬件验证平台发送的验证数据包,所述验证数据包由所述行为信息和所述行为结果信息根据预设协议生成;解析所述验证数据包得到所述行为信息和所述行为结果信息。In one embodiment, the receiving the behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform includes: receiving the verification data packet sent by the hardware verification platform, the verification data The packet is generated from the behavior information and the behavior result information according to a preset protocol; the verification data packet is parsed to obtain the behavior information and the behavior result information.

在一种实施方式中,所述根据所述行为信息运行所述待验证芯片对应的参考模型包括:通过预设脚本将所述行为信息还原为所述待验证芯片的行为序列;利用所述行为序列驱动所述参考模型运行。In one embodiment, the running the reference model corresponding to the chip to be verified according to the behavior information includes: restoring the behavior information to the behavior sequence of the chip to be verified through a preset script; using the behavior Sequences drive the reference model to run.

在一种实施方式中,所述根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核包括:将所述行为结果信息与所述模型结果信息进行比对;根据比对结果确定所述待验证芯片是否验证通过。In one embodiment, the verification review of the chip to be verified according to the behavior result information and the model result information includes: comparing the behavior result information with the model result information; The comparison result determines whether the chip to be verified passes the verification.

在一种实施方式中,所述比对结果为所述待验证芯片验证未通过,所述方法还包括:根据比对结果,对所述待验证芯片进行缺陷排查。In one embodiment, the comparison result is that the verification of the chip to be verified fails, and the method further includes: performing defect inspection on the chip to be verified according to the comparison result.

在一种实施方式中,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。In an implementation manner, the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information.

在一种实施方式中,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息;所述根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核之前,所述方法还包括:根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the memory access information of the instruction includes at least one of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, memory access information lost due to an abnormal situation . The memory information updated due to the predictive execution of instructions; before performing verification review on the chip to be verified according to the behavior result information and the model result information, the method further includes: according to the memory access information Detecting whether the chip to be verified has a cache coherency defect and/or a memory coherency defect.

在一种实施方式中,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;所述根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷包括:根据预先从所述硬件验证平台接收的、所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序;根据所述指令的规定执行顺序所对应的规定存储器访问次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the actual execution order of the instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order corresponds to the actual execution order of the instructions in the hardware emulation program the actual memory access sequence; the detecting whether the chip to be verified has a cache coherency defect and/or a memory consistency defect according to the memory access information includes: according to the instruction received in advance from the hardware verification platform According to the actual execution order of the instruction and the order adjustment information of the instruction, determine the specified execution sequence of the instruction; according to the specified memory access sequence corresponding to the specified execution sequence of the instruction, detect whether the chip to be verified has a cache coherency defect and/or or a memory consistency bug.

在一种实施方式中,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;所述根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷包括:根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序;根据所述同步次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the clock frequency of the first processor core is the same as the clock frequency of the The clock frequency of the second processor core is different; the access order of the at least two processor cores to the memory is based on the access order of the respective clocks of the processor cores; and according to the memory access information, it is detected whether the chip to be verified is The existence of cache coherency defects and/or memory consistency defects includes: according to the clock differences of the processor cores, synchronizing the access orders based on the respective clocks of the processor cores to obtain a synchronization order; according to the synchronization order, detecting all Describe whether the chip to be verified has cache coherency defects and/or memory coherency defects.

第三方面,本发明的实施例还提供一种芯片验证装置,包括:第一运行单元,用于运行待验证芯片的硬件仿真程序;发送单元,按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。In the third aspect, the embodiment of the present invention also provides a chip verification device, including: a first operating unit, configured to run a hardware simulation program of the chip to be verified; a sending unit, according to a preset policy, to send the Behavior information and behavior result information of the chip to be verified during program operation, so that the software verification platform performs verification review on the chip to be verified according to the behavior information and the behavior result information.

在一种实施方式中,所述发送单元,具体用于在所述硬件仿真程序中的每条指令运行结束后,向所述软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。In one embodiment, the sending unit is specifically configured to send the behavior information and Behavior Outcome Information.

在一种实施方式中,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。In an implementation manner, the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information.

在一种实施方式中,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息。In one embodiment, the memory access information of the instruction includes at least one of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, memory access information lost due to an abnormal situation , Memory information updated due to speculative execution of instructions.

在一种实施方式中,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;所述发送单元,具体用于:将所述指令的实际执行顺序所对应的实际存储器访问次序,以及指令的顺序调整信息向所述软件验证平台发送;或者,根据所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序,将所述规定执行顺序对应的规定存储器访问次序向所述软件验证平台发送。In one embodiment, the actual execution order of the instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order corresponds to the actual execution order of the instructions in the hardware emulation program the actual memory access sequence; the sending unit is specifically configured to: send the actual memory access sequence corresponding to the actual execution sequence of the instruction and the order adjustment information of the instruction to the software verification platform; or, according to the The actual execution sequence of the instructions and the sequence adjustment information of the instructions determine the specified execution sequence of the instructions, and send the specified memory access sequence corresponding to the specified execution sequence to the software verification platform.

在一种实施方式中,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;所述发送单元,具体用于:将所述基于处理器核心各自时钟的访问次序以及各处理器核心的时钟差异向所述软件验证平台发送,或者,根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序,将所述同步次序向所述软件验证平台发送。In one embodiment, the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the clock frequency of the first processor core is the same as the clock frequency of the The clock frequency of the second processor core is different; the access order of the at least two processor cores to the memory is an access order based on the respective clocks of the processor cores; the sending unit is specifically used to: The access sequence of the respective clocks and the clock difference of each processor core are sent to the software verification platform, or, according to the clock difference of each processor core, the access sequence based on the respective clocks of the processor cores is synchronized to obtain the synchronization sequence , sending the synchronization sequence to the software verification platform.

在一种实施方式中,所述装置还包括:第一确定单元,用于在按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,确定所述行为信息和所述行为结果信息对应的指令是否为预测执行的指令;第二确定单元,用于响应于所述指令为预测执行的指令,确定所述预测执行的指令是否预测成功;所述发送单元,具体用于:在预测成功的情况下,向软件验证平台发送所述行为信息和所述行为结果信息;在预测失败的情况下,拒绝向软件验证平台发送所述行为信息和所述行为结果信息。In one embodiment, the device further includes: a first determination unit, configured to determine the behavior information and behavior result information of the chip to be verified during program execution before sending the behavior information and behavior result information of the chip to be verified to the software verification platform according to a preset policy. Whether the instruction corresponding to the behavior information and the behavior result information is a predictively executed instruction; a second determining unit is configured to determine whether the predictively executed instruction is predicted to be successful in response to the instruction being a predictively executed instruction; The sending unit is specifically used to: send the behavior information and the behavior result information to the software verification platform if the prediction is successful; refuse to send the behavior information and the behavior result information to the software verification platform if the prediction fails Information about the outcome of the behavior described above.

在一种实施方式中,所述行为结果信息包括以下至少一项:指令退出后的定点寄存器信息,指令退出后的浮点寄存器信息、指令退出后的状态寄存器信息。In one embodiment, the behavior result information includes at least one of the following: fixed-point register information after the instruction exits, floating-point register information after the instruction exits, and status register information after the instruction exits.

在一种实施方式中,所述装置还包括:第一获取单元,用于在运行待验证芯片的硬件仿真程序之后,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,在执行所述硬件仿真程序中的每条指令时,获取该条指令的行为信息;第二获取单元,在执行所述硬件仿真程序中的每条指令后,获取该条指令对应的行为结果信息;生成单元,用于按照预设协议,将所述行为信息和所述行为结果信息生成验证数据包;所述发送单元,具体用于向所述软件验证平台发送所述验证数据包。In one embodiment, the device further includes: a first acquiring unit, configured to send the hardware simulation program of the chip to be verified to the software verification platform according to a preset strategy after running the hardware simulation program of the chip to be verified. Before the behavior information and behavior result information in operation, when executing each instruction in the hardware emulation program, obtain the behavior information of the instruction; the second acquisition unit, when executing each instruction in the hardware emulation program Afterwards, the behavior result information corresponding to the instruction is obtained; the generation unit is used to generate a verification data packet from the behavior information and the behavior result information according to a preset protocol; the sending unit is specifically used to send the software The verification platform sends the verification data packet.

在一种实施方式中,所述发送单元,具体用于通过DPI向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。In one embodiment, the sending unit is specifically configured to send behavior information and behavior result information of the chip to be verified during program execution to the software verification platform through DPI.

第四方面,本发明的实施例还提供一种芯片验证装置,包括:接收单元,用于接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息;第二运行单元,根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息;复核单元,用于根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。In the fourth aspect, the embodiment of the present invention further provides a chip verification device, including: a receiving unit, configured to receive behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform; The second operating unit is configured to run the reference model corresponding to the chip to be verified according to the behavior information to obtain corresponding model result information; the review unit is configured to process the pending chip according to the behavior result information and the model result information Verify the chip for verification review.

在一种实施方式中,所述接收单元包括:接收模块,用于接收硬件验证平台发送的验证数据包,所述验证数据包由所述行为信息和所述行为结果信息根据预设协议生成;解析模块,用于解析所述验证数据包得到所述行为信息和所述行为结果信息。In one embodiment, the receiving unit includes: a receiving module, configured to receive a verification data packet sent by a hardware verification platform, where the verification data packet is generated from the behavior information and the behavior result information according to a preset protocol; An analysis module, configured to analyze the verification data packet to obtain the behavior information and the behavior result information.

在一种实施方式中,所述第二运行单元包括:还原模块,用于通过预设脚本将所述行为信息还原为所述待验证芯片的行为序列;驱动模块,用于利用所述行为序列驱动所述参考模型运行。In one embodiment, the second operating unit includes: a restore module, configured to restore the behavior information to the behavior sequence of the chip to be verified through a preset script; a driver module, configured to use the behavior sequence Drive the reference model to run.

在一种实施方式中,所述复核单元包括:比对模块,用于将所述行为结果信息与所述模型结果信息进行比对;确定模块,用于根据比对结果确定所述待验证芯片是否验证通过。In one embodiment, the review unit includes: a comparison module, configured to compare the behavior result information with the model result information; a determination module, configured to determine the chip to be verified according to the comparison result Whether the verification is passed.

在一种实施方式中,所述比对结果为所述待验证芯片验证未通过;所述装置还包括:排查单元,用于根据比对结果,对所述待验证芯片进行缺陷排查。In one embodiment, the comparison result is that the verification of the chip to be verified fails; the device further includes: a troubleshooting unit, configured to perform defect troubleshooting on the chip to be verified according to the comparison result.

在一种实施方式中,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。In an implementation manner, the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information.

在一种实施方式中,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息;所述装置还包括:检测单元,用于在根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核之前,根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the memory access information of the instruction includes at least one of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, memory access information lost due to an abnormal situation . The memory information updated due to the predictive execution of the instruction; the device further includes: a detection unit, used to check the chip to be verified according to the The memory access information is used to detect whether the chip to be verified has a cache coherency defect and/or a memory consistency defect.

在一种实施方式中,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;所述检测单元包括:顺序确定模块,用于根据预先从所述硬件验证平台接收的、所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序;第一检测模块,用于根据所述指令的规定执行顺序所对应的规定存储器访问次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the actual execution order of the instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order corresponds to the actual execution order of the instructions in the hardware emulation program The actual memory access sequence; the detection unit includes: a sequence determination module, which is used to determine the specified execution of the instruction according to the actual execution sequence of the instruction and the order adjustment information received from the hardware verification platform in advance Sequence; the first detection module is configured to detect whether the chip to be verified has a cache coherency defect and/or a memory consistency defect according to the specified memory access sequence corresponding to the specified execution sequence of the instructions.

在一种实施方式中,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;所述检测单元包括:时钟同步模块,用于根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序;第二检测模块,用于根据所述同步次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the clock frequency of the first processor core is the same as the clock frequency of the The clock frequency of the second processor core is different; the access order of the at least two processor cores to the memory is based on the access order of the respective clocks of the processor cores; the detection unit includes: a clock synchronization module, for according to each processor The clock difference of the core is to synchronize the access sequence based on the respective clocks of the processor cores to obtain a synchronization sequence; the second detection module is used to detect whether there is a cache consistency defect and a cache consistency defect in the chip to be verified according to the synchronization sequence. /or memory consistency flaws.

第五方面,本发明的实施例还提供一种芯片验证系统,包括硬件验证平台和软件验证平台;所述硬件验证平台通过预设接口与所述软件验证平台通信连接;其中,所述硬件验证平台用于执行本发明的实施例提供的任一种基于硬件验证平台的芯片验证方法,所述软件验证平台用于执行本发明的实施例提供的任一种基于软件验证平台的芯片验证方法。In the fifth aspect, the embodiments of the present invention also provide a chip verification system, including a hardware verification platform and a software verification platform; the hardware verification platform communicates with the software verification platform through a preset interface; wherein, the hardware verification platform The platform is used to execute any chip verification method based on the hardware verification platform provided by the embodiments of the present invention, and the software verification platform is used to execute any chip verification method based on the software verification platform provided by the embodiments of the present invention.

第六方面,本发明的实施例还提供一种电子设备,包括:壳体、至少一个处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为上述电子设备的各个电路或器件供电;存储器用于存储可执行程序代码;所述至少一个处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,用于执行本发明的实施例提供的任一种芯片验证方法。In the sixth aspect, the embodiment of the present invention also provides an electronic device, including: a casing, at least one processor, a memory, a circuit board, and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the casing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to each circuit or device of the above-mentioned electronic equipment; the memory is used to store the executable program code; the at least one processor reads the executable program code stored in the memory to run a program corresponding to the executable program code, for executing any chip verification method provided by the embodiments of the present invention.

第七方面,本发明的实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现本发明的实施例提供的任一种芯片验证方法。In the seventh aspect, the embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to implement any chip verification method provided by the embodiments of the present invention.

本发明的实施例提供的芯片验证方法及装置、系统、电子设备、计算机可读存储介质,能将硬件验证平台与软件验证平台相结合,一方面可以在硬件验证平台上运行待验证芯片的仿真程序,从而实现对待验证芯片的大规模、快速验证,另一方面可以将硬件验证中待验证芯片的行为信息和行为结果信息发送给软件验证平台,以便软件验证平台对待验证芯片同样的行为进行软件方式的验证,从而能够利用软件验证方式中多样且完善的缺陷检测手段,排查待验证芯片中的缺陷,因此,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。The chip verification method and device, system, electronic equipment, and computer-readable storage medium provided by the embodiments of the present invention can combine a hardware verification platform with a software verification platform. On the one hand, the simulation of the chip to be verified can be run on the hardware verification platform. program, so as to realize large-scale and rapid verification of the chip to be verified. On the other hand, the behavior information and behavior result information of the chip to be verified in the hardware verification can be sent to the software verification platform, so that the software verification platform can perform software verification of the same behavior of the chip to be verified. In this way, the various and perfect defect detection methods in the software verification method can be used to check the defects in the chips to be verified. Therefore, it is possible to facilitate defect detection while giving full play to the large-scale and rapid verification advantages of the hardware verification platform.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1为本发明的实施例提供的芯片验证方法的一种流程图;FIG. 1 is a flow chart of a chip verification method provided by an embodiment of the present invention;

图2为本发明的实施例中处理器核心与存储器的一种结构示意图;FIG. 2 is a schematic structural diagram of a processor core and memory in an embodiment of the present invention;

图3为本发明的实施例提供的芯片验证方法的另一种流程图;Fig. 3 is another flow chart of the chip verification method provided by the embodiment of the present invention;

图4为本发明的实施例提供的芯片验证方法的一种详细流程图;FIG. 4 is a detailed flowchart of a chip verification method provided by an embodiment of the present invention;

图5为本发明的实施例提供的芯片验证装置的一种结构示意图;FIG. 5 is a schematic structural diagram of a chip verification device provided by an embodiment of the present invention;

图6为本发明的实施例提供的芯片验证装置的另一种结构示意图;FIG. 6 is another schematic structural diagram of a chip verification device provided by an embodiment of the present invention;

图7为本发明的实施例提供的芯片验证系统的一种结构示意图;FIG. 7 is a schematic structural diagram of a chip verification system provided by an embodiment of the present invention;

图8为本发明的实施例提供的电子设备的一种结构示意图。FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图对本发明实施例进行详细描述。Embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

应当明确,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。It should be clear that the described embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

为使本领域技术人员更好地理解本发明的实施例的技术构思、实施方案和有益技术效果,以下通过具体实施例进行详细说明。In order to enable those skilled in the art to better understand the technical conception, implementation and beneficial technical effects of the embodiments of the present invention, the following specific examples will be described in detail.

如背景技术所言,硬件仿真(emulation)技术虽然解决了芯片在流片前大规模测试时的测试速度慢和测试指令规模小的问题,但相比于传统的软件模拟验证(simulation),硬件仿真中很多检测手段,例如checker、monitor等,是无法综合成具体电路的,因此,硬件仿真中可供利用的缺陷(bug)检测手段较少,难以发现待验证芯片的一些设计缺陷。As mentioned in the background technology, although the hardware emulation technology solves the problems of slow test speed and small scale of test instructions when the chip is tested on a large scale before tape-out, compared with the traditional software simulation verification (simulation), the hardware Many detection methods in simulation, such as checker, monitor, etc., cannot be synthesized into specific circuits. Therefore, there are few defect detection methods available in hardware simulation, and it is difficult to find some design defects of the chip to be verified.

为了弥补上述不足,在使用硬件仿真加速平台进行CPU大规模测试中,可以在产生测试CPU direct/random测试用例时,由CPU验证工程师加入一些自校验的测试用例,比如CRC(Cyclic Redundancy Check,循环冗余校验)比对、多次跑同样的程序看结果是否一致、加入“通过”(pass)、“失败”(failed)的程序段表征测试按验证工程师的设计执行完等等。然而,这虽然在一定程度上解决了错误检测问题,但编写自校验测试用例时,校验粒度却难以把握,如果校验粒度较粗,则待验证芯片的一些错误就可能会被掩盖而校验不出,如果粒度较细,则测试用例很可能由于各种细微的问题而被终止运行,导致无法运行完成,进而无法发挥出校验作用。In order to make up for the above deficiencies, when using the hardware simulation acceleration platform for large-scale CPU testing, CPU verification engineers can add some self-checking test cases when generating test CPU direct/random test cases, such as CRC (Cyclic Redundancy Check, Cyclic redundancy check) comparison, running the same program multiple times to see if the results are consistent, adding "pass" (pass), "failed" (failed) program segment characterization tests are executed according to the design of the verification engineer, etc. However, although this solves the problem of error detection to a certain extent, it is difficult to grasp the verification granularity when writing self-verification test cases. If the verification granularity is coarse, some errors of the chip to be verified may be covered up. It cannot be verified. If the granularity is finer, the test case is likely to be terminated due to various subtle problems, resulting in the inability to run to completion, and thus unable to play a verification role.

此外,随着UVM(Universal Verification Methodology,通用验证方法学)的逐渐流行,也存在一种在硬件仿真加速器emulator上搭建主机UVM的方案,也就是在硬件emulator上运行待验证芯片的仿真程序,并与主机UVN进行transaction(事务)级别的通信。以此,硬件仿真可以复用主机UVM的软件验证平台simulation开发出来的checker,monitor,从而达到校验目的。然而,软件验证平台的仿真程序与硬件验证平台的仿真程序同时运行,并使这两个仿真程序保持transaction级别的通信,会使硬件仿真的运行速度受制于软件仿真的仿真速度。In addition, with the gradual popularity of UVM (Universal Verification Methodology, Universal Verification Methodology), there is also a solution to build host UVM on the hardware emulator emulator, that is, run the emulation program of the chip to be verified on the hardware emulator, and Communicate at the transaction level with the host UVN. In this way, the hardware simulation can reuse the checker and monitor developed by the host UVM software verification platform simulation, so as to achieve the purpose of verification. However, the emulation program of the software verification platform and the emulation program of the hardware verification platform run simultaneously, and the two emulation programs maintain transaction-level communication, so that the running speed of the hardware emulation is limited by the emulation speed of the software emulation.

另外,工程师也可以在运行过程中让硬件仿真加速器报告是否有满足条件的断言触发(assertion trigger)。然而,这种方式类似于白盒测试,需要验证工程师提前判断出问题的测试点可能出现的情况。但由于CPU的极端情况缺陷则往往是通过随机指令序列验证出的,验证工程师很难提前判断并加入对应的assertion。In addition, engineers can also let the hardware emulation accelerator report whether there is an assertion trigger (assertion trigger) that meets the conditions during operation. However, this approach is similar to white-box testing, which requires verification engineers to judge in advance the possible conditions of the problematic test points. However, since the extreme defects of the CPU are often verified through random instruction sequences, it is difficult for verification engineers to judge in advance and add corresponding assertions.

为了能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测,发明人在研究中发现,可以将硬件验证平台与软件验证平台相结合,一方面在硬件验证平台上运行待验证芯片的仿真程序,从而实现对待验证芯片的大规模、快速验证,另一方面可以将硬件验证中待验证芯片的行为信息和行为结果信息发送给软件验证平台,以便软件验证平台对待验证芯片同样的行为进行软件方式的验证,从而能够利用软件验证方式中多样且完善的缺陷检测手段,排查待验证芯片中的缺陷。In order to make full use of the large-scale and fast verification advantages of the hardware verification platform and facilitate defect detection, the inventor found in the research that the hardware verification platform can be combined with the software verification platform. Verify the simulation program of the chip, so as to realize the large-scale and fast verification of the chip to be verified. On the other hand, the behavior information and behavior result information of the chip to be verified in the hardware verification can be sent to the software verification platform, so that the software verification platform can also verify the chip to be verified. Behaviors are verified in software, so that various and complete defect detection methods in software verification methods can be used to troubleshoot defects in chips to be verified.

为使本领域技术人员更好地理解本发明实施例的技术构思、实施方案和有益效果,下面通过具体实施例进行详细说明。In order to enable those skilled in the art to better understand the technical concepts, implementations and beneficial effects of the embodiments of the present invention, specific examples are described below in detail.

第一方面,本发明的实施例提供一种芯片验证方法,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。In the first aspect, the embodiments of the present invention provide a method for chip verification, which can facilitate defect detection while giving full play to the large-scale and fast verification advantages of a hardware verification platform.

如图1所示,本发明的实施例提供的芯片验证方法,基于硬件验证平台,该方法可以包括:As shown in Figure 1, the chip verification method provided by the embodiment of the present invention is based on a hardware verification platform, and the method may include:

S11、运行待验证芯片的硬件仿真程序;S11, running a hardware emulation program of the chip to be verified;

本发明的实施例中,硬件验证平台可以为采用硬件电路或硬件器件模拟待验证芯片中的电路或功能模块的平台。待验证芯片在硬件验证平台,具体可以指硬件验证平台上模拟出的待验证芯片。本步骤中,运行待验证芯片的硬件仿真程序,也就是利用硬件验证平台模拟出待验证芯片的各种结构和功能后,在模拟出的待验证芯片上运行各种测试用例。由于硬件验证平台具有比软件验证平台更高的运行速度,因此在硬件验证平台上可以快速运行大规模的测试用例,以便对待验证芯片方方面面的功能进行高效验证。In the embodiment of the present invention, the hardware verification platform may be a platform that uses hardware circuits or hardware devices to simulate circuits or functional modules in the chip to be verified. The chip to be verified is on the hardware verification platform, specifically, it may refer to the chip to be verified simulated on the hardware verification platform. In this step, run the hardware simulation program of the chip to be verified, that is, use the hardware verification platform to simulate various structures and functions of the chip to be verified, and run various test cases on the simulated chip to be verified. Since the hardware verification platform has a higher operating speed than the software verification platform, large-scale test cases can be quickly run on the hardware verification platform to efficiently verify all aspects of the chip to be verified.

可选的,本发明的实施例中,待验证芯片可以包括各种功能、各种类型的集成电路,例如,各种专用集成电路、处理器等。Optionally, in the embodiment of the present invention, the chip to be verified may include various functions and various types of integrated circuits, for example, various application-specific integrated circuits, processors, and the like.

S12、按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。S12. According to the preset strategy, send the behavior information and behavior result information of the chip to be verified during the program operation to the software verification platform, so that the software verification platform can make the The chip to be verified is verified and reviewed.

本发明的实施例中,硬件验证平台运行硬件仿真程序后,一方面可以得到相应的硬件验证结果,另一方面,可以将硬件仿真程序中待验证芯片的行为信息和行为结果信息向软件验证平台发送,以使软件验证平台进行验证复核。软件验证平台可以指在主机上运行的验证平台。软件验证平台可以基于多种编程语言实现,例如,本发明的一个实施例中,软件验证平台可以基于C语言实现。In the embodiment of the present invention, after the hardware verification platform runs the hardware simulation program, on the one hand, the corresponding hardware verification results can be obtained; on the other hand, the behavior information and behavior result information of the chip to be verified in the hardware simulation program can be sent to the software verification platform Send to enable the software verification platform to perform a verification review. A software verification platform may refer to a verification platform running on a host. The software verification platform can be realized based on multiple programming languages. For example, in one embodiment of the present invention, the software verification platform can be realized based on C language.

预设策略可以包括向软件验证平台发送行为信息和行为结果信息的时机,也可以包括行为信息和行为结果信息的信息结构、组织形式等。其中,行为信息可以指程序运行过程中具体做了哪些或何种操作,行为结果信息可以指这些操作产生了何种结果或效果。The preset strategy may include the timing of sending behavior information and behavior result information to the software verification platform, and may also include the information structure and organizational form of the behavior information and behavior result information. Wherein, the behavior information may refer to which or what kind of operations are performed during the running of the program, and the behavior result information may refer to what results or effects are produced by these operations.

本发明的实施例中,行为信息和行为结果信息的发送时机可以多种多样,既可以在硬件仿真程序运行的过程中分批多次发送,也可以在硬件仿真程序运行结束后集中发送,以使软件验证平台可以根据所述行为信息和所述行为结果信息对该待验证芯片进行验证复核。可选的,在本发明的一个实施例中,该验证复核可以是离线的,即,硬件验证平台无需等待软件验证平台的验证复核结果,即可继续进行后续的仿真验证操作,从而进一步提高验证效率。在本发明的另一个实施例中,该验证复核也可以是在线的,即,硬件验证平台可以等待软件验证平台的验证复核结果,并根据验证复核结果确定是否继续进行后续的硬件仿真验证操作。这样,虽然等待软件验证平台的过程中会牺牲一些验证速度,但由于本发明实施例中的软件验证平台并非基于传统的UVM构建的复杂验证系统,而是针对硬件验证平台中相应的行为信息和行为结果信息进行验证复核,结构和程序更加精简,因此,软件验证速度相比于传统的UVM仍然有很大提升,从而能够在提升验证效率的同时,及时发现待验证芯片的问题,而无需后续再进行大量的验证,有效节约了验证资源。In the embodiment of the present invention, the timing of sending behavior information and behavior result information can be various, both can be sent multiple times in batches during the running of the hardware emulation program, or can be sent collectively after the hardware emulation program is running, so as to The software verification platform can perform verification review on the chip to be verified according to the behavior information and the behavior result information. Optionally, in an embodiment of the present invention, the verification review can be offline, that is, the hardware verification platform can continue to perform subsequent simulation verification operations without waiting for the verification review result of the software verification platform, thereby further improving verification. efficiency. In another embodiment of the present invention, the verification review can also be online, that is, the hardware verification platform can wait for the verification review result of the software verification platform, and determine whether to continue the subsequent hardware simulation verification operation according to the verification review result. In this way, although some verification speed will be sacrificed in the process of waiting for the software verification platform, since the software verification platform in the embodiment of the present invention is not a complex verification system based on traditional UVM, it is aimed at the corresponding behavior information and The behavior result information is verified and reviewed, and the structure and procedures are more streamlined. Therefore, the software verification speed is still greatly improved compared with the traditional UVM, so that while improving the verification efficiency, problems of the chip to be verified can be found in time without the need for follow-up Then, a large number of verifications are performed, which effectively saves verification resources.

可选的,行为信息和行为结果信息的信息结构和组织形式同样可以多种多样,例如,在本发明的一个实施例中,行为信息和行为结果信息可以以指令为单位进行获取和统计,也即获取和统计每一条指令的执行涉及哪些操作以及产生哪些结果,并将每一条指令对应的行为信息和行为结果信息分别向软件验证平台发送。在本发明的另一个实施例中,行为信息和行为结果信息也可以以时钟周期为单位进行获取和统计,也即是在每个时钟周期都获取和统计一次行为信息和行为结果信息。具体实施中,行为信息和行为结果信息既可以存储于同一个文件中,也可以存储于不同的文件中,本发明的实施例对此不做限定。Optionally, the information structure and organization form of behavior information and behavior result information can also be various. That is to obtain and count which operations and results are involved in the execution of each instruction, and send the behavior information and behavior result information corresponding to each instruction to the software verification platform. In another embodiment of the present invention, the behavior information and behavior result information may also be acquired and counted in units of clock cycles, that is, the behavior information and behavior result information are acquired and counted once in each clock cycle. In a specific implementation, the behavior information and the behavior result information may be stored in the same file or in different files, which is not limited in this embodiment of the present invention.

本发明的实施例提供的芯片验证方法,硬件验证平台能够运行待验证芯片的硬件仿真程序,按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。这样,就能将硬件验证平台与软件验证平台相结合,一方面可以在硬件验证平台上运行待验证芯片的仿真程序,从而实现对待验证芯片的大规模、快速验证,另一方面可以将硬件验证中待验证芯片的行为信息和行为结果信息发送给软件验证平台,以便软件验证平台对待验证芯片同样的行为进行软件方式的验证,从而能够利用软件验证方式中多样且完善的缺陷检测手段,排查待验证芯片中的缺陷,因此,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。In the chip verification method provided by the embodiments of the present invention, the hardware verification platform can run the hardware simulation program of the chip to be verified, and send the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform according to the preset strategy so that the software verification platform performs a verification review on the chip to be verified according to the behavior information and the behavior result information. In this way, the hardware verification platform can be combined with the software verification platform. On the one hand, the simulation program of the chip to be verified can be run on the hardware verification platform, thereby realizing large-scale and fast verification of the chip to be verified. The behavior information and behavior result information of the chip to be verified are sent to the software verification platform, so that the software verification platform can verify the same behavior of the chip to be verified in software, so that the various and perfect defect detection methods in the software verification method can be used to troubleshoot the pending defects. To verify the defects in the chip, it is possible to make full use of the large-scale and rapid verification advantages of the hardware verification platform, and at the same time facilitate defect detection.

具体而言,在本发明的一个实施例中,待验证芯片在程序运行中的行为信息可以包括以下一项或多项:指令的退出信息,指令的存储器访问信息,指令的中断信息。其中,指令的退出信息可以表示一条指令执行结束,指令的存储器访问信息可以表示一条指令具有存储器访问操作,例如读内存或写内存等,其中,存储器可以包括内存和/或各级缓存。示例性的,待验证芯片的一种处理器核心与存储器的结构示意图可以如图2所示。指令的中断信息可以表示一条指令的执行产生了中断。这些行为信息可以通过对硬件仿真的待验证芯片中相应的逻辑单元进行读取操作而获取。例如,可以从LSU(内存读写单元)中提取出指令执行过程中实际进行的访存行为信息,或者,从中断处理单元中获取中断信息等。Specifically, in an embodiment of the present invention, the behavior information of the chip to be verified during program execution may include one or more of the following: instruction exit information, instruction memory access information, and instruction interruption information. Wherein, the exit information of the instruction may indicate that the execution of an instruction is completed, and the memory access information of the instruction may indicate that an instruction has a memory access operation, such as reading memory or writing memory, etc., wherein the memory may include memory and/or various levels of cache. Exemplarily, a structural diagram of a processor core and a memory of a chip to be verified may be shown in FIG. 2 . The interrupt information of an instruction may indicate that the execution of an instruction has generated an interrupt. These behavioral information can be obtained by reading the corresponding logic unit in the hardware emulation chip to be verified. For example, actual memory access behavior information during instruction execution can be extracted from the LSU (memory read/write unit), or interrupt information can be obtained from the interrupt processing unit.

在指令的各种行为信息中,指令的存储器访问信息涉及到处理器与存储器的交互,基于此,本发明的一个实施例中,在对待验证芯片进行验证时,可以借助指令的存储器访问信息来验证待验证芯片是否存在内存一致性缺陷和/或缓存一致性缺陷。Among the various behavior information of the instruction, the memory access information of the instruction involves the interaction between the processor and the memory. Based on this, in one embodiment of the present invention, when verifying the chip to be verified, the memory access information of the instruction can be used to Verify whether the chips to be verified have memory coherency defects and/or cache coherency defects.

具体而言,在本发明的一个实施例中,指令的存储器访问信息可以包括以下一项或多项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息。这些因素都可能会影响硬件验证平台中待验证芯片的处理器核心对存储器的访问。而为了让软件验证平台能够根据硬件验证平台发送的行为信息和行为结果信息,对待验证芯片进行验证复核,本发明的实施例中,可以利用上述存储器访问信息准确恢复出各处理器核心与存储器的交互过程,从而使软件验证平台能够模拟该交互过程,以便对待验证芯片的内存一致性和/或缓存一致性进行验证复核。Specifically, in an embodiment of the present invention, the memory access information of the instruction may include one or more of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, The memory access information lost due to the situation, and the memory information updated due to the speculative execution of the instruction. All these factors may affect the memory access of the processor core of the chip to be verified in the hardware verification platform. In order for the software verification platform to verify and review the chip to be verified according to the behavior information and behavior result information sent by the hardware verification platform, in the embodiment of the present invention, the above memory access information can be used to accurately restore the relationship between each processor core and memory. The interactive process, so that the software verification platform can simulate the interactive process, so as to verify the memory consistency and/or cache consistency of the chips to be verified.

进一步地,随着计算机技术的发展,处理器在执行指令时不但可以按照指令原本的规定顺序执行,还可以打乱指令的规定顺序,进行乱序执行和/或预测执行。相应的,在乱序执行和/或预测执行中,也会涉及到每条指令执行时处理器与存储器的交互。这种情况下,为了能够让软件验证平台对待验证芯片的内存一致性和/或缓存一致性进行验证复核,本发明的实施例中,硬件验证平台和/或软件验证平台可以将乱序执行和/或预测执行的指令恢复成指令原本的规定执行顺序,再由软件验证平台根据已经恢复的规定执行顺序进行验证复核。为了使各条指令与各自的存储器访问信息相对应,存储器访问信息也随指令执行顺序的调整而调整。Further, with the development of computer technology, when executing instructions, the processor can not only execute the instructions in the original prescribed order, but also disrupt the prescribed order of the instructions to perform out-of-order execution and/or predictive execution. Correspondingly, in out-of-order execution and/or speculative execution, the interaction between the processor and the memory during the execution of each instruction is also involved. In this case, in order to enable the software verification platform to verify and review the memory consistency and/or cache consistency of the chip to be verified, in the embodiment of the present invention, the hardware verification platform and/or software verification platform can combine out-of-order execution and /or the predicted execution order is restored to the original specified execution sequence of the instruction, and then the software verification platform conducts verification review according to the restored specified execution sequence. In order to make each instruction correspond to its own memory access information, the memory access information is also adjusted along with the adjustment of the execution order of the instructions.

举例而言,在本发明的一个实施例中,待验证芯片的硬件仿真程序中指令的实际执行顺序可以包括乱序执行和/或预测执行;所述至少一个处理器核心对存储器的访问次序具体为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;基于此,步骤S12中向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息具体可以包括:将所述指令的实际执行顺序所对应的实际存储器访问次序,以及指令的顺序调整信息向所述软件验证平台发送,以便使软件验证平台根据该实际存储器访问次序和顺序调整信息确定指令的规定执行顺序对应的规定存储器访问次序,并基于该规定存储器访问次序对待验证芯片的内存一致性和/或缓存一致性进行验证复核。For example, in one embodiment of the present invention, the actual execution order of instructions in the hardware simulation program of the chip to be verified may include out-of-order execution and/or speculative execution; the access order of the memory by the at least one processor core is specifically is the actual memory access sequence corresponding to the actual execution sequence of the instructions in the hardware emulation program; based on this, in step S12, sending the behavior information and behavior result information of the chip to be verified to the software verification platform during program operation may specifically include : Send the actual memory access sequence corresponding to the actual execution sequence of the instructions, and the order adjustment information of the instructions to the software verification platform, so that the software verification platform determines the regulations of the instructions according to the actual memory access order and order adjustment information Executing the specified memory access sequence corresponding to the sequence, and performing a verification review on the memory consistency and/or cache consistency of the chip to be verified based on the specified memory access sequence.

可选的,在本发明的另一个实施例中,硬件验证平台也可以根据所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序,并将所述规定执行顺序对应的规定存储器访问次序向所述软件验证平台发送,以使软件验证平台基于该规定存储器访问次序对待验证芯片的内存一致性和/或缓存一致性进行验证复核。Optionally, in another embodiment of the present invention, the hardware verification platform may also determine the specified execution sequence of the instructions according to the actual execution sequence of the instructions and the sequence adjustment information of the instructions, and convert the specified execution sequence to The corresponding specified memory access sequence is sent to the software verification platform, so that the software verification platform performs verification review on the memory consistency and/or cache consistency of the chip to be verified based on the specified memory access sequence.

本发明的实施例中,除了指令的乱序执行和/或预测执行会影响软件验证平台的验证复核外,在多核处理器中,如果各处理器核心的时钟频率不同,也会对软件验证平台的验证复核造成影响,因此需要特别处理。In the embodiment of the present invention, in addition to the out-of-order execution and/or speculative execution of instructions will affect the verification review of the software verification platform, in a multi-core processor, if the clock frequencies of the cores of each processor are different, the software verification platform will also be affected. validation review for , and therefore require special handling.

举例而言,在本发明的一个实施例中,待验证芯片的处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;则基于此,步骤S12中向软件验证平台发送待验证芯片在程序运行中的行为信息和行为结果信息可以包括:将所述基于处理器核心各自时钟的访问次序以及各处理器核心的时钟差异向软件验证平台发送,以使软件验证平台根据各处理器核心的时钟差异,对基于处理器核心各自时钟的访问次序进行同步,并根据同步后的访问次序验证内存一致性和/或缓存一致性。For example, in one embodiment of the present invention, the number of processor cores of the chip to be verified is at least two, and there are at least one first processor core and one second processor core, the first processing The clock frequency of the processor core is different from the clock frequency of the second processor core; the access order of the at least two processor cores to the memory is based on the access order of the respective clocks of the processor cores; then based on this, in step S12 to The software verification platform sending the behavior information and behavior result information of the chip to be verified during program operation may include: sending the access sequence based on the respective clocks of the processor cores and the clock difference of each processor core to the software verification platform, so that the software The verification platform synchronizes the access sequence based on the respective clocks of the processor cores according to the clock difference of each processor core, and verifies memory consistency and/or cache consistency according to the synchronized access sequence.

可选的,在本发明的另一个实施例中,硬件验证平台也可以根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序,并将所述同步次序向所述软件验证平台发送。Optionally, in another embodiment of the present invention, the hardware verification platform may also synchronize the access sequence based on the respective clocks of the processor cores according to the clock differences of the processor cores to obtain the synchronization sequence, and store the obtained The synchronization sequence is sent to the software verification platform.

指令执行会产生一定的结果,得到相应的行为结果信息,行为结果信息可以存储在硬件仿真的待验证芯片的各种寄存器中而被获取和访问。例如,在本发明的一个实施例中,待验证芯片在程序运行中的行为结果信息可以包括以下一项或多项:指令退出后的定点寄存器信息,指令退出后的浮点寄存器信息、指令退出后的状态寄存器信息等。在获取行为结果信息时,例如可以从RT(完成退出单元)提取retire(退出)的定点信息,从FP(浮点单元)提取浮点信息等。The execution of the instruction will produce a certain result, and the corresponding behavior result information can be obtained. The behavior result information can be stored in various registers of the chip to be verified by hardware emulation and obtained and accessed. For example, in one embodiment of the present invention, the behavior result information of the chip to be verified during program execution may include one or more of the following: fixed-point register information after the instruction exits, floating-point register information after the instruction exits, instruction exit After the status register information and so on. When acquiring behavior result information, for example, fixed-point information of retire (exit) can be extracted from RT (complete exit unit), floating-point information can be extracted from FP (floating-point unit), and the like.

为了获取到待验证芯片的上述行为信息和行为结果信息,在本发明的一个实施例中,可以基于systemverilog实现一个可综合的monitor,用于在硬件验证平台上收集待验证芯片的行为信息和行为结果信息。In order to obtain the above behavior information and behavior result information of the chip to be verified, in one embodiment of the present invention, a synthesizable monitor can be implemented based on systemverilog, which is used to collect the behavior information and behavior of the chip to be verified on the hardware verification platform result information.

获取了待验证芯片在程序运行中的行为信息和行为结果信息之后,就可以在步骤S12中按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。具体而言,在本发明的一个实施例中,按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息具体可以包括:在硬件仿真程序中的每条指令运行结束后,向软件验证平台发送待验证芯片在程序运行中的行为信息和行为结果信息,例如,在CPU每条指令运行结束之后,可以将CPU在这条指令周期产生的行为信息和行为结果信息通过monitor传送给软件验证平台。这样,以指令为粒度对每条指令所做的操作以及产生的结果进行信息获取和发送,就可以准确掌握每条指令的动作及结果,既不会获取和发送过多的、指令执行中间过程信息和冗余信息,也不会对重要的行为信息和行为结果信息有所遗漏。After obtaining the behavior information and behavior result information of the chip to be verified during program operation, the behavior information and behavior result information of the chip to be verified during program operation can be sent to the software verification platform according to the preset strategy in step S12 . Specifically, in one embodiment of the present invention, according to a preset policy, sending the behavior information and behavior result information of the chip to be verified to the software verification platform during program execution may specifically include: After each instruction finishes running, send the behavior information and behavior result information of the chip to be verified during program running to the software verification platform. For example, after each CPU instruction finishes running, the behavior information and The behavior result information is transmitted to the software verification platform through the monitor. In this way, by acquiring and sending information on the operation and results of each instruction at the granularity of the instruction, the action and result of each instruction can be accurately grasped, and neither too much acquisition nor sending, and the intermediate process of instruction execution Information and redundant information will not omit important behavioral information and behavioral result information.

为了提高信息发送效率,在本发明的一个实施例中,在步骤S11运行待验证芯片的硬件仿真程序之后,步骤S12按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,本发明的实施例提供的芯片验证方法还可以包括:在执行所述硬件仿真程序中的每条指令时,获取该条指令的行为信息;在执行所述硬件仿真程序中的每条指令后,获取该条指令对应的行为结果信息;按照预设协议,将所述行为信息和所述行为结果信息生成验证数据包;则基于此,步骤S12向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息具体可以包括:向所述软件验证平台发送所述验证数据包。In order to improve the efficiency of information transmission, in one embodiment of the present invention, after the hardware simulation program of the chip to be verified is run in step S11, step S12 sends the information of the chip to be verified to the software verification platform according to the preset strategy when the program is running. Before the behavior information and behavior result information, the chip verification method provided by the embodiments of the present invention may also include: when executing each instruction in the hardware emulation program, obtaining the behavior information of the instruction; After each instruction in the program, the behavior result information corresponding to the instruction is obtained; according to the preset protocol, the behavior information and the behavior result information are generated into a verification data packet; based on this, step S12 sends to the software verification platform The behavior information and behavior result information of the chip to be verified during program running may specifically include: sending the verification data packet to the software verification platform.

本实施例中,由于存储行为信息和行为结果信息的各种逻辑单元和寄存器会随着程序的执行而进行更新,因此,为了得到每条指令的行为信息和行为结果信息,可以选择合适的时机来获取行为信息和行为结果信息。例如,本实施例中,选择在执行每条指令时获取相应的行为信息,在执行完每条指令后获取相应的行为结果信息。In this embodiment, since various logic units and registers storing behavior information and behavior result information will be updated with the execution of the program, in order to obtain the behavior information and behavior result information of each instruction, an appropriate timing can be selected To obtain behavioral information and behavioral result information. For example, in this embodiment, it is selected to obtain corresponding behavior information when each instruction is executed, and obtain corresponding behavior result information after each instruction is executed.

考虑到信息发送的便捷性,本实施例中,还对获取到的行为信息和行为结果信息进行了数据封装,按照与软件验证平台预先约定的协议,将行为信息和行为结果信息生成验证数据包,并向软件验证平台发送验证数据包。可选的,这些验证数据包既可以在每条指令结束后发送,也可以在几条指令结束后分批发送,或在硬件验证平台空闲时择机发送,还可以在硬件验证平台的硬件仿真程序运行结束后发送,本发明的实施例对此不做限定。可选的,行为信息和行为结果信息可以封装在同一个验证数据包中,或者封装在不同的验证数据包中。Considering the convenience of information transmission, in this embodiment, data encapsulation is also performed on the acquired behavior information and behavior result information, and the behavior information and behavior result information are generated into verification data packets according to the pre-agreed agreement with the software verification platform , and send a verification packet to the software verification platform. Optionally, these verification data packets can be sent after each instruction is finished, or can be sent in batches after several instructions are finished, or can be sent when the hardware verification platform is idle, or can be sent in the hardware emulation program of the hardware verification platform It is sent after the operation is completed, which is not limited in this embodiment of the present invention. Optionally, the behavior information and behavior result information may be encapsulated in the same verification data packet, or encapsulated in different verification data packets.

具体实施中,可以通过DPI或其他可用接口,向软件验证平台发送待验证芯片在程序运行中的行为信息和行为结果信息。In a specific implementation, the behavior information and behavior result information of the chip to be verified during program running can be sent to the software verification platform through DPI or other available interfaces.

此外,在本发明的一个或多个实施例中,可能存在指令的预测执行,而预测执行对应的行为信息和行为结果信息并不能立即生效,还要根据前序指令的执行情况确定本条预测指令执行得是否正确,也就是是否预测成功,如果预测成功,则其对应的行为信息和行为结果信息才是有效的,可以向软件验证平台发送,否则,如果预测失败,则该条预测指令对应的行为信息和行为结果信息都是无效的,因此,拒绝向软件验证平台发送,该条预测指令还要重新执行。In addition, in one or more embodiments of the present invention, there may be speculative execution of instructions, but the behavior information and behavior result information corresponding to speculative execution cannot take effect immediately, and this predictive instruction must be determined according to the execution status of the preceding instruction Whether the execution is correct, that is, whether the prediction is successful. If the prediction is successful, the corresponding behavior information and behavior result information are valid and can be sent to the software verification platform. Otherwise, if the prediction fails, the corresponding behavior information of the prediction instruction Behavior information and behavior result information are both invalid, therefore, refuse to send to the software verification platform, and the prediction instruction must be re-executed.

举例而言,在本发明的一个实施例中,在步骤S12按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,本发明的实施例提供的芯片验证方法还可以包括:确定所述行为信息和所述行为结果信息对应的指令是否为预测执行的指令;响应于所述指令为预测执行的指令,确定所述预测执行的指令是否预测成功;基于此,步骤S12按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息具体可以包括:在预测成功的情况下,向软件验证平台发送所述行为信息和所述行为结果信息;在预测失败的情况下,拒绝向软件验证平台发送所述行为信息和所述行为结果信息。For example, in one embodiment of the present invention, before step S12 sends the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform according to the preset policy, the embodiment of the present invention provides The chip verification method may further include: determining whether the instruction corresponding to the behavior information and the behavior result information is a speculatively executed instruction; in response to the fact that the instruction is a speculatively executed instruction, determining whether the prediction of the speculatively executed instruction is successful ; Based on this, step S12 sends the behavior information and behavior result information of the chip to be verified to the software verification platform according to the preset strategy during program operation. Specifically, it may include: in the case of successful prediction, sending the software verification platform. Behavior information and the behavior result information; when the prediction fails, refuse to send the behavior information and the behavior result information to the software verification platform.

相应的,本发明的实施例还提供一种芯片验证方法,基于软件验证平台,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。Correspondingly, the embodiment of the present invention also provides a chip verification method based on a software verification platform, which can facilitate defect detection while giving full play to the large-scale and rapid verification advantages of the hardware verification platform.

如图3所示,本发明的实施例提供的芯片验证方法,基于软件验证平台,该方法可以包括:As shown in Figure 3, the chip verification method provided by the embodiment of the present invention is based on a software verification platform, and the method may include:

S21,接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息;S21. Receive behavior information and behavior result information of the chips to be verified running on the hardware verification platform sent by the hardware verification platform;

本发明的实施例中,软件验证平台可以指在主机上运行的验证平台。硬件验证平台可以为采用硬件电路或硬件器件模拟待验证芯片中的电路或功能模块的平台。In the embodiment of the present invention, the software verification platform may refer to a verification platform running on a host. The hardware verification platform may be a platform that uses hardware circuits or hardware devices to simulate circuits or functional modules in the chip to be verified.

软件验证平台可以接收硬件验证平台发送的、待验证芯片在进行硬件验证中产生的行为信息和行为结果信息,并将行为信息和行为结果信息存储为文件,以便在软件验证平台上运行软件方式的验证复核程序。可选的,行为信息和行为结果信息既可以存储在同一个文件中,也可以存储在不同的文件中。The software verification platform can receive the behavior information and behavior result information sent by the hardware verification platform, and the chips to be verified during the hardware verification, and store the behavior information and behavior result information as files, so that the software can be run on the software verification platform. Validation review process. Optionally, the behavior information and behavior result information can be stored in the same file or in different files.

由于硬件验证平台具有比软件验证平台更高的运行速度,因此在硬件验证平台上可以快速运行大规模的测试用例,以便对待验证芯片方方面面的功能进行高效验证。但又由于硬件验证平台中定位、查找和分析缺陷的相关手段还比较少,因此,本步骤中,可以通过软件测试平台接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息,以便触发软件验证平台对硬件验证平台上进行的相关行为和行为结果进行验证复核。其中,行为信息可以指在硬件验证平台侧,硬件仿真程序运行过程中具体做了哪些或何种操作,行为结果信息可以指这些操作产生了何种结果或效果。Since the hardware verification platform has a higher operating speed than the software verification platform, large-scale test cases can be quickly run on the hardware verification platform to efficiently verify all aspects of the chip to be verified. But because there are relatively few related means for locating, searching and analyzing defects in the hardware verification platform, in this step, the software test platform can receive the information sent by the hardware verification platform and the chips to be verified run on the hardware verification platform. Behavior information and behavior result information, so as to trigger the software verification platform to verify and review the relevant behaviors and behavior results on the hardware verification platform. Wherein, the behavior information may refer to which or what kind of operations are specifically performed during the running of the hardware simulation program on the side of the hardware verification platform, and the behavior result information may refer to what results or effects are produced by these operations.

S22,根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息;S22. Run the reference model corresponding to the chip to be verified according to the behavior information to obtain corresponding model result information;

接收到来自硬件验证平台的行为信息后,本步骤中,软件验证平台可以根据该行为信息运行预先设置的、所述待验证芯片对应的参考模型,并基于该参考模型的计算,得到该行为信息对应的模型结果信息。也即是说,本步骤中,可以利用软件仿真的方式,计算出所述行为信息会产生何种结果,得到模型结果信息。After receiving the behavior information from the hardware verification platform, in this step, the software verification platform can run a preset reference model corresponding to the chip to be verified according to the behavior information, and calculate the behavior information based on the reference model Corresponding model result information. That is to say, in this step, software simulation can be used to calculate what result the behavior information will produce, and to obtain model result information.

其中,参考模型可以指采用软件的方式模拟待验证芯片的各种逻辑和功能,以便验证待验证芯片的正确性。由于软件验证方式中可以灵活地设置各种缺陷检测手段,例如可以在软件验证方式中设置类似于UVM中的checker、monitor等检测手段,因此,能够有效弥补硬件验证平台的不足。Wherein, the reference model may refer to using software to simulate various logics and functions of the chip to be verified, so as to verify the correctness of the chip to be verified. Since various defect detection methods can be flexibly set in the software verification method, for example, detection methods such as checker and monitor in UVM can be set in the software verification method, so it can effectively make up for the deficiency of the hardware verification platform.

S23,根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。S23. Perform verification review on the chip to be verified according to the behavior result information and the model result information.

本步骤中,可以根据硬件验证平台发送来的行为结果信息,以及软件验证平台根据行为信息计算得到的模型结果信息,对待验证芯片进行验证复核,即确定待验证芯片是否存在缺陷,如果存在缺陷,还可以进一步对缺陷进行定位分析等。In this step, according to the behavior result information sent by the hardware verification platform and the model result information calculated by the software verification platform based on the behavior information, the chip to be verified can be verified and reviewed, that is, to determine whether the chip to be verified is defective, and if there is a defect, It is also possible to further perform positioning analysis on defects, etc.

本发明的实施例提供的芯片验证方法,软件验证平台能够接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息,根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息,根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。这样,就能将硬件验证平台与软件验证平台相结合,一方面可以在硬件验证平台上运行待验证芯片的仿真程序,从而实现对待验证芯片的大规模、快速验证,另一方面可以通过软件验证平台接收硬件验证中待验证芯片的行为信息和行为结果信息,并就待验证芯片同样的行为在软件验证平台进行验证,从而能够利用软件验证方式中多样且完善的缺陷检测手段,排查待验证芯片中的缺陷,因此,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。In the chip verification method provided by the embodiments of the present invention, the software verification platform can receive the behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform, and run the pending chip according to the behavior information. Verifying the reference model corresponding to the chip, obtaining the corresponding model result information, and performing verification review on the chip to be verified according to the behavior result information and the model result information. In this way, the hardware verification platform can be combined with the software verification platform. On the one hand, the simulation program of the chip to be verified can be run on the hardware verification platform, thereby realizing large-scale and fast verification of the chip to be verified. The platform receives the behavior information and behavior result information of the chip to be verified in the hardware verification, and verifies the same behavior of the chip to be verified on the software verification platform, so that it can use the various and perfect defect detection methods in the software verification method to troubleshoot the chip to be verified Therefore, while giving full play to the large-scale and rapid verification advantages of the hardware verification platform, it is convenient for defect detection.

具体而言,在步骤S21中,软件验证平台接收的行为信息和行为结果信息的具体形式可以由软件验证平台和硬件验证平台预先约定,只要双方能够识别这些行为信息和行为结果信息即可。例如,在本发明的一个实施例中,接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息具体可以包括:接收硬件验证平台发送的验证数据包,所述验证数据包由行为信息和行为结果信息根据预设协议生成;解析所述验证数据包得到所述行为信息和所述行为结果信息。可选的,行为信息和行为结果信息可以封装在同一个验证数据包中,或者封装在不同的验证数据包中。Specifically, in step S21, the specific form of the behavior information and behavior result information received by the software verification platform can be pre-agreed by the software verification platform and the hardware verification platform, as long as the two parties can identify the behavior information and behavior result information. For example, in one embodiment of the present invention, receiving the behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform may specifically include: receiving the verification data packet sent by the hardware verification platform, The verification data packet is generated from the behavior information and behavior result information according to a preset protocol; the verification data packet is analyzed to obtain the behavior information and the behavior result information. Optionally, the behavior information and behavior result information may be encapsulated in the same verification data packet, or encapsulated in different verification data packets.

软件验证平台接收到上述行为信息和行为结果信息后,就可以根据该行为信息运行所述待验证芯片对应的参考模型。可选的,在本发明的一个实施例中,可以离线运行该参考模型,即,硬件验证平台无需等待软件验证平台的验证复核结果,即可继续进行后续的仿真验证操作,从而进一步提高验证效率。在本发明的另一个实施例中,也可以在线运行该参考模型,即,硬件验证平台可以等待软件验证平台的验证复核结果,并根据验证复核结果确定是否继续进行后续的硬件仿真验证操作,从而能够在相对于现有技术提升验证效率的同时,及时发现待验证芯片的问题,而无需后续再进行大量的验证,有效节约验证资源。After the software verification platform receives the above behavior information and behavior result information, it can run the reference model corresponding to the chip to be verified according to the behavior information. Optionally, in one embodiment of the present invention, the reference model can be run offline, that is, the hardware verification platform can continue to perform subsequent simulation verification operations without waiting for the verification review result of the software verification platform, thereby further improving verification efficiency . In another embodiment of the present invention, the reference model can also be run online, that is, the hardware verification platform can wait for the verification review result of the software verification platform, and determine whether to continue the subsequent hardware simulation verification operation according to the verification review result, thereby Compared with the existing technology, the verification efficiency can be improved, and the problem of the chip to be verified can be found in a timely manner, without the need for a large number of subsequent verifications, effectively saving verification resources.

具体而言,在本发明的一个实施例中,步骤S22中根据所述行为信息运行所述待验证芯片对应的参考模型具体可以包括:通过预设脚本将所述行为信息还原为所述待验证芯片的行为序列;利用所述行为序列驱动所述参考模型运行。可选的,行为信息可以以文本、表格等多种形式存在。为了使软件验证平台能够根据行为信息运行待验证芯片对应的参考模型,可以对该行为信息进行进一步处理,例如,可以将该行为信息还原为待验证芯片的行为序列,例如,第一时刻进行了第一操作,第二时刻进行了第二操作等,以便待验证芯片对应的参考模型可以根据该行为序列中的一系列行为进行模拟计算,得到行为信息对应的模型结果信息。可选的,该行为序列可以基于软件验证平台能够识别的任何格式或语言,例如可以基于Verilog语言。Specifically, in one embodiment of the present invention, in step S22, running the reference model corresponding to the chip to be verified according to the behavior information may specifically include: restoring the behavior information to the to-be-verified chip through a preset script A behavior sequence of the chip; using the behavior sequence to drive the operation of the reference model. Optionally, behavior information may exist in various forms such as text and tables. In order for the software verification platform to run the reference model corresponding to the chip to be verified according to the behavior information, the behavior information can be further processed. For example, the behavior information can be restored to the behavior sequence of the chip to be verified. The first operation, the second operation at the second moment, etc., so that the reference model corresponding to the chip to be verified can perform simulation calculations according to a series of behaviors in the behavior sequence, and obtain the model result information corresponding to the behavior information. Optionally, the behavior sequence can be based on any format or language that the software verification platform can recognize, for example, it can be based on the Verilog language.

得到了模型结果信息后,即可在步骤S23中根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。具体的,该验证复核操作可以包括:将行为结果信息与模型结果信息进行比对;根据比对结果确定所述待验证芯片是否验证通过。例如,如果比对结果为:行为结果信息与模型结果信息一致,则说明,对于同样的芯片行为,硬件验证和软件验证得到的结果是一致的,因此可以确定待验证芯片验证通过;如果比对结果为:行为结果信息与模型结果信息不一致,则说明,对于同样的芯片行为,硬件验证和软件验证得到的结果不一致,因此可以确定待验证芯片验证未通过(即验证失败)。After the model result information is obtained, the chip to be verified can be verified and rechecked in step S23 according to the behavior result information and the model result information. Specifically, the verification review operation may include: comparing the behavior result information with the model result information; and determining whether the chip to be verified passes the verification according to the comparison result. For example, if the comparison result is: the behavior result information is consistent with the model result information, it means that for the same chip behavior, the results obtained by hardware verification and software verification are consistent, so it can be determined that the verification of the chip to be verified has passed; if the comparison The result is: if the behavior result information is inconsistent with the model result information, it means that for the same chip behavior, the results obtained by hardware verification and software verification are inconsistent, so it can be determined that the verification of the chip to be verified has not passed (ie, verification failed).

进一步地,在本发明的一个实施例中,如果比对结果为所述待验证芯片验证未通过,则本发明的实施例提供的芯片验证方法还可以包括:根据比对结果,对所述待验证芯片进行缺陷排查。也即是说,对于验证失败的芯片,本发明的实施例提供的芯片验证方法,还可以利用软件验证平台内置的各种缺陷检测工具和手段,对失败原因进行分析,帮助用户找到导致验证失败的芯片缺陷,以便用户对芯片设计进行相应的修改,从而克服该缺陷。Further, in one embodiment of the present invention, if the comparison result shows that the verification of the chip to be verified fails, the chip verification method provided by the embodiment of the present invention may further include: according to the comparison result, Verify the chip for defect troubleshooting. That is to say, for a chip that fails verification, the chip verification method provided by the embodiment of the present invention can also use various defect detection tools and means built in the software verification platform to analyze the cause of the failure and help users find the cause of the verification failure. chip defects, so that users can modify the chip design accordingly to overcome the defects.

更进一步地,除了根据行为结果信息与模型结果信息检测待验证芯片是否验证通过外,本发明的实施例中,还可以利用行为信息对待验证芯片是否存在缺陷进行验证。例如,在本发明的一个实施例中,软件验证平台接收到的行为信息可以包括以下一项或多项:指令的退出信息,指令的存储器访问信息,指令的中断信息。而当该行为信息中包括指令的存储器访问信息时,还可以利用该存储器访问信息,验证待验证芯片的内存一致性和/或缓存一致性。Furthermore, in addition to detecting whether the chip to be verified has passed the verification according to the behavior result information and the model result information, in the embodiment of the present invention, the behavior information can also be used to verify whether the chip to be verified has defects. For example, in an embodiment of the present invention, the behavior information received by the software verification platform may include one or more of the following: instruction exit information, instruction memory access information, and instruction interruption information. And when the behavior information includes the memory access information of the instruction, the memory access information can also be used to verify the memory consistency and/or cache consistency of the chip to be verified.

举例而言,在本发明的一个实施例中,指令的存储器访问信息可以包括以下一项或多项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息;则在根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核之前,本发明的实施例提供的芯片验证方法还可以包括:根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。也即是说,在多核共享内存或多线程共享内存的情况下,各个处理器核心或同一处理器核心的不同线程,需要遵守预设的内存访问规则,如果未遵守该内存访问规则,则有可能会出现多个处理器核心对同一内存单元中的数据读取不一致的问题,或者不同处理器核心的缓存中,对同一内存单元的缓存数据不一致的问题。本实施例中,软件验证平台可以根据上述存储器访问信息是否符合预设的内存访问规则,确定待验证芯片是否存在内存一致性和/或缓存一致性缺陷。For example, in one embodiment of the present invention, the memory access information of the instruction may include one or more of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, The memory access information lost due to the situation, the memory information updated due to the predictive execution of the instruction; then, before performing verification review on the chip to be verified according to the behavior result information and the model result information, the embodiment of the present invention The provided chip verification method may further include: according to the memory access information, detecting whether the chip to be verified has a cache consistency defect and/or a memory consistency defect. That is to say, in the case of multi-core shared memory or multi-thread shared memory, each processor core or different threads of the same processor core need to abide by the preset memory access rules. If the memory access rules are not followed, there will be There may be a problem of inconsistency in reading data in the same memory unit by multiple processor cores, or inconsistency in the cache data of the same memory unit in caches of different processor cores. In this embodiment, the software verification platform can determine whether the chip to be verified has memory consistency and/or cache consistency defects according to whether the above memory access information conforms to preset memory access rules.

举例而言,在本发明的一个实施例中,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述至少一个处理器核心对存储器的访问次序可以为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;则基于此,根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷具体可以包括:根据预先从所述硬件验证平台接收的、所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序;根据所述指令的规定执行顺序所对应的规定存储器访问次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。For example, in one embodiment of the present invention, the actual execution order of the instructions in the hardware simulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order of the memory by the at least one processor core It may be the actual memory access sequence corresponding to the actual execution sequence of the instructions in the hardware emulation program; then based on this, according to the memory access information, detect whether the chip to be verified has cache consistency defects and/or memory consistency The defect may specifically include: determining the specified execution sequence of the instructions according to the actual execution sequence of the instructions received from the hardware verification platform in advance and the sequence adjustment information of the instructions; A memory access sequence is specified, and whether there is a cache consistency defect and/or a memory consistency defect in the chip to be verified is detected.

本发明的实施例中,除了指令的乱序执行和/或预测执行会影响软件验证平台的验证复核外,在多核处理器中,如果各处理器核心的时钟频率不同,也会对软件验证平台的验证复核造成影响,因此需要特别处理。In the embodiment of the present invention, in addition to the out-of-order execution and/or speculative execution of instructions will affect the verification review of the software verification platform, in a multi-core processor, if the clock frequencies of the cores of each processor are different, the software verification platform will also be affected. validation review for , and therefore require special handling.

举例而言,在本发明的一个实施例中,待验证芯片的处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;则基于此,根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷具体可以包括:根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序;根据所述同步次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。For example, in one embodiment of the present invention, the number of processor cores of the chip to be verified is at least two, and there are at least one first processor core and one second processor core, the first processing The clock frequency of the processor core is different from the clock frequency of the second processor core; the access order of the at least two processor cores to the memory is based on the access order of the respective clocks of the processor cores; then based on this, according to the memory Accessing information, and detecting whether the chip to be verified has a cache consistency defect and/or a memory consistency defect may specifically include: synchronizing the access sequence based on the respective clocks of the processor cores according to the clock difference of each processor core, Obtaining a synchronization sequence; according to the synchronization sequence, detecting whether the chip to be verified has a cache consistency defect and/or a memory consistency defect.

下面通过一个具体的实施例对本发明的实施例提供的芯片验证方法进行详细说明。The chip verification method provided by the embodiment of the present invention will be described in detail below through a specific embodiment.

如图4所示,本发明的实施例提供的芯片验证方法可以包括:As shown in Figure 4, the chip verification method provided by the embodiment of the present invention may include:

S301、在硬件验证平台运行待验证芯片的硬件仿真程序;S301. Running a hardware simulation program of the chip to be verified on the hardware verification platform;

其中,硬件验证平台可以基于硬件仿真加速器Emulator。Wherein, the hardware verification platform may be based on a hardware emulation accelerator Emulator.

S302、硬件验证平台在执行硬件仿真程序中的每条指令时,获取该条指令的行为信息;S302. When the hardware verification platform executes each instruction in the hardware emulation program, obtains the behavior information of the instruction;

可选的,该指令的行为信息例如可以包括指令的退出信息、指令的存储器访问信息等。其中,指令的存储器访问信息可以包括以下一项或多项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息等。Optionally, the behavior information of the instruction may include, for example, exit information of the instruction, memory access information of the instruction, and the like. Wherein, the memory access information of the instruction may include one or more of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, memory access information lost due to an abnormal situation, Memory information updated by speculative execution, etc.

S303、硬件验证平台在执行硬件仿真程序中的每条指令后,获取该条指令对应的行为结果信息;S303. After executing each instruction in the hardware simulation program, the hardware verification platform acquires behavior result information corresponding to the instruction;

可选的,该行为结果信息可以包括指令退出后的定点寄存器信息,指令退出后的浮点寄存器信息、指令退出后的状态寄存器信息等。Optionally, the behavior result information may include fixed-point register information after the instruction exits, floating-point register information after the instruction exits, status register information after the instruction exits, and the like.

S304、硬件验证平台按照预设协议,将行为信息和行为结果信息生成验证数据包;S304. The hardware verification platform generates a verification data packet from the behavior information and behavior result information according to a preset protocol;

可选的,硬件验证平台可以先确定该条指令是否为预测执行的指令,响应于所述指令为预测执行的指令,确定所述预测执行的指令是否预测成功;在预测成功的情况下,按照预设协议,将行为信息和行为结果信息生成验证数据包,以便向软件验证平台发送所述行为信息和所述行为结果信息;在预测失败的情况下,拒绝将行为信息和行为结果信息生成验证数据包。Optionally, the hardware verification platform may first determine whether the instruction is a speculatively executed instruction, and in response to the instruction being a speculatively executed instruction, determine whether the prediction of the speculatively executed instruction is successful; if the prediction is successful, follow Preset agreement, generate verification data packets from behavior information and behavior result information, so as to send the behavior information and behavior result information to the software verification platform; in the case of prediction failure, refuse to generate verification information from the behavior information and behavior result information data pack.

S305、硬件验证平台通过直接编程接口向软件验证平台发送验证数据包;S305. The hardware verification platform sends a verification data packet to the software verification platform through a direct programming interface;

S306、软件验证平台接收并解析验证数据包,得到所述行为信息和所述行为结果信息;S306. The software verification platform receives and parses the verification data packet, and obtains the behavior information and the behavior result information;

S307、软件验证平台根据行为信息中的存储器访问信息,检测待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷;S307. The software verification platform detects whether the chip to be verified has a cache consistency defect and/or a memory consistency defect according to the memory access information in the behavior information;

S308、软件验证平台通过预设脚本将行为信息还原为待验证芯片的行为序列;S308. The software verification platform restores the behavior information to the behavior sequence of the chip to be verified through a preset script;

例如,该预设脚本例如可以为Python脚本。For example, the preset script can be, for example, a Python script.

S309、软件验证平台利用所述行为序列驱动待验证芯片对应的参考模型运行;S309. The software verification platform uses the behavior sequence to drive the reference model corresponding to the chip to be verified to run;

S310、软件验证平台将所述行为结果信息与参考模型运行得到的模型结果信息进行比对;S310. The software verification platform compares the behavior result information with the model result information obtained by running the reference model;

S311、软件验证平台根据比对结果确定待验证芯片是否验证通过;S311. The software verification platform determines whether the chip to be verified passes the verification according to the comparison result;

S312、软件验证平台对验证未通过的待验证芯片进行缺陷排查。S312. The software verification platform performs defect inspection on the chips to be verified that fail the verification.

可选的,可以利用各种debug工具,例如类似于monitor、checker等的软件工具,对缺陷进行定位和分析。Optionally, various debugging tools, such as software tools similar to monitor and checker, can be used to locate and analyze defects.

相应的,第三方面,本发明的实施例还提供一种芯片验证装置,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。Correspondingly, in the third aspect, the embodiment of the present invention also provides a chip verification device, which can facilitate defect detection while giving full play to the large-scale and fast verification advantages of the hardware verification platform.

如图5所示,本发明的实施例提供的芯片验证装置可以包括:As shown in Figure 5, the chip verification device provided by the embodiment of the present invention may include:

第一运行单元41,用于运行待验证芯片的硬件仿真程序;The first running unit 41 is used to run a hardware emulation program of the chip to be verified;

发送单元42,按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。The sending unit 42, according to a preset policy, sends the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform, so that the software verification platform The chip to be verified undergoes a verification review.

本发明的实施例提供的芯片验证装置,能够运行待验证芯片的硬件仿真程序,按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。这样,就能将硬件验证平台与软件验证平台相结合,一方面可以在硬件验证平台上运行待验证芯片的仿真程序,从而实现对待验证芯片的大规模、快速验证,另一方面可以将硬件验证中待验证芯片的行为信息和行为结果信息发送给软件验证平台,以便软件验证平台对待验证芯片同样的行为进行软件方式的验证,从而能够利用软件验证方式中多样且完善的缺陷检测手段,排查待验证芯片中的缺陷,因此,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。The chip verification device provided by the embodiment of the present invention can run the hardware simulation program of the chip to be verified, and send the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform according to the preset strategy, so that The software verification platform performs a verification review on the chip to be verified according to the behavior information and the behavior result information. In this way, the hardware verification platform can be combined with the software verification platform. On the one hand, the simulation program of the chip to be verified can be run on the hardware verification platform, thereby realizing large-scale and fast verification of the chip to be verified. The behavior information and behavior result information of the chip to be verified are sent to the software verification platform, so that the software verification platform can verify the same behavior of the chip to be verified in software, so that the various and perfect defect detection methods in the software verification method can be used to troubleshoot the pending defects. To verify the defects in the chip, it is possible to make full use of the large-scale and rapid verification advantages of the hardware verification platform, and at the same time facilitate defect detection.

在一种实施方式中,发送单元42,具体可以用于在所述硬件仿真程序中的每条指令运行结束后,向所述软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。In one embodiment, the sending unit 42 can be specifically configured to send the behavior information and Behavior Outcome Information.

在一种实施方式中,所述行为信息可以包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。In an implementation manner, the behavior information may include at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information.

在一种实施方式中,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息。In one embodiment, the memory access information of the instruction includes at least one of the following: at least one processor core's access sequence to the memory, memory type, size of the accessed data, memory access information lost due to an abnormal situation , Memory information updated due to speculative execution of instructions.

在一种实施方式中,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;发送单元42,具体可用于:将所述指令的实际执行顺序所对应的实际存储器访问次序,以及指令的顺序调整信息向所述软件验证平台发送;或者,根据所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序,将所述规定执行顺序对应的规定存储器访问次序向所述软件验证平台发送。In one embodiment, the actual execution order of the instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order corresponds to the actual execution order of the instructions in the hardware emulation program The actual memory access sequence of the instruction; the sending unit 42 is specifically configured to: send the actual memory access sequence corresponding to the actual execution sequence of the instruction and the order adjustment information of the instruction to the software verification platform; or, according to the instruction The actual execution sequence of the instruction and the sequence adjustment information of the instruction, determine the specified execution sequence of the instruction, and send the specified memory access sequence corresponding to the specified execution sequence to the software verification platform.

在一种实施方式中,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;发送单元42,具体可用于:将所述基于处理器核心各自时钟的访问次序以及各处理器核心的时钟差异向所述软件验证平台发送,或者,根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序,将所述同步次序向所述软件验证平台发送。In one embodiment, the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the clock frequency of the first processor core is the same as the clock frequency of the The clock frequency of the second processor core is different; the access order of the at least two processor cores to the memory is based on the access order of the respective clocks of the processor cores; the sending unit 42 can be specifically used to: The clock access sequence and the clock difference of each processor core are sent to the software verification platform, or, according to the clock difference of each processor core, the access sequence based on the respective clocks of the processor cores is synchronized to obtain a synchronization sequence, Sending the synchronization sequence to the software verification platform.

在一种实施方式中,所述装置还包括:第一确定单元,用于在按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,确定所述行为信息和所述行为结果信息对应的指令是否为预测执行的指令;第二确定单元,用于响应于所述指令为预测执行的指令,确定所述预测执行的指令是否预测成功;所述发送单元,具体用于:在预测成功的情况下,向软件验证平台发送所述行为信息和所述行为结果信息;在预测失败的情况下,拒绝向软件验证平台发送所述行为信息和所述行为结果信息。In one embodiment, the device further includes: a first determination unit, configured to determine the behavior information and behavior result information of the chip to be verified during program execution before sending the behavior information and behavior result information of the chip to be verified to the software verification platform according to a preset policy. Whether the instruction corresponding to the behavior information and the behavior result information is a predictively executed instruction; a second determining unit is configured to determine whether the predictively executed instruction is predicted to be successful in response to the instruction being a predictively executed instruction; The sending unit is specifically used to: send the behavior information and the behavior result information to the software verification platform if the prediction is successful; refuse to send the behavior information and the behavior result information to the software verification platform if the prediction fails Information about the outcome of the behavior described above.

在一种实施方式中,所述行为结果信息包括以下至少一项:指令退出后的定点寄存器信息,指令退出后的浮点寄存器信息、指令退出后的状态寄存器信息。In one embodiment, the behavior result information includes at least one of the following: fixed-point register information after the instruction exits, floating-point register information after the instruction exits, and status register information after the instruction exits.

在一种实施方式中,所述芯片验证装置还可以包括:In one embodiment, the chip verification device may further include:

第一获取单元,用于在运行待验证芯片的硬件仿真程序之后,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,在执行所述硬件仿真程序中的每条指令时,获取该条指令的行为信息;The first acquiring unit is configured to, after running the hardware emulation program of the chip to be verified, send the behavior information and behavior result information of the chip to be verified to the software verification platform according to the preset strategy, before executing When each instruction in the hardware emulation program, obtain the behavior information of the instruction;

第二获取单元,在执行所述硬件仿真程序中的每条指令后,获取该条指令对应的行为结果信息;The second acquiring unit, after executing each instruction in the hardware emulation program, acquires the behavior result information corresponding to the instruction;

生成单元,用于按照预设协议,将所述行为信息和所述行为结果信息生成验证数据包;A generating unit, configured to generate a verification data packet from the behavior information and the behavior result information according to a preset protocol;

发送单元42,具体可用于向所述软件验证平台发送所述验证数据包。The sending unit 42 is specifically configured to send the verification data packet to the software verification platform.

在一种实施方式中,发送单元42,具体可用于通过直接编程接口DPI向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。In one embodiment, the sending unit 42 is specifically configured to send the behavior information and behavior result information of the chip to be verified during program running to the software verification platform through the direct programming interface DPI.

相应的,第四方面,本发明的实施例还提供一种芯片验证装置,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。Correspondingly, in the fourth aspect, the embodiments of the present invention further provide a chip verification device, which can facilitate defect detection while giving full play to the large-scale and fast verification advantages of the hardware verification platform.

如图6所示,本发明的实施例提供的芯片验证装置可以包括:As shown in Figure 6, the chip verification device provided by the embodiment of the present invention may include:

接收单元51,用于接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息;The receiving unit 51 is configured to receive behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform;

第二运行单元52,根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息;The second running unit 52 runs the reference model corresponding to the chip to be verified according to the behavior information to obtain corresponding model result information;

复核单元53,用于根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。The review unit 53 is configured to perform a verification review on the chip to be verified according to the behavior result information and the model result information.

本发明的实施例提供的芯片验证装置,能够接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息,根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息,根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。这样,就能将硬件验证平台与软件验证平台相结合,一方面可以在硬件验证平台上运行待验证芯片的仿真程序,从而实现对待验证芯片的大规模、快速验证,另一方面可以通过软件验证平台接收硬件验证中待验证芯片的行为信息和行为结果信息,并就待验证芯片同样的行为在软件验证平台进行验证,从而能够利用软件验证方式中多样且完善的缺陷检测手段,排查待验证芯片中的缺陷,因此,能够在充分发挥硬件验证平台大规模、快速验证优势的同时,便于进行缺陷检测。The chip verification device provided by the embodiment of the present invention can receive the behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform, and run the corresponding chip to be verified according to the behavior information. obtain the corresponding model result information, and perform a verification review on the chip to be verified according to the behavior result information and the model result information. In this way, the hardware verification platform can be combined with the software verification platform. On the one hand, the simulation program of the chip to be verified can be run on the hardware verification platform, thereby realizing large-scale and fast verification of the chip to be verified. The platform receives the behavior information and behavior result information of the chip to be verified in the hardware verification, and verifies the same behavior of the chip to be verified on the software verification platform, so that it can use the various and perfect defect detection methods in the software verification method to troubleshoot the chip to be verified Therefore, while giving full play to the large-scale and rapid verification advantages of the hardware verification platform, it is convenient for defect detection.

在一种实施方式中,接收单元51可以包括:In one embodiment, the receiving unit 51 may include:

接收模块,用于接收硬件验证平台发送的验证数据包,所述验证数据包由所述行为信息和所述行为结果信息根据预设协议生成;A receiving module, configured to receive a verification data packet sent by a hardware verification platform, wherein the verification data packet is generated from the behavior information and the behavior result information according to a preset protocol;

解析模块,用于解析所述验证数据包得到所述行为信息和所述行为结果信息。An analysis module, configured to analyze the verification data packet to obtain the behavior information and the behavior result information.

在一种实施方式中,第二运行单元52可以包括:In one embodiment, the second operating unit 52 may include:

还原模块,用于通过预设脚本将所述行为信息还原为所述待验证芯片的行为序列;A restore module, configured to restore the behavior information to the behavior sequence of the chip to be verified through a preset script;

驱动模块,用于利用所述行为序列驱动所述参考模型运行。A driving module, configured to use the behavior sequence to drive the reference model to run.

在一种实施方式中,复核单元53可以包括:In one embodiment, the review unit 53 may include:

比对模块,用于将所述行为结果信息与所述模型结果信息进行比对;A comparison module, configured to compare the behavior result information with the model result information;

确定模块,用于根据比对结果确定所述待验证芯片是否验证通过。A determining module, configured to determine whether the chip to be verified has passed the verification according to the comparison result.

在一种实施方式中,所述比对结果为所述待验证芯片验证未通过;所述装置还可以包括:排查单元,用于根据比对结果,对所述待验证芯片进行缺陷排查。In one embodiment, the comparison result is that the verification of the chip to be verified fails; the device may further include: a troubleshooting unit, configured to perform defect troubleshooting on the chip to be verified according to the comparison result.

在一种实施方式中,所述行为信息可以包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。In an implementation manner, the behavior information may include at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information.

在一种实施方式中,所述指令的存储器访问信息可以包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息;所述装置还包括:检测单元,用于在根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核之前,根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the memory access information of the instruction may include at least one of the following: memory access order of at least one processor core, memory type, size of accessed data, memory access lost due to an abnormal situation information, memory information updated due to the predictive execution of instructions; the device also includes: a detection unit, used to check the chip to be verified according to the behavior result information and the model result information The memory access information detects whether there is a cache consistency defect and/or a memory consistency defect in the chip to be verified.

在一种实施方式中,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;所述检测单元包括:顺序确定模块,用于根据预先从所述硬件验证平台接收的、所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序;第一检测模块,用于根据所述指令的规定执行顺序所对应的规定存储器访问次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the actual execution order of the instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order corresponds to the actual execution order of the instructions in the hardware emulation program The actual memory access sequence; the detection unit includes: a sequence determination module, which is used to determine the specified execution of the instruction according to the actual execution sequence of the instruction and the order adjustment information received from the hardware verification platform in advance Sequence; the first detection module is configured to detect whether the chip to be verified has a cache coherency defect and/or a memory consistency defect according to the specified memory access sequence corresponding to the specified execution sequence of the instructions.

在一种实施方式中,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;所述检测单元包括:时钟同步模块,用于根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序;第二检测模块,用于根据所述同步次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。In one embodiment, the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the clock frequency of the first processor core is the same as the clock frequency of the The clock frequency of the second processor core is different; the access order of the at least two processor cores to the memory is based on the access order of the respective clocks of the processor cores; the detection unit includes: a clock synchronization module, for according to each processor The clock difference of the core is to synchronize the access sequence based on the respective clocks of the processor cores to obtain a synchronization sequence; the second detection module is used to detect whether there is a cache consistency defect and a cache consistency defect in the chip to be verified according to the synchronization sequence. /or memory consistency flaws.

相应的,第五方面,本发明的实施例还提供一种芯片验证系统,如图7所示,该系统可以包括硬件验证平台61和软件验证平台62;硬件验证平台62通过预设接口与软件验证平台62通信连接;其中,硬件验证平台61用于执行前述实施例中基于硬件验证平台的任一种芯片验证方法,所述软件验证平台用于执行前述实施例中基于软件验证平台的任一种芯片验证方法,因此也能实现相应的有益技术效果,前文已经进行了详细的说明,此处不再赘述。Correspondingly, in the fifth aspect, the embodiment of the present invention also provides a chip verification system. As shown in FIG. 7 , the system may include a hardware verification platform 61 and a software verification platform 62; The verification platform 62 is connected in communication; wherein, the hardware verification platform 61 is used to execute any chip verification method based on the hardware verification platform in the foregoing embodiments, and the software verification platform is used to execute any method based on the software verification platform in the foregoing embodiments. A chip verification method is used, so corresponding beneficial technical effects can also be achieved, which has been described in detail above and will not be repeated here.

第六方面,如图8所示,本发明的实施例还提供一种电子设备,包括:壳体100、至少一个处理器110、存储器120、电路板130和电源电路140,其中,电路板130安置在壳体100围成的空间内部,处理器110和存储器120设置在电路板130上;电源电路140,用于为上述电子设备的各个电路或器件供电;存储器120用于存储可执行程序代码;处理器110通过读取存储器120中存储的可执行程序代码来运行与可执行程序代码对应的程序,用于执行前述实施例提供的任一种的芯片验证方法。处理器110对上述步骤的具体执行过程以及处理器110通过运行可执行程序代码来进一步执行的步骤,可以参见前述实施例的描述,在此不再赘述。In the sixth aspect, as shown in FIG. 8 , an embodiment of the present invention also provides an electronic device, including: a housing 100, at least one processor 110, a memory 120, a circuit board 130, and a power supply circuit 140, wherein the circuit board 130 Arranged inside the space enclosed by the casing 100, the processor 110 and the memory 120 are arranged on the circuit board 130; the power supply circuit 140 is used to supply power to each circuit or device of the above-mentioned electronic equipment; the memory 120 is used to store executable program codes The processor 110 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 120, so as to execute any chip verification method provided in the foregoing embodiments. For the specific execution process of the above steps by the processor 110 and the further steps executed by the processor 110 by running the executable program code, reference may be made to the description of the foregoing embodiments, and details are not repeated here.

第七方面,本发明的实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现前述实施例提供的任一种的芯片验证方法。处理器对上述步骤的具体执行过程以及处理器通过运行可执行程序代码来进一步执行的步骤,可以参见前述实施例的描述,在此不再赘述。In the seventh aspect, the embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to implement any one of the chip verification methods provided in the foregoing embodiments. For the specific execution process of the above steps by the processor and the further steps executed by the processor by running the executable program code, reference may be made to the description of the foregoing embodiments, and details are not repeated here.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。Each embodiment in this specification is described in a related manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments.

尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。In particular, as for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, please refer to part of the description of the method embodiment.

为了描述的方便,描述以上装置是以功能分为各种单元/模块分别描述。当然,在实施本发明时可以把各单元/模块的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above devices are described by dividing their functions into various units/modules and describing them separately. Of course, when implementing the present invention, the functions of each unit/module can be implemented in one or more pieces of software and/or hardware.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random AccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random AccessMemory, RAM), etc.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. All should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (41)

1.一种芯片验证方法,其特征在于,基于硬件验证平台,包括:1. A chip verification method, characterized in that, based on a hardware verification platform, comprising: 运行待验证芯片的硬件仿真程序;Run the hardware emulation program of the chip to be verified; 按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。According to the preset policy, send the behavior information and behavior result information of the chip to be verified to the software verification platform during the program operation, so that the software verification platform can perform the verification on the to-be-verified chip according to the behavior information and the behavior result information Chip verification review. 2.根据权利要求1所述的方法,其特征在于,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:2. The method according to claim 1, wherein, according to a preset strategy, sending the behavior information and behavior result information of the chip to be verified to the software verification platform during program operation comprises: 在所述硬件仿真程序中的每条指令运行结束后,向所述软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。After each instruction in the hardware emulation program finishes running, the behavior information and behavior result information of the chip to be verified during program running are sent to the software verification platform. 3.根据权利要求1所述的方法,其特征在于,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。3. The method according to claim 1, wherein the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information. 4.根据权利要求3所述的方法,其特征在于,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息。4. The method according to claim 3, wherein the memory access information of the instruction includes at least one of the following: at least one processor core access sequence to the memory, memory type, size of the accessed data, Memory access information lost due to exceptional conditions, memory information updated due to speculative execution of instructions. 5.根据权利要求4所述的方法,其特征在于,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;5. The method according to claim 4, wherein the actual execution order of instructions in the hardware emulation program of the chip to be verified comprises out-of-order execution and/or predictive execution; the access order is the hardware emulation program The actual memory access sequence corresponding to the actual execution sequence of the instructions in ; 所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:将所述指令的实际执行顺序所对应的实际存储器访问次序,以及指令的顺序调整信息向所述软件验证平台发送;或者,根据所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序,将所述规定执行顺序对应的规定存储器访问次序向所述软件验证平台发送。The sending the behavior information and behavior result information of the chip to be verified during program running to the software verification platform includes: sending the actual memory access sequence corresponding to the actual execution sequence of the instructions and the order adjustment information of the instructions to the sending by the software verification platform; or, according to the actual execution sequence of the instructions and the order adjustment information of the instructions, determine the specified execution sequence of the instructions, and send the specified memory access sequence corresponding to the specified execution sequence to the software verification platform . 6.根据权利要求4所述的方法,其特征在于,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;6. The method according to claim 4, wherein the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the first processing The clock frequency of the processor core is different from the clock frequency of the second processor core; the access sequence of the at least two processor cores to the memory is an access sequence based on the respective clocks of the processor cores; 所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:The sending the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform includes: 将所述基于处理器核心各自时钟的访问次序以及各处理器核心的时钟差异向所述软件验证平台发送,或者,根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序,将所述同步次序向所述软件验证平台发送。Send the access sequence based on the respective clocks of the processor cores and the clock difference of each processor core to the software verification platform, or, according to the clock differences of each processor core, the access sequence based on the respective clocks of the processor cores The sequence is synchronized to obtain the synchronization sequence, and the synchronization sequence is sent to the software verification platform. 7.根据权利要求1所述的方法,其特征在于,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,所述方法还包括:7. The method according to claim 1, wherein, before sending the behavior information and behavior result information of the chip to be verified to the software verification platform according to the preset strategy, the method further comprises : 确定所述行为信息和所述行为结果信息对应的指令是否为预测执行的指令;determining whether the instruction corresponding to the behavior information and the behavior result information is a speculatively executed instruction; 响应于所述指令为预测执行的指令,确定所述预测执行的指令是否预测成功;in response to the instruction being a speculatively executed instruction, determining whether the speculatively executed instruction was predicted to succeed; 所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:在预测成功的情况下,向软件验证平台发送所述行为信息和所述行为结果信息;在预测失败的情况下,拒绝向软件验证平台发送所述行为信息和所述行为结果信息。The sending the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform according to the preset strategy includes: sending the behavior information and the behavior result information to the software verification platform if the prediction is successful. Result information; in the case of prediction failure, refusing to send the behavior information and the behavior result information to the software verification platform. 8.根据权利要求1所述的方法,其特征在于,所述行为结果信息包括以下至少一项:8. The method according to claim 1, wherein the behavior result information includes at least one of the following: 指令退出后的定点寄存器信息,指令退出后的浮点寄存器信息、指令退出后的状态寄存器信息。The fixed-point register information after the instruction exits, the floating-point register information after the instruction exits, and the status register information after the instruction exits. 9.根据权利要求1至8中任一项所述的方法,其特征在于,所述运行待验证芯片的硬件仿真程序之后,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,所述方法还包括:9. The method according to any one of claims 1 to 8, wherein after the hardware emulation program of the chip to be verified is run, the chip to be verified is sent to the software verification platform according to a preset strategy. Before the behavior information and behavior result information during program running, the method further includes: 在执行所述硬件仿真程序中的每条指令时,获取该条指令的行为信息;When executing each instruction in the hardware emulation program, obtain the behavior information of the instruction; 在执行所述硬件仿真程序中的每条指令后,获取该条指令对应的行为结果信息;After executing each instruction in the hardware emulation program, obtain behavior result information corresponding to the instruction; 按照预设协议,将所述行为信息和所述行为结果信息生成验证数据包;generating a verification data packet from the behavior information and the behavior result information according to a preset protocol; 所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:向所述软件验证平台发送所述验证数据包。The sending the behavior information and behavior result information of the chip to be verified during program running to the software verification platform includes: sending the verification data packet to the software verification platform. 10.根据权利要求1至8中任一项所述的方法,其特征在于,所述向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息包括:10. The method according to any one of claims 1 to 8, wherein the sending the behavior information and behavior result information of the chip to be verified to the software verification platform during program operation comprises: 通过直接编程接口DPI向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。The behavior information and behavior result information of the chip to be verified during program operation are sent to the software verification platform through the direct programming interface DPI. 11.一种芯片验证方法,其特征在于,基于软件验证平台,包括:11. A chip verification method, characterized in that, based on a software verification platform, comprising: 接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息;Receiving behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform; 根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息;Running a reference model corresponding to the chip to be verified according to the behavior information to obtain corresponding model result information; 根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。Perform verification review on the chip to be verified according to the behavior result information and the model result information. 12.根据权利要求11所述的方法,其特征在于,所述接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息包括:12. The method according to claim 11, wherein the behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the receiving hardware verification platform include: 接收硬件验证平台发送的验证数据包,所述验证数据包由所述行为信息和所述行为结果信息根据预设协议生成;receiving a verification data packet sent by a hardware verification platform, wherein the verification data packet is generated from the behavior information and the behavior result information according to a preset protocol; 解析所述验证数据包得到所述行为信息和所述行为结果信息。Analyzing the verification data packet to obtain the behavior information and the behavior result information. 13.根据权利要求11所述的方法,其特征在于,所述根据所述行为信息运行所述待验证芯片对应的参考模型包括:13. The method according to claim 11, wherein the running the reference model corresponding to the chip to be verified according to the behavior information comprises: 通过预设脚本将所述行为信息还原为所述待验证芯片的行为序列;Restoring the behavior information to the behavior sequence of the chip to be verified through a preset script; 利用所述行为序列驱动所述参考模型运行。The operation of the reference model is driven by the behavior sequence. 14.根据权利要求11所述的方法,其特征在于,所述根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核包括:14. The method according to claim 11, wherein, according to the behavior result information and the model result information, performing a verification review on the chip to be verified comprises: 将所述行为结果信息与所述模型结果信息进行比对;comparing the behavior result information with the model result information; 根据比对结果确定所述待验证芯片是否验证通过。Determine whether the chip to be verified has passed the verification according to the comparison result. 15.根据权利要求14所述的方法,其特征在于,所述比对结果为所述待验证芯片验证未通过,所述方法还包括:15. The method according to claim 14, wherein the comparison result is that the verification of the chip to be verified has failed, and the method further comprises: 根据比对结果,对所述待验证芯片进行缺陷排查。According to the comparison result, defect checking is performed on the chip to be verified. 16.根据权利要求11所述的方法,其特征在于,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。16. The method according to claim 11, wherein the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information. 17.根据权利要求16所述的方法,其特征在于,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息;17. The method according to claim 16, wherein the memory access information of the instruction includes at least one of the following: at least one processor core access sequence to the memory, memory type, size of the accessed data, Memory access information lost due to abnormal conditions, memory information updated due to speculative execution of instructions; 所述根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核之前,所述方法还包括:According to the behavior result information and the model result information, before performing verification review on the chip to be verified, the method further includes: 根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。According to the memory access information, it is detected whether the chip to be verified has a cache consistency defect and/or a memory consistency defect. 18.根据权利要求17所述的方法,其特征在于,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;18. The method according to claim 17, wherein the actual execution order of instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order is the hardware emulation program The actual memory access sequence corresponding to the actual execution sequence of the instructions; 所述根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷包括:The detecting whether the chip to be verified has a cache consistency defect and/or a memory consistency defect according to the memory access information includes: 根据预先从所述硬件验证平台接收的、所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序;Determine the specified execution order of the instructions according to the actual execution order of the instructions received in advance from the hardware verification platform and the order adjustment information of the instructions; 根据所述指令的规定执行顺序所对应的规定存储器访问次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。According to the specified memory access sequence corresponding to the specified execution sequence of the instructions, it is detected whether the chip to be verified has a cache consistency defect and/or a memory consistency defect. 19.根据权利要求17所述的方法,其特征在于,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;19. The method according to claim 17, wherein the number of the processor cores is at least two, and at least one first processor core and one second processor core exist, and the first processing The clock frequency of the processor core is different from the clock frequency of the second processor core; the access sequence of the at least two processor cores to the memory is an access sequence based on the respective clocks of the processor cores; 所述根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷包括:The detecting whether the chip to be verified has a cache consistency defect and/or a memory consistency defect according to the memory access information includes: 根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序;According to the clock difference of each processor core, the access sequence based on the respective clocks of the processor cores is synchronized to obtain a synchronization sequence; 根据所述同步次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。According to the synchronization sequence, it is detected whether the chip to be verified has a cache consistency defect and/or a memory consistency defect. 20.一种芯片验证装置,其特征在于,包括:20. A chip verification device, characterized in that it comprises: 第一运行单元,用于运行待验证芯片的硬件仿真程序;The first running unit is used to run a hardware emulation program of the chip to be verified; 发送单元,按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息,以使所述软件验证平台根据所述行为信息和所述行为结果信息对所述待验证芯片进行验证复核。The sending unit sends the behavior information and behavior result information of the chip to be verified during program operation to the software verification platform according to a preset policy, so that the software verification platform performs The chip to be verified is verified and reviewed. 21.根据权利要求20所述的装置,其特征在于,所述发送单元,具体用于在所述硬件仿真程序中的每条指令运行结束后,向所述软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。21. The device according to claim 20, wherein the sending unit is specifically configured to send the chip to be verified to the software verification platform after each instruction in the hardware emulation program finishes running. Behavior information and behavior result information during program running. 22.根据权利要求20所述的装置,其特征在于,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。22. The device according to claim 20, wherein the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information. 23.根据权利要求22所述的装置,其特征在于,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息。23. The device according to claim 22, wherein the memory access information of the instruction includes at least one of the following: at least one processor core access sequence to the memory, memory type, size of the accessed data, Memory access information lost due to exceptional conditions, memory information updated due to speculative execution of instructions. 24.根据权利要求23所述的装置,其特征在于,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;24. The device according to claim 23, wherein the actual execution order of instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order is the hardware emulation program The actual memory access sequence corresponding to the actual execution sequence of the instructions; 所述发送单元,具体用于:将所述指令的实际执行顺序所对应的实际存储器访问次序,以及指令的顺序调整信息向所述软件验证平台发送;或者,根据所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序,将所述规定执行顺序对应的规定存储器访问次序向所述软件验证平台发送。The sending unit is specifically configured to: send the actual memory access sequence corresponding to the actual execution sequence of the instructions and the sequence adjustment information of the instructions to the software verification platform; or, according to the actual execution sequence of the instructions and The sequence adjustment information of instructions determines the specified execution sequence of the instructions, and sends the specified memory access sequence corresponding to the specified execution sequence to the software verification platform. 25.根据权利要求23所述的装置,其特征在于,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;25. The device according to claim 23, wherein the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the first processing The clock frequency of the processor core is different from the clock frequency of the second processor core; the access sequence of the at least two processor cores to the memory is an access sequence based on the respective clocks of the processor cores; 所述发送单元,具体用于:The sending unit is specifically used for: 将所述基于处理器核心各自时钟的访问次序以及各处理器核心的时钟差异向所述软件验证平台发送,或者,根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序,将所述同步次序向所述软件验证平台发送。Send the access sequence based on the respective clocks of the processor cores and the clock difference of each processor core to the software verification platform, or, according to the clock differences of each processor core, the access sequence based on the respective clocks of the processor cores The sequence is synchronized to obtain the synchronization sequence, and the synchronization sequence is sent to the software verification platform. 26.根据权利要求20所述的装置,其特征在于,还包括:26. The apparatus of claim 20, further comprising: 第一确定单元,用于在按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,确定所述行为信息和所述行为结果信息对应的指令是否为预测执行的指令;The first determination unit is configured to determine the behavior information and the instruction corresponding to the behavior result information before sending the behavior information and behavior result information of the chip to be verified to the software verification platform during program operation according to a preset strategy Whether it is a speculatively executed instruction; 第二确定单元,用于响应于所述指令为预测执行的指令,确定所述预测执行的指令是否预测成功;a second determining unit, configured to determine whether the prediction of the speculatively executed instruction is successful in response to the instruction being a speculatively executed instruction; 所述发送单元,具体用于:在预测成功的情况下,向软件验证平台发送所述行为信息和所述行为结果信息;在预测失败的情况下,拒绝向软件验证平台发送所述行为信息和所述行为结果信息。The sending unit is specifically used to: send the behavior information and the behavior result information to the software verification platform if the prediction is successful; refuse to send the behavior information and the behavior result information to the software verification platform if the prediction fails. Information about the result of the action. 27.根据权利要求20所述的装置,其特征在于,所述行为结果信息包括以下至少一项:指令退出后的定点寄存器信息,指令退出后的浮点寄存器信息、指令退出后的状态寄存器信息。27. The device according to claim 20, wherein the behavior result information includes at least one of the following: fixed-point register information after the instruction exits, floating-point register information after the instruction exits, and status register information after the instruction exits . 28.根据权利要求20至27所述的装置,其特征在于,还包括:28. The apparatus of claims 20 to 27, further comprising: 第一获取单元,用于在运行待验证芯片的硬件仿真程序之后,所述按照预设策略,向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息之前,在执行所述硬件仿真程序中的每条指令时,获取该条指令的行为信息;The first acquiring unit is configured to, after running the hardware emulation program of the chip to be verified, send the behavior information and behavior result information of the chip to be verified to the software verification platform according to the preset strategy, before executing When each instruction in the hardware emulation program, obtain the behavior information of the instruction; 第二获取单元,在执行所述硬件仿真程序中的每条指令后,获取该条指令对应的行为结果信息;The second acquiring unit, after executing each instruction in the hardware emulation program, acquires the behavior result information corresponding to the instruction; 生成单元,用于按照预设协议,将所述行为信息和所述行为结果信息生成验证数据包;A generating unit, configured to generate a verification data packet from the behavior information and the behavior result information according to a preset protocol; 所述发送单元,具体用于向所述软件验证平台发送所述验证数据包。The sending unit is specifically configured to send the verification data packet to the software verification platform. 29.根据权利要求20至27所述的装置,其特征在于,所述发送单元,具体用于通过直接编程接口DPI向软件验证平台发送所述待验证芯片在程序运行中的行为信息和行为结果信息。29. The device according to claims 20 to 27, wherein the sending unit is specifically configured to send behavior information and behavior results of the chip to be verified during program operation to the software verification platform through the direct programming interface DPI information. 30.一种芯片验证装置,其特征在于,包括:30. A chip verification device, comprising: 接收单元,用于接收硬件验证平台发送的、待验证芯片在所述硬件验证平台上运行的行为信息和行为结果信息;A receiving unit, configured to receive behavior information and behavior result information of the chip to be verified running on the hardware verification platform sent by the hardware verification platform; 第二运行单元,根据所述行为信息运行所述待验证芯片对应的参考模型,得到对应的模型结果信息;The second running unit runs the reference model corresponding to the chip to be verified according to the behavior information to obtain corresponding model result information; 复核单元,用于根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核。A review unit, configured to perform verification review on the chip to be verified according to the behavior result information and the model result information. 31.根据权利要求30所述的装置,其特征在于,所述接收单元包括:31. The device according to claim 30, wherein the receiving unit comprises: 接收模块,用于接收硬件验证平台发送的验证数据包,所述验证数据包由所述行为信息和所述行为结果信息根据预设协议生成;A receiving module, configured to receive a verification data packet sent by a hardware verification platform, wherein the verification data packet is generated from the behavior information and the behavior result information according to a preset protocol; 解析模块,用于解析所述验证数据包得到所述行为信息和所述行为结果信息。An analysis module, configured to analyze the verification data packet to obtain the behavior information and the behavior result information. 32.根据权利要求30所述的装置,其特征在于,所述第二运行单元包括:32. The device according to claim 30, wherein the second operating unit comprises: 还原模块,用于通过预设脚本将所述行为信息还原为所述待验证芯片的行为序列;A restore module, configured to restore the behavior information to the behavior sequence of the chip to be verified through a preset script; 驱动模块,用于利用所述行为序列驱动所述参考模型运行。A driving module, configured to use the behavior sequence to drive the reference model to run. 33.根据权利要求30所述的装置,其特征在于,所述复核单元包括:33. The device according to claim 30, wherein the review unit comprises: 比对模块,用于将所述行为结果信息与所述模型结果信息进行比对;A comparison module, configured to compare the behavior result information with the model result information; 确定模块,用于根据比对结果确定所述待验证芯片是否验证通过。A determining module, configured to determine whether the chip to be verified has passed the verification according to the comparison result. 34.根据权利要求33所述的装置,其特征在于,所述比对结果为所述待验证芯片验证未通过;34. The device according to claim 33, wherein the comparison result is that the verification of the chip to be verified has failed; 所述装置还包括:排查单元,用于根据比对结果,对所述待验证芯片进行缺陷排查。The device also includes: an inspection unit, configured to perform defect inspection on the chip to be verified according to the comparison result. 35.根据权利要求30所述的装置,其特征在于,所述行为信息包括以下至少一项:指令的退出信息,指令的存储器访问信息,指令的中断信息。35. The device according to claim 30, wherein the behavior information includes at least one of the following: instruction exit information, instruction memory access information, and instruction interruption information. 36.根据权利要求35所述的装置,其特征在于,所述指令的存储器访问信息包括以下至少一项:至少一个处理器核心对存储器的访问次序、内存类型、被访问数据的大小、因发生异常情况而丢失的存储器访问信息、因指令的预测执行而更新的存储器信息;36. The device according to claim 35, wherein the memory access information of the instruction includes at least one of the following: at least one processor core access sequence to the memory, memory type, size of the accessed data, Memory access information lost due to abnormal conditions, memory information updated due to speculative execution of instructions; 所述装置还包括:检测单元,用于在根据所述行为结果信息和所述模型结果信息,对所述待验证芯片进行验证复核之前,根据所述存储器访问信息,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。The device further includes: a detection unit, configured to detect whether the chip to be verified is There are cache coherency flaws and/or memory consistency flaws. 37.根据权利要求36所述的装置,其特征在于,所述待验证芯片的硬件仿真程序中指令的实际执行顺序包括乱序执行和/或预测执行;所述访问次序为所述硬件仿真程序中指令的实际执行顺序所对应的实际存储器访问次序;37. The device according to claim 36, wherein the actual execution order of instructions in the hardware emulation program of the chip to be verified includes out-of-order execution and/or predictive execution; the access order is the hardware emulation program The actual memory access sequence corresponding to the actual execution sequence of the instructions in ; 所述检测单元包括:The detection unit includes: 顺序确定模块,用于根据预先从所述硬件验证平台接收的、所述指令的实际执行顺序以及指令的顺序调整信息,确定所述指令的规定执行顺序;A sequence determination module, configured to determine the specified execution sequence of the instructions according to the actual execution sequence of the instructions received in advance from the hardware verification platform and the sequence adjustment information of the instructions; 第一检测模块,用于根据所述指令的规定执行顺序所对应的规定存储器访问次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。The first detection module is configured to detect whether the chip to be verified has a cache coherency defect and/or a memory consistency defect according to a predetermined memory access sequence corresponding to the predetermined execution sequence of the instructions. 38.根据权利要求36所述的装置,其特征在于,所述处理器核心的数量为至少两个,且其中至少存在一个第一处理器核心和一个第二处理器核心,所述第一处理器核心的时钟频率与所述第二处理器核心的时钟频率不同;所述至少两个处理器核心对存储器的访问次序为基于处理器核心各自时钟的访问次序;38. The device according to claim 36, wherein the number of the processor cores is at least two, and there is at least one first processor core and one second processor core, and the first processing The clock frequency of the processor core is different from the clock frequency of the second processor core; the access sequence of the at least two processor cores to the memory is an access sequence based on the respective clocks of the processor cores; 所述检测单元包括:The detection unit includes: 时钟同步模块,用于根据各处理器核心的时钟差异,对所述基于处理器核心各自时钟的访问次序进行同步,得到同步次序;A clock synchronization module, configured to synchronize the access sequences based on the respective clocks of the processor cores according to the clock differences of the processor cores to obtain a synchronization sequence; 第二检测模块,用于根据所述同步次序,检测所述待验证芯片是否存在缓存一致性缺陷和/或内存一致性缺陷。The second detection module is configured to detect whether the chip to be verified has a cache consistency defect and/or a memory consistency defect according to the synchronization order. 39.一种芯片验证系统,其特征在于,包括硬件验证平台和软件验证平台;所述硬件验证平台通过预设接口与所述软件验证平台通信连接;其中,所述硬件验证平台用于执行权利要求1-10中任一项所述的芯片验证方法,所述软件验证平台用于执行权利要求11-19中任一项所述的芯片验证方法。39. A chip verification system, characterized in that it includes a hardware verification platform and a software verification platform; the hardware verification platform communicates with the software verification platform through a preset interface; wherein the hardware verification platform is used to enforce rights The chip verification method according to any one of claims 1-10, the software verification platform is used to execute the chip verification method according to any one of claims 11-19. 40.一种电子设备,其特征在于,包括:壳体、至少一个处理器、存储器、电路板和电源电路,其中,电路板安置在壳体围成的空间内部,处理器和存储器设置在电路板上;电源电路,用于为上述电子设备的各个电路或器件供电;存储器用于存储可执行程序代码;所述至少一个处理器通过读取存储器中存储的可执行程序代码来运行与可执行程序代码对应的程序,用于执行前述权利要求1-19中任一项所述的芯片验证方法。40. An electronic device, characterized in that it comprises: a housing, at least one processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged in the circuit on board; a power supply circuit, used to supply power to each circuit or device of the above-mentioned electronic equipment; the memory is used to store executable program code; the at least one processor runs and executes by reading the executable program code stored in the memory The program corresponding to the program code is used to execute the chip verification method described in any one of claims 1-19. 41.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现前述权利要求1-19中任一项所述的芯片验证方法。41. A computer-readable storage medium, characterized in that the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the aforementioned rights The chip verification method described in any one of 1-19 is required.
CN202210600599.7A 2022-05-30 2022-05-30 Chip verification method, device, system, electronic equipment and storage medium Pending CN116048887A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210600599.7A CN116048887A (en) 2022-05-30 2022-05-30 Chip verification method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210600599.7A CN116048887A (en) 2022-05-30 2022-05-30 Chip verification method, device, system, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116048887A true CN116048887A (en) 2023-05-02

Family

ID=86120558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210600599.7A Pending CN116048887A (en) 2022-05-30 2022-05-30 Chip verification method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116048887A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076330A (en) * 2023-10-12 2023-11-17 北京开源芯片研究院 Access verification method, system, electronic equipment and readable storage medium
CN118395918A (en) * 2024-04-30 2024-07-26 北京中科昊芯科技有限公司 Chip simulation method and device based on software and hardware, test terminal and medium
CN119396349A (en) * 2024-12-31 2025-02-07 北京开源芯片研究院 Cache verification method, device, electronic device and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117076330A (en) * 2023-10-12 2023-11-17 北京开源芯片研究院 Access verification method, system, electronic equipment and readable storage medium
CN117076330B (en) * 2023-10-12 2024-02-02 北京开源芯片研究院 Access verification method, system, electronic equipment and readable storage medium
CN118395918A (en) * 2024-04-30 2024-07-26 北京中科昊芯科技有限公司 Chip simulation method and device based on software and hardware, test terminal and medium
CN119396349A (en) * 2024-12-31 2025-02-07 北京开源芯片研究院 Cache verification method, device, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
CN116048887A (en) Chip verification method, device, system, electronic equipment and storage medium
Mishra et al. Post-silicon validation in the SoC era: A tutorial introduction
US20230098071A1 (en) Functional safety mechanisms for input/output (io) cells
US10083262B2 (en) Deadlock detection in hardware design using assertion based verification
CN117113907B (en) Verification method, verification device, electronic equipment and readable storage medium
CN105930242B (en) A kind of multi-core processor random verification method and device for supporting accurate memory access detection
US8560988B2 (en) Apparatus and method thereof for hybrid timing exception verification of an integrated circuit design
CN117094269B (en) Verification method, verification device, electronic equipment and readable storage medium
US10592623B2 (en) Assertion statement check and debug
CN110321292A (en) Chip detecting method, device, electronic equipment and computer readable storage medium
CN113076709B (en) Multi-core processor function verification platform and method based on mixed reference model
CN117093353B (en) Interrupt control method and device, electronic equipment and readable storage medium
CN111400997A (en) Processor core verification method, system and medium based on synchronous execution
CN103713977B (en) Microprocessor IP (internet protocol) kernel comparison and verification implementation method
Kumar et al. A semi-formal verification methodology for efficient configuration coverage of highly configurable digital designs
Lei et al. Validating direct memory access interfaces with conformance checking
Petersén et al. Fault injection and fault handling: an MPSoC demonstrator using IEEE P1687
Dietrich et al. Cross-layer fault-space pruning for hardware-assisted fault injection
CN1936860A (en) Method for realizing supporting of EJTAG detection in instruction grade random detection
CN115757099A (en) Automatic testing method and device for platform firmware protection recovery function
CN103678127B (en) The fault location of a kind of embedded instrumentation software and the method for analysis
CN112416857B (en) Processor-independent FPGA peripheral chip dynamic configuration method
JP2010165121A (en) Program and program verification method
CN119885991A (en) Debugging method, device and storage medium
Bindu A Rigorous Approach to Microprocessor Verification using UVM

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