Method and system for checking simulation signal of digital product

文档序号:1505336 发布日期:2020-02-07 浏览:22次 中文

阅读说明:本技术 数字产品的仿真信号查看方法及系统 (Method and system for checking simulation signal of digital product ) 是由 林铠鹏 李艳荣 白耿 于 2019-12-06 设计创作,主要内容包括:本发明公开了一种数字产品的仿真信号查看方法及仿真系统,所述方法包括:对数字产品进行FPGA仿真时,实时读取数字产品的所有外部端口的状态数据并记录,同时,每间隔一段时间读取一次数字产品的全部内部状态数据并记录;仿真完成后,当需要回溯查看数字产品的某个时钟周期的数据时,在记录的仿真数据中,读取此时钟周期前的最后一个时间点存储的数字产品的内部状态数据和所述时间点的外部端口状态数据,将数字产品载入到软件仿真器中,并把所述时间点记录的外部端口状态数据和内部状态数据设置为数字产品的初始状态,启动软件仿真器并运行到需要查看的时钟周期。采用本发明的技术方案,可以快速的回溯查看任一个时钟周期的全部仿真数据。(The invention discloses a simulation signal viewing method and a simulation system of a digital product, wherein the method comprises the following steps: when the FPGA simulation is carried out on the digital product, the state data of all external ports of the digital product are read in real time and recorded, and simultaneously, all internal state data of the digital product are read and recorded once at intervals; after the simulation is completed, when data of a certain clock cycle of the digital product needs to be traced and checked, reading internal state data of the digital product and external port state data of the time point, which are stored at the last time point before the clock cycle, in the recorded simulation data, loading the digital product into a software simulator, setting the external port state data and the internal state data recorded at the time point as initial states of the digital product, starting the software simulator and running to the clock cycle needing to be checked. By adopting the technical scheme of the invention, all simulation data of any clock period can be quickly backtracked and checked.)

1. A method for checking simulation signals of a digital product is characterized by comprising

When the FPGA simulation is carried out on the digital product, the state data of all external ports of the digital product are read in real time and recorded, and simultaneously, all internal state data of the digital product are read and recorded once at intervals;

after the simulation is finished, when data of a certain clock period of the digital product needs to be backtracked, reading internal state data of the digital product and external port state data of the time point, which are stored at the last time point before the clock period, in the recorded simulation data;

and loading the digital product into a software simulator, setting the external port state data and the internal state data recorded at the time point as the initial state of the digital product, starting the software simulator and running to a clock cycle needing to be checked.

2. The method as claimed in claim 1, wherein the external port status data and the internal status data of the digital product are stored as ordered structured data with the clock cycle number as a time stamp when the external port status data and the internal status data of the digital product are recorded.

3. The method of viewing simulation signals of a digital product according to claim 1, wherein all external port status data of the digital product is read by a static probe detection method.

4. The method of viewing an emulated signal in a digital product of claim 1, wherein all internal state data of the digital product is read using a dynamic probe detection method.

5. The method of viewing an emulated signal of a digital product of claim 1, wherein the time interval is the same each time all of the internal state data of the digital product is read every one time interval.

6. The method of viewing an emulated signal of a digital product of claim 5, wherein the time interval is 1 million clock cycles at a time.

7. The method of viewing an emulated signal of a digital product of claim 1, wherein the time interval is different each time all of the internal state data of the digital product is read every one time interval.

8. A simulation system of digital products is characterized by comprising an FPGA, a software simulator, a controller, a software simulator and a storage device,

the FPGA is used for loading digital products and carrying out simulation verification;

the software simulator is used for carrying out simulation verification on the digital product in a software simulation mode;

the controller is used for reading the state data of all external ports of the digital product in real time when the digital product is subjected to FPGA simulation, and reading all internal state data of the digital product once at intervals;

the storage device is used for storing the simulation data read by the controller;

after the simulation is completed, when data of a certain clock cycle of the digital product needs to be checked back, the controller reads internal state data of the digital product and external port state data of the time point, which are recorded at the last time point before the clock cycle, from the simulation data recorded in the storage device, then loads the digital product into the software simulator, sets the external port state data and the internal state data recorded at the time point as initial states of the digital product, starts the software simulator and runs to the clock cycle needing to be checked.

9. The simulation system of a digital product according to claim 1, wherein the controller processes the external port state data and the internal state data of the digital product into ordered structured data with the clock cycle number as a time stamp after reading the external port state data and the internal state data of the digital product and stores the ordered structured data in the storage device.

10. The simulation system of a digital product according to claim 1, wherein the controller reads all external port status data of the digital product using a static probing method and reads all internal status data of the digital product using a dynamic probing method.

Technical Field

The invention relates to the field of simulation of digital logic products, in particular to a method and a system for checking simulation signals of a digital product.

Background

In the design process of digital logic products, a simulation verification mode is required to test and verify the correctness of the design, and generally, this link is completed by using a software Simulator (Simulator).

The working principle of the software simulator is as follows: and running a design to be tested (RTL code or gate-level netlist) and a test vector (HVL code or non-synthesizable SystemVerilog program) in the simulator, and finishing the verification process defined in the test vector through the interaction of interface signals of the design to be tested and the test vector. Developers can check the value of any test vector, check the value of any port or internal signal of the design to be tested, or check the waveform formed by a plurality of clock cycles to determine whether the design is correct, and Debug.

However, the performance of software emulators is limited by software processing power. In general, verifying a complete design of an SoC may operate at speeds of only tens of Hz. Therefore, in order to increase the speed, designers tend to transplant designs into FPGAs for verification as soon as possible, and this verification method is generally called as FPGA proto-verification (FPGA proto-verification), which can reach an operation speed of tens of MHz or even higher, and can achieve faster verification. However, it is difficult to detect the signal value of the design to be tested by the FPGA prototype verification, and a general method can only trigger or display by guiding the required signal to the port through the wiring and then connecting to the logic analyzer. In addition, in the process, due to the change of the signal or the environment, the original error or event can be caused, and the error or event is difficult to reproduce. The debuggability of the FPGA is very poor.

Considering the obvious advantages and disadvantages of the software simulator and the FPGA prototype verification, the industry is inclined to a solution that the simulation verification process has the full visibility of the signals of the software simulator and the rapidness of the FPGA prototype verification. Such a solution is known in the industry as a hardware Emulator (Emulator). Hardware emulators have two important characteristics:

performance: compared with a software simulator, the hardware simulator has obvious performance advantages. In general, hardware emulators have operating speeds on the order of MHz.

Signal detectability: compared with FPGA prototype verification, the hardware simulator has convenient signal detectability, and can see all internal and port signals of the design to be tested without rerun or reconfiguration. The generic term is called signal Full Visibility (Full Visibility).

In order to realize a hardware simulator, there are several technical schemes: a distributed special processor array is adopted, which is equivalent to a processor cluster with an ultra-large scale, so as to run a software simulator in parallel; an array is formed by adopting a customized FPGA, and signals are all stored in an external memory through an additional signal channel and an additional wiring resource; the array is formed by adopting a general FPGA, and the shadow resources are cloned and stored and transferred to an external memory. Or the scan chain provided by the FPGA is used for reading and writing, and signals are read and stored into an external memory.

The advantage of the special processor array is that the signal detectability is very strong, but the disadvantage is that the operation speed is very slow, the power consumption is very large, and the special processor ASIC development is needed, and the upgrade cost is very large. The customized FPGA array has the advantages of high running speed and high upgrading cost due to the fact that the customized FPGA needs to be developed. The general FPGA array has the advantages of high speed and low cost, and has the defect of weak signal detectability.

In the scheme of the general FPGA array, signal full visibility is realized by two methods:

cloning shadow resources: all trigger signals of the signals to be detected are output to a shadow register and then are transferred and stored to an external memory one by one through special logic. The combined signal is deduced from the trigger signal through the later stage of the software. This approach does not substantially reduce the operating speed of the design under test, requiring the consumption of large amounts of shadow logic, resulting in very low FPGA resources (as low as <30%) available for the logic under test. Meanwhile, when the display signal is needed after the operation, the preparation time of the display signal is very long because the combinational logic needs to be reckoned again.

Read/write resources of FPGA scan chains: FPGA manufacturers have read/write channels for providing internal resources, and can directly read or write logic such as registers (DFFs), logic resources (LUTs), and built-in srams (brams) in additional channels outside the common logic resource network (e.g., XILINX refers to this function as Configuration read Capture). This channel is typically used for configuration of the FPGA, but a hardware emulator can also use this channel to enable reading any internal signals. The method is called as a dynamic probe detection method, the dynamic probe detection method does not consume FPGA resources, but the speed is extremely low because a scan chain serial reading mode is adopted in a reading channel, and the running speed is as low as Hz level if the scanning chain serial reading mode is adopted for reading. Therefore, the conventional hardware simulator only uses the dynamic probe to take a single signal value, and when the dynamic probe is used to continuously take signals, the running speed is reduced to an extremely low level.

Disclosure of Invention

The invention aims to provide a simulation signal viewing method and a simulation signal viewing system for a digital product, which can quickly backtrack and view all simulation data of any clock period, aiming at the technical problem that the general FPGA in the prior art realizes the full-visible speed of signals and is slow in time consumption.

In an embodiment of the present invention, a method for checking a simulation signal of a digital product is provided, which includes:

when the FPGA simulation is carried out on the digital product, the state data of all external ports of the digital product are read in real time and recorded, and simultaneously, all internal state data of the digital product are read and recorded once at intervals;

after the simulation is finished, when data of a certain clock period of the digital product needs to be backtracked, reading internal state data of the digital product and external port state data of the time point, which are stored at the last time point before the clock period, in the recorded simulation data;

and loading the digital product into a software simulator, setting the external port state data and the internal state data recorded at the time point as the initial state of the digital product, starting the software simulator and running to a clock cycle needing to be checked.

In the embodiment of the invention, when the external port state data and the internal state data of the digital product are recorded, the external port data and the internal state data of the digital product are stored as ordered structured data by taking the clock cycle sequence number as a timestamp.

In the embodiment of the invention, all the external port state data of the digital product are read by adopting a static probe detection method.

In the embodiment of the invention, a dynamic probe detection method is adopted to read all internal state data of the digital product.

In the embodiment of the invention, when all internal state data of the digital product are read at intervals, the interval time of each time is the same.

In the embodiment of the invention, the interval time of each time is 1 million clock cycles.

In the embodiment of the invention, when all internal state data of the digital product are read at intervals, the interval time of each time is different.

The embodiment of the invention also provides a simulation system of a digital product, which comprises an FPGA, a software simulator, a controller, a software simulator and a storage device,

the FPGA is used for loading digital products and carrying out simulation verification;

the software simulator is used for carrying out simulation verification on the digital product in a software simulation mode;

the controller is used for reading the state data of all external ports of the digital product in real time when the digital product is subjected to FPGA simulation, and reading all internal state data of the digital product once at intervals;

the storage device is used for storing the simulation data read by the controller;

after the simulation is completed, when data of a certain clock cycle of the digital product needs to be checked back, the controller reads internal state data of the digital product and external port state data of the time point, which are recorded at the last time point before the clock cycle, from the simulation data recorded in the storage device, then loads the digital product into the software simulator, sets the external port state data and the internal state data recorded at the time point as initial states of the digital product, starts the software simulator and runs to the clock cycle needing to be checked.

In the embodiment of the invention, after the controller reads the external port state data and the internal state data of the digital product, the external port data and the internal state data of the digital product are processed into ordered structured data by taking the clock cycle sequence number as a timestamp and are stored in the storage device.

In the embodiment of the invention, the controller reads all external port state data of the digital product by adopting a static probe detection method, and reads all internal state data of the digital product by adopting a dynamic probe detection method.

Compared with the prior art, in the method and the system for checking the simulation signal of the digital product, the state data of all external ports of the digital product are read and recorded in real time when the digital product is subjected to FPGA simulation, and simultaneously, all internal state data of the digital product are read and recorded at intervals; after the simulation is completed, when data of a certain clock cycle of the digital product needs to be backtracked and checked, reading internal state data of the digital product and external port state data of the time point, which are stored at the last time point before the clock cycle, in the recorded simulation data, then loading the digital product into a software simulator, setting the external port state data and the internal state data recorded at the time point as initial states of the digital product, starting the software simulator and running to the clock cycle needing to be checked, and checking and recording the data of the clock cycle needing to be checked in real time through the software simulator, so that the running time of the software simulator before the time point is saved, and the time for checking the data can be saved.

Drawings

Fig. 1 is a schematic structural diagram of a simulation system of a digital product according to an embodiment of the present invention.

Fig. 2 is a flowchart of a method for viewing an emulation signal of a digital product according to an embodiment of the present invention.

Detailed Description

As shown in fig. 1, in an embodiment of the present invention, a simulation system for a digital product is provided, which includes an FPGA, a software simulator, a controller, and a storage device. The FPGA is used for loading digital products and performing simulation verification. The software simulator is used for carrying out simulation verification on the digital product in a software simulation mode. The controller is used for reading the simulation data of the FPGA, and the storage device is used for storing the simulation data of the FPGA.

As shown in fig. 2, when performing FPGA simulation on a digital product, the controller reads state data of all external ports of the digital product in real time by using a static probe detection method, and simultaneously reads all internal state data of the digital product once at intervals by using a dynamic probe detection method. Meanwhile, the controller processes the external port data and the internal state data of the digital product into ordered structured data by taking the clock cycle sequence number as a time stamp and stores the ordered structured data in the storage device. The stored data comprises the clock cycle sequence number as the time stamp, so that the data of the corresponding clock cycle can be inquired when the data is inquired subsequently.

It should be noted that, when performing FPGA simulation on a digital product, the digital product is loaded into an FPGA, and then initial operating parameters are set. When the state data of all external ports of the digital product are read, the external ports are led out through the lead wires by adopting a static probe detection method, so that the state data can be directly read in real time without any time delay. When reading all the internal state data of the digital product, the speed is extremely low because of adopting a dynamic probe detection method and adopting a scan chain serial reading mode for a reading channel, and a large amount of time is consumed for reading all the internal state data of the digital product every time, so that all the internal state data of the digital product cannot be read in real time and can not be read at intervals.

When all the internal state data of the digital product are read every time interval, the time interval is the same every time, and for example, the time interval may be set to 1 million clock cycles every time. When all internal state data of the digital product are read every time at intervals, the interval time of each time can be different, for example, the interval time can be set to be larger, for example, 1 million clock cycles, at the initial stage of the simulation, and the interval time can be set to be smaller, for example, 1 million clock cycles, at the later stage of the simulation.

After the simulation is completed, when a user needs to backtrack and check data of a certain clock period of the digital product, the controller reads internal state data of the digital product and external port state data of the time point, which are stored at the last time point before the clock period, from the recorded simulation data.

And then loading the digital product into a software simulator, setting the external port state data and the internal state data recorded at the time point as the initial state of the digital product, starting the software simulator and running to a clock cycle needing to be checked, and checking and recording data near the clock cycle needing to be checked in real time through the software simulator, so that the running time of the software simulator before the time point is saved, and the time for checking the data can be saved.

In summary, in the method and system for checking simulation signals of a digital product of the present invention, when performing FPGA simulation on the digital product, the status data of all external ports of the digital product is read and recorded in real time, and simultaneously, all internal status data of the digital product is read and recorded at intervals; after the simulation is completed, when data of a certain clock cycle of the digital product needs to be backtracked and checked, reading internal state data of the digital product and external port state data of the time point, which are stored at the last time point before the clock cycle, in the recorded simulation data, then loading the digital product into a software simulator, setting the external port state data and the internal state data recorded at the time point as initial states of the digital product, starting the software simulator and running to the clock cycle needing to be checked, and checking and recording the data of the clock cycle needing to be checked in real time through the software simulator, so that the running time of the software simulator before the time point is saved, and the time for checking the data can be saved.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于FPGA的扩展卡尔曼滤波器电路结构设计方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类