Movatterモバイル変換


[0]ホーム

URL:


CN114818565A - Python-based simulation environment management platform, method, equipment and medium - Google Patents

Python-based simulation environment management platform, method, equipment and medium
Download PDF

Info

Publication number
CN114818565A
CN114818565ACN202210509994.4ACN202210509994ACN114818565ACN 114818565 ACN114818565 ACN 114818565ACN 202210509994 ACN202210509994 ACN 202210509994ACN 114818565 ACN114818565 ACN 114818565A
Authority
CN
China
Prior art keywords
simulation
command
python
generate
environment management
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
CN202210509994.4A
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.)
Hangzhou Clounix Technology Ltd
Original Assignee
Hangzhou Clounix Technology 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 Hangzhou Clounix Technology LtdfiledCriticalHangzhou Clounix Technology Ltd
Priority to CN202210509994.4ApriorityCriticalpatent/CN114818565A/en
Publication of CN114818565ApublicationCriticalpatent/CN114818565A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The invention provides a simulation environment management platform, a method, equipment and a medium based on python, wherein the platform comprises the following components: the command receiving unit is used for receiving a simulation command submitted by the test platform; the analysis unit is used for analyzing the simulation command to obtain a simulation command parameter and generating a simulation task according to the simulation command parameter; the execution unit is used for executing simulation according to the simulation task so as to generate a simulation log file and a waveform file; the judging unit is used for capturing the specified keywords in the simulation log file and judging whether the simulation result passes or fails through the function return value; and the display unit is used for displaying the simulation log file and the waveform file on a screen when the simulation result is judged to pass. The method realizes unified management of simulation environment based on python language development, realizes standardization of team EDA simulation flow, facilitates communication and cooperation among teams, and improves the working efficiency of the whole team.

Description

Translated fromChinese
基于python的仿真环境管理平台、方法、设备及介质Python-based simulation environment management platform, method, equipment and medium

技术领域technical field

本发明涉及仿真领域,具体而言,涉及一种基于python的仿真环境管理平台、方法、设备及介质。The invention relates to the field of simulation, in particular to a python-based simulation environment management platform, method, device and medium.

背景技术Background technique

电子设计自动化(Electronic design automation,EDA)是指利用计算机辅助设计软件,以计算机为工作平台,融合应用电子技术、计算机技术、信息处理及智能化技术的最新成果,进行电子产品的自动化设计。利用EDA工具,电子工程师可以从概念、算法、协议等开始设计电子系统,大量工作可以通过计算机完成,并可以将电子产品从电路设计、性能分析到设计出集成电路版图或印刷电路板版图的整个过程在计算机上自动处理完成。Electronic design automation (EDA) refers to the use of computer-aided design software, using computer as a working platform, and integrating the latest achievements of electronic technology, computer technology, information processing and intelligent technology to automate the design of electronic products. Using EDA tools, electronic engineers can design electronic systems from concepts, algorithms, protocols, etc., and a lot of work can be done by computers, and can complete the entire process of electronic products from circuit design, performance analysis to designing integrated circuit layouts or printed circuit board layouts The process is done automatically on the computer.

在集成电路芯片领域同样少不了EDA工具的参与,工程师们会使用该工具来完成超大规模集成电路芯片的功能设计、综合、验证、物理设计(包括布局、布线、版图、设计规则检查等),可以说芯片设计的每个环节都离不开EDA工具的参与,这已经成为了一套标准流程的设计方式。In the field of integrated circuit chips, the participation of EDA tools is also indispensable. Engineers will use this tool to complete the functional design, synthesis, verification, and physical design (including layout, wiring, layout, design rule checking, etc.) of VLSI chips. It is said that every link of chip design is inseparable from the participation of EDA tools, which has become a design method of a standard process.

其中,对于数字类芯片的前端设计和验证,常用的EDA仿真工具有:Among them, for the front-end design and verification of digital chips, the commonly used EDA simulation tools are:

Mentor公司的ModelsimModelsim from Mentor

Synopsys公司的VCSSynopsys VCS

Cadence公司的NC-Verilog、Verilog—XLCadence's NC-Verilog, Verilog-XL

以上公司的EDA仿真工具均可以对RTL(Register Transfer Level)代码进行功能,行为,逻辑和时序的仿真。The EDA simulation tools of the above companies can simulate the function, behavior, logic and timing of RTL (Register Transfer Level) code.

一般情况下,芯片设计和验证开发人员都有各自独立的工作目录,并在该目录下建立独立的EDA仿真环境,通过各自维护的仿真运行脚本来对RTL代码以及相应的验证平台进行编译和仿真。整个工作流程大致如图1所示。In general, chip design and verification developers have their own independent working directories, and establish an independent EDA simulation environment in this directory, and compile and simulate the RTL code and the corresponding verification platform through the simulation running scripts maintained by each other. . The entire workflow is roughly shown in Figure 1.

现有工作流程存在如下缺陷:The existing workflow has the following shortcomings:

1、由于开发团队成员各自开发维护一套独立的仿真开发环境,那么文件存放目录路径会各不相同,仿真命令和方式也会存在差异,导致每个人的仿真环境不尽相同,因此团队成员之间很难进行相互之间的协作交流。比如,对于需要团队其他成员进行协助进行定位RTL行为功能等问题时存在困难,因为需要首先熟悉对方的仿真环境,这无疑增加了团队协作的成本,从而导致团队整体工作效率的降低。1. Since the development team members develop and maintain an independent simulation development environment, the file storage directory paths will be different, and the simulation commands and methods will also be different, resulting in different simulation environments for each team member. It is difficult to cooperate and communicate with each other. For example, it is difficult for other team members to assist in locating RTL behavior and other problems, because it is necessary to be familiar with the simulation environment of the other party first, which undoubtedly increases the cost of team collaboration and reduces the overall work efficiency of the team.

2、由于开发团队成员各自开发维护一套独立的仿真开发环境,因此很难对仿真开发流程做标准化,从而导致标准文档描述的缺失,管理流程的混乱,而芯片的设计和验证过程是一项非常细致的讲究团队协作配合的工作,容不得一丁点差错,否则很容易导致芯片的流片失败。而众所周知,流片的成本非常高昂,企业一般很难承受流片失败所带来的影响,除此之外,还会大大延长芯片及配套中下游产品推向市场的时间,容易错过市场的窗口期,错失一系列的商业机会。2. Since the development team members develop and maintain an independent simulation development environment, it is difficult to standardize the simulation development process, which leads to the lack of standard document description and the confusion of the management process, and the chip design and verification process is a The work of teamwork and cooperation is very meticulous, and there is no room for mistakes, otherwise it will easily lead to the failure of the chip tape-out. As we all know, the cost of tape-out is very high, and it is generally difficult for companies to bear the impact of tape-out failure. In addition, it will greatly extend the time for chips and supporting mid- and downstream products to be introduced to the market, and it is easy to miss the market window. A series of business opportunities are missed.

3、由于开发团队成员的技术水平深浅不一,在各自独立开发维护的仿真环境中,或许会遇到各种各样的问题和困难,需要独立或相互探讨进行解决,这增加了开发的时间,白白消耗了开发人员的精力,导致团队整体效率的减低。3. Due to the different technical levels of the development team members, in the simulation environment independently developed and maintained, various problems and difficulties may be encountered, which need to be solved independently or through mutual discussion, which increases the development time. , consumes the developer's energy in vain, resulting in the reduction of the overall efficiency of the team.

4、对于新入职的开发团队成员来说,由于没有一套标准的仿真开发环境供参考,导致较难融入团队,增大了团队适应成本,变相降低了团队协作的效率。4. For new members of the development team, because there is no standard simulation development environment for reference, it is difficult to integrate into the team, which increases the cost of team adaptation and reduces the efficiency of team collaboration in disguise.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明的目的在于提供一种基于python的仿真环境管理平台、方法、设备及介质,以改善上述问题。In view of this, the purpose of the present invention is to provide a python-based simulation environment management platform, method, device and medium to improve the above problems.

本发明实施例提供了一种基于python的仿真环境管理平台,其包括:The embodiment of the present invention provides a python-based simulation environment management platform, which includes:

命令接收单元,用于接收测试平台提交的仿真命令;The command receiving unit is used to receive the simulation command submitted by the test platform;

解析单元,用于对所述仿真命令进行解析,以获得仿真命令参数,并根据所述仿真命令参数生成仿真任务;a parsing unit, configured to parse the simulation command to obtain simulation command parameters, and generate simulation tasks according to the simulation command parameters;

执行单元,用于根据所述仿真任务执行仿真,以产生仿真日志文件和波形文件;an execution unit, configured to perform simulation according to the simulation task, to generate a simulation log file and a waveform file;

判断单元,用于对仿真日志文件中的指定关键字进行抓取并通过函数返回值判断仿真结果是通过还是失败;The judgment unit is used to grab the specified keyword in the simulation log file and judge whether the simulation result passes or fails through the function return value;

显示单元,用于当判断仿真结果通过时,将仿真日志文件和波形文件显示到屏幕上。The display unit is used to display the simulation log file and the waveform file on the screen when it is judged that the simulation result is passed.

优选地,所述仿真环境管理平台设定有统一的环境变量,所述环境变量包括工作目录所在路径和快捷映射命令。Preferably, the simulation environment management platform is set with a unified environment variable, and the environment variable includes the path where the working directory is located and the shortcut mapping command.

优选地,还包括:Preferably, it also includes:

配置单元,用于对仿真环境管理平台进行基本的参数配置,包括:The configuration unit is used to configure the basic parameters of the simulation environment management platform, including:

对日志模块做日志格式设置;Set the log format for the log module;

对仿真模式进行配置,支持对仿真测试用例的三种仿真运行模式:Configure the simulation mode to support three simulation run modes for simulation test cases:

多进程运行模式,该模式为默认的模式Multi-process running mode, this mode is the default mode

多线程运行模式Multi-threaded operation mode

顺序运行模式。Sequential operation mode.

优选地,所述解析单元至少支持以下命令参数的解析:Preferably, the parsing unit supports at least parsing of the following command parameters:

-tb:用于指定需要验证的测试平台名称;-tb: used to specify the name of the test platform that needs to be verified;

-casename:用于指定需要仿真运行的测试用例名称;-casename: used to specify the name of the test case that needs to be simulated;

-compile_args:用于传入编译参数,从而对代码进行静态的选择性编译;-compile_args: used to pass in compilation parameters to perform static selective compilation of the code;

-sim_args:用于传入仿真运行参数,从而对代码进行动态的选择性仿真;-sim_args: used to pass in the simulation running parameters, so as to perform dynamic and selective simulation of the code;

-seed:用于指定随机种子,从而对测试平台中的随机函数的随机模式进行指定或随机;-seed: used to specify the random seed, so as to specify or randomize the random mode of the random function in the test platform;

-bypass_compile:用于跳过编译阶段,直接进入仿真运行阶段,从而加速仿真运行效率,对于此前编译过的测试平台来说,只需要传入不同的测试用例名称,直接进行仿真;-bypass_compile: It is used to skip the compilation stage and directly enter the simulation operation stage, thereby accelerating the simulation operation efficiency. For the previously compiled test platform, only need to pass in different test case names to directly simulate;

-testlist:用于指定回归测试时的测试用例列表文件,EDA仿真工具会根据此前配置的仿真模式对列表中的测试用例进行遍历仿真运行;-testlist: used to specify the test case list file for regression testing. The EDA simulation tool will traverse and simulate the test cases in the list according to the previously configured simulation mode;

-parallel:用于指定回归测试模式时是否调用多线程或多进程来进行并行仿真加速,最大线程和进程数默认为服务器CPU核心数;-parallel: used to specify whether to call multi-thread or multi-process for parallel simulation acceleration in regression test mode. The maximum number of threads and processes defaults to the number of server CPU cores;

-waveform:用于指定仿真后产生的波形文件格式;-waveform: used to specify the waveform file format generated after simulation;

-mode:用于指定回归测试模式时的仿真运行模式,支持多进程,多线程以及顺序执行的三种运行模式。-mode: It is used to specify the simulation running mode in regression test mode, and supports three running modes of multi-process, multi-thread and sequential execution.

优选地,对于单个测试用例,所述执行单元具体用于:Preferably, for a single test case, the execution unit is specifically used for:

根据测试平台名称创建并进入编译目录路径下;Create and enter the compilation directory path according to the name of the test platform;

根据仿真命令参数产生编译命令;Generate a compile command according to the simulation command parameters;

执行编译命令并产生编译日志文件;Execute the compilation command and generate the compilation log file;

根据测试用例名称,仿真运行参数和随机种子创建并进入仿真目录路径下;Create and enter the simulation directory path according to the test case name, simulation running parameters and random seeds;

根据仿真命令参数产生仿真命令;Generate a simulation command according to the simulation command parameters;

执行仿真命令并产生仿真日志文件和波形文件。Execute simulation commands and generate simulation log files and waveform files.

优选地,对于基于列表的回归测试用例,所述执行单元具体用于:Preferably, for a list-based regression test case, the execution unit is specifically used for:

根据测试平台和回归测试用例列表名称创建并进入编译目录路径下;Create and enter the compilation directory path according to the name of the test platform and the regression test case list;

根据仿真命令参数产生编译命令;Generate a compile command according to the simulation command parameters;

执行编译命令并产生编译日志文件;Execute the compilation command and generate the compilation log file;

创建用于回归测试的随机种子列表;Create a list of random seeds for regression testing;

根据配置的仿真运行模式以及根据测试用例名称,仿真运行参数和随机种子来遍历创建并进入仿真目录路径下;According to the configured simulation operation mode and according to the test case name, simulation operation parameters and random seeds, traverse to create and enter the simulation directory path;

根据仿真命令参数产生仿真命令;Generate a simulation command according to the simulation command parameters;

执行仿真命令并产生仿真日志文件和波形文件。Execute simulation commands and generate simulation log files and waveform files.

优选地,还包括:Preferably, it also includes:

报告日志单元,用于运行python模块测试并产生报告日志文件;其中,报告日志文件包括所有的测试用例名称,仿真日志,仿真结果和随机种子信息。The report log unit is used to run the python module test and generate a report log file; wherein, the report log file includes all test case names, simulation logs, simulation results and random seed information.

本发明实施例还提供了一种基于python的仿真环境管理方法,其包括:The embodiment of the present invention also provides a python-based simulation environment management method, which includes:

接收测试平台提交的仿真命令;Receive the simulation command submitted by the test platform;

对所述仿真命令进行解析,以获得仿真命令参数,并根据所述仿真命令参数生成仿真任务;Parsing the simulation command to obtain simulation command parameters, and generating simulation tasks according to the simulation command parameters;

根据所述仿真任务执行仿真,以产生仿真日志文件和波形文件;performing simulation according to the simulation task to generate simulation log files and waveform files;

对仿真日志文件中的指定关键字进行抓取并通过函数返回值判断仿真结果是通过还是失败;Grab the specified keyword in the simulation log file and judge whether the simulation result passes or fails through the function return value;

当判断仿真结果通过时,将仿真日志文件和波形文件显示到屏幕上。When it is judged that the simulation result is passed, the simulation log file and waveform file are displayed on the screen.

本发明实施例还提供了一种基于python的仿真环境管理设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如上述的基于python的仿真环境管理方法。An embodiment of the present invention further provides a python-based simulation environment management device, which is characterized by comprising a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to realize Such as the above python-based simulation environment management method.

本发明实施例还提供了一种计算机可读存储介质,其存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如上述的基于python的仿真环境管理方法。An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, and the computer program can be executed by a processor of a device where the computer-readable storage medium is located, so as to implement the above python-based simulation Environmental management methods.

综上所述,本实施例的基于python的仿真环境管理平台,其具有如下优点:To sum up, the python-based simulation environment management platform of this embodiment has the following advantages:

(1)基于python语言开发实现了仿真环境的统一管理,实现了对团队EDA仿真流程的标准化,方便了团队之间的交流协作,提高了整个团队的工作效率,此外还可以方便收集仿真后台数据,从而做进一步的资源统计分析和管理优化。(1) Based on the development of python language, the unified management of the simulation environment is realized, and the standardization of the team EDA simulation process is realized, which facilitates the communication and cooperation between the teams, improves the work efficiency of the whole team, and also facilitates the collection of simulation background data. , so as to do further resource statistical analysis and management optimization.

(2)针对多个目标测试用例的回归仿真场景,提供了三种仿真运行模式的支持,包括顺序运行,多进程运行以及多线程运行模式,配合LSF可以很方便的对提交的仿真作业进行计算资源的调度和仿真运行。(2) For the regression simulation scenario of multiple target test cases, it provides support for three simulation operation modes, including sequential operation, multi-process operation and multi-thread operation mode. With LSF, the submitted simulation jobs can be easily calculated. Resource scheduling and simulation runs.

(3)通过使用基于python的argparse模块来对仿真命令参数进行解析,从而满足了不同项目组定制化的EDA仿真需求。(3) By using the python-based argparse module to parse the simulation command parameters, the customized EDA simulation requirements of different project groups are met.

(4)采用基于python的面向对象的开发方式以及可扩展的解析参数,可以很方便地扩展出更加复杂,更加完善的精细化仿真环境管理流程,从而进一步提升团队的协作效率。(4) Using the python-based object-oriented development method and scalable analysis parameters, it is easy to expand a more complex and perfect refined simulation environment management process, thereby further improving the team's collaboration efficiency.

(5)通过使用基于python的jinjia2模块和pytest模块来产生和运行仿真测试脚本,从而返回测试用例仿真结果并输出报告日志。(5) Generate and run simulation test scripts by using python-based jinjia2 module and pytest module to return test case simulation results and output report logs.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, 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 an implementation architecture diagram of an existing simulation environment management method.

图2是本发明第一实施例提供的仿真环境管理平台的实现原理图。FIG. 2 is a schematic diagram of the realization of the simulation environment management platform provided by the first embodiment of the present invention.

图3是本发明第一实施例提供的仿真环境管理平台的模块示意图。FIG. 3 is a schematic diagram of a module of a simulation environment management platform provided by the first embodiment of the present invention.

图4是本发明一实施例提供的仿真环境管理平台的实现架构图。FIG. 4 is an implementation architecture diagram of a simulation environment management platform provided by an embodiment of the present invention.

图5是IBM Spectrum LSF负载共享架构图。Figure 5 is a diagram of the IBM Spectrum LSF load sharing architecture.

图6是本发明第二实施例提供的仿真环境管理方法的流程示意图。FIG. 6 is a schematic flowchart of a simulation environment management method provided by a second embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

为了更好的理解本发明的技术方案,下面结合附图对本发明实施例进行详细描述。In order to better understand the technical solutions of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.

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

在本发明实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明。在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. As used in the embodiments of the present invention and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise.

下面结合附图与具体实施方式对本发明作进一步详细描述:The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments:

如图2所示,在本实施例,不再由开发团队人员各自独立维护自己的仿真开发环境,而是统一由管理人员通过本实施例的仿真环境管理平台进行维护,开发团队人员只需要通过其测试平台200按照统一的命令格式进行调用即可,此外,仿真产生的过程文件的目录位置也都是统一的格式,因此开发团队成员之间可以方便地进行协作交流。As shown in FIG. 2 , in this embodiment, the development team members no longer maintain their own simulation development environments independently, but are maintained by the management personnel through the simulation environment management platform of this embodiment. The development team members only need to The test platform 200 can be called according to a unified command format. In addition, the directory locations of the process files generated by the simulation are also in a unified format, so that members of the development team can easily collaborate and communicate.

这里的仿真环境管理人员会首先收集不同项目组成员的EDA工具使用需求,然后基于python开发相应的仿真环境管理脚本,除了基本编译和仿真功能以外,还提供多种命令行参数供用户使用,从而满足不同项目组成员的定制化的EDA工具使用需求。The simulation environment managers here will first collect the EDA tool usage requirements of different project team members, and then develop corresponding simulation environment management scripts based on python. Meet the customized EDA tool usage needs of different project team members.

请参阅图3以及图4,在本实施例中,为了实现仿真环境的统一管理,所述仿真环境管理平台包括:Please refer to FIG. 3 and FIG. 4. In this embodiment, in order to realize unified management of the simulation environment, the simulation environment management platform includes:

命令接收单元10,用于接收测试平台200提交的仿真命令。The command receiving unit 10 is configured to receive the simulation command submitted by the test platform 200 .

解析单元20,用于对所述仿真命令进行解析,以获得仿真命令参数,并根据所述仿真命令参数生成仿真任务。The parsing unit 20 is configured to parse the simulation command to obtain simulation command parameters, and generate a simulation task according to the simulation command parameters.

在本实施例中,各个开发人员可以通过其自身的测试平台200来提交仿真命令,命令接收单元10可接收该仿真命令,再通过解析单元20进行解析,以获得仿真命令参数。其中,一般的,仿真命令包括如下仿真命令参数中的全部或者部分:In this embodiment, each developer can submit a simulation command through its own test platform 200 , and the command receiving unit 10 can receive the simulation command and parse it through the parsing unit 20 to obtain simulation command parameters. Wherein, generally, the simulation command includes all or part of the following simulation command parameters:

-tb:用于指定需要验证的测试平台名称;-tb: used to specify the name of the test platform that needs to be verified;

-casename:用于指定需要仿真运行的测试用例名称;-casename: used to specify the name of the test case that needs to be simulated;

-compile_args:用于传入编译参数,从而对代码进行静态的选择性编译;-compile_args: used to pass in compilation parameters to perform static selective compilation of the code;

-sim_args:用于传入仿真运行参数,从而对代码进行动态的选择性仿真;-sim_args: used to pass in the simulation running parameters, so as to perform dynamic and selective simulation of the code;

-seed:用于指定随机种子,从而对测试平台中的随机函数的随机模式进行指定或随机;-seed: used to specify the random seed, so as to specify or randomize the random mode of the random function in the test platform;

-bypass_compile:用于跳过编译阶段,直接进入仿真运行阶段,从而加速仿真运行效率,对于此前编译过的测试平台来说,只需要传入不同的测试用例名称,直接进行仿真;-bypass_compile: It is used to skip the compilation stage and directly enter the simulation operation stage, thereby accelerating the simulation operation efficiency. For the previously compiled test platform, only need to pass in different test case names to directly simulate;

-testlist:用于指定回归测试时的测试用例列表文件,EDA仿真工具会根据此前配置的仿真模式对列表中的测试用例进行遍历仿真运行;-testlist: used to specify the test case list file for regression testing. The EDA simulation tool will traverse and simulate the test cases in the list according to the previously configured simulation mode;

-parallel:用于指定回归测试模式时是否调用多线程或多进程来进行并行仿真加速,最大线程和进程数默认为服务器CPU核心数;-parallel: used to specify whether to call multi-thread or multi-process for parallel simulation acceleration in regression test mode. The maximum number of threads and processes defaults to the number of server CPU cores;

-waveform:用于指定仿真后产生的波形文件格式;-waveform: used to specify the waveform file format generated after simulation;

-mode:用于指定回归测试模式时的仿真运行模式,支持多进程,多线程以及顺序执行的三种运行模式。-mode: It is used to specify the simulation running mode in regression test mode, and supports three running modes of multi-process, multi-thread and sequential execution.

相应的,解析单元20也需要支持对这些仿真命令参数的解析。Correspondingly, the parsing unit 20 also needs to support parsing of these simulation command parameters.

其中,具体地,如图4所示,所述解析单元20可为基于python开发父类对象Common,在其中创建仿真环境管理的基础接口方法,包括:Specifically, as shown in FIG. 4 , the parsing unit 20 may develop a parent class object Common based on python, and create a basic interface method for simulation environment management in it, including:

产生随机种子的接口方法Interface method for generating random seeds

命令行参数解析的接口方法Interface method for command line parameter parsing

加载yaml文件数据的接口方法Interface method for loading yaml file data

产生并进入编译目录路径的接口方法Interface method for generating and entering the compile directory path

产生编译命令的接口方法Interface method for generating compile commands

运行编译命令的接口方法Interface method for running compile commands

产生并进入仿真目录路径的接口方法Interface method for generating and entering simulation directory path

产生仿真命令的接口方法Interface method for generating simulation commands

运行仿真命令的接口方法Interface methods for running simulation commands

判断返回仿真结果的接口方法Determine the interface method that returns the simulation result

产生仿真用例结果测试脚本的接口方法Interface method for generating simulation use case result test script

运行仿真用例结果测试脚本并产生报告日志的接口方法Interface method to run simulation use case result test script and generate report log

打印仿真结果和波形文件路径位置的接口方法Interface method for printing simulation results and waveform file path location

然后对上述父类对象进行继承以产生子类对象Simulation_flow,在其中创建仿真环境管理的流程的接口方法,包括:Then the above-mentioned parent class object is inherited to generate a subclass object Simulation_flow, in which interface methods for the flow managed by the simulation environment are created, including:

基本仿真流程配置的接口方法Interface methods for basic simulation process configuration

单个测试用例仿真流程的接口方法Interface method of single test case simulation process

多个测试用例的回归仿真流程的接口方法Interface method for regression simulation process of multiple test cases

用于为回归测试产生随机种子列表的接口方法Interface method for generating a random seed list for regression testing

用于顺序运行的回归测试流程的接口方法Interface methods for regression testing processes that run sequentially

用于多线程运行的回归测试流程的接口方法Interface methods for regression testing processes running in multiple threads

用于多进程运行的回归测试流程的接口方法Interface methods for regression testing processes running in multiple processes

用于提交给LSF的最小仿真任务单元的接口方法Interface method for minimal simulation task unit submitted to LSF

最后例化该子类对象,并根据仿真场景调用不同的仿真流程的接口方法,从而生成仿真任务,并写入到队列中。Finally, the subclass object is instantiated, and the interface methods of different simulation processes are called according to the simulation scene, so as to generate simulation tasks and write them into the queue.

执行单元30,用于根据所述仿真命令参数执行仿真,以产生仿真日志文件和波形文件。The execution unit 30 is configured to execute simulation according to the simulation command parameters, so as to generate a simulation log file and a waveform file.

其中,所述执行单元30从队列中提取仿真任务,并将其分配给对应的计算资源来执行仿真任务,然后执行单元30不断与计算机集群资源和队列进行通信,从而分配最佳计算资源给目标仿真任务,以最终实现最佳的计算机资源利用,负载均衡并降低企业成本负责计算机资源的资源调度和分配执行。The execution unit 30 extracts simulation tasks from the queue and allocates them to corresponding computing resources to execute the simulation tasks, and then the execution unit 30 continuously communicates with computer cluster resources and queues to allocate optimal computing resources to the target Simulate tasks to ultimately achieve optimal computer resource utilization, load balancing and reduce enterprise costs. Responsible for resource scheduling and allocation execution of computer resources.

具体地,在执行仿真时:Specifically, when performing the simulation:

对于单个测试用例,所述执行单元30具体用于:For a single test case, the execution unit 30 is specifically used for:

根据测试平台名称创建并进入编译目录路径下;Create and enter the compilation directory path according to the name of the test platform;

根据仿真命令参数产生编译命令;Generate a compile command according to the simulation command parameters;

执行编译命令并产生编译日志文件。Execute the compile command and generate the compile log file.

其中,上述为编译步骤,对于此前编译过的测试平台来说,可以通过仿真命令参数bypass_compile跳过编译步骤,直接进行下面的仿真步骤。Among them, the above is the compilation step. For the previously compiled test platform, the compilation step can be skipped through the simulation command parameter bypass_compile, and the following simulation steps can be directly performed.

根据测试用例名称,仿真运行参数和随机种子创建并进入仿真目录路径下。Create and enter the simulation directory path according to the test case name, simulation running parameters and random seeds.

在本实施例中,例如,设置工作目录为WORK_SPACE,设置alias快捷映射命令runsim来映射执行对应的python脚本。In this embodiment, for example, the working directory is set to WORK_SPACE, and the alias shortcut mapping command runsim is set to map and execute the corresponding python script.

根据仿真命令参数产生仿真命令;Generate a simulation command according to the simulation command parameters;

执行仿真命令并产生仿真日志文件和波形文件。Execute simulation commands and generate simulation log files and waveform files.

对于基于列表的回归测试用例,所述执行单元30具体用于:For the list-based regression test case, the execution unit 30 is specifically used for:

根据测试平台和回归测试用例列表名称创建并进入编译目录路径下;Create and enter the compilation directory path according to the name of the test platform and the regression test case list;

根据仿真命令参数产生编译命令;Generate a compile command according to the simulation command parameters;

执行编译命令并产生编译日志文件;Execute the compilation command and generate the compilation log file;

创建用于回归测试的随机种子列表;Create a list of random seeds for regression testing;

根据配置的仿真运行模式以及根据测试用例名称,仿真运行参数和随机种子来遍历创建并进入仿真目录路径下;According to the configured simulation operation mode and according to the test case name, simulation operation parameters and random seeds, traverse to create and enter the simulation directory path;

根据仿真命令参数产生仿真命令;Generate a simulation command according to the simulation command parameters;

执行仿真命令并产生仿真日志文件和波形文件。Execute simulation commands and generate simulation log files and waveform files.

判断单元40,用于对仿真日志文件中的指定关键字进行抓取并通过函数返回值判断仿真结果是通过还是失败。The judging unit 40 is configured to capture the specified keyword in the simulation log file and judge whether the simulation result passes or fails through the function return value.

其中,可通过基于python的jinjia2模块以及pytest模块来产生python模块测试脚本文件来对仿真日志文件中的指定关键字进行抓取并通过函数返回值。Among them, the python module test script file can be generated based on the python-based jinjia2 module and the pytest module to capture the specified keywords in the simulation log file and return the value through the function.

显示单元50,用于当判断仿真结果通过时,将仿真日志文件和波形文件显示到屏幕上。The display unit 50 is configured to display the simulation log file and the waveform file on the screen when it is judged that the simulation result is passed.

在本实施例中,当确定仿真通过后,将相关仿真结果信息打印到屏幕,可以方便开发人员对测试过程进行调试。In this embodiment, after it is determined that the simulation is passed, the relevant simulation result information is printed on the screen, which can facilitate the developer to debug the test process.

当然,如果仿真不通过,也可以将失败的理由打印到屏幕上,以供开发人员参考以及调整。Of course, if the simulation fails, the reason for failure can also be printed on the screen for reference and adjustment by developers.

优选地,还包括:Preferably, it also includes:

配置单元,用于对仿真环境管理平台进行基本的参数配置,包括:The configuration unit is used to configure the basic parameters of the simulation environment management platform, including:

对日志模块做日志格式设置。Set the log format for the log module.

对仿真模式进行配置,支持对仿真测试用例的三种仿真运行模式:Configure the simulation mode to support three simulation run modes for simulation test cases:

多进程运行模式,该模式为默认的模式Multi-process running mode, this mode is the default mode

多线程运行模式Multi-threaded operation mode

顺序运行模式。Sequential operation mode.

具体地,对于python多线程编程来说,python会使用一种叫做全局解释器锁(g'lobal interpreter lock,GIL)来防止Cpython(python解释器)的状态在多线程环境里受到破坏干扰。但是这会存在一个缺陷,即在程序中的多线程任务,由于受到GIL约束,即每个线程在执行过程中都需要先获得GIL,每次或许只能有一个线程向前执行推进,而无法实现多线程的齐头并进。Specifically, for python multithreaded programming, python will use a so-called global interpreter lock (g'local interpreter lock, GIL) to prevent the state of Cpython (python interpreter) from being corrupted in a multithreaded environment. However, there is a flaw in this, that is, the multi-threaded tasks in the program are constrained by the GIL, that is, each thread needs to obtain the GIL first during the execution process, and there may only be one thread at a time. Implementing multithreading goes hand in hand.

虽然说多线程编程由于受到GIL锁的影响,并不能真正实现并行加速,但是可以通过多线程编程模拟同时执行多项任务的效果,也可以让程序在执行阻塞式IO密集型任务时,继续做其他运算。但是EDA仿真任务通常属于计算密集型的运算任务,程序本身内不会有太多的阻塞式I/O任务,因此无法利用多线程的上述特性。因此一般无法通过多线程编程来实现真正的并行EDA仿真加速,相反还可能会因为线程的频繁切换,导致效率下降。而对于python多进程编程来说,每个进程在会有单独的GIL,不会存在类似多线程编程中对GIL争抢的情况。因此在面对计算密集型任务时,可以使用多进程编程来真正实现EDA的并行仿真加速,从而充分利用CPU多核运算能力,并且会随着CPU核心数量的增加,性能也会得到进一步的提升。Although multi-threaded programming cannot really achieve parallel acceleration due to the influence of GIL locks, it can simulate the effect of executing multiple tasks at the same time through multi-threaded programming, and also allow the program to continue to do blocking IO-intensive tasks. other operations. However, EDA simulation tasks are usually computationally intensive computing tasks, and there will not be too many blocking I/O tasks in the program itself, so the above characteristics of multithreading cannot be used. Therefore, it is generally impossible to achieve true parallel EDA simulation acceleration through multi-threaded programming. On the contrary, it may also lead to decreased efficiency due to frequent switching of threads. For python multi-process programming, each process will have a separate GIL, and there will be no competition for the GIL similar to multi-threaded programming. Therefore, in the face of computationally intensive tasks, multi-process programming can be used to truly realize the parallel simulation acceleration of EDA, so as to make full use of the multi-core computing power of the CPU, and the performance will be further improved as the number of CPU cores increases.

所以考虑在一定的时间内并行处理一些工作时,最好依靠多进程来创建多个EDA仿真任务,以便在多个CPU核心之间分散负载。So when considering some work in parallel for a certain amount of time, it is better to rely on multiprocessing to create multiple EDA simulation tasks in order to spread the load among multiple CPU cores.

具体地,本实施例使用内置的multiprocesssing模块来提供多进程的并行仿真运行,使用内置的concurrent.futures模块来提供多进程的仿真运行,其中多进程和多线程编程实现对仿真的加速是以消耗计算机资源和EDA工具的授权license为代价的。而对于计算机资源的合理使用分配和负载均衡,将由企业级软件IBM Spectrum LSF来负责,其提供了一个资源管理框架,实现更快、更可靠的工作负载性能并降低企业成本,其基本架构如图4所示。Specifically, this embodiment uses the built-in multiprocesssing module to provide multi-process parallel simulation operation, and uses the built-in concurrent.futures module to provide multi-process simulation operation, wherein multi-process and multi-thread programming realizes the acceleration of simulation at the expense of consumption At the expense of computer resources and licenses for EDA tools. For the rational use, allocation and load balancing of computer resources, the enterprise-level software IBM Spectrum LSF will be responsible for providing a resource management framework to achieve faster and more reliable workload performance and reduce enterprise costs. Its basic architecture is shown in the figure 4 shown.

优选地,还包括:Preferably, it also includes:

报告日志单元,用于运行python模块测试并产生报告日志文件;其中,报告日志文件包括所有的测试用例名称,仿真日志,仿真结果和随机种子信息。The report log unit is used to run the python module test and generate a report log file; wherein, the report log file includes all test case names, simulation logs, simulation results and random seed information.

综上所述,本实施例的基于python的仿真环境管理平台,其具有如下优点:To sum up, the python-based simulation environment management platform of this embodiment has the following advantages:

(1)基于python语言开发实现了仿真环境的统一管理,实现了对团队EDA仿真流程的标准化,方便了团队之间的交流协作,提高了整个团队的工作效率,此外还可以方便收集仿真后台数据,从而做进一步的资源统计分析和管理优化。(1) Based on the development of python language, the unified management of the simulation environment is realized, and the standardization of the team EDA simulation process is realized, which facilitates the communication and cooperation between the teams, improves the work efficiency of the whole team, and also facilitates the collection of simulation background data. , so as to do further resource statistical analysis and management optimization.

(2)针对多个目标测试用例的回归仿真场景,提供了三种仿真运行模式的支持,包括顺序运行,多进程运行以及多线程运行模式,配合LSF可以很方便的对提交的仿真作业进行计算资源的调度和仿真运行。(2) For the regression simulation scenario of multiple target test cases, it provides support for three simulation operation modes, including sequential operation, multi-process operation and multi-thread operation mode. With LSF, the submitted simulation jobs can be easily calculated. Resource scheduling and simulation runs.

(3)通过使用基于python的argparse模块来对仿真命令参数进行解析,从而满足了不同项目组定制化的EDA仿真需求。(3) By using the python-based argparse module to parse the simulation command parameters, the customized EDA simulation requirements of different project groups are met.

(4)采用基于python的面向对象的开发方式以及可扩展的解析参数,可以很方便地扩展出更加复杂,更加完善的精细化仿真环境管理流程,从而进一步提升团队的协作效率。(4) Using the python-based object-oriented development method and scalable analysis parameters, it is easy to expand a more complex and perfect refined simulation environment management process, thereby further improving the team's collaboration efficiency.

(5)通过使用基于python的jinjia2模块和pytest模块来产生和运行仿真测试脚本,从而返回测试用例仿真结果并输出报告日志。(5) Generate and run simulation test scripts by using python-based jinjia2 module and pytest module to return test case simulation results and output report logs.

请参阅图6,本发明第二实施例还提供了一种基于python的仿真环境管理方法,其包括:Referring to FIG. 6, the second embodiment of the present invention also provides a python-based simulation environment management method, which includes:

S201,接收测试平台提交的仿真命令;S201, receiving the simulation command submitted by the test platform;

S202,对所述仿真命令进行解析,以获得仿真命令参数,并根据所述仿真命令参数生成仿真任务;S202, parsing the simulation command to obtain simulation command parameters, and generating a simulation task according to the simulation command parameters;

S203,根据所述仿真任务执行仿真,以产生仿真日志文件和波形文件;S203, performing simulation according to the simulation task to generate a simulation log file and a waveform file;

S204,对仿真日志文件中的指定关键字进行抓取并通过函数返回值判断仿真结果是通过还是失败;S204, grab the specified keyword in the simulation log file and judge whether the simulation result passes or fails through the function return value;

S205,当判断仿真结果通过时,将仿真日志文件和波形文件显示到屏幕上。S205, when it is judged that the simulation result is passed, the simulation log file and the waveform file are displayed on the screen.

本发明第三实施例还提供了一种基于python的仿真环境管理设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如上述的基于python的仿真环境管理方法。The third embodiment of the present invention also provides a python-based simulation environment management device, which is characterized by comprising a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor, In order to realize the above-mentioned python-based simulation environment management method.

本发明第四实施例还提供了一种计算机可读存储介质,其存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如上述的基于python的仿真环境管理方法。The fourth embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program, and the computer program can be executed by a processor of a device where the computer-readable storage medium is located, so as to realize the above-mentioned python-based The simulation environment management method.

在本发明实施例所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置和方法实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本发明的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus and method embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention, function and operation. 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 invention may be integrated 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 invention 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, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. 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, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device that includes elements includes not only those elements, but also Include other elements not expressly listed, or which are inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims (10)

Translated fromChinese
1.一种基于python的仿真环境管理平台,其特征在于,包括:1. a simulation environment management platform based on python, is characterized in that, comprises:命令接收单元,用于接收测试平台提交的仿真命令;The command receiving unit is used to receive the simulation command submitted by the test platform;解析单元,用于对所述仿真命令进行解析,以获得仿真命令参数,并根据所述仿真命令参数生成仿真任务;a parsing unit, configured to parse the simulation command to obtain simulation command parameters, and generate simulation tasks according to the simulation command parameters;执行单元,用于根据所述仿真任务执行仿真,以产生仿真日志文件和波形文件;an execution unit, configured to perform simulation according to the simulation task, to generate a simulation log file and a waveform file;判断单元,用于对仿真日志文件中的指定关键字进行抓取并通过函数返回值判断仿真结果是通过还是失败;The judgment unit is used to grab the specified keyword in the simulation log file and judge whether the simulation result passes or fails through the function return value;显示单元,用于当判断仿真结果通过时,将仿真日志文件和波形文件显示到屏幕上。The display unit is used to display the simulation log file and the waveform file on the screen when it is judged that the simulation result is passed.2.根据权利要求1所述的基于python的仿真环境管理平台,其特征在于,2. the simulation environment management platform based on python according to claim 1, is characterized in that,所述仿真环境管理平台设定有统一的环境变量,所述环境变量包括工作目录所在路径和快捷映射命令。The simulation environment management platform is set with a unified environment variable, and the environment variable includes the path where the working directory is located and the shortcut mapping command.3.根据权利要求1所述的基于python的仿真环境管理平台,其特征在于,还包括:3. python-based simulation environment management platform according to claim 1, is characterized in that, also comprises:配置单元,用于对仿真环境管理平台进行基本的参数配置,包括:The configuration unit is used to configure the basic parameters of the simulation environment management platform, including:对日志模块做日志格式设置;Set the log format for the log module;对仿真模式进行配置,支持对仿真测试用例的三种仿真运行模式:Configure the simulation mode to support three simulation run modes for simulation test cases:多进程运行模式,该模式为默认的模式;Multi-process running mode, which is the default mode;多线程运行模式;Multi-threaded operation mode;顺序运行模式。Sequential operation mode.4.根据权利要求1所述的基于python的仿真环境管理平台,其特征在于,所述解析单元至少支持以下命令参数的解析:4. The python-based simulation environment management platform according to claim 1, wherein the parsing unit supports at least parsing of the following command parameters:-tb:用于指定需要验证的测试平台名称;-tb: used to specify the name of the test platform that needs to be verified;-casename:用于指定需要仿真运行的测试用例名称;-casename: used to specify the name of the test case that needs to be simulated;-compile_args:用于传入编译参数,从而对代码进行静态的选择性编译;-compile_args: used to pass in compilation parameters to perform static selective compilation of the code;-sim_args:用于传入仿真运行参数,从而对代码进行动态的选择性仿真;-sim_args: used to pass in the simulation running parameters, so as to perform dynamic and selective simulation of the code;-seed:用于指定随机种子,从而对测试平台中的随机函数的随机模式进行指定或随机;-seed: used to specify the random seed, so as to specify or randomize the random mode of the random function in the test platform;-bypass_compile:用于跳过编译阶段,直接进入仿真运行阶段,从而加速仿真运行效率,对于此前编译过的测试平台来说,只需要传入不同的测试用例名称,直接进行仿真;-bypass_compile: It is used to skip the compilation stage and directly enter the simulation operation stage, thereby accelerating the simulation operation efficiency. For the previously compiled test platform, only need to pass in different test case names to directly simulate;-testlist:用于指定回归测试时的测试用例列表文件,EDA仿真工具会根据此前配置的仿真模式对列表中的测试用例进行遍历仿真运行;-testlist: used to specify the test case list file for regression testing. The EDA simulation tool will traverse and simulate the test cases in the list according to the previously configured simulation mode;-parallel:用于指定回归测试模式时是否调用多线程或多进程来进行并行仿真加速,最大线程和进程数默认为服务器CPU核心数;-parallel: used to specify whether to call multi-thread or multi-process for parallel simulation acceleration in regression test mode. The maximum number of threads and processes defaults to the number of server CPU cores;-waveform:用于指定仿真后产生的波形文件格式;-waveform: used to specify the waveform file format generated after simulation;-mode:用于指定回归测试模式时的仿真运行模式,支持多进程,多线程以及顺序执行的三种运行模式。-mode: It is used to specify the simulation running mode in regression test mode, and supports three running modes of multi-process, multi-thread and sequential execution.5.根据权利要求4所述的基于python的仿真环境管理平台,其特征在于,对于单个测试用例,所述执行单元具体用于:5. The python-based simulation environment management platform according to claim 4, wherein, for a single test case, the execution unit is specifically used for:根据测试平台名称创建并进入编译目录路径下;Create and enter the compilation directory path according to the name of the test platform;根据仿真命令参数产生编译命令;Generate a compile command according to the simulation command parameters;执行编译命令并产生编译日志文件;Execute the compilation command and generate the compilation log file;根据测试用例名称,仿真运行参数和随机种子创建并进入仿真目录路径下;Create and enter the simulation directory path according to the test case name, simulation running parameters and random seeds;根据仿真命令参数产生仿真命令;Generate a simulation command according to the simulation command parameters;执行仿真命令并产生仿真日志文件和波形文件。Execute simulation commands and generate simulation log files and waveform files.6.根据权利要求4所述的基于python的仿真环境管理平台,其特征在于,对于基于列表的回归测试用例,所述执行单元具体用于:6. The python-based simulation environment management platform according to claim 4, wherein, for the list-based regression test case, the execution unit is specifically used for:根据测试平台和回归测试用例列表名称创建并进入编译目录路径下;Create and enter the compilation directory path according to the name of the test platform and the regression test case list;根据仿真命令参数产生编译命令;Generate a compile command according to the simulation command parameters;执行编译命令并产生编译日志文件;Execute the compilation command and generate the compilation log file;创建用于回归测试的随机种子列表;Create a list of random seeds for regression testing;根据配置的仿真运行模式以及根据测试用例名称,仿真运行参数和随机种子来遍历创建并进入仿真目录路径下;According to the configured simulation operation mode and according to the test case name, simulation operation parameters and random seeds, traverse to create and enter the simulation directory path;根据仿真命令参数产生仿真命令;Generate a simulation command according to the simulation command parameters;执行仿真命令并产生仿真日志文件和波形文件。Execute simulation commands and generate simulation log files and waveform files.7.根据权利要求4所述的基于python的仿真环境管理平台,其特征在于,还包括:7. python-based simulation environment management platform according to claim 4, is characterized in that, also comprises:报告日志单元,用于运行python模块测试并产生报告日志文件;其中,报告日志文件包括所有的测试用例名称,仿真日志,仿真结果和随机种子信息。The report log unit is used to run the python module test and generate a report log file; wherein, the report log file includes all test case names, simulation logs, simulation results and random seed information.8.一种基于python的仿真环境管理方法,其特征在于,包括:8. A python-based simulation environment management method, characterized in that, comprising:接收测试平台提交的仿真命令;Receive the simulation command submitted by the test platform;对所述仿真命令进行解析,以获得仿真命令参数,并根据所述仿真命令参数生成仿真任务;Parsing the simulation command to obtain simulation command parameters, and generating simulation tasks according to the simulation command parameters;根据所述仿真任务执行仿真,以产生仿真日志文件和波形文件;performing simulation according to the simulation task to generate simulation log files and waveform files;对仿真日志文件中的指定关键字进行抓取并通过函数返回值判断仿真结果是通过还是失败;Grab the specified keyword in the simulation log file and judge whether the simulation result passes or fails through the function return value;当判断仿真结果通过时,将仿真日志文件和波形文件显示到屏幕上。When it is judged that the simulation result is passed, the simulation log file and waveform file are displayed on the screen.9.一种基于python的仿真环境管理设备,其特征在于,包括存储器以及处理器,所述存储器内存储有计算机程序,所述计算机程序能够被所述处理器执行,以实现如权利要求8所述的基于python的仿真环境管理方法。9. a kind of simulation environment management device based on python, is characterized in that, comprises memory and processor, described memory is stored with computer program, and described computer program can be executed by described processor, to realize as claimed in claim 8 The described python-based simulation environment management method.10.一种计算机可读存储介质,其特征在于,存储有计算机程序,所述计算机程序能够被所述计算机可读存储介质所在设备的处理器执行,以实现如权利要求8所述的基于python的仿真环境管理方法。10. A computer-readable storage medium, characterized in that, a computer program is stored, and the computer program can be executed by the processor of the device where the computer-readable storage medium is located, to realize the python-based method as claimed in claim 8 The simulation environment management method.
CN202210509994.4A2022-05-112022-05-11 Python-based simulation environment management platform, method, equipment and mediumPendingCN114818565A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202210509994.4ACN114818565A (en)2022-05-112022-05-11 Python-based simulation environment management platform, method, equipment and medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202210509994.4ACN114818565A (en)2022-05-112022-05-11 Python-based simulation environment management platform, method, equipment and medium

Publications (1)

Publication NumberPublication Date
CN114818565Atrue CN114818565A (en)2022-07-29

Family

ID=82514033

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202210509994.4APendingCN114818565A (en)2022-05-112022-05-11 Python-based simulation environment management platform, method, equipment and medium

Country Status (1)

CountryLink
CN (1)CN114818565A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115062569A (en)*2022-08-172022-09-16深圳市华杰智通科技有限公司 Millimeter wave chip design simulation EDA storage and calculation parallel acceleration system and method
CN116090403A (en)*2023-02-132023-05-09上海合见工业软件集团有限公司Command processing system supporting multiple simulators
CN116383155A (en)*2023-06-052023-07-04成都融见软件科技有限公司Log query system based on EDA verification simulator
CN117149911A (en)*2023-09-122023-12-01易方达基金管理有限公司Regression parameter synchronization method and device for simulation test environment
CN119292767A (en)*2024-09-132025-01-10山东云海国创云计算装备产业创新中心有限公司 A dynamic configuration system, device and readable storage medium for a simulation environment

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111832236A (en)*2020-06-292020-10-27山东云海国创云计算装备产业创新中心有限公司 A chip regression test method, system, electronic device and storage medium
CN112084113A (en)*2020-09-162020-12-15上海创景信息科技有限公司Configurable automatic test method and system based on embedded simulation verification software
CN112560290A (en)*2020-12-292021-03-26中国航空工业集团公司沈阳飞机设计研究所Automatic testing method and system based on countermeasure simulation platform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111832236A (en)*2020-06-292020-10-27山东云海国创云计算装备产业创新中心有限公司 A chip regression test method, system, electronic device and storage medium
CN112084113A (en)*2020-09-162020-12-15上海创景信息科技有限公司Configurable automatic test method and system based on embedded simulation verification software
CN112560290A (en)*2020-12-292021-03-26中国航空工业集团公司沈阳飞机设计研究所Automatic testing method and system based on countermeasure simulation platform

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
"cocobt 1.5.2", pages 1 - 2, Retrieved from the Internet <URL:"https://docs.cocotb.org/en/v1.5.2/building.html#var-SIM_ARGS">*
"MSTest.exez命令行选项", pages 1, Retrieved from the Internet <URL:"https://learn.microsoft.com/zh-cn/previous-versions/ms182489(v=vs.120)?redirectedfrom=MSDN">*
"python多进程及并行计算:multiprocessing总结&joblib.parallel函数", pages 1, Retrieved from the Internet <URL:"https://www.cnblogs.com/dychen/p/15743087.html">*
"python接口自动化代码_python3接口自动化-run_all_case", pages 1, Retrieved from the Internet <URL:https://blog.csdn.net/weixin_39856803/article/details/110027208">*
王明师: "《Python编程实战》", 31 May 2021, "北京航空航天大学出版社", pages: 226 - 229*

Cited By (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115062569A (en)*2022-08-172022-09-16深圳市华杰智通科技有限公司 Millimeter wave chip design simulation EDA storage and calculation parallel acceleration system and method
CN115062569B (en)*2022-08-172022-12-02深圳市华杰智通科技有限公司 Millimeter wave chip design simulation EDA storage and calculation parallel acceleration system and method
CN116090403A (en)*2023-02-132023-05-09上海合见工业软件集团有限公司Command processing system supporting multiple simulators
CN116090403B (en)*2023-02-132023-12-26上海合见工业软件集团有限公司Command processing system supporting multiple simulators
CN116383155A (en)*2023-06-052023-07-04成都融见软件科技有限公司Log query system based on EDA verification simulator
CN116383155B (en)*2023-06-052023-08-11成都融见软件科技有限公司Log query system based on EDA verification simulator
CN117149911A (en)*2023-09-122023-12-01易方达基金管理有限公司Regression parameter synchronization method and device for simulation test environment
CN117149911B (en)*2023-09-122024-03-15易方达基金管理有限公司Regression parameter synchronization method and device for simulation test environment
CN119292767A (en)*2024-09-132025-01-10山东云海国创云计算装备产业创新中心有限公司 A dynamic configuration system, device and readable storage medium for a simulation environment

Similar Documents

PublicationPublication DateTitle
CN114818565A (en) Python-based simulation environment management platform, method, equipment and medium
Beyer et al.Reliable benchmarking: requirements and solutions
US7996816B2 (en)Method and apparatus for dynamically binding service component implementations for specific unit test cases
US11010283B2 (en)Mock-based unit test(s) for an end-to-end test of a code snippet
CN104750603B (en)A kind of multi-core DSP software simulator and its physical layer software test method
WO2018072493A1 (en)Compiling method and compiling system
US20110145643A1 (en)Reproducible test framework for randomized stress test
Mack et al.CEDR: A compiler-integrated, extensible DSSoC runtime
US10579341B2 (en)Generation of workload models from execution traces
US9715440B2 (en)Test scope determination based on code change(s)
CN101393535A (en) Method and system for associating runtime events with components
Vega et al.STOMP: A tool for evaluation of scheduling policies in heterogeneous multi-processors
Ye et al.SimICT: A fast and flexible framework for performance and power evaluation of large-scale architecture
CN111309297B (en)Script development system and method
CN113391903A (en)Method and device for establishing schedulability model, electronic equipment and storage medium
JP6771413B2 (en) Software verification device and software verification program
WatsonWriting high-performance. NET code
Bianchi et al.An ASM-based model for grid job management
Dorier et al.Supporting task-level fault-tolerance in HPC workflows by launching MPI jobs inside MPI jobs
CN111580409A (en) A fault simulation test method for real-time embedded systems
Yuqing et al.The research of performance test method for Linux process scheduling
Nikolaidis et al.Event-driven chaos testing for containerized applications
MosA framework for adaptive monitoring and performance management of component-based enterprise applications
CN111881025A (en)Automatic test task scheduling method, device and system
CN101043390A (en)Grid system performance detection process and grid system performance detection control device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change of applicant information

Country or region after:China

Address after:3 / F, 665 Zhangjiang Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai

Applicant after:Yunhe Zhiwang (Shanghai) Technology Co.,Ltd.

Address before:310016 room 107, building D, integrated circuit design Industrial Park, No. 858, Jianshe Second Road, Xiaoshan Economic and Technological Development Zone, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant before:Hangzhou yunhezhi Network Technology Co.,Ltd.

Country or region before:China


[8]ページ先頭

©2009-2025 Movatter.jp