CN1549119A - Logic simulation test system and method - Google Patents
Logic simulation test system and method Download PDFInfo
- Publication number
- CN1549119A CN1549119A CNA031228852A CN03122885A CN1549119A CN 1549119 A CN1549119 A CN 1549119A CN A031228852 A CNA031228852 A CN A031228852A CN 03122885 A CN03122885 A CN 03122885A CN 1549119 A CN1549119 A CN 1549119A
- Authority
- CN
- China
- Prior art keywords
- module
- message
- stimulus
- test
- analysis
- 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.)
- Granted
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
本发明的逻辑仿真测试系统,通过用户的主脚本文件来完成包含在仿真器模块中的待测试逻辑的测试,其中,该系统包含有:控制模块,用来解释执行该主脚本文件和控制下述的各个模块;报文数据库模块,用来实现报文数据的存储和读取、检索和显示、保存到文件和从文件中加载;CPU配置模块,用来实现数据的读写和中断;若干个激励模块,用来构造激励报文;仿真器模块,用来对输入的激励报文完成仿真处理测试,并输出测试后的报文;若干个分析模块,用来分析测试后的报文,并将分析结果输出。本发明用户编写的测试代码比较简单并且代码量少,测试代码采用TCL脚本编写,不需要编译,搭建仿真系统投入的时间大大减少。
The logic simulation test system of the present invention completes the test of the logic to be tested contained in the emulator module through the user's main script file, wherein, the system includes: a control module for explaining and executing the main script file and controlling The various modules described above; the message database module is used to realize the storage and reading, retrieval and display of message data, saving to and loading from files; the CPU configuration module is used to realize data reading and writing and interruption; A stimulus module, used to construct the stimulus message; an emulator module, used to complete the simulation processing test on the input stimulus message, and output the message after the test; several analysis modules, used to analyze the message after the test, and output the analysis results. The test code written by the user in the present invention is relatively simple and has a small amount of code. The test code is written by TCL script without compiling, and the time invested in building the simulation system is greatly reduced.
Description
技术领域technical field
本发明涉及设备测试领域,具体来说是涉及一种模块化的逻辑仿真测试系统和方法。The invention relates to the field of equipment testing, in particular to a modular logic simulation testing system and method.
背景技术Background technique
如今大量的通讯类大规模逻辑得到了广泛的使用,在投入使用前要对该种通讯类大规模逻辑的功能进行仿真测试,测试时大量的工作是编写由激励产生功能和结果分析功能组成的测试代码,然后进行测试。Nowadays, a large number of large-scale communication logics are widely used. Before putting them into use, the functions of this large-scale communication logic should be simulated and tested. During the test, a lot of work is to write a program consisting of incentive generation functions and result analysis functions. Test the code, and test it.
现有的测试方法主要是首先由测试人员编写测试代码,然后将该测试代码输入非模块化的逻辑验证系统来完成测试。如图1所示为目前应用非常广泛的Zaiq公司采用的逻辑验证系统的结构框图,其包括有三部分:C测试代码部分、接口层部分、通用的HDL(Hardware Design Language:硬件设计语言)仿真部分。Existing testing methods are mainly to first write test codes by testers, and then input the test codes into a non-modular logic verification system to complete the test. As shown in Figure 1, the structural block diagram of the logic verification system adopted by Zaiq Company, which is widely used at present, includes three parts: the C test code part, the interface layer part, and the general HDL (Hardware Design Language: hardware design language) simulation part .
C测试代码部分包括用户实现测试目的测试用例代码、实现数据传递交换的接口函数(包括:TX测试函数、RX测试函数、CPU测试函数)、环境控制、报文记录库。测试用例代码调用数据交换接口函数,实现数据的收发,调用TX测试函数发送激励数据,将产生的激励数据传递给被测试逻辑;调用RX测试函数实现数据接收,接收被测试逻辑传递过来的数据,完成接收数据分析;调用CPU测试函数实现CPU接口的数据读写和中断。数据交换接口函数,是用户根据特定激励数据格式的要求,调用接口层提供的编程接口,编码而成。报文记录库用于记录激励报文的相关信息,比如收发端口、收发时间、报文构造数据,报文序列号等。环境控制部分,实现模块之间的消息传递和同步,仿真器控制,消息记录等。The C test code part includes the test case code for the user to realize the test purpose, the interface function to realize the data transmission and exchange (including: TX test function, RX test function, CPU test function), environment control, and message recording library. The test case code calls the data exchange interface function to realize the sending and receiving of data, calls the TX test function to send the stimulus data, and passes the generated stimulus data to the logic under test; calls the RX test function to realize data reception, and receives the data passed by the logic under test, Complete the receiving data analysis; call the CPU test function to realize the data reading and writing and interrupt of the CPU interface. The data exchange interface function is coded by the user by calling the programming interface provided by the interface layer according to the requirements of the specific incentive data format. The message record library is used to record relevant information of incentive messages, such as sending and receiving ports, sending and receiving time, message structure data, message serial number, etc. The environment control part realizes message transmission and synchronization between modules, emulator control, message recording, etc.
接口层部分,实现上述的C测试代码部分的数据和下述的HDL仿真部分数据的交换,存在于该逻辑验证系统的内核,对于用户来说是一些编程接口。The interface layer part, which realizes the data exchange of the above-mentioned C test code part and the following HDL simulation part data, exists in the core of the logic verification system, and is some programming interfaces for users.
HDL仿真部分,包含TX数据交换接口、RX数据交换接口、CPU数据交换接口、被仿真测试的逻辑。其中TX数据交换接口、RX数据交换接口、CPU数据交换接口是用户用HDL语言编写实现的,用于将数据转换成时序信号传递给被仿真测试的逻辑,或者从被测试逻辑接收时序信号转换成数据。HDL仿真部分的模块也是用HDL语言编码实现,在通用仿真器软件环境中运行,仿真硬件的行为。The HDL simulation part includes TX data exchange interface, RX data exchange interface, CPU data exchange interface, and the logic to be simulated and tested. Among them, the TX data exchange interface, RX data exchange interface, and CPU data exchange interface are written and implemented by the user in HDL language, and are used to convert data into timing signals and transmit them to the logic to be simulated, or receive timing signals from the logic under test and convert them into data. The modules of the HDL simulation part are also coded in HDL language and run in the general simulator software environment to simulate the behavior of the hardware.
该逻辑验证系统提供了许多底层函数,比如报文数据结构定义、报文构造函数、同步机制函数等,测试人员使用这些函数编写C测试代码。The logic verification system provides many low-level functions, such as message data structure definition, message constructor, synchronization mechanism functions, etc. Testers use these functions to write C test codes.
虽然上述现有技术在一定程度上达到了测试代码共享,提高了测试效率,但是其仍然存在许多不足。首先由于为一个通讯类大规模逻辑项目编写一套测试代码,现有技术没有形成模块化组件,只是提供了编程的底层函数,测试人员不得不熟悉很多函数;而测试代码和被仿真的逻辑相关,测试代码重用度很低、可重复性很差;另外,各功能模块没有明确的编程指导或接口规范,只是提出大概的分工,实现的功能主要由用户根据具体的项目要求进行设计,因此编程工作量很大。其次对逻辑测试人员的编程技术要求很高,可是通常逻辑测试人员是硬件工程师,对软件编程不是很擅长,这更增加了逻辑仿真测试工作的难度和不便,造成测试效率低下。Although the above prior art achieves test code sharing to a certain extent and improves test efficiency, it still has many deficiencies. First of all, because a set of test codes is written for a large-scale communication-type logic project, the existing technology does not form modular components, but only provides the underlying functions of programming, and testers have to be familiar with many functions; and the test code is related to the simulated logic. , the test code reuse is very low, and the repeatability is very poor; in addition, there is no clear programming guidance or interface specification for each functional module, only a rough division of labor is proposed, and the realized functions are mainly designed by the user according to the specific project requirements, so programming Heavy workload. Secondly, the programming skills of logic testers are very high, but usually logic testers are hardware engineers and are not very good at software programming, which increases the difficulty and inconvenience of logic simulation testing, resulting in low testing efficiency.
发明内容Contents of the invention
本发明的主要目的是提供一种测试人员只需编写和待测试逻辑相关的少量代码的主脚本文件,以解决现有技术存在的测试代码重用度低、可重复性差、编程工作量大和测试效率低下等问题,就能自动完成仿真逻辑的测试和分析的模块化的逻辑仿真测试系统和方法。The main purpose of the present invention is to provide a main script file in which testers only need to write a small amount of code related to the logic to be tested, so as to solve the problems of low test code reuse, poor repeatability, large programming workload and test efficiency in the prior art A modularized logic simulation test system and method that can automatically complete the test and analysis of simulation logic if problems such as inferiority are solved.
为实现上述目的,本发明的解决方案是:To achieve the above object, the solution of the present invention is:
一种逻辑仿真测试系统,通过用户的主脚本文件来完成包含在仿真器模块中的待测试逻辑的测试,其中,该系统包含有:A logic simulation test system, through the user's main script file to complete the test of the logic to be tested contained in the simulator module, wherein, the system includes:
控制模块,用来解释执行该主脚本文件和控制下述的各个模块;The control module is used to explain and execute the main script file and control the following modules;
报文数据库模块,用来实现报文数据的存储和读取、检索和显示、保存到文件和从文件中加载;Message database module, used to store and read message data, retrieve and display, save to file and load from file;
CPU配置模块,用来实现数据的读写和中断;CPU configuration module, used to realize data reading and writing and interrupt;
若干个激励模块,用来构造激励报文;Several incentive modules are used to construct incentive messages;
仿真器模块,用来对输入的激励报文完成仿真处理测试,并输出测试后的报文;The emulator module is used to complete the simulation processing test on the input stimulus message, and output the message after the test;
若干个分析模块,用来分析测试后的报文,并将分析结果输出;Several analysis modules are used to analyze the tested messages and output the analysis results;
所述的仿真器模块中的HDL代码模块向控制模块发出测试激励请求,该控制模块转发该测试激励请求至相应的激励模块,该激励模块构造激励报文,将报文数据信息存储至所述的报文数据库模块,且将该激励报文发送至所述的仿真器模块,由在仿真器模块中运行的HDL代码模块读取并处理输入报文,并输出处理后的报文至相应的分析模块,该分析模块分析被测试逻辑处理后的报文,将分析结果在所述的CPU配置模块的控制下保存到报文数据库模块。The HDL code module in the emulator module sends a test stimulus request to the control module, and the control module forwards the test stimulus request to a corresponding stimulus module, and the stimulus module constructs a stimulus message, and stores the message data information in the message database module, and send the stimulus message to the emulator module, read and process the input message by the HDL code module running in the emulator module, and output the processed message to the corresponding An analysis module, which analyzes the message processed by the test logic, and saves the analysis result to the message database module under the control of the CPU configuration module.
其中,所述的激励模块包含有相应的含有TCL脚本的报文构造器。该激励模块通过调度内部数据流,得到被选中的数据流的参数,再调用该报文构造器,即产生所述的激励报文。Wherein, the incentive module includes a corresponding message constructor containing a TCL script. The incentive module obtains the parameters of the selected data stream by scheduling the internal data stream, and then invokes the message constructor to generate the incentive message.
该系统还进一步包括:用于进一步验证待测试逻辑对激励报文的处理的用户验证模块,所述的激励模块将激励报文传递给用户验证模块,得到该报文的预期处理结果,激励模块将预期处理结果保存到报文数据库;所述的分析模块将原始的激励报文和测试后的报文传递至该用户验证模块,该用户验证模块完成待测试逻辑对激励报文处理的进一步验证,并将验证结果返回给所述的分析模块。所述的分析模块根据报文库中报文的记录数据,自动完成对报文的一些行为的分析。The system further includes: a user verification module for further verifying the processing of the logic to be tested on the incentive message, the incentive module transmits the incentive message to the user verification module to obtain the expected processing result of the message, and the incentive module Save the expected processing result to the message database; the analysis module transmits the original incentive message and the tested message to the user verification module, and the user verification module completes further verification of the processing of the incentive message by the logic to be tested , and return the verification result to the analysis module. The analysis module automatically completes the analysis of some behaviors of the message according to the record data of the message in the message database.
所述的控制模块和所述的激励模块、分析模块、CPU配置模块之间的连接是通过基类模块来进行的。而所述的用户验证模块和所述的激励模块、分析模块之间的连接是通过基类模块来进行的。The connection between the control module, the excitation module, the analysis module and the CPU configuration module is carried out through the base class module. The connection between the user verification module, the incentive module and the analysis module is carried out through the base class module.
另外,本发明的一种逻辑仿真测试方法,通过用户的主脚本文件来完成包含在仿真器模块中的待测试逻辑的测试,其中,该方法包含如下步骤:In addition, a kind of logic simulation test method of the present invention, completes the test of the logic to be tested contained in the emulator module through the main script file of the user, wherein, this method comprises the following steps:
a、解释执行主脚本文件,然后根据主脚本文件建立激励模块对象和分析模块对象,并按照其中的参数对该激励模块对象和分析模块对象进行配置;a. Interpret and execute the main script file, then establish the stimulus module object and the analysis module object according to the main script file, and configure the stimulus module object and the analysis module object according to the parameters therein;
b、仿真器模块发出测试服务请求,且送至该激励模块对象;b. The emulator module sends a test service request and sends it to the stimulus module object;
c、该激励模块对象根据该测试服务请求构造激励报文,将该激励报文送至仿真器模块;c. The stimulus module object constructs a stimulus message according to the test service request, and sends the stimulus message to the emulator module;
d、仿真器模块对输入的该激励报文根据HDL代码描述的硬件行为完成仿真处理,将处理后的报文送至相应的分析激励模块对象;d. The emulator module completes simulation processing for the input stimulus message according to the hardware behavior described by the HDL code, and sends the processed message to the corresponding analysis stimulus module object;
e、该分析模块对象分析该处理后的报文,并将分析结果输出。e. The analysis module object analyzes the processed message, and outputs the analysis result.
其中所述步骤a中的建立激励模块对象和分析模块对象是指建立若干个相应的激励模块对象和分析模块对象。The establishment of the incentive module object and the analysis module object in the step a refers to the establishment of several corresponding incentive module objects and analysis module objects.
所述步骤c中的构造激励报文是通过调度各激励模块对象内的激励数据流,再调用相应的TCL脚本进行报文构造,来产生所述的激励报文。The construction of the incentive message in the step c is to generate the incentive message by scheduling the incentive data flow in each incentive module object, and then calling the corresponding TCL script to construct the message.
所述步骤e中的分析该测试后的报文更具体包括:The message after analyzing the test in the step e more specifically includes:
e1、对该测试后的报文进行协议符合性分析,如果为切片报文,则进行报文重组,得到完整的报文;e1. Perform protocol compliance analysis on the tested message, if it is a sliced message, reassemble the message to obtain a complete message;
e2、对该完整的报文进行解析,提取出插入标签,获得报文净荷;e2. Analyzing the complete message, extracting the inserted label, and obtaining the payload of the message;
e3、验证该报文净荷,得到分析结果。e3. Verify the message payload, and obtain the analysis result.
其中,所述步骤e的步骤e1中更进一步包括:如果该测试后的报文是待测试逻辑自动插入的报文,则由用户辅助验证;否则继续。Wherein, the step e1 of the step e further includes: if the tested message is a message automatically inserted by the logic to be tested, the verification is assisted by the user; otherwise, continue.
本发明建立在对被测试对象的充分调研和充分分析上,提取出被测试对象的共性以及验证策略的共性,从而设计出固定的模块组件,并制订了模块间接口标准,使得系统模块化,并且可以后期添加(或开发)新的模块补充进来,而不需要对平台原来的模块重新编译。激励模块和分析模块在激励产生和报文分析方面,容易在逻辑项目之间共享。用户编写的测试代码比较简单并且代码量少,测试代码采用TCL脚本编写,不需要编译。使用本发明设计的系统,搭建仿真系统投入的时间大大减少,使得测试人员可以将大部分精力主要投入到测试条目的设计上。The present invention is based on the full investigation and analysis of the tested objects, and extracts the commonness of the tested objects and the commonness of the verification strategy, thereby designing fixed module components, and formulating the inter-module interface standard, so that the system is modularized, And new modules can be added (or developed) later without recompiling the original modules of the platform. Stimulus modules and analysis modules are easily shared between logic projects for stimulus generation and message analysis. The test code written by the user is relatively simple and has a small amount of code. The test code is written in TCL script and does not need to be compiled. By using the system designed by the invention, the time invested in building the simulation system is greatly reduced, so that testers can devote most of their energy to the design of test items.
下面结合附图和具体实施例来详细描述本发明。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.
附图说明Description of drawings
图1为现有的逻辑验证系统的结构框图;Fig. 1 is the structural block diagram of existing logic verification system;
图2是本发明所述的逻辑仿真测试系统的结构框图;Fig. 2 is the structural block diagram of logic simulation testing system of the present invention;
图3是本发明所述的逻辑仿真测试方法的流程图;Fig. 3 is the flow chart of logic simulation testing method of the present invention;
图4是本发明所述的控制模块、激励模块、仿真器模块之间的数据交换示意图;Fig. 4 is a schematic diagram of data exchange between the control module, the excitation module, and the emulator module of the present invention;
图5是本发明所述的激励模块的报文构造过程示意图。Fig. 5 is a schematic diagram of the message construction process of the excitation module according to the present invention.
具体实施方式Detailed ways
如图2所示本发明实施例所述的逻辑仿真测试系统的结构框图,其主要由一控制模块、一报文数据库模块、一CPU配置模块、一激励模块、一仿真器模块、一分析模块和一用户验证模块构成,其中:The structural block diagram of the logic simulation test system described in the embodiment of the present invention as shown in Figure 2, it is mainly by a control module, a message database module, a CPU configuration module, an excitation module, an emulator module, an analysis module and a user authentication module, wherein:
控制模块,用来解释执行该主脚本文件和控制下述的各个模块;The control module is used to explain and execute the main script file and control the following modules;
报文数据库模块,用来实现报文数据的存储和读取、检索和显示、保存到文件和从文件中加载;Message database module, used to store and read message data, retrieve and display, save to file and load from file;
CPU配置模块,用来实现数据的读写和中断处理;CPU configuration module, used to realize data reading and writing and interrupt processing;
激励模块,用来构造激励报文;An incentive module, used to construct an incentive message;
仿真器模块,用来对输入的激励报文根据HDL代码描述的硬件行为完成仿真处理,将处理后的报文送至相应的分析模块;该仿真器模块是一个仿真环境,使用通用的第三方HDL仿真软件,用来仿真HDL代码描述的硬件行为,该部分实现的功能是仿真被测试逻辑处理输入激励报文,仿真该逻辑的输出响应。HDL代码包括被测试逻辑DUV和多个总线接口模块BFM。The emulator module is used to complete the simulation processing of the input stimulus message according to the hardware behavior described by the HDL code, and send the processed message to the corresponding analysis module; the emulator module is a simulation environment, using a common third-party HDL simulation software is used to simulate the hardware behavior described by the HDL code. The function of this part is to simulate the logic under test to process the input stimulus message and simulate the output response of the logic. The HDL code includes the logic DUV under test and multiple bus interface modules BFM.
分析模块,用来分析仿真器模块处理后的报文,并将分析结果输出;The analysis module is used to analyze the message processed by the emulator module and output the analysis result;
用户验证模块,用来进一步验证待测试逻辑对激励报文的处理,为分析模块实现自动分析报文的某些行为,提供分析条件。The user verification module is used to further verify the processing of the incentive message by the logic to be tested, and provides analysis conditions for the analysis module to automatically analyze certain behaviors of the message.
上述的控制模块、报文数据库模块是基础模块,是固定不变的,该控制模块包含有用于处理用户界面操作的用户界面服务模块和用于处理数据交换请求的数据交换服务模块,该用户界面服务模块可以在仿真过程中查看统计数据而不影响仿真的进行,该数据交换服务模块将数据交换请求转发给相应的激励模块或分析模块(即目标模块),目标模块产生激励或处理接收数据;而CPU配置模块,系统提供一个基本模块实现读写和中断,在实际的逻辑测试中,测试人员在此基本模块的基础上添加所需的功能,比如实现某种报文的收发、根据逻辑运行状态而对逻辑实施的动态控制等等。The above-mentioned control module and message database module are basic modules and are fixed. The control module includes a user interface service module for processing user interface operations and a data exchange service module for processing data exchange requests. The user interface The service module can view statistical data during the simulation process without affecting the simulation. The data exchange service module forwards the data exchange request to the corresponding stimulus module or analysis module (ie, the target module), and the target module generates stimulus or processes the received data; As for the CPU configuration module, the system provides a basic module for reading, writing and interrupting. In the actual logic test, the tester adds the required functions on the basis of this basic module, such as realizing the sending and receiving of certain messages and running according to the logic. State and dynamic control over logic, and so on.
报文数据库模块主要实现报文记录数据的存储和读取、检索和显示、保存到文件和从文件加载。核心是报文记录数据结构的定义,这些记录数据支持激励模块和分析模块完成结果的自动分析。The message database module mainly implements the storage and reading of message record data, retrieval and display, saving to and loading from files. The core is the definition of the message record data structure, which supports the automatic analysis of the results completed by the incentive module and the analysis module.
另外激励模块、分析模块可以有很多个,可以后期添加。对于一个逻辑项目测试,通常有多种不同的激励模块和多种不同的分析模块,用户根据需要例化出这些激励模块和分析模块的实体即可,本实施例只给出了一个激励模块和一个分析模块的情形。如果开发新的激励或分析模块可以在原来的模块基类上派生即可,但这些模块的基类定义,主要是定义了模块的接口,控制模块访问后期添加的模块能通过基类模块的接口进行。In addition, there can be many incentive modules and analysis modules, which can be added later. For a logic project test, there are usually many different stimulus modules and many different analysis modules. Users can instantiate the entities of these stimulus modules and analysis modules according to their needs. This embodiment only provides one stimulus module and The case of an analysis module. If a new stimulus or analysis module is developed, it can be derived from the base class of the original module, but the base class definition of these modules mainly defines the interface of the module, and the control module can access the modules added later through the interface of the base class module conduct.
图2中的仿真器模块,是待测试逻辑DUV(Design Under verfica Tion)+testbench(测试平台)+仿真器,属于仿真器的控制范围;其中,待测试逻辑DUV是由硬件语言VERILOG或者VHDL编写出的程序,testbench主要由BFM(Bus Bunction Module:总线功能模型)组成,其完成的功能是从激励模块取得(行为级的)激励数据,将行为级的激励数据(相对于比特位流数据)变换成一组时序信号(或电平信号),传递给DUV;BFM接收DUV输出的时序信号,转换成行为级的数据,将行为级的数据传递给分析模块。仿真器负责解释执行DUV+testbench,仿真逻辑的行为。The emulator module in Figure 2 is the logic to be tested DUV (Design Under verfica Tion) + testbench (test platform) + emulator, which belongs to the control range of the emulator; where the logic DUV to be tested is written by the hardware language VERILOG or VHDL Out of the program, testbench is mainly composed of BFM (Bus Bunction Module: bus function model), and its completed function is to obtain (behavior-level) stimulus data from the stimulus module, and convert the behavior-level stimulus data (relative to bit stream data) Transform into a set of timing signals (or level signals) and pass them to DUV; BFM receives the timing signals output by DUV, converts them into behavior-level data, and passes the behavior-level data to the analysis module. The emulator is responsible for explaining the behavior of executing DUV+testbench and simulating logic.
用户验证模块是测试人员根据具体的逻辑项目特点自己编写测试代码实现的模块,主要完成与被仿真逻辑特定行为有关的验证。比如逻辑修改了以太网报文的目的MAC地址,修改是否正确需要用户验证模块进行分析。该模块可以不作为仿真测试系统组成的必备部件,此时仿真测试系统只是对用户验证模块的接口进行了定义,如接口定义的描述如下:输入原始报文得到预期出口列表和预期拷贝数;输入原始报文和报文入口,输入接收报文和报文出口,得到验证是否通过的消息或出错信息。而用户验证模块与激励模块和分析模块的接口是一个标准化的接口,可以通过定义一个用户验证模块的基类,对于不同的逻辑测试项目,用户在此基类的基础上派生出具体的用户验证模块。用户可以通过主脚本文件中的脚本命令,命令用户验证模块加载配表数据或实现其它功能。The user verification module is a module implemented by testers who write test codes according to the characteristics of specific logic projects. It mainly completes the verification related to the specific behavior of the simulated logic. For example, if the destination MAC address of the Ethernet message is modified logically, the user verification module needs to analyze whether the modification is correct. This module may not be used as an essential part of the simulation test system. At this time, the simulation test system only defines the interface of the user verification module. For example, the description of the interface definition is as follows: input the original message to obtain the expected export list and expected copy number; Input the original message and the message entry, input the received message and the message exit, and get the message or error message whether the verification is passed or not. The interface between the user verification module, the incentive module and the analysis module is a standardized interface. By defining a base class of the user verification module, for different logic test items, the user can derive specific user verification based on this base class. module. The user can order the user verification module to load the table data or realize other functions through the script command in the main script file.
需要明确地是,这里传递给用户验证模块的报文,都是完整的报文,比如UTOPIA分析模块传递给用户验证模块的接收报文是信元重组后的AAL封装形式的报文,而不是信元或从AAL PAYLOAD中提取出的IP或以太网报文。It needs to be clear that the messages passed to the user verification module here are all complete messages. For example, the received message passed by the UTOPIA analysis module to the user verification module is a message in the form of AAL encapsulation after cell reorganization, rather than Cells or IP or Ethernet packets extracted from AAL PAYLOAD.
图2中的仿真器模块等效为一个可以工作的逻辑芯片,它能够处理输入数据,并输出结果数据。逻辑芯片有数个数据输入口,和数个数据输出口,每个数据输入口和数据输出口都有相应的BFM对接。BFM是实现行为级激励数据和时序级信号相互转换的功能,是连接逻辑芯片与激励模块和分析模块的接口桥梁。每个向逻辑芯片输送激励数据的BFM对应一个激励模块的实例,每个从逻辑芯片接收数据的的BFM对应一个分析模块的实例。逻辑芯片一般都有CPU接口,外部CPU通过该接口对逻辑芯片进行读写操作,因此有一个BFM与逻辑芯片的CPU口对接。CPU配置模块模仿逻辑芯片的外部CPU,对逻辑芯片进行读写操作。基本的CPU配置模块只实现读写接口,用户可以利用这些接口,实现对逻辑芯片的复杂控制。The emulator module in Figure 2 is equivalent to a working logic chip, which can process input data and output result data. The logic chip has several data input ports and several data output ports, and each data input port and data output port has a corresponding BFM connection. BFM is a function to realize the mutual conversion between behavior-level stimulus data and timing-level signals, and is an interface bridge connecting logic chips with stimulus modules and analysis modules. Each BFM that delivers stimulus data to the logic chip corresponds to an instance of the stimulus module, and each BFM that receives data from the logic chip corresponds to an instance of the analysis module. A logic chip generally has a CPU interface through which an external CPU can read and write to the logic chip. Therefore, a BFM is connected to the CPU port of the logic chip. The CPU configuration module imitates the external CPU of the logic chip, and performs read and write operations on the logic chip. The basic CPU configuration module only implements read and write interfaces, and users can use these interfaces to realize complex control of logic chips.
本实施例中的逻辑芯片有自己特定的数据输入接口和数据输出接口,数据接口的类型有很多种,每一种接口类型都定义了一组接口信号和时序,比如UTOPIA L1 ATM接口、MII接口。每一种类型的数据输入接口,逻辑仿真测试系统都需要提供一种对应激励模块;每一种类型的数据输出接口,逻辑仿真测试系统都需要提供一种对应分析模块。The logic chip in this embodiment has its own specific data input interface and data output interface. There are many types of data interfaces. Each interface type defines a set of interface signals and timing, such as UTOPIA L1 ATM interface and MII interface. . For each type of data input interface, the logic simulation test system needs to provide a corresponding stimulus module; for each type of data output interface, the logic simulation test system needs to provide a corresponding analysis module.
使用逻辑仿真测试系统进行逻辑仿真测试之前,必须建立激励模块实例、分析模块实例、CPU配置模块实例,以及设置每个实例的参数,其称为配置操作。用户根据逻辑芯片的接口类型,在逻辑仿真测试系统的图形界面上,选择激励模块类型建立激励模块实例,同样建立分析模块的实例、CPU模块的实例。每个实例在建立时,要求输入实例的名称,名称必须唯一,不能重名。Before using the logic simulation test system for logic simulation testing, it is necessary to create instances of the stimulus module, analysis module, and CPU configuration module, and set the parameters of each instance, which is called configuration operation. According to the interface type of the logic chip, the user selects the stimulus module type on the graphical interface of the logic simulation test system to create an example of the stimulus module, and also creates an example of the analysis module and a CPU module. When each instance is created, it is required to enter the name of the instance, which must be unique and cannot be duplicated.
如前所述,激励或分析模块的实例是与BFM一一对应的,存在一个绑定关系,这个绑定是通过名称实现的,每个BFM内有一个参数,该参数的值就是对应实例的名称。完成激励和分析模块、CPU模块实例建立后,可以打开每个实例的图形界面,进行参数配置。逻辑仿真测试系统可以将每个模块的参数,以及用户建立的激励模块实例、分析模块实例、CPU配置模块实例等相关参数保存成一个参数配置文件。当逻辑仿真测试系统启动时,可以加载该参数配置文件,恢复以前的配置。As mentioned above, the instance of the excitation or analysis module corresponds to the BFM one by one, and there is a binding relationship. This binding is realized through the name. There is a parameter in each BFM, and the value of the parameter is the value of the corresponding instance. name. After the stimulus and analysis module and the CPU module instance are established, the graphical interface of each instance can be opened for parameter configuration. The logic simulation test system can save the parameters of each module, as well as relevant parameters such as the excitation module instance, the analysis module instance, and the CPU configuration module instance created by the user into a parameter configuration file. When the logic simulation test system is started, the parameter configuration file can be loaded to restore the previous configuration.
如图3所示,本发明实施例所述的逻辑仿真测试系统是通过如下的步骤来实现测试的。As shown in FIG. 3 , the logic simulation test system described in the embodiment of the present invention implements the test through the following steps.
第一、解释执行主脚本文件,然后根据主脚本文件建立激励模块对象和分析模块对象,并按照其中的参数对该激励模块对象和分析模块对象进行配置。First, explain and execute the main script file, and then establish the stimulus module object and the analysis module object according to the main script file, and configure the stimulus module object and the analysis module object according to the parameters therein.
主脚本文件的示例如下:An example of a main script file is as follows:
1. Lcfg(cfg_filename) --加载配置数据
2. onbreak{ --参看仿真模块的控制模块详细设计
部分
3. If{brkmsg==″note″} {resume}else{
a) Set result″error″
(b) Writechkmsg(result) --将信息写入专用LOG文件和该用例
的LOG文件。
(c) Exit_test --退出
b) }
4. run
5. #改变配置参数的命令
6. ..............
7. Run
8. #改变配置参数的命令
9. ..............
10. set result[auto_check] --结果=″ok″或″error″
11. #判断auto_check验证的结果是否正确,写成功或失败的信息到
记录文件。
12. Writechkmsg(result) --将信息写入专用LOG文件和该用例的
LOG文件。
13. Exit_test --退出
1. Lcfg(cfg_filename) --load configuration data
2. onbreak{ --Refer to the detailed design of the control module of the simulation module
part
3. If{brkmsg=="note"} {resume}else{
a) Set result "error"
(b) Writechkmsg(result) -- write the information to the dedicated LOG file and the use case
LOG file.
(c) Exit_test -- exit
b) }
4. run
5. #Command to change configuration parameters
6. ..........
7. Run
8. #Command to change configuration parameters
9. ..............
10. set result[auto_check] --result = "ok" or "error"
11. #Judge whether the result of auto_check verification is correct, write success or failure information to
log file.
12. Writechkmsg(result) -- write the information into the dedicated LOG file and the
LOG file.
13. Exit_test -- exit
控制模块负责解释执行上述的脚本文件,控制逻辑仿真测试系统内各个模块的行为。逻辑仿真测试系统提供了许多TCL扩展命令,用户使用这些扩展命令和TCL固有命令编写仿真脚本。仿真平台的所有操作都可以通过扩展TCL命令实现。脚本文件并不直接负责建立激励产生和分析分析,但可以建立激励模块对象和分析模块对象,即建立激励模块和分析模块,所以每个脚本的代码并不多。重要的一点,在仿真逻辑测试执行完毕后,可以得到该测试用例是否通过的信息,并可以保存信息到指定文件。The control module is responsible for interpreting and executing the above-mentioned script files, and controlling the behavior of each module in the logic simulation test system. The logic simulation test system provides many TCL extension commands, and users use these extension commands and TCL intrinsic commands to write simulation scripts. All operations of the simulation platform can be realized by extending TCL commands. The script file is not directly responsible for creating stimulus generation and analysis, but it can create stimulus module objects and analysis module objects, that is, create stimulus modules and analysis modules, so there are not many codes for each script. The important point is that after the simulation logic test is executed, information about whether the test case is passed or not can be obtained, and the information can be saved to a specified file.
脚本中onbreak的解释如下所述:The interpretation of onbreak in the script is as follows:
激励模块和分析模块在收发报文数目达到用户设定的上限数目时,会向控制模块发送消息,该消息的级别为”note”。控制模块在接收到消息时就执行onbreak语句体。激励模块和分析模块在分析报文时如果发现错误,也会向控制模块发送消息,该消息的级别为”error”。用户编写onbreak语句体,可以处理这些消息,并能判断发送消息的模块实例名以及具体的消息内容,从而执行相关命令,比如修改某个模块的参数,或者结束仿真。Onbreak在”note”级别的消息处理后,通常会结束run命令的执行,使其返回,于是脚本继续执行下一条脚本语句。When the number of sent and received messages reaches the upper limit set by the user, the incentive module and the analysis module will send a message to the control module, and the level of the message is "note". The control module executes the onbreak statement body when receiving the message. If the stimulus module and the analysis module find an error when analyzing the message, they will also send a message to the control module, and the level of the message is "error". The user writes the body of the onbreak statement, which can process these messages, and can determine the module instance name and the specific message content that sent the message, so as to execute related commands, such as modifying the parameters of a certain module, or ending the simulation. Onbreak usually ends the execution of the run command after processing the message at the "note" level, making it return, so the script continues to execute the next script statement.
脚本中run命令的解释如下所述:The interpretation of the run command in the script is as follows:
脚本中的run命令比较特殊,它不会自动结束或返回,它一直等待onbreak语句体中resume命令的执行完成。在run命令执行期间,BFM向仿真平台发起的服务请求能够传递到控制模块,进而被处理。在非run命令执行期间,BFM向仿真平台发起的服务请求被阻塞,仿真器的运行也同时被阻塞。The run command in the script is quite special, it will not end or return automatically, it has been waiting for the execution of the resume command in the onbreak statement body to complete. During the execution of the run command, the service request initiated by the BFM to the simulation platform can be transmitted to the control module and then processed. During the execution of the non-run command, the service request initiated by the BFM to the simulation platform is blocked, and the operation of the emulator is also blocked at the same time.
脚本中auto_check命令的解释如下所述:The explanation of the auto_check command in the script is as follows:
该命令一般位于脚本的后部,在仿真结束时执行该命令。控制模块遍历每一个模块实例,调用它们的auto_check接口函数,每个模块实例进行内部状态检查,检查是否有错误。This command is generally located at the end of the script and is executed at the end of the simulation. The control module traverses each module instance, calls their auto_check interface function, and checks the internal state of each module instance to check whether there is an error.
第二、仿真器模块发出测试服务请求,且送至该激励模块对象。Second, the emulator module issues a test service request and sends it to the stimulus module object.
仿真器模块按照控制模块的指令发出测试服务请求,即testbench的BFM发出报文请求,是通过调用PLI接口程序实现的。PLI接口程序将BFM传递的参数,写入图4中的参数数据结构,然后向控制模块发起请求,再等待该请求处理完成的消息。下面是该BFM调用PLI接口程序的一个示例:The emulator module sends a test service request according to the instructions of the control module, that is, the BFM of the testbench sends a message request, which is realized by calling the PLI interface program. The PLI interface program writes the parameters passed by the BFM into the parameter data structure in Figure 4, then initiates a request to the control module, and waits for the message that the request is processed. The following is an example of the BFM calling the PLI interface program:
$mii_read_pkt(modulename,framegap,tx_frame_len,tx_frame_data);$mii_read_pkt(modulename, framegap, tx_frame_len, tx_frame_data);
如图4所示,PLI接口程序和激励模块(上式中的modulename)之间通过参数数据结构交换数据,PLI接口程序在填写报文请求参数数据结构中相关数据后,调用系统提供的接口函数发出请求(该函数执行期间,仿真软件的执行停止),控制模块的数据服务模块收到该激励请求后,控制模块从报文请求参数数据结构中得到目标模块(即激励模块实例)名,从而得到激励模块实例的句柄,然后调用激励模块实例的消息处理程序,将该激励请求送至该激励模块实例。As shown in Figure 4, the PLI interface program and the excitation module (modulename in the above formula) exchange data through the parameter data structure, and the PLI interface program calls the interface function provided by the system after filling in the relevant data in the message request parameter data structure Send a request (during the execution of this function, the execution of the simulation software stops), after the data service module of the control module receives the excitation request, the control module obtains the target module (i.e. the excitation module instance) name from the message request parameter data structure, thereby Get the handle of the stimulus module instance, then call the message processing program of the stimulus module instance, and send the stimulus request to the stimulus module instance.
第三、该激励模块对象根据该测试服务请求构造激励报文,将该激励报文写入前述报文请求参数数据结构中。Third, the stimulus module object constructs a stimulus message according to the test service request, and writes the stimulus message into the aforementioned message request parameter data structure.
各种激励模块在构造激励报文机制上是类似的,都是首先通过对流的调度,将多条流混合形成激励报文流。通常可以将具有一定特征的报文序列,定义为一条流。比如具有相同VLANID的报文可以定义为一条流,具有相同源MAC地址的报文序列也可以定义为一条流,或者将同时具有某几个属性的报文序列定义为一条流。对于一条流可以设置一些属性(如乱序、带宽、延时、突发、报文丢弃率),比如属于该流的所有报文经过逻辑的延时最大不能超过多少。Various incentive modules are similar in constructing the incentive message mechanism, they all first mix multiple streams to form an incentive message flow through convective scheduling. Usually, a packet sequence with certain characteristics can be defined as a stream. For example, packets with the same VLAN ID can be defined as a flow, a sequence of packets with the same source MAC address can also be defined as a flow, or a sequence of packets with certain attributes at the same time can be defined as a flow. Some attributes (such as out-of-order, bandwidth, delay, burst, packet discard rate) can be set for a flow, such as the maximum logical delay of all packets belonging to the flow.
其次对多个报文流进行汇聚,即形成输送给待测试逻辑的报文。在逻辑仿真中,为了产生符合实际的激励数据,通常我们定义多个流(在激励模块实例的参数配置界面中,设置流的个数和每个流的参数,这些参数称为激励模块实例的配置参数)。当激励模块实例接收到申请报文的请求时,就按照一定的调度算法对这些流进行调度,调度出来一个流,从该流取出用于报文构造的参数(参看图5),然后执行用户编写的报文构造脚本,同时传递前述的报文构造参数。用户编写报文构造脚本负责构造具体的报文,脚本本中必须使用仿真平台专用的报文构造命令,激励模块才能读取构造好的报文,脚本执行完毕,激励模块实例就得到了报文数据。调度出来的报文就可以作为激励报文输送给待测试逻辑。其中需要明确流的调度概念:并不是先产生流的报文序列,然后对各条报文流调度,而是根据流的属性数据,对流进行调度,当调度出一个流后,再根据流的部分具有编号性质的属性数据(即报文构造时所使用的参数),调用报文构造器,产生调度出的报文。例如UTOPIA L2激励模块,有多个子端口,每个子端口内有多个流,此时该激励模块需要实现子端口的调度,每个子端口再实现流的调度,子端口的调度与流的调度有类似之处。Secondly, multiple message streams are aggregated to form a message sent to the logic to be tested. In logic simulation, in order to generate realistic stimulus data, we usually define multiple streams (in the parameter configuration interface of the stimulus module instance, set the number of streams and the parameters of each stream, these parameters are called stimulus module instance configuration parameters). When the incentive module instance receives the request of the application message, it will schedule these flows according to a certain scheduling algorithm, schedule a flow, take out the parameters used for message construction from the flow (see Figure 5), and then execute the user Write the message construction script, and pass the aforementioned message construction parameters at the same time. The user writes the message construction script to be responsible for constructing the specific message. The script must use the special message construction command of the simulation platform, so that the stimulus module can read the constructed message. After the script is executed, the stimulus module instance gets the message data. The scheduled message can be sent to the logic to be tested as an incentive message. Among them, the concept of flow scheduling needs to be clarified: instead of generating the packet sequence of the flow first, and then scheduling each packet flow, the flow is scheduled according to the attribute data of the flow. Part of the attribute data with the nature of numbers (that is, the parameters used in the construction of the message) calls the message constructor to generate the dispatched message. For example, the UTOPIA L2 excitation module has multiple sub-ports, and each sub-port has multiple streams. At this time, the excitation module needs to implement sub-port scheduling, and each sub-port implements flow scheduling. The sub-port scheduling is related to the flow scheduling. Similarities.
本实施例的激励模块包含有相应的含有TCL脚本的报文构造器,该激励模块通过调度各激励模块产生的所需的激励数据流,再调用该报文构造器,即产生所述的激励报文。更具体来讲,如图5所示为报文构造过程示意图,该激励模块经过调度算法调度出所需的激励数据流,并取出流的参数,产生静荷Payload部分,在其前部插入一个标签,标签定义如下:The incentive module of the present embodiment includes a corresponding message constructor containing TCL scripts, and the incentive module schedules the required incentive data streams generated by each incentive module, and then calls the message constructor to generate the incentive message. More specifically, as shown in Figure 5, it is a schematic diagram of the message construction process. The incentive module schedules the required incentive data flow through the scheduling algorithm, and takes out the parameters of the flow, generates the payload part, and inserts a Label, the label is defined as follows:
特征数据(F55F)(2个字节)+FSN(报文序列号)(3字节)+校验码(前5个字节累加的和)(1个字节)+净荷长度(2字节)+后面净荷的CRC32(4字节);Feature data (F55F) (2 bytes) + FSN (message sequence number) (3 bytes) + check code (sum of the first 5 bytes) (1 byte) + payload length (2 bytes) byte) + CRC32 (4 bytes) of the following payload;
其中流的属性参数是为了支持QOS(Quality Of Services:服务质量)属性(如乱序、带宽、延时、突发、报文丢弃率)的测试,用户在控制模块的用户界面服务模块或通过脚本命令可以设置各个流的属性参数,这些参数(如用户要求的带宽、突发)将控制流的调度,在分析模块进行结果自动分析时也会用到这些参数(如检查实际带宽、乱序、延时要求、报文丢弃率)。Among them, the attribute parameter of the flow is to support the test of QOS (Quality Of Services: quality of service) attributes (such as out-of-order, bandwidth, delay, burst, and message discarding rate). Script commands can set the attribute parameters of each flow. These parameters (such as the bandwidth required by the user, burst) will control the scheduling of the flow. These parameters will also be used when the analysis module performs automatic analysis of the results (such as checking the actual , delay requirements, packet discard rate).
接着将其参数和静荷Payload部分传递给外部的TCL脚本,通过TCL脚本报文构造函数然后返回,即得到所需的激励报文。其中产生报文的TCL代码可以采用如下的方式编写:Then pass its parameters and static load Payload to the external TCL script, and then return through the TCL script message constructor to obtain the required incentive message. The TCL code that generates the message can be written in the following way:
#------------------------------------------
#port_sn端口编号,假定编号1和2的端口是两个MII口,向逻辑发送
以太网报文
#last_txpkt_sn是报文在流内的序号。
#flow_sn是流在端口内的序号
#port_sn、last_txpkt_sn、flow_sn定义为TCL脚本全局变量,并和主
模块内的对应全局变量进行连接,激励模块将流的对应参数赋值给主模
块的这些全局变量。
#------------------------------------------
proc mii_pkt_build{}{
if($port_sn<3){
#to_hex扩展命令用于将输入的十进制参数,形成16进制字符串,
返回的字符个数,由第二个参数控制。
set temp1[to_hex $last_txpkt_sn 6]
set temp2[to_hex $flow_sn 6]
set dmac $temp2$temp1
set smac[to_hex $port_sn 12]
#create_mac是扩展的报文构造命令。未指定的参数,按照缺省规
则构造报文。参看MII激励模块使用手册。产生后的报文保存在主模块的
全局报文缓冲区中,激励模块可以从该缓冲区读取产生的报文。
create_mac-dmac Ox$dmac-smac Ox$smac
#如果将create_mac产生的报文封装为AAL5,则继续:
create_aal5
<!-- SIPO <DP n="13"> -->
<dp n="d13"/>
#create_aal5扩展命令能够识别create_mac产生的报文类型,并产生
合适的封装。
}
}
#--------------------------------------------------
#------------------------------------------
#port_sn port number, assuming that ports numbered 1 and 2 are two MII ports, send to the logic
Ethernet telegram
#last_txpkt_sn is the serial number of the packet in the stream.
#flow_sn is the serial number of the flow in the port
#port_sn, last_txpkt_sn, flow_sn are defined as TCL script global variables, and
The corresponding global variables in the module are connected, and the incentive module assigns the corresponding parameters of the flow to the main module
These global variables of the block.
#------------------------------------------
proc mii_pkt_build{}{
if($port_sn<3){
The #to_hex extension command is used to convert the input decimal parameters into a hexadecimal string,
The number of characters returned is controlled by the second parameter.
set temp1[to_hex $last_txpkt_sn 6]
set temp2[to_hex $flow_sn 6]
set dmac $temp2$temp1
set smac[to_hex $port_sn 12]
#create_mac is an extended message construction command. Unspecified parameters, according to the default rules
Then construct the message. Refer to the MII stimulus module user manual. The generated message is saved in the main module
In the global message buffer, the stimulus module can read the generated messages from this buffer.
create_mac-dmac Ox$dmac-smac Ox$smac
#If the packet generated by create_mac is encapsulated as AAL5, continue:
create_aal5
<!-- SIPO <DP n="13"> -->
<dp n="d13"/>
#create_aal5 The extended command can identify the message type generated by create_mac and generate
suitable package.
}
}
#------------------------------------------------- -
上述的这种报文构造方法,对于构造异常报文和多层协议封装的报文是很方便的。可以将流调度和报文构造做成一个基类,然后在此基础上可以派生出多种激励模块,这样简化了开发新的激励模块的工作量。The above message construction method is very convenient for constructing abnormal messages and multi-layer protocol encapsulated messages. Flow scheduling and message construction can be made into a base class, and then various incentive modules can be derived on this basis, which simplifies the workload of developing new incentive modules.
报文产生后,激励模块向报文数据库模块注册报文相关信息:如产生报文时用的各个参数、报文产生时间;激励模块也可以调用户验证模块,得到报文的预期处理结果。After the message is generated, the incentive module registers message-related information with the message database module: such as various parameters used when generating the message, and message generation time; the incentive module can also call the user verification module to obtain the expected processing result of the message.
激励模块构造完成激励报文后,向报文请求参数数据结构中写入激励报文,PLI接口程序调用系统接口函数返回,从报文请求参数数据结构中取出仿真系统处理完成后的激励报文,将该激励报文送至仿真器模块中的BFM。After the stimulus module constructs the stimulus message, write the stimulus message into the message request parameter data structure, the PLI interface program calls the system interface function to return, and takes out the stimulus message processed by the simulation system from the message request parameter data structure , and send the stimulus message to the BFM in the emulator module.
第四、仿真器模块对输入的该激励报文完成测试,将含有测试结果的测试后的报文送至相应的分析模块对象。Fourth, the emulator module completes the test on the input stimulus message, and sends the tested message containing the test result to the corresponding analysis module object.
仿真器模块中的输入激励数据给逻辑芯片的BFM得到该激励报文后,其将该激励数据变换成时序信号,传递给DUV。在仿真期间,DUV处理激励数据,并输出结果数据。逻辑芯片数据输出口的BFM将该DUV输出的信号,转换为行为级的数据,即结果报文(或待分析报文)。The input stimulus data in the emulator module is sent to the BFM of the logic chip, and after obtaining the stimulus message, it converts the stimulus data into a timing signal and transmits it to the DUV. During simulation, the DUV processes stimulus data and outputs result data. The BFM at the data output port of the logic chip converts the signal output by the DUV into behavior-level data, that is, a result message (or a message to be analyzed).
逻辑芯片数据输出口的BFM发出服务请求,也是通过调用PLI接口程序实现的。PLI接口程序将BFM传递的参数,通过上述的报文请求参数数据结构向控制模块发起请求,然后等待该请求处理完成的消息The BFM at the data output port of the logic chip sends a service request, which is also realized by calling the PLI interface program. The PLI interface program initiates a request to the control module through the above-mentioned message request parameter data structure for the parameters passed by the BFM, and then waits for the message that the request processing is completed
PLI接口程序和分析模块之间通过报文请求参数数据结构交换数据,PLI接口程序在填写报文请求参数数据结构中相关数据后,调用逻辑仿真测试系统提供的接口函数发出请求(该函数执行期间,仿真软件的执行停止),控制模块的数据服务模块收到该服务请求后,控制模块从报文请求参数数据结构中得到相应的目标模块(即分析模块实例)名,从而得到分析模块实例的句柄,然后调用分析模块的消息处理程序,将该分析请求送至该分析模块,即分析模块对象中,该分析模块即可从报文请求参数数据结构取出所述的待测试的报文。The PLI interface program and the analysis module exchange data through the message request parameter data structure. After filling in the relevant data in the message request parameter data structure, the PLI interface program calls the interface function provided by the logic simulation test system to issue a request (during the execution of the function , the execution of the simulation software stops), after the data service module of the control module receives the service request, the control module obtains the name of the corresponding target module (that is, the analysis module instance) from the message request parameter data structure, thereby obtaining the name of the analysis module instance handle, and then call the message processing program of the analysis module, and send the analysis request to the analysis module, that is, the analysis module object, and the analysis module can take out the message to be tested from the message request parameter data structure.
第五、该分析模块对象分析该待测试的报文,并将分析结果输出。Fifth, the analysis module analyzes the message to be tested, and outputs the analysis result.
分析模块从BFM收到待测试的报文后进行分析,直到提取出仿真平台插入到报文中的标签,并完成报文静荷的验证。这一分析过程是标准化的,是可以程序化的,其更具体包括:After the analysis module receives the message to be tested from the BFM, it analyzes until the label inserted into the message by the simulation platform is extracted, and the verification of the static load of the message is completed. This analysis process is standardized and can be programmed, which more specifically includes:
1、对该测试后的报文进行协议符合性分析,如果为切片报文,则进行报文重组,得到完整的报文;1. Analyze the protocol compliance of the tested message. If it is a sliced message, reassemble the message to obtain a complete message;
如果该测试后的报文是待测试逻辑自动插入的报文,则由用户辅助验证;否则继续。If the tested message is a message automatically inserted by the logic to be tested, the verification is assisted by the user; otherwise, continue.
当分析模块在收到待测试逻辑自动插入报文,如管理报文、管理信元,这些报文不含有报文序列号,不是仿真测试系统产生的报文,这类报文,分析模块无法进一步分析其正确性,将这些报文传递给用户验证模块,让用户验证模块判断正确性。When the analysis module receives the logic to be tested, it automatically inserts messages, such as management messages and management cells. These messages do not contain message serial numbers, and are not messages generated by the simulation test system. For such messages, the analysis module cannot Further analyze its correctness, pass these messages to the user verification module, and let the user verification module judge the correctness.
另外,报文的路由正确性、广播正确性、报文变换正确性需要用户验证模块提供辅助信息才能完成。分析模块提取出报文序号后,访问报文数据库模块,得到产生该报文的激励模块实例句柄,调用激励模块实例恢复原始报文,分析模块实例可以调用由用户自行编制的用户验证模块,将原始报文和接收报文传递给用户验证模块,用户验证模块完成报文变换正确性的分析,并给出预期出口列表信息,分析模块根据返回的预期信息,并根据报文数据库模块中该报文的历史记录,完成路由正确性、广播拷贝正确性的分析。分析模块将分析结果和接收报文的出口信息写入报文数据库模块。In addition, the routing correctness, broadcast correctness, and message transformation correctness of the message need the auxiliary information provided by the user authentication module to complete. After the analysis module extracts the serial number of the message, it accesses the message database module to obtain the instance handle of the stimulus module that generated the message, and calls the instance of the stimulus module to restore the original message. The instance of the analysis module can call the user verification module compiled by the user, and The original message and the received message are passed to the user verification module. The user verification module completes the analysis of the correctness of the message transformation and gives the expected export list information. The analysis module returns the expected information according to the report in the message database module. The historical records of documents are analyzed to complete the analysis of routing correctness and broadcast copy correctness. The analysis module writes the analysis result and the export information of the received message into the message database module.
2、对该完整的报文进行解析,提取出插入标签,获得报文净荷;2. Parsing the complete message, extracting the insertion tag, and obtaining the payload of the message;
3、验证该报文净荷,得到分析结果。3. Verify the message payload and obtain the analysis result.
根据报文库中该报文的记录数据,自动分析报文的出口正确性、报文延时正确性和报文乱序正确性。According to the recorded data of the message in the message database, the correctness of the export of the message, the correctness of the message delay and the correctness of the out-of-sequence of the message are automatically analyzed.
在前述的激励模块内,有流的一系列参数,描述流的QOS属性,分析模块在收到报文后,要通知激励模块,进行QOS符合性检查,比如,检查报文的延时是否超过设定值、检查是否存在乱序。In the aforementioned incentive module, there are a series of parameters of the flow, which describe the QOS attributes of the flow. After the analysis module receives the message, it will notify the incentive module to check the QOS compliance, for example, check whether the delay of the message exceeds Set values, check for out-of-order.
这样,测试人员就可以通过控制模块中的用户界面服务模块来检索、显示报文数据库模块中的分析结果和其他相关信息了。In this way, testers can retrieve and display the analysis results and other relevant information in the message database module through the user interface service module in the control module.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB031228852A CN100511149C (en) | 2003-05-07 | 2003-05-07 | Logic emulation testing system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB031228852A CN100511149C (en) | 2003-05-07 | 2003-05-07 | Logic emulation testing system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1549119A true CN1549119A (en) | 2004-11-24 |
CN100511149C CN100511149C (en) | 2009-07-08 |
Family
ID=34321152
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB031228852A Expired - Fee Related CN100511149C (en) | 2003-05-07 | 2003-05-07 | Logic emulation testing system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100511149C (en) |
Cited By (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100349416C (en) * | 2004-12-01 | 2007-11-14 | 华为技术有限公司 | Method and device for controlling excited data flow, and excited message producer |
CN100359488C (en) * | 2005-08-19 | 2008-01-02 | 华为技术有限公司 | A Method for Automatic Generation of Random Incentives Based on Functional Coverage |
CN100432954C (en) * | 2005-09-23 | 2008-11-12 | 中兴通讯股份有限公司 | Inlaid system detection method and system |
CN100452062C (en) * | 2006-01-13 | 2009-01-14 | 大同股份有限公司 | Method for testing hardware circuit block written by hardware description language |
CN101782869A (en) * | 2010-03-09 | 2010-07-21 | 南京航空航天大学 | Method for testing function of panel based on Bash shell script |
CN101847162A (en) * | 2010-05-25 | 2010-09-29 | 中国电力科学研究院 | Electric system simulation centre data processing method based on file and database exchange |
CN101604290B (en) * | 2009-06-05 | 2012-05-16 | 中国移动(深圳)有限公司 | A background module testing method and background module testing system |
CN102495778A (en) * | 2011-12-13 | 2012-06-13 | 曙光信息产业(北京)有限公司 | System and method for testing single-packet regular matching logic |
CN103580954A (en) * | 2013-10-29 | 2014-02-12 | 盛科网络(苏州)有限公司 | Device and method for verifying switch chip through software simulation |
CN104679963A (en) * | 2015-03-20 | 2015-06-03 | 杭州士兰微电子股份有限公司 | Simulation and verification device and simulation and verification method based on TCL |
CN105574292A (en) * | 2016-01-29 | 2016-05-11 | 盛科网络(苏州)有限公司 | Method for achieving multi-channel any-bandwidth packet sending based on dynamic arrays |
CN106155903A (en) * | 2015-04-20 | 2016-11-23 | 飞思卡尔半导体公司 | Apparatus and method for system design validation |
CN106841974A (en) * | 2016-12-13 | 2017-06-13 | 深圳市紫光同创电子有限公司 | A kind of FPGA test platforms and method |
CN107566204A (en) * | 2016-06-30 | 2018-01-09 | 中兴通讯股份有限公司 | Excited message produces control method, device and logic detection equipment |
CN108108306A (en) * | 2018-02-09 | 2018-06-01 | 盛科网络(苏州)有限公司 | A kind of method and system for improving packet parsing test coverage |
CN108279890A (en) * | 2017-01-06 | 2018-07-13 | 阿里巴巴集团控股有限公司 | Component is issued and the constructing method of component based on graphical machine learning algorithm platform, graphical machine learning algorithm platform |
CN108363567A (en) * | 2018-02-12 | 2018-08-03 | 盛科网络(苏州)有限公司 | A kind of verification platform driver automatic generating method based on database |
CN109213680A (en) * | 2018-08-28 | 2019-01-15 | 康烁 | Automated testing method based on embedded system simulation device |
CN109426503A (en) * | 2017-07-21 | 2019-03-05 | 华为技术有限公司 | The method and device of simulation excitation is provided |
CN110688296A (en) * | 2019-02-25 | 2020-01-14 | 上海核工程研究设计院有限公司 | Automatic testing method for computerized rule configuration |
CN111221693A (en) * | 2019-12-31 | 2020-06-02 | 深圳市芯天下技术有限公司 | Verification method, system, device and storage medium for NOR flash configuration module |
CN112905154A (en) * | 2020-12-30 | 2021-06-04 | 杭州加速科技有限公司 | Method and device for improving software and hardware collaborative development speed |
CN113704044A (en) * | 2021-07-19 | 2021-11-26 | 新华三半导体技术有限公司 | Interface verification system, method and chip |
CN114398214A (en) * | 2022-01-18 | 2022-04-26 | 展讯通信(上海)有限公司 | Performance verification method and device, storage medium and computer equipment |
CN116401978A (en) * | 2021-12-28 | 2023-07-07 | 太初(无锡)电子科技有限公司 | A Reusable Implementation Scheme of Verilog Code Simulation Script |
-
2003
- 2003-05-07 CN CNB031228852A patent/CN100511149C/en not_active Expired - Fee Related
Cited By (34)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100349416C (en) * | 2004-12-01 | 2007-11-14 | 华为技术有限公司 | Method and device for controlling excited data flow, and excited message producer |
CN100359488C (en) * | 2005-08-19 | 2008-01-02 | 华为技术有限公司 | A Method for Automatic Generation of Random Incentives Based on Functional Coverage |
CN100432954C (en) * | 2005-09-23 | 2008-11-12 | 中兴通讯股份有限公司 | Inlaid system detection method and system |
CN100452062C (en) * | 2006-01-13 | 2009-01-14 | 大同股份有限公司 | Method for testing hardware circuit block written by hardware description language |
CN101604290B (en) * | 2009-06-05 | 2012-05-16 | 中国移动(深圳)有限公司 | A background module testing method and background module testing system |
CN101782869B (en) * | 2010-03-09 | 2013-10-02 | 南京航空航天大学 | Method for testing function of panel based on Bash shell script |
CN101782869A (en) * | 2010-03-09 | 2010-07-21 | 南京航空航天大学 | Method for testing function of panel based on Bash shell script |
CN101847162B (en) * | 2010-05-25 | 2013-03-27 | 中国电力科学研究院 | Electric system simulation centre data processing method based on file and database exchange |
CN101847162A (en) * | 2010-05-25 | 2010-09-29 | 中国电力科学研究院 | Electric system simulation centre data processing method based on file and database exchange |
CN102495778A (en) * | 2011-12-13 | 2012-06-13 | 曙光信息产业(北京)有限公司 | System and method for testing single-packet regular matching logic |
CN102495778B (en) * | 2011-12-13 | 2014-10-22 | 曙光信息产业(北京)有限公司 | System and method for testing single-packet regular matching logic |
CN103580954A (en) * | 2013-10-29 | 2014-02-12 | 盛科网络(苏州)有限公司 | Device and method for verifying switch chip through software simulation |
CN104679963A (en) * | 2015-03-20 | 2015-06-03 | 杭州士兰微电子股份有限公司 | Simulation and verification device and simulation and verification method based on TCL |
CN104679963B (en) * | 2015-03-20 | 2018-04-27 | 杭州士兰微电子股份有限公司 | A kind of simulating, verifying apparatus and method based on TCL |
CN106155903A (en) * | 2015-04-20 | 2016-11-23 | 飞思卡尔半导体公司 | Apparatus and method for system design validation |
CN106155903B (en) * | 2015-04-20 | 2021-05-07 | 恩智浦美国有限公司 | Apparatus and method for system design verification |
CN105574292B (en) * | 2016-01-29 | 2018-12-11 | 盛科网络(苏州)有限公司 | A method of realizing that any bandwidth of multichannel is given out a contract for a project based on dynamic array |
CN105574292A (en) * | 2016-01-29 | 2016-05-11 | 盛科网络(苏州)有限公司 | Method for achieving multi-channel any-bandwidth packet sending based on dynamic arrays |
CN107566204A (en) * | 2016-06-30 | 2018-01-09 | 中兴通讯股份有限公司 | Excited message produces control method, device and logic detection equipment |
CN106841974A (en) * | 2016-12-13 | 2017-06-13 | 深圳市紫光同创电子有限公司 | A kind of FPGA test platforms and method |
CN108279890A (en) * | 2017-01-06 | 2018-07-13 | 阿里巴巴集团控股有限公司 | Component is issued and the constructing method of component based on graphical machine learning algorithm platform, graphical machine learning algorithm platform |
CN108279890B (en) * | 2017-01-06 | 2021-12-24 | 阿里巴巴集团控股有限公司 | Component publishing method, component constructing method and graphical machine learning algorithm platform |
CN109426503A (en) * | 2017-07-21 | 2019-03-05 | 华为技术有限公司 | The method and device of simulation excitation is provided |
CN108108306A (en) * | 2018-02-09 | 2018-06-01 | 盛科网络(苏州)有限公司 | A kind of method and system for improving packet parsing test coverage |
CN108108306B (en) * | 2018-02-09 | 2021-10-15 | 苏州盛科通信股份有限公司 | Method and system for improving message analysis test coverage rate |
CN108363567A (en) * | 2018-02-12 | 2018-08-03 | 盛科网络(苏州)有限公司 | A kind of verification platform driver automatic generating method based on database |
CN109213680A (en) * | 2018-08-28 | 2019-01-15 | 康烁 | Automated testing method based on embedded system simulation device |
CN110688296A (en) * | 2019-02-25 | 2020-01-14 | 上海核工程研究设计院有限公司 | Automatic testing method for computerized rule configuration |
CN111221693A (en) * | 2019-12-31 | 2020-06-02 | 深圳市芯天下技术有限公司 | Verification method, system, device and storage medium for NOR flash configuration module |
CN112905154A (en) * | 2020-12-30 | 2021-06-04 | 杭州加速科技有限公司 | Method and device for improving software and hardware collaborative development speed |
CN113704044A (en) * | 2021-07-19 | 2021-11-26 | 新华三半导体技术有限公司 | Interface verification system, method and chip |
CN113704044B (en) * | 2021-07-19 | 2024-05-24 | 新华三半导体技术有限公司 | Interface verification system, method and chip |
CN116401978A (en) * | 2021-12-28 | 2023-07-07 | 太初(无锡)电子科技有限公司 | A Reusable Implementation Scheme of Verilog Code Simulation Script |
CN114398214A (en) * | 2022-01-18 | 2022-04-26 | 展讯通信(上海)有限公司 | Performance verification method and device, storage medium and computer equipment |
Also Published As
Publication number | Publication date |
---|---|
CN100511149C (en) | 2009-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1549119A (en) | Logic simulation test system and method | |
Kukkala et al. | UML 2.0 profile for embedded system design | |
CN113221318B (en) | A DDS-based system-level simulation test environment construction method | |
CN1828617A (en) | A software-hardware co-simulation/verification system and vector mode simulation/verification method | |
CN1229721C (en) | Apparatus and method for in-circuit emulation using high-level programming language | |
US7424416B1 (en) | Interfacing hardware emulation to distributed simulation environments | |
CN114036013B (en) | Multi-module synchronous verification platform and verification method for transponder chip based on UVM | |
CN115828839A (en) | System-level verification system and method for SOC (System on chip) | |
CN100337212C (en) | Logic verification system and method | |
WO2024130861A1 (en) | Cloud native hardware logic simulation fpga acceleration method and system | |
CN102480467A (en) | SOC software and hardware collaborative simulation verification method based on network communication protocol | |
CN104935936A (en) | Entropy decoder verification method and device based on UVM | |
CN107451026A (en) | A kind of serial ports generic validation platform and method based on SV language | |
CN115719047A (en) | Joint simulation system based on waveform GPU | |
CN116842890A (en) | A chip verification platform and method for multi-scenario multiplexing of digital-analog chips | |
CN110263459B (en) | UVM verification acceleration method based on test sequence analysis | |
CN116451617A (en) | Information processing method, device and application based on simulation waveform in chip simulation | |
CN116049014A (en) | AMBA bus verification platform generation method and device | |
CN1858719A (en) | Method for realizing automatic test and its system | |
CN119415343A (en) | Functional verification methods, devices, equipment, media and products for hardware design | |
CN119292906A (en) | A method, device, equipment and medium for automatic interface signal verification control | |
CN118503106A (en) | Chip verification method and system | |
CN1407756A (en) | Interface test method | |
CN106100920A (en) | A kind of reusable model verification method of network interconnection chip | |
CN115048312A (en) | Simulation platform and chip universal verification method based on protocol set |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090708 Termination date: 20160507 |
|
CF01 | Termination of patent right due to non-payment of annual fee |