CN112580283B - Control method and device of cross-clock-domain model checker and electronic equipment - Google Patents
Control method and device of cross-clock-domain model checker and electronic equipment Download PDFInfo
- Publication number
- CN112580283B CN112580283B CN202011555344.0A CN202011555344A CN112580283B CN 112580283 B CN112580283 B CN 112580283B CN 202011555344 A CN202011555344 A CN 202011555344A CN 112580283 B CN112580283 B CN 112580283B
- Authority
- CN
- China
- Prior art keywords
- cross
- information
- clock domain
- domain model
- module
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 69
- 238000012795 verification Methods 0.000 claims abstract description 73
- 238000004458 analytical method Methods 0.000 claims abstract description 14
- 238000013461 design Methods 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 8
- 238000013500 data storage Methods 0.000 claims description 6
- 238000004806 packaging method and process Methods 0.000 abstract 1
- 230000006870 function Effects 0.000 description 17
- 238000004088 simulation Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 15
- 238000010586 diagram Methods 0.000 description 13
- 238000012545 processing Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 4
- 230000002093 peripheral effect Effects 0.000 description 4
- 238000007689 inspection Methods 0.000 description 3
- 230000007547 defect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
- G06F30/33—Design verification, e.g. functional simulation or model checking
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本申请涉及计算机技术领域,具体而言,涉及一种跨时钟域模型检查器的控制方法、装置及电子设备。The present application relates to the field of computer technologies, and in particular, to a control method, apparatus, and electronic device for a cross-clock domain model checker.
背景技术Background technique
芯片设计和验证一般都需要针对跨时钟域(Clock Domain Crossing,以下简称CDC)电路进行验证。Chip design and verification generally need to be verified for a clock domain crossing (Clock Domain Crossing, hereinafter referred to as CDC) circuit.
由于芯片设计和仿真的场景的多样性,针对跨时钟域电路的验证和检查,需要配合实际跨时钟域电路和应用情况来做调整和控制,以确定用于检测跨时钟域电路的检查器的检查规则都是合理的。例如,一般验证人员专门撰写代码做针对性的精细控制,以控制检查器需要开或者关的时机。Due to the diversity of chip design and simulation scenarios, the verification and inspection of cross-clock domain circuits needs to be adjusted and controlled in accordance with the actual cross-clock domain circuits and application conditions to determine the checker for detecting cross-clock domain circuits. The inspection rules are all reasonable. For example, general verifiers write code to do targeted fine-grained control to control when the checker needs to be turned on or off.
发明内容SUMMARY OF THE INVENTION
本申请的目的在于提供一种跨时钟域模型检查器的控制方法、装置及电子设备,能够解决对跨时钟域模型中的功能验证问题。The purpose of the present application is to provide a control method, device and electronic device for a cross-clock domain model checker, which can solve the problem of functional verification in a cross-clock domain model.
第一方面,本发明实施例提供一种跨时钟域模型检查器的控制方法,包括:In a first aspect, an embodiment of the present invention provides a method for controlling a cross-clock domain model checker, including:
通过波形分析工具对跨时钟域模型进行分析,以得到所述跨时钟域模型的模型信息,所述跨时钟域模型为一芯片设计模型;The cross-clock domain model is analyzed by a waveform analysis tool to obtain model information of the cross-clock domain model, where the cross-clock domain model is a chip design model;
对所述模型信息进行解析,以得到所述跨时钟域模型的例化信息,所述例化信息用于描述例化单元;parsing the model information to obtain instantiation information of the cross-clock domain model, where the instantiation information is used to describe the instantiated unit;
通过遍历所述跨时钟域模型的例化信息,生成用于控制例化单元对应的检查器的控制代码;By traversing the instantiation information of the cross-clock domain model, a control code for controlling the checker corresponding to the instantiated unit is generated;
将所述控制代码、预定义的用户接口封装至验证环境中的控制模块中,以及将预定义的控制文件添加至所述验证环境中的指定位置,以得到目标验证环境;Encapsulating the control code and the predefined user interface into a control module in the verification environment, and adding a predefined control file to a specified location in the verification environment to obtain a target verification environment;
通过所述目标验证环境对所述跨时钟域模型对应的检查器进行控制。The checker corresponding to the cross-clock domain model is controlled through the target verification environment.
在可选的实施方式中,所述通过遍历所述跨时钟域模型的例化信息,生成用于控制例化单元对应的检查器的控制代码,包括:In an optional implementation manner, generating the control code for controlling the checker corresponding to the instantiated unit by traversing the instantiation information of the cross-clock domain model, including:
根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息,并生成用于控制例化单元对应的检查器的控制代码。According to a predefined control code generation script, the instantiation information of the cross-clock domain model is traversed, and a control code for controlling the checker corresponding to the instantiated unit is generated.
在本申请实施例中,通过控制代码生成脚本直接生成控制代码,可以减少人工编写代码的操作,从而可以复用至需要的环境中,从而可以提高针对跨时钟域模型在跨时钟域下的各个功能的验证效率。In the embodiment of the present application, the control code is directly generated by the control code generation script, which can reduce the operation of manually writing the code, so that it can be reused in the required environment, thereby improving the performance of each clock domain model for the cross-clock domain model. Verification efficiency of functions.
在可选的实施方式中,所述根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息,并生成用于控制例化单元对应的检查器的控制代码,包括:In an optional implementation manner, the script is generated according to the predefined control code, traverses the instantiation information of the cross-clock domain model, and generates control code for controlling the checker corresponding to the instantiation unit, including:
根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息得到目标例化信息,以及根据所述目标例化信息生成用于控制所述目标例化信息的目标例化单元对应的检查器的控制代码,所述目标例化信息为所述跨时钟域模型的例化信息中的任意一个例化信息。Generate a script according to a predefined control code, traverse the instantiation information of the cross-clock domain model to obtain target instantiation information, and generate a target instantiation unit corresponding to the target instantiation information for controlling the target instantiation information according to the target instantiation information The control code of the checker, the target instantiation information is any one of the instantiation information of the cross-clock domain model.
在本申请实施例中,基于不同验证需求,例如,需要进行精确控制时,则每一个例化信息需要对应精确的控制代码,则可以匹配为每一个例化信息生成一个对应的控制代码,从而实现一对一的精确控制。In the embodiment of the present application, based on different verification requirements, for example, when precise control is required, each instantiated information needs to correspond to a precise control code, and a corresponding control code can be generated for each instantiated information, thereby Achieve one-to-one precise control.
在可选的实施方式中,所述根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息,并生成用于控制例化单元对应的检查器的控制代码,包括:In an optional implementation manner, the script is generated according to the predefined control code, traverses the instantiation information of the cross-clock domain model, and generates control code for controlling the checker corresponding to the instantiation unit, including:
根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息得到的同一类例化信息,以及生成用于控制所述同一类例化信息下的例化单元对应的检查器的控制代码,所述跨时钟域模型的例化信息包括一类或多类例化信息。Generate a script according to a predefined control code, traverse the instantiation information of the cross-clock domain model to obtain the same type of instantiation information, and generate a script for controlling the checker corresponding to the instantiated unit under the same type of instantiation information The control code, the instantiation information of the cross-clock domain model includes one or more types of instantiation information.
在本申请实施例中,基于不同验证需求,例如,需要同时对一类检查器控制时,多个例化信息可以采用相同的控制逻辑,则可以采用模糊匹配的方式,实现一类例化信息的统一控制,从而提高控制代码的生成效率。In the embodiment of the present application, based on different verification requirements, for example, when a type of checker needs to be controlled at the same time, the same control logic can be used for multiple instantiation information, and a fuzzy matching method can be used to realize a type of instantiated information unified control, thereby improving the efficiency of control code generation.
在可选的实施方式中,所述跨时钟域模型包括多个模块,所述模型信息包括:所述跨时钟域模型中的层次结构路径;所述对所述模型信息进行解析,以得到所述跨时钟域模型的例化信息,包括:In an optional implementation manner, the cross-clock domain model includes a plurality of modules, and the model information includes: a hierarchical structure path in the cross-clock domain model; the model information is parsed to obtain the instantiation information for the described cross-clock domain model, including:
根据所述层次结构路径和预存配置文件对所述跨时钟域模型的每个模块进行解析,以得到每个模块对应的一个或多个例化信息。Each module of the cross-clock domain model is parsed according to the hierarchical structure path and the pre-stored configuration file to obtain one or more instantiation information corresponding to each module.
在本申请实施例中,通过基于对跨时钟域模型的基本信息的分析,确定出适应该跨时钟域模型的例化信息,从而可以更准确地生成用于对该跨时钟域模型控制的控制代码。In the embodiment of the present application, by analyzing the basic information of the cross-clock-domain model, instantiation information adapted to the cross-clock-domain model is determined, so that the control for controlling the cross-clock-domain model can be generated more accurately code.
在可选的实施方式中,所述根据所述层次结构路径和预存配置文件对所述跨时钟域模型的每个模块进行解析,以得到每个模块对应的一个或多个例化信息,包括:In an optional implementation manner, each module of the cross-clock domain model is parsed according to the hierarchical structure path and the pre-stored configuration file to obtain one or more instantiation information corresponding to each module, including :
根据所述配置文件对每个模块进行解析,以得到每个模块的模块信息,所述模块信息包括:模块名称、标志位、使能信号路径;Analyze each module according to the configuration file to obtain module information of each module, where the module information includes: module name, flag bit, and enable signal path;
根据每个模块的层次结构路径、标志位和使能信号路径,确定出每个模块对应的多个例化信息。According to the hierarchical structure path, flag bit and enable signal path of each module, multiple instantiation information corresponding to each module is determined.
在本申请实施例中,根据跨时钟域模型中的各个模块中的信息确定出例化信息,以适应不同模块的控制需求,从而可以使确定出的例化信息更利于对跨时钟域模型在跨时钟域下的各个功能进行验证。In this embodiment of the present application, the instantiation information is determined according to the information in each module in the cross-clock domain model to meet the control requirements of different modules, so that the determined instantiated information can be more helpful for the cross-clock domain model in the Verification of individual functions across clock domains.
在可选的实施方式中,所述方法还包括:In an optional embodiment, the method further includes:
将每个模块对应的一个或多个例化信息按照设定的数据存储格式进行存储。Store one or more instantiated information corresponding to each module according to the set data storage format.
在可选的实施方式中,所述将每个模块对应的一个或多个例化信息按照设定的数据存储格式进行存储,包括:In an optional implementation manner, the one or more instantiation information corresponding to each module is stored according to the set data storage format, including:
将每个模块对应的一个或多个例化信息分别按照哈希数组的存储形式进行存储,每个哈希数组包含一个例化信息。One or more instantiation information corresponding to each module is stored in the storage form of a hash array, and each hash array contains one instantiated information.
在本申请实施例中,通过采用哈希数组的方式进行存储,从而可以使例化信息更方便地被遍历,从而为生成控制代码提供便利,提高生成控制代码的效率。In the embodiment of the present application, by using a hash array for storage, the instantiated information can be traversed more conveniently, thereby providing convenience for generating control codes and improving the efficiency of generating control codes.
第二方面,本发明实施例提供一种跨时钟域模型检查器的控制装置,包括:In a second aspect, an embodiment of the present invention provides a control device for a cross-clock domain model checker, including:
模型分析模块,用于通过波形分析工具对跨时钟域模型进行分析,以得到所述跨时钟域模型的模型信息,所述跨时钟域模型为一芯片设计模型;a model analysis module, configured to analyze the cross-clock domain model through a waveform analysis tool to obtain model information of the cross-clock domain model, where the cross-clock domain model is a chip design model;
信息解析模块,用于对所述模型信息进行解析,以得到所述跨时钟域模型的例化信息;an information parsing module, configured to parse the model information to obtain instantiation information of the cross-clock domain model;
控制代码生成模块,用于通过遍历所述跨时钟域模型的例化信息,生成用于控制例化单元对应的检查器的控制代码;a control code generation module, configured to generate a control code for controlling the checker corresponding to the instantiated unit by traversing the instantiation information of the cross-clock domain model;
验证环境获取模块,用于将所述控制代码、预定义的用户接口封装至验证环境中的控制模块中,以及将预定义的控制文件添加至验证环境中的指定位置,以得到目标验证环境;A verification environment acquisition module, for encapsulating the control code and the predefined user interface into the control module in the verification environment, and adding the predefined control file to a specified position in the verification environment to obtain a target verification environment;
检查器控制模块,用于通过所述目标验证环境对所述跨时钟域模型对应的检查器进行控制。The checker control module is configured to control the checker corresponding to the cross-clock domain model through the target verification environment.
第三方面,本发明实施例提供一种电子设备,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行如前述实施方式任一所述的方法的步骤。In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the machine-readable instructions The steps of the method as described in any of the preceding embodiments are performed when executed by the processor.
第四方面,本发明实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如前述实施方式任一所述的方法的步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps of the method described in any of the foregoing embodiments are executed. .
本申请实施例的有益效果是:通过基于对跨时钟域模型进行分析,可以确定出例化信息、控制代码等内容,则可以减少每次需要验证跨时钟域模型时的各类编写验证环境中所需新的操作,从而可以提高对跨时钟域模型在跨时钟域下的各个功能的验证效率。The beneficial effects of the embodiments of the present application are: by analyzing the cross-clock domain model, content such as instantiation information, control codes, etc. can be determined, thereby reducing the need to verify the cross-clock domain model in various writing verification environments every time. A new operation is required, so that the verification efficiency of each function of the cross-clock-domain model under the cross-clock domain can be improved.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following drawings will briefly introduce the drawings that need to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.
图1为本申请实施例提供的电子设备的方框示意图。FIG. 1 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
图2为本申请实施例提供的跨时钟域模型检查器的控制方法的流程图。FIG. 2 is a flowchart of a control method of a cross-clock domain model checker provided by an embodiment of the present application.
图3为本申请实施例提供的跨时钟域模型检查器的控制方法的步骤204的详细流程图。FIG. 3 is a detailed flowchart of
图4为本申请实施例提供的跨时钟域模型检查器的控制方法得到目标验证环境示意图。FIG. 4 is a schematic diagram of a target verification environment obtained by a control method of a cross-clock domain model checker provided by an embodiment of the present application.
图5为本申请实施例提供的跨时钟域模型检查器的控制方法的验证环境复用示意图。FIG. 5 is a schematic diagram of multiplexing a verification environment of a control method for a cross-clock domain model checker provided by an embodiment of the present application.
图6为本申请实施例提供的跨时钟域模型检查器的控制装置的功能模块示意图。FIG. 6 is a schematic diagram of functional modules of a control device of a cross-clock domain model checker provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
在芯片的设计中一般分为前端设计和后端设计两个过程中。其中前端设计表示逻辑设计,该逻辑设计是指通过芯片需要的功能编写代码,以根据代码构建仿真芯片模型。通过仿真模型的验证,以确定仿真芯片模型是否能够实现需要的功能,在实现需要的功能时是否准确等。后端设计表示物理设计。例如,物理设计可以包括芯片封装和管脚设计,floorplan,电源布线和功率验证,线间干扰的预防和修正,时序收敛等。The chip design is generally divided into two processes: front-end design and back-end design. The front-end design represents the logic design, and the logic design refers to writing code through the functions required by the chip to construct a simulated chip model according to the code. Through the verification of the simulation model, it is determined whether the simulation chip model can realize the required functions, and whether it is accurate when realizing the required functions. The backend design represents the physical design. For example, physical design can include chip package and pin design, floorplan, power routing and power verification, prevention and correction of line-to-line interference, timing closure, etc.
在系统级芯片(System on Chip,SOC)的设计中,功能越来越多,规模越来越大,芯片里的时钟也越来越多。芯片设计和验证都需要保证跨时钟域(Clock Domain Crossing,以下简称CDC)电路的正确性。随着CDC电路的验证的发展,目前已为CDC电路建立通用的前端模型,并且在该前端模型上增加通用的检查器,在前端设计中的功能仿真阶段,通过检查器的验证就发现CDC电路中可能存在的问题。In the design of a system-on-chip (SOC), there are more and more functions, more and more scale, and more and more clocks in the chip. Both chip design and verification need to ensure the correctness of a clock domain crossing (Clock Domain Crossing, CDC for short below) circuit. With the development of the verification of the CDC circuit, a general front-end model has been established for the CDC circuit, and a general checker has been added to the front-end model. In the functional simulation stage of the front-end design, the CDC circuit is found through the verification of the checker. possible problems.
由于芯片设计多样性,导致芯片设计中的前端仿真场景也具有多样性,通用的前端模型以及检查器,需要配合实际的仿真场景进行适应性地调整和控制,以使检查器的检查规则都是合理的。例如,在某些特定情况下,一些通用的检查器是不适用的,则需要相关验证人员专门撰写代码做针对性的精细控制,例如,在具体时间针对某一些检查器进行开或者关。Due to the diversity of chip design, the front-end simulation scenarios in chip design are also diverse. The general front-end model and checker need to be adjusted and controlled adaptively with the actual simulation scenario, so that the checker's checking rules are all reasonable. For example, in some specific cases, some general-purpose checkers are not applicable, and the relevant verifiers need to write codes for specific and precise control, for example, to turn on or off certain checkers at specific times.
本申请发明人针对现有技术进行研究,发现现有的技术方案一般都是通过验证人员通过手写代码来逐一控制这些检查器,不同的仿真环境针对同一块电路,都需要做类似的检查器控制,工作量巨大,从而导致芯片的验证效率降低。The inventors of the present application have conducted research on the prior art and found that the existing technical solutions generally control these checkers one by one through handwritten codes by verifiers. Different simulation environments require similar checker control for the same circuit. , the workload is huge, which reduces the verification efficiency of the chip.
其中,通过验证人员手写的代码来实现逐一控制用于验证CDC电路的检查器,这样的方式可能存在以下的缺陷:Among them, the checker used to verify the CDC circuit is controlled one by one through the code written by the verifier, which may have the following defects:
由于大量的代码的编写可能会存在容易出错的情况。尤其是在电路复杂时,需要更多控制代码时,由于代码量巨大,撰写很容易出错。如果用于检测CDC电路的代码存在错误,那么针对CDC电路的检查也就可能漏检缺陷。There may be error-prone situations due to the large amount of code written. Especially when the circuit is complex and more control codes are required, it is easy to make mistakes due to the huge amount of code. If there is an error in the code used to detect the CDC circuit, the inspection for the CDC circuit may also miss the defect.
同一块CDC电路在不同级别的仿真环境中,可能存在很多精细控制是相同的。不同仿真环境需要分别搭建该精细控制,可能会做一些重复的工作,导致CDC电路的验证的效率较低。The same CDC circuit may have many fine controls that are the same in different levels of simulation environments. Different simulation environments need to build the fine control separately, and some repetitive work may be done, resulting in lower verification efficiency of the CDC circuit.
针对上述研究,本申请发明人研究CDC电路,了解到可以通过使用通用的底层控制模块和用户接口弥补上述不足。示例性地,通用控制模块可以通过具体的仿真CDC模型的验证环境实例化,通用接口可以定义统一的控制方法。基于此,本申请实施例提供了一种跨时钟域模型检查器的控制方法、装置及电子设备。下面通过几个实施例描述本申请实施例提供的方案。In view of the above research, the inventors of the present application have studied the CDC circuit and learned that the above deficiencies can be compensated by using a common underlying control module and user interface. Exemplarily, the general control module can be instantiated through a specific simulation CDC model verification environment, and the general interface can define a unified control method. Based on this, embodiments of the present application provide a control method, apparatus, and electronic device for a cross-clock domain model checker. The solutions provided by the embodiments of the present application are described below through several embodiments.
实施例一Example 1
为便于对本实施例进行理解,首先对执行本申请实施例所公开的跨时钟域模型检查器的控制方法的电子设备进行详细介绍。In order to facilitate understanding of this embodiment, an electronic device that executes the control method of the cross-clock domain model checker disclosed in the embodiment of this application is first introduced in detail.
如图1所示,是电子设备的方框示意图。电子设备100可以包括存储器111、存储控制器112、处理器113、外设接口114、输入输出单元115、显示单元116。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对电子设备100的结构造成限定。例如,电子设备100还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。As shown in FIG. 1, it is a block diagram of an electronic device. The
上述的存储器111、存储控制器112、处理器113、外设接口114、输入输出单元115及显示单元116各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。上述的处理器113用于执行存储器中存储的可执行模块。The above-mentioned elements of the
其中,存储器111可以是,但不限于,随机存取存储器(Random Access Memory,简称RAM),只读存储器(Read Only Memory,简称ROM),可编程只读存储器(ProgrammableRead-Only Memory,简称PROM),可擦除只读存储器(Erasable Programmable Read-OnlyMemory,简称EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-OnlyMemory,简称EEPROM)等。其中,存储器111用于存储程序,所述处理器113在接收到执行指令后,执行所述程序,本申请实施例中的任一实施例揭示的过程定义的电子设备100所执行的方法可以应用于处理器113中,或者由处理器113实现。Wherein, the
上述的处理器113可能是一种集成电路芯片,具有信号的处理能力。上述的处理器113可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(digital signalprocessor,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The above-mentioned
上述的外设接口114将各种输入/输出装置耦合至处理器113以及存储器111。在一些实施例中,外设接口114,处理器113以及存储控制器112可以在单个芯片中实现。在其他一些实例中,他们可以分别由独立的芯片实现。The aforementioned
上述的输入输出单元115用于提供给用户输入数据。所述输入输出单元115可以是,但不限于,鼠标和键盘等。The above-mentioned input and
上述的显示单元116在电子设备100与用户之间提供一个交互界面(例如用户操作界面)或用于显示图像数据给用户参考。在本实施例中,所述显示单元可以是液晶显示器或触控显示器。若为触控显示器,其可为支持单点和多点触控操作的电容式触控屏或电阻式触控屏等。支持单点和多点触控操作是指触控显示器能感应到来自该触控显示器上一个或多个位置处同时产生的触控操作,并将该感应到的触控操作交由处理器进行计算和处理。The above-mentioned
示例性地,上述的显示单元116可用于显示在对跨时钟域模型的检查器进行控制过程中产生的示意图。Exemplarily, the above-mentioned
本实施例中的电子设备100可以用于执行本申请实施例提供的各个方法中的各个步骤。下面通过几个实施例详细描述跨时钟域模型检查器的控制方法的实现过程。The
实施例二Embodiment 2
请参阅图2,是本申请实施例提供的跨时钟域模型检查器的控制方法的流程图。下面将对图2所示的具体流程进行详细阐述。Please refer to FIG. 2 , which is a flowchart of a control method of a cross-clock domain model checker provided by an embodiment of the present application. The specific flow shown in FIG. 2 will be described in detail below.
步骤202,通过波形分析工具对跨时钟域模型进行分析,以得到所述跨时钟域模型的模型信息。
本实施例中,该跨时钟域模型为一芯片设计模型,该跨时钟域模型包括多个模块。该芯片设计模型可以是对模型代码进行编译后得到的数据,该模型代码基于所需要实现的芯片的功能编写的代码。In this embodiment, the cross-clock domain model is a chip design model, and the cross-clock domain model includes a plurality of modules. The chip design model may be data obtained after compiling model codes, and the model codes are codes written based on the functions of the chip to be implemented.
示例性地,上述的模型代码可以提交给一仿真工具进行编译。Exemplarily, the above model code can be submitted to a simulation tool for compilation.
示例性地,该仿真工具可以是vcs。该vcs为新思科技(synopsys)公司出的一款用于仿真的工具。Illustratively, the simulation tool may be vcs. The vcs is a tool for simulation developed by synopsys.
示例性地,仿真工具也可以是Mentor的ModelSim、Cadence的Verilog-XL、Cadence的NC-Verilog等仿真工具。Exemplarily, the simulation tool may also be a simulation tool such as Mentor's ModelSim, Cadence's Verilog-XL, and Cadence's NC-Verilog.
可选地,上述的波形分析工具可以是Verdi。其中,该Verdi为新思科技(synopsys)公司出的一款用于分析仿真波形的工具。Optionally, the above-mentioned waveform analysis tool may be Verdi. Among them, the Verdi is a tool developed by synopsys for analyzing simulation waveforms.
示例性地,可以通过Verdi的NPI(Native Programming Interface,本机编程接口)来提取已编译的模型代码对应的芯片设计的模型信息。Exemplarily, the model information of the chip design corresponding to the compiled model code can be extracted through the NPI (Native Programming Interface, native programming interface) of Verdi.
示例性地,verdi的NPI提取的模型信息可以是从vcs编译的模型代码里,抽取指定的信息。Exemplarily, the model information extracted by the NPI of verdi may be specified information extracted from the model code compiled by vcs.
示例性地,该模型信息可以包括:层次结构、模块名称和文件路径。本实施例中的跨时钟域模型可以包括多个模块。该模块可以指CDC模块。Illustratively, the model information may include: hierarchy, module name, and file path. The cross-clock domain model in this embodiment may include multiple modules. The module may refer to the CDC module.
示例性地,模型信息可以表示为如下表1所示的内容:Exemplarily, the model information can be represented as the content shown in Table 1 below:
表1Table 1
其中,Hierarchy Path表示跨时钟域模型的各个模块的层次结构路径;ModuleName表示跨时钟域模型的CDC模块名称;File Path表示对应的CDC模块对应的文件的存储位置。Among them, Hierarchy Path represents the hierarchical structure path of each module of the cross-clock domain model; ModuleName represents the name of the CDC module of the cross-clock domain model; File Path represents the storage location of the file corresponding to the corresponding CDC module.
步骤204,对所述模型信息进行解析,以得到所述跨时钟域模型的例化信息。Step 204: Parse the model information to obtain instantiation information of the cross-clock domain model.
本实施例中,每个CDC模块可以包括一个或多个例化信息,通过对上述的模型信息进行分析解析,从而可以确定出各个例化信息的位置。In this embodiment, each CDC module may include one or more pieces of instantiated information, and by analyzing the above-mentioned model information, the location of each instantiated information can be determined.
示例性地,该模型信息包括:所述跨时钟域模型中的层次结构路径。Exemplarily, the model information includes: a hierarchical structure path in the cross-clock domain model.
可选地,该模型信息中还可以包括:各个模块文件路径。Optionally, the model information may further include: each module file path.
在一种实施方式中,步骤204可以包括:根据所述层次结构路径和预存配置文件对所述跨时钟域模型的每个模块进行解析,以得到每个模块对应的一个或多个例化信息。In one embodiment, step 204 may include: parsing each module of the cross-clock domain model according to the hierarchical structure path and the pre-stored configuration file to obtain one or more instantiation information corresponding to each module .
示例性地,该预存配置文件为用户预先编辑得到的文件。该预存配置文件中包括各个CDC模块的相关信息。Exemplarily, the pre-stored configuration file is a file pre-edited by the user. The pre-stored configuration file includes relevant information of each CDC module.
可选地,如图3所示,步骤204可以包括以下步骤。Optionally, as shown in FIG. 3 , step 204 may include the following steps.
步骤2041,根据配置文件对每个模块进行解析,以得到每个模块的模块信息。
示例性地,模块信息包括:模块名称、标志位(Process Flag)、使能信号路径(Control Signal Path)。Exemplarily, the module information includes: a module name, a flag bit (Process Flag), and an enable signal path (Control Signal Path).
示例性地,通过对配置文件进行解析,可以得到每个模块的例化信息。Exemplarily, by parsing the configuration file, the instantiation information of each module can be obtained.
示例性地,在一个实例中,配置文件中的跨时钟域模型的各个CDC模块的模块信息可以表示为如下表2所示的内容:Exemplarily, in one instance, the module information of each CDC module of the cross-clock domain model in the configuration file may be represented as the content shown in Table 2 below:
表2Table 2
其中,Module Name表示对应的CDC的模块名;Process Flag表示标志位;ControlSignal Path表示控制检查器的使能信号路径。其中,Process Flag表示是否需要对该CDC模块的层次结构进行后期处理。示例性地,同样的CDC模块在不同的例化参数下的层次结构可能会存在区别。Among them, Module Name represents the module name of the corresponding CDC; Process Flag represents the flag bit; ControlSignal Path represents the enable signal path of the control checker. Among them, Process Flag indicates whether post-processing of the hierarchical structure of the CDC module is required. Exemplarily, there may be differences in the hierarchical structure of the same CDC module under different instantiation parameters.
步骤2042,根据每个模块的层次结构路径、标志位和使能信号路径,确定出每个模块对应的多个例化信息。Step 2042: Determine a plurality of instantiation information corresponding to each module according to the hierarchical structure path, flag bit and enable signal path of each module.
本实施例中,通过使用不同的例化参数从而可以得到跨时钟域模型的不同层次结构。In this embodiment, different hierarchical structures of the cross-clock domain model can be obtained by using different instantiation parameters.
可选地,可以通过预先定义的脚本解析出跨时钟域模型中的各个模块的例化信息。Optionally, the instantiation information of each module in the cross-clock domain model can be parsed through a predefined script.
本实施例中,不同的Process Flag标志位对应的各个模块的例化信息中的路径可能不同。In this embodiment, the paths in the instantiation information of each module corresponding to different Process Flag flags may be different.
示例性地,当Process Flag标志位为1时,各个模块的例化信息为第一路径;当Process Flag标志位为2时,各个模块的例化信息为第二路径,其中该第一路径与该第二路径不同。Exemplarily, when the Process Flag flag is 1, the instantiation information of each module is the first path; when the Process Flag flag is 2, the instantiation information of each module is the second path, wherein the first path is the same as the one. The second path is different.
示例性地,该Process Flag标志位为不同值时,可以通过对文件路径File Path中的原始文件进行分析得到例化信息中的路径。Exemplarily, when the Process Flag bit is a different value, the path in the instantiation information can be obtained by analyzing the original file in the file path File Path.
可选地,关于各个例化信息的存储也可以按照预先定义的存储规则进行存储。Optionally, the storage of each instantiated information may also be stored according to a predefined storage rule.
可选地,本实施例中的方法还可以包括步骤205,将每个模块对应的一个或多个例化信息按照设定的数据存储格式进行存储。Optionally, the method in this embodiment may further include step 205, storing one or more instantiation information corresponding to each module according to a set data storage format.
在一种实施方式中,将每个模块对应的一个或多个例化信息分别按照哈希数组的存储形式进行存储,每个哈希数组包含一个例化信息。In an implementation manner, one or more instantiation information corresponding to each module is respectively stored in the storage form of a hash array, and each hash array contains one piece of instantiated information.
示例性地,一个CDC模块的一个例化信息可以表示为如下表3所示的内容:Exemplarily, an instantiated information of a CDC module can be represented as the content shown in Table 3 below:
表3table 3
其中,键Key表示一个例化信息对应的关键字,值Value表示对应的路径信息。Among them, the key Key represents a keyword corresponding to the instantiated information, and the value Value represents the corresponding path information.
本实施例中,通过键Hier的值Hierarchy Path可以确定一个例化单元对应的层级结构路径,通过键Dis的值Control Signal Path可以确定出对应的例化单元的使能信号路径。因此,通过键Dis和键Hier对应的值可以唯一确定一个例化单元检查器控制信号的路径。In this embodiment, a hierarchical structure path corresponding to an instantiated unit can be determined by the value of the key Hier Hierarchy Path, and an enable signal path of the corresponding instantiated unit can be determined by the value of the key Dis Control Signal Path. Therefore, the path of an instantiated unit checker control signal can be uniquely determined by the values corresponding to the key Dis and the key Hier.
本实施例中,遍历跨时钟域模型的模型信息,对所有CDC模块的例化信息均可以产生一个如表3所示的CDC模块的哈希数组。In this embodiment, the model information of the cross-clock domain model is traversed, and a hash array of the CDC modules as shown in Table 3 can be generated for the instantiation information of all CDC modules.
示例性地,把所有CDC模块的例化信息进行汇总存储于一个新的哈希数组中,简称为CDC实例哈希,可表示为表4所示的内容:Exemplarily, the instantiation information of all CDC modules is aggregated and stored in a new hash array, referred to as CDC instance hash for short, which can be expressed as the content shown in Table 4:
表4Table 4
在表4所示的实例中,CDC模块CDC_Wrapper_Name_1中包括N1个例化单元。每个例化单元的例化信息可以分别表示为Sub_Hash_11、…、Sub_Hash_N1。In the example shown in Table 4, the CDC module CDC_Wrapper_Name_1 includes N1 instantiated units. The instantiation information of each instantiated unit can be represented as Sub_Hash_11, . . . , Sub_Hash_N 1 , respectively.
示例性地,每个例化单元对应的例化信息可以是该例化单元的路径信息。Exemplarily, the instance information corresponding to each instance unit may be path information of the instance unit.
本实施例中,通过步骤202至204可以确定出一个跨时钟域模型中的各个模块的例化信息的位置。通过例化信息的位置,从而可以构建出控制例化信息的检查器的控制代码。In this embodiment, through
步骤206,通过遍历所述跨时钟域模型的例化信息,生成用于控制例化单元对应的检查器的控制代码。
可选地,通过遍历所述跨时钟域模型的所有的例化信息,从而针对跨时钟域模型的所有的例化信息的例化单元对应的检查器生成对应的控制代码,以基于该控制代码实现对各个例化单元的检查器的控制。Optionally, by traversing all the instantiation information of the cross-clock domain model, a corresponding control code is generated for the checker corresponding to the instantiated unit of all the instantiated information of the cross-clock domain model, based on the control code. Implements control of the inspector for each instantiated unit.
可选地,步骤206的动作可以由预先定义的脚步执行。示例性地,步骤206可以包括:根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息,并生成用于控制例化单元对应的检查器的控制代码。Optionally, the actions of
示例性地,该控制代码生成脚本可以进行遍历跨时钟域模型的例化信息的动作,以及还能执行根据遍历得到的例化信息生成控制例化单元对应的检查器的控制代码的动作。Exemplarily, the control code generation script may perform an action of traversing the instantiation information of the cross-clock domain model, and may also perform an action of generating a control code for controlling the checker corresponding to the instantiated unit according to the instantiated information obtained by the traversal.
示例性地,控制代码生成脚本中可以包括控制代码模板,其中,该控制代码模板中预留了需要个性化的内容。Exemplarily, the control code generation script may include a control code template, where the content that needs to be personalized is reserved in the control code template.
例如,该控制代码模板中可以预留出需要填充例化单元的路径信息的位置。当一控制代码模板填充了一个例化单元的路径信息,则可以形成该例化单元对应的检查器的控制代码。For example, the control code template may reserve a location where the path information of the instantiated unit needs to be filled. When a control code template is filled with path information of an instantiated unit, the control code of the checker corresponding to the instantiated unit can be formed.
在一个实例中,其中一个CDC模块的哈希数组可以是:In one instance, the hash array for one of the CDC modules can be:
my%HASH=();my%HASH = ();
$HASH{'cdc_model'}{0}{dis}='sync_r.InputChkDis';$HASH{'cdc_model'}{0}{dis}='sync_r.InputChkDis';
$HASH{'cdc_model'}{0}{hier}='tb.pcie.upcs.txClk_Ack_sync_0';$HASH{'cdc_model'}{0}{hier}='tb.pcie.upcs.txClk_Ack_sync_0';
$HASH{'cdc_model'}{1}{dis}='sync_r.InputChkDis';$HASH{'cdc_model'}{1}{dis}='sync_r.InputChkDis';
$HASH{'cdc_model'}{1}{hier}='tb.pcie.upcs.txClk_Ack_sync_1';$HASH{'cdc_model'}{1}{hier}='tb.pcie.upcs.txClk_Ack_sync_1';
$HASH{'cdc_model'}{2}{dis}='sync_r.InputChkDis';$HASH{'cdc_model'}{2}{dis}='sync_r.InputChkDis';
$HASH{'cdc_model'}{2}{hier}='tb.pcie.upcs.txClk_Ack_sync_2';$HASH{'cdc_model'}{2}{hier}='tb.pcie.upcs.txClk_Ack_sync_2';
$HASH{'cdc_model'}{3}{dis}='sync_r.InputChkDis';$HASH{'cdc_model'}{3}{dis}='sync_r.InputChkDis';
$HASH{'cdc_model'}{3}{hier}='tb.pcie.upcs.txClk_Ack_sync_3';$HASH{'cdc_model'}{3}{hier}='tb.pcie.upcs.txClk_Ack_sync_3';
上述的CDC模块cdc_model对应有四个例化单元。示例性地,{0}{dis}='sync_r.InputChkDis'和{0}{hier}='tb.pcie.upcs.txClk_Ack_sync_0'表示CDC模块cdc_model的第一个例化单元的例化信息。The above CDC module cdc_model corresponds to four instantiation units. Exemplarily, {0}{dis}='sync_r.InputChkDis' and {0}{hier}='tb.pcie.upcs.txClk_Ack_sync_0' represent the instantiation information of the first instantiation unit of the CDC module cdc_model.
针对第一个例化单元产生的控制代码可以表示为:The control code generated for the first instantiated unit can be expressed as:
以上述实例为例,则控制代码模板则可表示为:Taking the above example as an example, the control code template can be expressed as:
其中,控制代码模板中的“XXX”处用于填充需要控制的例化单元的路径信息,“YYY”处用于填充需要控制的例化单元的使能信号的路径信息。Wherein, "XXX" in the control code template is used to fill in the path information of the instantiated unit that needs to be controlled, and "YYY" is used to fill the path information of the enable signal of the instantiated unit that needs to be controlled.
本实施例中,基于不同的控制需求,可以生成需要的控制代码。In this embodiment, required control codes can be generated based on different control requirements.
在一种实施方式中,控制代码可以包括精确控制代码,用于当找到与提供的路径完全匹配的例化单元时,则可以对该例化单元对应的检查器进行打开或者关闭的操作。In one embodiment, the control code may include a precise control code for, when an instantiated unit that completely matches the provided path is found, the checker corresponding to the instantiated unit may be turned on or off.
示例性地,针对需要精确控制的例化单元,每个例化单元均可以对应一组控制代码。Exemplarily, for instantiated units that require precise control, each instantiated unit may correspond to a set of control codes.
示例性地,步骤206可以包括:根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息得到目标例化信息,以及根据所述目标例化信息生成用于控制所述目标例化信息的目标例化单元对应的检查器的控制代码,所述目标例化信息为所述跨时钟域模型的例化信息中的任意一个例化信息。Exemplarily, step 206 may include: generating a script according to a predefined control code, traversing the instantiation information of the cross-clock domain model to obtain target instantiation information, and generating a script for controlling the target according to the target instantiation information. The control code of the checker corresponding to the target instantiation unit of the instantiation information, where the target instantiation information is any one of the instantiation information of the cross-clock domain model.
示例性地,控制代码可以包括模糊控制代码,用于找到与提供的路径部分匹配的例化单元时,则可以对部分路径匹配成功的例化单元对应的检查器进行打开或者关闭的操作。Exemplarily, the control code may include a fuzzy control code, and when an instantiated unit partially matching the provided path is found, the checker corresponding to the instantiated unit whose partial path is successfully matched may be turned on or off.
在一种实施方式中,步骤206可以包括:根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息得到的同一类例化信息,以及生成用于控制所述同一类例化信息下的例化单元对应的检查器的控制代码,所述跨时钟域模型的例化信息包括一类或多类例化信息。In one embodiment, step 206 may include: generating a script according to a predefined control code, traversing the instantiation information of the same type obtained by traversing the instantiation information of the cross-clock domain model, and generating an instance for controlling the same type The control code of the checker corresponding to the instantiation unit under the instantiation information, where the instantiation information of the cross-clock domain model includes one or more types of instantiation information.
示例性地,上述的同一类例化信息可以指该同一类例化信息中的各个例化信息对应的例化单元的路径信息存在不同,且该同一类例化信息对应的各个例化信息对应的例化单元的被控制的逻辑相同。例如,在同样的条件下,部分的例化单元对应的检查器需要被同时关闭,则该部分例化单元可以是同一类例化单元,则该部分例化单元对应的例化信息则为同一类例化信息。Exemplarily, the above instantiation information of the same type may refer to the fact that the path information of the instantiation units corresponding to each instantiation information in the instantiation information of the same type is different, and the instantiation information corresponding to the instantiation information of the same type corresponds to The controlled logic of the instantiated unit is the same. For example, under the same conditions, the checkers corresponding to some instantiated units need to be closed at the same time, then the partial instantiation units can be the same type of instantiation units, and the instantiation information corresponding to the partial instantiation units is the same Class instantiation information.
本实施例中,各个例化单元对应的控制代码可组成底层控制模块。In this embodiment, the control codes corresponding to each instantiated unit may form a low-level control module.
示例性地,通过步骤202至步骤208可以生成用于控制各个检查器的底层控制模块。Exemplarily, through
步骤208,将所述控制代码、预定义的用户接口封装至验证环境中的控制模块中,以及将预定义的控制文件添加至所述验证环境中的指定位置,以得到目标验证环境。Step 208: Encapsulate the control code and the predefined user interface into a control module in a verification environment, and add a predefined control file to a specified location in the verification environment to obtain a target verification environment.
示例性地,基于上述的底层控制模块可以实现对各个例化单元对应的控制单元的检查器的控制。Exemplarily, the control of the checker of the control unit corresponding to each instantiated unit can be implemented based on the above-mentioned underlying control module.
可选地,还可以针对上述的底层控制模块构建通用接口。Optionally, a general interface can also be constructed for the above-mentioned underlying control module.
通过上述的通用接口,只要提供需要控制的检查器状态(input_chk_en是TURN_ON还是TURN_OFF),检查器对应的例化单元的路径信息以及模糊匹配模式控制开关(use_regex)等信息,即可实现对例化单元的检查器的控制。Through the above general interface, as long as you provide the status of the checker to be controlled (whether input_chk_en is TURN_ON or TURN_OFF), the path information of the instantiated unit corresponding to the checker, and the fuzzy matching mode control switch (use_regex) and other information, the instantiation can be realized. Control of the unit's inspector.
本实施例中,上述的预定义的控制文件可以根据跨时钟域模型的实际功能以及场景需求定义的控制文件。In this embodiment, the above-mentioned predefined control file may be a control file defined according to the actual function of the cross-clock domain model and scenario requirements.
示例性地,该控制文件中包括用来控制CDC模块的检查器的开关的逻辑。Illustratively, the control file includes logic for controlling switches of the checker of the CDC module.
可选地,针对每一块跨时钟域模型对应的控制文件都打包成独立的控制文件。在需要对对应的跨时钟域模型的在跨时钟域状态的功能进行检查时,则可以根据对应的控制文件对相关的检查器进行控制。Optionally, the control files corresponding to each cross-clock domain model are packaged into independent control files. When the function of the corresponding cross-clock-domain model in the cross-clock-domain state needs to be checked, the relevant checker can be controlled according to the corresponding control file.
本实施例中,将上述的步骤206中构建的控制代码形成的底层控制模块,以及该底层控制模块对应的通用接口封装至一个控制模块中,从而实现在一个验证环境中实例化该控制模块。In this embodiment, the underlying control module formed by the control code constructed in the
示例性地,如图4所示,图4示出了由底层控制模块、通用接口以及控制文件构建的一个目标验证环境示意图。Exemplarily, as shown in FIG. 4 , FIG. 4 shows a schematic diagram of a target verification environment constructed by a bottom layer control module, a general interface and a control file.
步骤210,通过所述目标验证环境对所述跨时钟域模型对应的检查器进行控制。Step 210: Control the checker corresponding to the cross-clock domain model through the target verification environment.
本实施例中,通过对跨时钟域模型对应的检查器进行控制,是为了实现对CDC模块的验证,在无须检查的时候可以很方便的关闭检查器,从而提高验证效率。In this embodiment, by controlling the checker corresponding to the cross-clock domain model, it is to realize the verification of the CDC module, and the checker can be conveniently turned off when there is no need to check, thereby improving the verification efficiency.
在本实施例中,通过步骤202至步骤208能够实现对用于验证跨时钟域模型的验证环境。In this embodiment, through
其中,步骤202至步骤206实现的底层控制模块可以基于需要验证的跨时钟域模型实现自动化生成。The underlying control modules implemented in
本实施例中,预定义的控制文件可以收敛,则可以复用于任何包含相同的该电路模块的验证环境,实现对所有CDC模块的检查器的控制,从而可以提高验证效率。In this embodiment, the predefined control file can be converged, and can be reused in any verification environment including the same circuit module, so as to control the checkers of all CDC modules, thereby improving the verification efficiency.
本实施例中,在构建目标验证环境时,仅需少量改动即可把整套方法添加到任何验证环境。In this embodiment, when constructing the target verification environment, the entire method can be added to any verification environment with only a few changes.
示例性地,如图5所示,设计A为设计B的一部分。验证环境A用于对设计A进行验证,验证环境B对设计B进行验证。若在验证环境A已经完成了控制模块和控制文件的开发后,仅需自动产生对应设计B的底层代码,并对控制文件的设计路径稍加改动,即可将整个CDC的控制模块从验证环境A复用到验证环境B。Illustratively, as shown in Figure 5, Design A is part of Design B. Verification environment A is used to verify design A, and verification environment B is used to verify design B. If the verification environment A has completed the development of the control module and the control file, it is only necessary to automatically generate the underlying code corresponding to the design B and slightly change the design path of the control file, and then the entire CDC control module can be changed from the verification environment. A is multiplexed to the verification environment B.
现有的常见的CDC模块检查器的控制,需要验证人员一条一条手工编写控制代码的方式,直接使用强制/释放(force/release)组合对CDC模块的检查器进行操作,控制代码也可能散落在验证环境的各个角落。量大,没有统一组织,容易出错和遗漏。与现有技术相比,在本实施例中,通过挂载专用的底层控制模块和统一的通用接口,实现CDC模块的检查器的控制在不同验证环境间的复用,减少不同验证环境之间的重复构建验证环境中的部分相同信息,以及各验证环境之间因为没有及时同步引发的错误和处理错误的时间,提高验证效率,减少维护成本。The control of the existing common CDC module checker requires the verifier to manually write the control code one by one, and directly use the force/release combination to operate the CDC module checker, and the control code may also be scattered in the CDC module. Verify every corner of the environment. The volume is large, there is no unified organization, and it is prone to errors and omissions. Compared with the prior art, in this embodiment, by mounting a dedicated bottom control module and a unified general interface, the control of the checker of the CDC module can be reused between different verification environments, reducing the number of different verification environments. The repeated construction of some of the same information in the verification environment, as well as the errors caused by the lack of timely synchronization between the verification environments and the time for processing errors, improve verification efficiency and reduce maintenance costs.
本实施例中的方法,针对相同电路的CDC模块的检查器控制文件可以在不同验证环境之间直接复用,验证人员只需要持续维护一套控制文件即可,从而可以提高CDC模块验证的效率。In the method in this embodiment, the checker control files of the CDC module for the same circuit can be directly reused between different verification environments, and the verifier only needs to continuously maintain one set of control files, thereby improving the efficiency of the CDC module verification. .
实施例三Embodiment 3
基于同一申请构思,本申请实施例中还提供了与跨时钟域模型检查器的控制方法对应的跨时钟域模型检查器的控制装置,由于本申请实施例中的装置解决问题的原理与前述的跨时钟域模型检查器的控制方法实施例相似,因此本实施例中的装置的实施可以参见上述方法的实施例中的描述,重复之处不再赘述。Based on the same application concept, the embodiment of the present application also provides a control device for the cross-clock domain model checker corresponding to the control method for the cross-clock domain model checker. Embodiments of the control method of the cross-clock domain model checker are similar, so for the implementation of the apparatus in this embodiment, reference may be made to the descriptions in the foregoing method embodiments, and repeated descriptions will not be repeated.
请参阅图6,是本申请实施例提供的跨时钟域模型检查器的控制装置的功能模块示意图。本实施例中的跨时钟域模型检查器的控制装置中的各个模块用于执行上述方法实施例中的各个步骤。跨时钟域模型检查器的控制装置包括:模型分析模块301、信息解析模块302、控制代码生成模块303、验证环境获取模块304以及检查器控制模块305;其中,Please refer to FIG. 6 , which is a schematic diagram of functional modules of a control device of a cross-clock domain model checker provided by an embodiment of the present application. Each module in the control device of the cross-clock domain model checker in this embodiment is configured to execute each step in the foregoing method embodiment. The control device of the cross-clock domain model checker includes: a
模型分析模块301,用于通过波形分析工具对跨时钟域模型进行分析,以得到所述跨时钟域模型的模型信息,所述跨时钟域模型为一芯片设计模型;A
信息解析模块302,用于对所述模型信息进行解析,以得到所述跨时钟域模型的例化信息;an
控制代码生成模块303,用于通过遍历所述跨时钟域模型的例化信息,生成用于控制例化单元对应的检查器的控制代码;a control
验证环境获取模块304,用于将所述控制代码、预定义的用户接口封装至验证环境中的控制模块中,以及将预定义的控制文件添加至验证环境中的指定位置,以得到目标验证环境;The verification
检查器控制模块305,用于通过所述目标验证环境对所述跨时钟域模型对应的检查器进行控制。The
一种可能的实施方式中,控制代码生成模块303,用于:In a possible implementation manner, the control
根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息,并生成用于控制例化单元对应的检查器的控制代码。According to a predefined control code generation script, the instantiation information of the cross-clock domain model is traversed, and a control code for controlling the checker corresponding to the instantiated unit is generated.
一种可能的实施方式中,控制代码生成模块303,用于:In a possible implementation manner, the control
根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息得到目标例化信息,以及根据所述目标例化信息生成用于控制所述目标例化信息的目标例化单元对应的检查器的控制代码,所述目标例化信息为所述跨时钟域模型的例化信息中的任意一个例化信息。Generate a script according to a predefined control code, traverse the instantiation information of the cross-clock domain model to obtain target instantiation information, and generate a target instantiation unit corresponding to the target instantiation information for controlling the target instantiation information according to the target instantiation information The control code of the checker, the target instantiation information is any one of the instantiation information of the cross-clock domain model.
一种可能的实施方式中,控制代码生成模块303,用于:In a possible implementation manner, the control
根据预定义的控制代码生成脚本,遍历所述跨时钟域模型的例化信息得到的同一类例化信息,以及生成用于控制所述同一类例化信息下的例化单元对应的检查器的控制代码,所述跨时钟域模型的例化信息包括一类或多类例化信息。Generate a script according to a predefined control code, traverse the instantiation information of the cross-clock domain model to obtain the same type of instantiation information, and generate a script for controlling the checker corresponding to the instantiated unit under the same type of instantiation information The control code, the instantiation information of the cross-clock domain model includes one or more types of instantiation information.
一种可能的实施方式中,所述跨时钟域模型包括多个模块,所述模型信息包括:所述跨时钟域模型中的层次结构路径和各个模块文件路径;信息解析模块302,用于:In a possible implementation manner, the cross-clock domain model includes a plurality of modules, and the model information includes: a hierarchical structure path and each module file path in the cross-clock domain model; an
根据所述层次结构路径和预存配置文件对所述跨时钟域模型的每个模块进行解析,以得到每个模块对应的一个或多个例化信息。Each module of the cross-clock domain model is parsed according to the hierarchical structure path and the pre-stored configuration file to obtain one or more instantiation information corresponding to each module.
一种可能的实施方式中,信息解析模块302,用于:In a possible implementation manner, the
根据所述配置文件对每个模块进行解析,以得到每个模块的模块信息,所述模块信息包括:模块名称、标志位、使能信号路径;Analyze each module according to the configuration file to obtain module information of each module, where the module information includes: module name, flag bit, and enable signal path;
根据每个模块的层次结构路径、标志位和使能信号路径,确定出每个模块对应的多个例化信息。According to the hierarchical structure path, flag bit and enable signal path of each module, multiple instantiation information corresponding to each module is determined.
一种可能的实施方式中,本实施例中的跨时钟域模型检查器的控制装置还包括:In a possible implementation manner, the control device of the cross-clock domain model checker in this embodiment further includes:
存储模块,用于将每个模块对应的一个或多个例化信息按照设定的数据存储格式进行存储。The storage module is used for storing one or more instantiated information corresponding to each module according to the set data storage format.
一种可能的实施方式中,存储模块,用于:In a possible implementation, the storage module is used for:
将每个模块对应的一个或多个例化信息分别按照哈希数组的存储形式进行存储,每个哈希数组包含一个例化信息。One or more instantiation information corresponding to each module is stored in the storage form of a hash array, and each hash array contains one instantiated information.
此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的跨时钟域模型检查器的控制方法的步骤。In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to perform the cross-clock domain model check described in the foregoing method embodiments. The steps of the control method of the device.
本申请实施例所提供的跨时钟域模型检查器的控制方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中所述的跨时钟域模型检查器的控制方法的步骤,具体可参见上述方法实施例,在此不再赘述。The computer program product of the control method for the cross-clock domain model checker provided by the embodiments of the present application includes a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the methods described in the foregoing method embodiments. For the steps of the control method of the cross-clock domain model checker, reference may be made to the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architectures, functions and possible implementations of apparatuses, methods and computer program products according to various embodiments of the present application. operate. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes . It should be noted that, in this document, 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 any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprises" does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application. It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011555344.0A CN112580283B (en) | 2020-12-23 | 2020-12-23 | Control method and device of cross-clock-domain model checker and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011555344.0A CN112580283B (en) | 2020-12-23 | 2020-12-23 | Control method and device of cross-clock-domain model checker and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112580283A CN112580283A (en) | 2021-03-30 |
CN112580283B true CN112580283B (en) | 2022-04-29 |
Family
ID=75139709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011555344.0A Active CN112580283B (en) | 2020-12-23 | 2020-12-23 | Control method and device of cross-clock-domain model checker and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112580283B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116187233A (en) * | 2022-12-09 | 2023-05-30 | 海光信息技术股份有限公司 | Checker control method, verification system, computer device, and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112000173A (en) * | 2020-08-20 | 2020-11-27 | 天津飞腾信息技术有限公司 | Method and system for checking multi-bit signal timing violation across clock domains |
CN112115664A (en) * | 2020-11-18 | 2020-12-22 | 北京滕华软件有限公司 | Multi-mode multi-clock domain chip integrated control system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8819599B2 (en) * | 2008-11-07 | 2014-08-26 | Mentor Graphics Corporation | Hierarchical verification of clock domain crossings |
US8607173B2 (en) * | 2012-03-09 | 2013-12-10 | Atrenta, Inc. | Hierarchical bottom-up clock domain crossing verification |
-
2020
- 2020-12-23 CN CN202011555344.0A patent/CN112580283B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112000173A (en) * | 2020-08-20 | 2020-11-27 | 天津飞腾信息技术有限公司 | Method and system for checking multi-bit signal timing violation across clock domains |
CN112115664A (en) * | 2020-11-18 | 2020-12-22 | 北京滕华软件有限公司 | Multi-mode multi-clock domain chip integrated control system |
Also Published As
Publication number | Publication date |
---|---|
CN112580283A (en) | 2021-03-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10354042B2 (en) | Selectively reducing graph based analysis pessimism | |
Foster | Applied assertion-based verification: An industry perspective | |
US8856706B2 (en) | System and method for metastability verification of circuits of an integrated circuit | |
US8051402B2 (en) | Method and apparatus for implementing communication between a software side and a hardware side of a test bench in a transaction-based acceleration verification system | |
US20210232742A1 (en) | Detecting timing violations in emulation using field programmable gate array (fpga) reprogramming | |
US9990458B2 (en) | Generic design rule checking (DRC) test case extraction | |
US10579341B2 (en) | Generation of workload models from execution traces | |
US8838430B1 (en) | Detection of memory access violation in simulations | |
US10146895B2 (en) | Method and apparatus for simulating a digital circuit | |
US20200401750A1 (en) | Verifying glitches in reset path using formal verification and simulation | |
US10430215B1 (en) | Method and system to transfer data between hardware emulator and host workstation | |
US9047427B1 (en) | Method and system for performing verification of an electronic design | |
Simpson | FPGA design | |
JP2018524652A (en) | Efficient waveform generation for emulation | |
US10445077B2 (en) | Techniques to remove idle cycles for clock-sensitive threads in hardware simulators | |
CN112580283B (en) | Control method and device of cross-clock-domain model checker and electronic equipment | |
US20210374314A1 (en) | Engineering Change Order Scenario Compression by Applying Hybrid of Live and Static Timing Views | |
CN112631852B (en) | Macro checking method, macro checking device, electronic equipment and computer readable storage medium | |
US9519746B1 (en) | Addressing early mode slack fails by book decomposition | |
US8819612B1 (en) | Analyzing timing requirements of a hierarchical integrated circuit design | |
Zhang et al. | A validation fault model for timing-induced functional errors | |
Malaquias et al. | From the Standards to Silicon: Formally Proved Memory Controllers | |
CN110750956B (en) | Logic gate level verification method and verification system | |
JP5001126B2 (en) | Hardware verification programming description generation apparatus, hardware verification programming description generation method, control program, and readable recording medium | |
US12307179B2 (en) | Detecting simulation, emulation and prototyping issues using static analysis tools |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |