CN107066707B - A kind of adjustable design method for tracing and device using snapshot - Google Patents
A kind of adjustable design method for tracing and device using snapshot Download PDFInfo
- Publication number
- CN107066707B CN107066707B CN201710188024.8A CN201710188024A CN107066707B CN 107066707 B CN107066707 B CN 107066707B CN 201710188024 A CN201710188024 A CN 201710188024A CN 107066707 B CN107066707 B CN 107066707B
- Authority
- CN
- China
- Prior art keywords
- snapshot
- signal
- cluster
- trace
- tracking
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 238000011084 recovery Methods 0.000 claims abstract description 59
- 230000005540 biological transmission Effects 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims 1
- 230000011664 signaling Effects 0.000 claims 1
- 229910052710 silicon Inorganic materials 0.000 abstract description 18
- 239000010703 silicon Substances 0.000 abstract description 18
- 238000010187 selection method Methods 0.000 abstract description 10
- XUIMIQQOPSSXEZ-UHFFFAOYSA-N Silicon Chemical compound [Si] XUIMIQQOPSSXEZ-UHFFFAOYSA-N 0.000 abstract description 6
- 239000000872 buffer Substances 0.000 description 34
- 238000010586 diagram Methods 0.000 description 6
- 238000004088 simulation Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 238000009795 derivation Methods 0.000 description 3
- 230000007812 deficiency Effects 0.000 description 2
- 239000002243 precursor Substances 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/39—Circuit design at the physical level
- G06F30/398—Design verification or optimisation, e.g. using design rule check [DRC], layout versus schematics [LVS] or finite element methods [FEM]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/30—Circuit design
- G06F30/32—Circuit design at the digital level
- G06F30/327—Logic synthesis; Behaviour synthesis, e.g. mapping logic, HDL to netlist, high-level language to RTL or netlist
Landscapes
- Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Geometry (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
技术领域technical field
本发明涉及集成电路可调试性设计技术领域,特别涉及一种使用快照的可调试性设计追踪方法及装置。The present invention relates to the technical field of debuggable design of integrated circuits, and in particular, to a method and device for traceability of debuggable designs using snapshots.
背景技术Background technique
随着集成电路设计复杂度的增加和快速产品化压力的增大,可调试性设计成为硅后调试的支撑技术。由于设计复杂度高、软件模拟速度慢、时延模型精度低等因素制约,硅前验证已无法保证硬件设计的正确性,一些设计错误遗漏到硅后,甚至在芯片投入市场后才被发现,造成巨大损失,硅后调试作为量产前最后一道质量控制环节,可验证流片后芯片的正确性,并检测、定位和诊断硅前遗漏的错误,由于流片后芯片可观测性差,使得硅后调试成为集成电路开发流程中的重要瓶颈,甚至需要耗费一半以上的开发时间,可调试性设计通过在芯片设计阶段增加辅助硅后调试的调试电路,以提高硅后调试时的芯片的可观测性,缩短硅后调试时间。With the increase in the complexity of integrated circuit design and the pressure for rapid productization, debuggable design has become a supporting technology for post-silicon debugging. Due to factors such as high design complexity, slow software simulation speed, and low accuracy of time-delay models, pre-silicon verification cannot guarantee the correctness of hardware design. It causes huge losses. As the last quality control link before mass production, post-silicon debugging can verify the correctness of the chip after tape-out, and detect, locate and diagnose errors that are missed before the silicon. Due to the poor observability of the chip after tape-out, the silicon Post-debugging has become an important bottleneck in the development process of integrated circuits, and even takes more than half of the development time. The debuggability design improves the observability of the chip during post-silicon debugging by adding a debugging circuit to assist post-silicon debugging in the chip design stage. performance, reducing post-silicon debug time.
基于追踪的可调试性设计作为主流的设计方案,通过在芯片中增加追踪缓存,可在硅后调试时提供连续多拍的实时追踪能力,并已成为硅后调试的主要技术之一,并广泛应用于商业等处理器中,例如ARM架构的处理器和IBM Power系列处理器。一个完整的追踪设计通常包括:触发模块、追踪控制器、追踪缓存,如图1所示。触发模块用于监控调试中的触发事件或者触发序列,当指定的触发事件或序列发生时,触发单元会监测到触发信息并告知追踪控制器。追踪控制器接收到触发模块的触发信号,开启信号追踪,将追踪数据存储到追踪缓存中。追踪控制器还可以根据调试需求配置触发单元中的触发事件等调试参数。追踪缓存可实时存储追踪数据。当追踪缓存存满追踪数据后,可将追踪缓存中的数据通过调试接口输出到片外,以用于后续的状态恢复和错误调试。Trace-based debuggability design is a mainstream design solution. By adding trace buffers in the chip, it can provide continuous multi-shot real-time trace capabilities during post-silicon debugging. It has become one of the main technologies for post-silicon debugging, and has been widely used. It is used in commercial processors, such as ARM-based processors and IBM Power series processors. A complete trace design usually includes: trigger module, trace controller, trace buffer, as shown in Figure 1. The trigger module is used to monitor the trigger event or trigger sequence in debugging. When the specified trigger event or sequence occurs, the trigger unit will monitor the trigger information and inform the tracking controller. The tracking controller receives the trigger signal from the trigger module, starts the signal tracking, and stores the tracking data in the tracking buffer. The trace controller can also configure debugging parameters such as trigger events in the trigger unit according to the debugging requirements. The trace cache stores trace data in real time. When the trace buffer is full of trace data, the data in the trace buffer can be output to off-chip through the debug interface for subsequent state recovery and error debugging.
工业界现有的追踪设计的方法是选择重要的功能信号或者与处理器指令流相关的功能信号,并将这些功能信号通过调试总线连接到追踪缓存上。例如ARM的调试架构一般是将处理器的指令计数器、指令等存储到片上追踪缓存中。这类方法有助于软件级别的调试,但对电路级错误的调试帮助有限,如何在流片后细粒度的准确查找、诊断和定位设计错误成为硅后调试的瓶颈。The existing method of trace design in the industry is to select important functional signals or functional signals related to the instruction stream of the processor, and connect these functional signals to the trace cache through the debug bus. For example, the debug architecture of ARM generally stores the processor's instruction counter, instructions, etc. in the on-chip trace cache. Such methods are helpful for software-level debugging, but have limited help in debugging circuit-level errors. How to accurately find, diagnose, and locate design errors after tape-out has become a bottleneck for post-silicon debugging.
状态恢复是电路级错误检测和定位的主要技术,其利用已知的电路逻辑状态恢复未知电路逻辑状态的方法,通过状态恢复可知更多电路内部信号的状态值,从而提高了电路的可观测性,辅助硅后调试中错误的诊断和定位。其基本原理是利用逻辑单元的逻辑功能进行逻辑推导,使用已知信号状态恢复未知信号状态。通常有三种逻辑门的恢复策略:前向恢复,后向恢复和组合恢复。前向恢复是利用逻辑门的输入推断逻辑门的输出,后向恢复是利用逻辑门的输出推断逻辑门的输入,组合恢复是结合逻辑门的输出和部分输入推断未知的输入。这些恢复操作如图2所示。对于时序逻辑门,也可进行恢复操作,但需要考虑时序关系。利用这些恢复原理,可以构建状态恢复模拟器,它以追踪缓存获取的追踪数据作为输入,恢复未追踪的数据,从而获知更多的门级信号状态,通过与模拟仿真得到的数据进行比较,可以在电路级检测、定位和诊断硅前的设计错误。状态恢复率是评价追踪信号对未追踪信号的恢复能力的指标。状态恢复率定义为:经过状态恢复后所有可知的寄存器状态的总数目与追踪获取的寄存器状态的总数目的比值。在同样数目的追踪信号和同样的追踪周期下,状态恢复率大,就代表可以获知的内部寄存器状态更多,内部的可观测性就更大,更有助于电路级错误的调试。State recovery is the main technology of circuit-level error detection and location. It uses the known circuit logic state to recover the unknown circuit logic state. Through state recovery, more state values of the internal signals of the circuit can be known, thereby improving the observability of the circuit. , to assist in the diagnosis and localization of errors in post-silicon debugging. The basic principle is to use the logic function of the logic unit for logic derivation, and use the known signal state to restore the unknown signal state. There are generally three recovery strategies for logic gates: forward recovery, backward recovery and combined recovery. Forward recovery is to use the input of the logic gate to infer the output of the logic gate, backward recovery is to use the output of the logic gate to infer the input of the logic gate, and combinatorial recovery is to combine the output of the logic gate and part of the input to infer the unknown input. These recovery operations are shown in Figure 2. For sequential logic gates, recovery operations are also possible, but timing relationships need to be considered. Using these recovery principles, a state recovery simulator can be constructed, which takes the tracking data obtained from the tracking cache as input, recovers the untracked data, and learns more gate-level signal states. Detect, locate and diagnose pre-silicon design errors at the circuit level. The state recovery rate is an index to evaluate the recovery ability of the tracked signal to the untracked signal. The state recovery rate is defined as the ratio of the total number of all known register states after state recovery to the total number of tracked register states. Under the same number of trace signals and the same trace period, a large state recovery rate means that more internal register states can be known, and internal observability is greater, which is more helpful for circuit-level error debugging.
国内外研究者提出了通过解析电路并从中选择某些对于状态恢复重要的信号作为追踪信号,即在追踪信号的选取时采用基于状态恢复率的追踪信号选择方法,并将追踪信号通过追踪总线和多路复用网络连接到追踪缓存上。当追踪周期开始时,与调试相关的追踪信号的数据即被存储到追踪缓存中。在追踪周期内,追踪信号的各拍数据均被存储到追踪缓存中,一直到追踪缓存没有空余的存储空间。在调试数据分析时,需将追踪缓存中存储的各个时钟周期的追踪数据导出,并进行状态恢复,从而辅助错误的调试。目前研究较多的基于状态恢复率的追踪信号选择方法,主要分为两类:基于概率的追踪信号选择和基于模拟的追踪信号选择。基于概率的选择方法通过综合考虑寄存器之间的组合电路的拓扑结构和逻辑门的逻辑特征,使用概率分析方法估计状态恢复率,并迭代地选择使得状态恢复率达到最大的追踪信号。基于模拟的选择方法使用实际的模拟数据去预估状态恢复率,并以此选择追踪信号。Researchers at home and abroad have proposed to analyze the circuit and select some signals that are important for state recovery as the tracking signal. The multiplexing network is connected to the trace cache. When a trace cycle begins, the data for the debug-related trace signals is stored in the trace buffer. During the tracking period, each beat data of the tracking signal is stored in the tracking buffer until the tracking buffer has no free storage space. During debugging data analysis, it is necessary to export the trace data of each clock cycle stored in the trace cache, and perform state recovery, thereby assisting error debugging. At present, there are many methods of tracking signal selection based on state recovery rate, which are mainly divided into two categories: probability-based tracking signal selection and simulation-based tracking signal selection. The probability-based selection method uses the probability analysis method to estimate the state recovery rate by comprehensively considering the topological structure of the combinatorial circuit between the registers and the logic characteristics of the logic gate, and iteratively selects the tracking signal that maximizes the state recovery rate. Simulation-based selection methods use actual simulation data to estimate state recovery rates and select tracking signals accordingly.
现有的状态恢复方法只从简单的组合电路的拓扑结构进行逻辑推导,受限于复杂的逻辑结构,状态恢复率低,对硅后调试的帮助有限。现有的基于状态恢复的调试技术以追踪信号在追踪周期内的追踪数据作为已知信号,进而通过逻辑门的逻辑推导,迭代的恢复其他信号,信号的恢复是基于逻辑门的恢复操作,对于复杂的逻辑门结构,例如多输入的与或非门,利用单独的已知输入或输出恢复其他未知信号的几率较低。此方法受限于组合逻辑的结构和基本逻辑门的逻辑复杂度,在复杂电路中利用追踪信号进行状态恢复得到的状态恢复率低。Existing state recovery methods only perform logical derivation from the topology of a simple combinational circuit, which is limited by complex logic structures, has a low state recovery rate, and is of limited help for post-silicon debugging. The existing debugging technology based on state recovery takes the tracking data of the tracking signal in the tracking period as the known signal, and then recovers other signals iteratively through the logic derivation of the logic gate. The recovery of the signal is based on the recovery operation of the logic gate. Complex logic gate structures, such as multi-input NAND or NOR gates, have a low probability of recovering otherwise unknown signals with a single known input or output. This method is limited by the structure of combinational logic and the logic complexity of basic logic gates, and the state recovery rate obtained by using the tracking signal for state recovery in complex circuits is low.
此外,现有的基于状态恢复的追踪信号选择方法不能在较短时间内取得高状态恢复率的追踪信号。基于概率的方法运行速度快,但概率估计精度低,得到的状态恢复率较模拟方法低;基于模拟的方法可取得更高的状态恢复率,但运行时间过长。这些不足制约了基于状态恢复率的选择方法在实际中的运用。In addition, the existing tracking signal selection method based on state recovery cannot obtain a tracking signal with a high state recovery rate in a relatively short time. The probability-based method runs fast, but the probability estimation accuracy is low, and the obtained state recovery rate is lower than that of the simulation method; the simulation-based method can achieve a higher state recovery rate, but the running time is too long. These deficiencies restrict the application of the selection method based on the state recovery rate in practice.
发明内容SUMMARY OF THE INVENTION
针对现有技术的不足,本发明提出一种使用快照的可调试性设计追踪方法及装置。In view of the deficiencies of the prior art, the present invention proposes a method and device for debuggable design tracing using snapshots.
本发明提出一种使用快照的可调试性设计追踪方法,包括:The present invention proposes a debuggable design tracking method using snapshots, including:
步骤1,设置追踪缓存与快照缓存的容量,确定追踪信号的宽度限制与快照信号的宽度限制;Step 1, set the capacity of the tracking buffer and the snapshot buffer, and determine the width limit of the tracking signal and the width limit of the snapshot signal;
步骤2,根据所述追踪信号与所述快照信号的宽度限制,生成寄存器簇并迭代选择寄存器簇,从而确定所述追踪信号与所述快照信号;Step 2, according to the width limitation of the tracking signal and the snapshot signal, generate a register cluster and iteratively select the register cluster, thereby determining the tracking signal and the snapshot signal;
步骤3,根据所述追踪信号与所述快照信号,设置追踪结构,其中所述追踪结构包括追踪控制器、触发器、追踪总线、追踪缓存、快照缓存。Step 3, setting a tracking structure according to the tracking signal and the snapshot signal, wherein the tracking structure includes a tracking controller, a trigger, a tracking bus, a tracking buffer, and a snapshot buffer.
所述追踪缓存用于存储所述追踪信号,所述追踪缓存包括追踪缓存的宽度与深度,其中所述宽度为同时追踪所述追踪信号的信号数,所述深度为追踪所述追踪信号的时钟周期数。The tracking buffer is used to store the tracking signal, and the tracking buffer includes the width and depth of the tracking buffer, wherein the width is the number of signals simultaneously tracking the tracking signal, and the depth is the clock that tracks the tracking signal number of cycles.
所述快照缓存,用于存储所述快照信号,其中将所述快照信号通过传输网络连接到所述快照缓存上。The snapshot cache is used for storing the snapshot signal, wherein the snapshot signal is connected to the snapshot cache through a transmission network.
所述快照信号中包括簇快照,其中所述簇状态为所有簇内寄存器在当前时钟周期的状态集。The snapshot signal includes a cluster snapshot, wherein the cluster state is a state set of all intra-cluster registers in the current clock cycle.
还包括选择追踪信号步骤,其中,通过前向搜索生成寄存器簇,估计每个所述寄存器簇带来的全局状态恢复率,并选择对所述状态恢复率改善最多的寄存器簇作为追踪簇,并将簇输入作为追踪信号,寄存器簇的簇内寄存器作为快照信号,直至追踪信号的宽度预设阈值。Also included is the step of selecting a tracking signal, wherein register clusters are generated by forward searching, the global state recovery rate brought by each of the register clusters is estimated, and the register cluster that improves the state recovery rate the most is selected as the tracking cluster, and The cluster input is used as the tracking signal, and the registers within the register cluster are used as the snapshot signal, until the width of the tracking signal is preset to the threshold.
本发明还提出一种使用快照的可调试性设计追踪装置,包括:The present invention also provides a debuggable design tracking device using snapshots, including:
确定宽度限制模块,用于设置追踪缓存与快照缓存的容量,确定追踪信号的宽度限制与快照信号的宽度限制;Determine the width limit module, which is used to set the capacity of the tracking buffer and the snapshot buffer, and determine the width limit of the tracking signal and the width limit of the snapshot signal;
确定信号模块,用于根据所述追踪信号与所述快照信号的宽度限制,生成寄存器簇并迭代选择寄存器簇,从而确定所述追踪信号与所述快照信号;A determining signal module, for generating a register cluster and iteratively selecting a register cluster according to the width limitation of the tracking signal and the snapshot signal, thereby determining the tracking signal and the snapshot signal;
设置追踪结构模块,用于根据所述追踪信号与所述快照信号,设置追踪结构,其中所述追踪结构包括追踪控制器、触发器、追踪总线、追踪缓存、快照缓存。A tracking structure setting module is configured to set a tracking structure according to the tracking signal and the snapshot signal, wherein the tracking structure includes a tracking controller, a trigger, a tracking bus, a tracking buffer, and a snapshot buffer.
所述追踪缓存用于存储所述追踪信号,所述追踪缓存包括追踪缓存的宽度与深度,其中所述宽度为同时追踪所述追踪信号的信号数,所述深度为追踪所述追踪信号的时钟周期数。The tracking buffer is used to store the tracking signal, and the tracking buffer includes the width and depth of the tracking buffer, wherein the width is the number of signals simultaneously tracking the tracking signal, and the depth is the clock that tracks the tracking signal number of cycles.
所述快照缓存,用于存储所述快照信号,其中将所述快照信号通过传输网络连接到所述快照缓存上。The snapshot cache is used for storing the snapshot signal, wherein the snapshot signal is connected to the snapshot cache through a transmission network.
所述快照信号中包括簇快照,其中所述簇状态为所有簇内寄存器在当前时钟周期的状态集。The snapshot signal includes a cluster snapshot, wherein the cluster state is a state set of all intra-cluster registers in the current clock cycle.
还包括选择追踪信号模块,其中,通过前向搜索生成寄存器簇,估计每个所述寄存器簇带来的全局状态恢复率,并选择对所述状态恢复率改善最多的寄存器簇作为追踪簇,并将簇输入作为追踪信号,寄存器簇的簇内寄存器作为快照信号,直至追踪信号的宽度预设阈值。Also includes selecting a tracking signal module, wherein, generating register clusters through forward search, estimating the global state recovery rate brought by each of the register clusters, and selecting the register cluster that improves the state recovery rate the most as the tracking cluster, and The cluster input is used as the tracking signal, and the registers within the register cluster are used as the snapshot signal, until the width of the tracking signal is preset to the threshold.
由以上方案可知,本发明的优点在于:As can be seen from the above scheme, the advantages of the present invention are:
第一点,本发明可以显著的提高调试数据的状态恢复率,增加硅后调试的可观测性,缩短硅后调试时间。通过追踪快照信号的输入和快照信号的初始状态,本发明可以确定性的恢复出快照信号在整个调试周期内的状态值,这些被恢复出来的状态值还可恢复出其他的未知信号,从而提高了整个追踪方案的状态恢复率。First, the present invention can significantly improve the state recovery rate of debugging data, increase the observability of post-silicon debugging, and shorten the time of post-silicon debugging. By tracking the input of the snapshot signal and the initial state of the snapshot signal, the present invention can deterministically restore the state value of the snapshot signal in the entire debugging cycle, and these restored state values can also restore other unknown signals, thereby improving the The state recovery rate of the entire tracking scheme is calculated.
第二点,本发明可以确定性的恢复关键信号。在传统的追踪设计和状态恢复中,除了追踪数据,其他可被恢复的信号极为有限。本发明通过获取快照信号的初始状态,并结合追踪信号,可以确定性的恢复出快照信号在追踪周期内的状态。Second, the present invention can deterministically restore key signals. In traditional tracking design and state recovery, except for tracking data, other signals that can be recovered are extremely limited. By acquiring the initial state of the snapshot signal and combining the tracking signal, the present invention can deterministically restore the state of the snapshot signal in the tracking period.
第三点,本发明可以减少追踪信号选择方法的运行时间。本发明通过选择寄存器簇,从而确定追踪信号和快照信号。选择一个寄存器簇可同时确定多个追踪信号,加快了追踪信号选择的速度。由于选择时间短,可以针对选择结果,进行多次的迭代优化。Third, the present invention can reduce the running time of the tracking signal selection method. The present invention determines the tracking signal and the snapshot signal by selecting the register cluster. Selecting a register bank can determine multiple trace signals at the same time, speeding up the speed of trace signal selection. Due to the short selection time, multiple iterative optimizations can be performed for the selection results.
附图说明Description of drawings
图1是基于追踪的可调试性设计框架图;Figure 1 is a framework diagram of trace-based debuggability design;
图2是状态恢复的示例图;Fig. 2 is an example diagram of state recovery;
图3是簇恢复的实例电路图;Fig. 3 is the example circuit diagram of cluster recovery;
图4是本发明提出的使用快照的追踪装置图;4 is a diagram of a tracking device using snapshots proposed by the present invention;
图5是快照追踪实例图;Figure 5 is a snapshot tracking example diagram;
图6是追踪信号选择方法流程图;6 is a flowchart of a tracking signal selection method;
图7是使用快照的追踪设计的流程图。Figure 7 is a flow diagram of a trace design using snapshots.
具体实施方式Detailed ways
本发明的使用快照的状态恢复的方法具体为:对于选定的寄存器簇,结合寄存器簇的簇输入和寄存器簇的簇内寄存器的快照,即簇内寄存器的初始状态,即可恢复出整个寄存器簇在整个追踪周期内的状态。一个寄存器簇是由电路中抽取的若干寄存器组成,这些寄存器称为簇内寄存器。簇状态表示所有簇内寄存器在当前时钟周期的状态集,也称簇快照,而簇内寄存器的前驱寄存器称为簇输入,通过组合逻辑直接影响簇内寄存器的前驱原始输入也被称为簇输入。图3所示为一个从电路中抽取的寄存器簇,它包括4个簇内寄存器,即{B,C,D,E},而簇输入集为{A},通过获取簇初始状态和簇输入在所有追踪周期的状态值,可恢复出寄存器簇在所有追踪周期的簇状态值,因为根据簇初始状态和簇初始输入,可以得知下一追踪周期的簇状态,以此递推,可以得知此后所有追踪周期的簇状态,如表1所示,如果已知簇初始状态,即已知{B,C,D,E}在周期0的状态,并且持续追踪簇输入,即已知A在周期0到周期4的值,利用这些值可以恢复出{B,C,D,E}在周期1到5的状态,即可恢复出追踪周期内的所有簇状态,如表1中灰色阴影部分所示,如果采取传统的状态恢复方法,即不使用簇初始状态,那么选择图3中任何1个作为追踪信号,都不能完全恢复出寄存器簇在追踪周期的所有状态。The method for state recovery using snapshots of the present invention is specifically as follows: for a selected register cluster, the entire register can be recovered by combining the cluster input of the register cluster and the snapshot of the register within the cluster, that is, the initial state of the register within the cluster. The state of the cluster throughout the tracking period. A register cluster is composed of several registers extracted from the circuit, and these registers are called intra-cluster registers. The cluster state represents the state set of all the registers in the cluster in the current clock cycle, also known as the cluster snapshot, and the precursor register of the register in the cluster is called the cluster input, and the precursor original input of the register in the cluster directly affected by the combinational logic is also called the cluster input. . Figure 3 shows a register cluster extracted from the circuit, which includes 4 intra-cluster registers, namely {B, C, D, E}, and the cluster input set is {A}. By obtaining the initial state of the cluster and the cluster input The state value of the register cluster in all tracking periods can be recovered, because according to the initial state of the cluster and the initial input of the cluster, the cluster state of the next tracking period can be known, and by recursion, we can get Know the cluster states of all subsequent tracking cycles, as shown in Table 1, if the initial state of the cluster is known, that is, the state of {B, C, D, E} in cycle 0 is known, and the cluster input is continuously tracked, that is, A is known From the values of period 0 to period 4, the states of {B, C, D, E} in periods 1 to 5 can be recovered by using these values, and all cluster states in the tracking period can be recovered, as shown in the gray shade in Table 1. As shown in part, if the traditional state recovery method is adopted, that is, the initial state of the cluster is not used, then selecting any one in Figure 3 as the tracking signal cannot completely recover all the states of the register cluster in the tracking period.
表1Table 1
相对于传统追踪设计,本发明的追踪方案在硬件设计上有明显的改进,如图4所示,本发明需要捕获两种不同类型的信号:追踪信号和快照信号,而传统的追踪设计不捕获快照信号,追踪信号在追踪周期内每周期都需捕获,而对于快照信号只捕获其初始状态,为了满足捕获要求,本发明的追踪设计方案需要增加快照缓存,也就是共有两种类型的缓存:追踪缓存和快照缓存。Compared with the traditional tracking design, the tracking scheme of the present invention has obvious improvements in hardware design. As shown in Figure 4, the present invention needs to capture two different types of signals: tracking signals and snapshot signals, while the traditional tracking design does not capture Snapshot signal, the tracking signal needs to be captured every cycle in the tracking period, and only its initial state is captured for the snapshot signal. In order to meet the capture requirements, the tracking design scheme of the present invention needs to increase the snapshot cache, that is, there are two types of caches: Trace cache and snapshot cache.
追踪缓存是用来存储追踪信号,一般其宽度和深度均有限,宽度代表可以同时追踪的信号数,深度代表了可以追踪的时钟周期数,例如:16*1024的追踪缓存可以同时追踪16位追踪信号,并持续追踪1024个周期。The trace buffer is used to store trace signals. Generally, its width and depth are limited. The width represents the number of signals that can be traced at the same time, and the depth represents the number of clock cycles that can be traced. For example, a 16*1024 trace buffer can simultaneously trace 16 bits of trace. signal, and continues to track 1024 cycles.
快照缓存是本发明的追踪设计新增的缓存,用以存储快照信号,即选定的追踪寄存器簇的初始状态,选定的快照信号通过传输网络连接到快照缓存上,各个不同簇的快照信号可以在不同的追踪周期里先后捕获,如果这些寄存器簇没有时序依赖关系,且其快照信号数目之和不大于快照缓存的宽度,则多个寄存器簇的快照也可同时捕获。The snapshot cache is a newly added cache in the tracking design of the present invention, which is used to store the snapshot signal, that is, the initial state of the selected tracking register cluster. The selected snapshot signal is connected to the snapshot cache through the transmission network, and the snapshot signals of each different cluster are It can be captured successively in different trace cycles. If these register banks have no timing dependency, and the sum of the number of snapshot signals is not greater than the width of the snapshot cache, the snapshots of multiple register banks can also be captured at the same time.
如图5所示,三个寄存器簇{A,B,C}的快照存储至快照缓存中,可在三个追踪周期内先后捕获寄存器簇A,B和C的快照,如果满足快照缓存宽度约束,也可同时捕获寄存器簇A、B和C的快照。As shown in Figure 5, the snapshots of the three register banks {A, B, C} are stored in the snapshot cache, and the snapshots of the register banks A, B and C can be captured successively in three tracking cycles, if the snapshot cache width constraint is satisfied , it is also possible to capture snapshots of register banks A, B, and C at the same time.
由于本发明使用了快照缓存中快照信号改善状态恢复率,故相应的追踪信号选择方法也有改变,使用快照的追踪信号选择问题可以分解为寄存器簇生成和寄存器簇选择的问题,追踪信号和快照信号由追踪寄存器簇决定,由于调试设计开销有限,追踪寄存器簇同时需满足追踪信号宽度WT和快照信号宽度WS的约束。Since the invention uses the snapshot signal in the snapshot cache to improve the state recovery rate, the corresponding tracking signal selection method is also changed. The tracking signal selection problem using snapshots can be decomposed into the problem of register bank generation and register bank selection, tracking signal and snapshot signal. Determined by the trace register bank, due to the limited debug design overhead, the trace register bank needs to satisfy the constraints of the trace signal width WT and the snapshot signal width W S at the same time.
本发明的使用快照的追踪信号选择方法可分为两步:寄存器簇的簇生成和寄存器簇选择,即首先通过前向搜索生成寄存器簇,然后估计每个寄存器簇可带来的全局状态恢复率,并选择对状态恢复率改善最多的簇作为追踪簇,并将簇输入作为追踪信号,簇内寄存器作为快照信号,直至追踪信号的宽度满足设计要求(即宽度满足一预设阈值),追踪信号选择方法流程如图6所示。The tracking signal selection method using snapshots of the present invention can be divided into two steps: register cluster cluster generation and register cluster selection, that is, first generate register clusters through forward search, and then estimate the global state recovery rate that each register cluster can bring. , and select the cluster that improves the state recovery rate the most as the tracking cluster, the cluster input is used as the tracking signal, and the register in the cluster is used as the snapshot signal, until the width of the tracking signal meets the design requirements (that is, the width meets a preset threshold), the tracking signal The selection method flow is shown in Figure 6.
使用快照的追踪方案的具体设计步骤为:The specific design steps of the tracking scheme using snapshots are:
步骤一:确定缓存容量和信号约束。设计追踪缓存和快照缓存的容量,确定追踪信号的宽度限制和快照信号的宽度限制。Step 1: Determine buffer capacity and signal constraints. Design the capacity of the trace buffer and the snapshot buffer, and determine the width limit of the trace signal and the width limit of the snapshot signal.
步骤二:追踪信号和快照信号选择。根据追踪信号和快照信号的宽度限制,生成寄存器簇并迭代选择寄存器簇,从而确定追踪信号和快照信号。Step 2: Track signal and snapshot signal selection. According to the width constraints of the trace signal and the snapshot signal, register clusters are generated and selected iteratively to determine the trace signal and the snapshot signal.
步骤三:设计整体追踪结构。确定完整的追踪调度方案,设计整个追踪结构,包括追踪控制器、触发器、追踪总线、追踪缓存、快照缓存等。Step 3: Design the overall tracking structure. Determine the complete trace scheduling scheme and design the entire trace structure, including trace controllers, triggers, trace buses, trace caches, snapshot caches, etc.
本发明还提出一种使用快照的可调试性设计追踪装置,包括:The present invention also provides a debuggable design tracking device using snapshots, including:
确定宽度限制模块,用于设置追踪缓存与快照缓存的容量,确定追踪信号的宽度限制与快照信号的宽度限制;Determine the width limit module, which is used to set the capacity of the tracking buffer and the snapshot buffer, and determine the width limit of the tracking signal and the width limit of the snapshot signal;
确定信号模块,用于根据所述追踪信号与所述快照信号的宽度限制,生成寄存器簇并迭代选择寄存器簇,从而确定所述追踪信号与所述快照信号;A determining signal module, for generating a register cluster and iteratively selecting a register cluster according to the width limitation of the tracking signal and the snapshot signal, thereby determining the tracking signal and the snapshot signal;
设置追踪结构模块,用于根据所述追踪信号与所述快照信号,设置追踪结构,其中所述追踪结构包括追踪控制器、触发器、追踪总线、追踪缓存、快照缓存。A tracking structure setting module is configured to set a tracking structure according to the tracking signal and the snapshot signal, wherein the tracking structure includes a tracking controller, a trigger, a tracking bus, a tracking buffer, and a snapshot buffer.
所述追踪缓存用于存储所述追踪信号,所述追踪缓存包括追踪缓存的宽度与深度,其中所述宽度为同时追踪所述追踪信号的信号数,所述深度为追踪所述追踪信号的时钟周期数。The tracking buffer is used to store the tracking signal, and the tracking buffer includes the width and depth of the tracking buffer, wherein the width is the number of signals simultaneously tracking the tracking signal, and the depth is the clock that tracks the tracking signal number of cycles.
所述快照缓存,用于存储所述快照信号,其中将所述快照信号通过传输网络连接到所述快照缓存上。The snapshot cache is used for storing the snapshot signal, wherein the snapshot signal is connected to the snapshot cache through a transmission network.
所述快照信号中包括簇快照,其中所述簇状态为所有簇内寄存器在当前时钟周期的状态集。The snapshot signal includes a cluster snapshot, wherein the cluster state is a state set of all intra-cluster registers in the current clock cycle.
还包括选择追踪信号模块,其中,通过前向搜索生成寄存器簇,估计每个所述寄存器簇带来的全局状态恢复率,并选择对所述状态恢复率改善最多的寄存器簇作为追踪簇,并将簇输入作为追踪信号,寄存器簇的簇内寄存器作为快照信号,直至追踪信号的宽度预设阈值。Also includes selecting a tracking signal module, wherein, generating register clusters through forward search, estimating the global state recovery rate brought by each of the register clusters, and selecting the register cluster that improves the state recovery rate the most as the tracking cluster, and The cluster input is used as the tracking signal, and the registers within the register cluster are used as the snapshot signal, until the width of the tracking signal is preset to the threshold.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710188024.8A CN107066707B (en) | 2017-03-27 | 2017-03-27 | A kind of adjustable design method for tracing and device using snapshot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710188024.8A CN107066707B (en) | 2017-03-27 | 2017-03-27 | A kind of adjustable design method for tracing and device using snapshot |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107066707A CN107066707A (en) | 2017-08-18 |
CN107066707B true CN107066707B (en) | 2019-07-30 |
Family
ID=59618147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710188024.8A Active CN107066707B (en) | 2017-03-27 | 2017-03-27 | A kind of adjustable design method for tracing and device using snapshot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107066707B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117113907B (en) * | 2023-10-17 | 2023-12-22 | 北京开源芯片研究院 | Verification method, verification device, electronic equipment and readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101720466A (en) * | 2007-05-09 | 2010-06-02 | 新思公司 | Techniques for use with automated circuit design and simulations |
CN103246711A (en) * | 2013-04-22 | 2013-08-14 | 华为技术有限公司 | Method and device generating snapshots of binary large object type data |
CN103440201A (en) * | 2013-09-05 | 2013-12-11 | 北京邮电大学 | Dynamic taint analysis device and application thereof to document format reverse analysis |
CN103593271A (en) * | 2012-08-13 | 2014-02-19 | 中兴通讯股份有限公司 | Method and device for chip tracking debugging of system on chip |
CN104699574A (en) * | 2013-12-09 | 2015-06-10 | 华为技术有限公司 | Method, device and system for establishing Cache check points of processor |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7890700B2 (en) * | 2008-03-19 | 2011-02-15 | International Business Machines Corporation | Method, system, and computer program product for cross-invalidation handling in a multi-level private cache |
-
2017
- 2017-03-27 CN CN201710188024.8A patent/CN107066707B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101720466A (en) * | 2007-05-09 | 2010-06-02 | 新思公司 | Techniques for use with automated circuit design and simulations |
CN103593271A (en) * | 2012-08-13 | 2014-02-19 | 中兴通讯股份有限公司 | Method and device for chip tracking debugging of system on chip |
CN103246711A (en) * | 2013-04-22 | 2013-08-14 | 华为技术有限公司 | Method and device generating snapshots of binary large object type data |
CN103440201A (en) * | 2013-09-05 | 2013-12-11 | 北京邮电大学 | Dynamic taint analysis device and application thereof to document format reverse analysis |
CN104699574A (en) * | 2013-12-09 | 2015-06-10 | 华为技术有限公司 | Method, device and system for establishing Cache check points of processor |
Non-Patent Citations (1)
Title |
---|
An On-Line Timing Error Detection Method for Silicon Debug;程云等;《2014 IEEE 23rd Asian Test Symposium》;20141211;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN107066707A (en) | 2017-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8949101B2 (en) | Hardware execution driven application level derating calculation for soft error rate analysis | |
Li et al. | A hybrid approach for fast and accurate trace signal selection for post-silicon debug | |
Park et al. | Post-silicon bug localization in processors using instruction footprint recording and analysis (IFRA) | |
CN102360329B (en) | Bus monitoring and debugging control device and methods for monitoring and debugging bus | |
US8091050B2 (en) | Modeling system-level effects of soft errors | |
US9251045B2 (en) | Control flow error localization | |
WO2014110922A1 (en) | Extended cache coherence protocol-based multi-level coherence domain simulation verification and test method | |
EP3391224B1 (en) | Method and apparatus for data mining from core traces | |
De Paula et al. | TAB-BackSpace: Unlimited-length trace buffers with zero additional on-chip overhead | |
US20080263489A1 (en) | Method to identify and generate critical timing path test vectors | |
CN102968515B (en) | For calculating the method and apparatus of the checking coverage rate of integrated circuit model | |
CN107066707B (en) | A kind of adjustable design method for tracing and device using snapshot | |
CN105094949B (en) | A kind of analogy method and system based on instruction computation model and feedback compensation | |
Dadashi et al. | Hardware-software integrated diagnosis for intermittent hardware faults | |
Oh et al. | An on-chip error detection method to reduce the post-silicon debug time | |
CN108234213B (en) | An on-chip network structure-level soft error online evaluation method | |
Chandoke et al. | A novel approach to estimate power consumption using SystemC transaction level modelling | |
Rout et al. | Efficient router architecture for trace reduction during NoC post-silicon validation | |
Zhao et al. | Host-compiled reliability modeling for fast estimation of architectural vulnerabilities | |
Peng et al. | PROPHET: Predictive on-chip power Meter in hardware accelerator for DNN | |
US11586791B1 (en) | Visualization of data buses in circuit designs | |
Hsu et al. | ArChiVED: Architectural checking via event digests for high performance validation | |
Amrein | System-level trace signal selection for post-silicon debug using linear programming | |
CN117608951B (en) | Clock domain-crossing sampling circuit and method for large-scale FPGA platform | |
CN109933472A (en) | Microprocessor Architecture-Level Soft Error Susceptibility Assessment Method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20170818 Assignee: Zhongke Jianxin (Beijing) Technology Co.,Ltd. Assignor: Institute of Computing Technology, Chinese Academy of Sciences Contract record no.: X2022990000752 Denomination of invention: A Design for Debuggability Tracing Method and Device Using Snapshots Granted publication date: 20190730 License type: Exclusive License Record date: 20221009 |