TW412674B - Method and system for analyzing test coverage - Google Patents
Method and system for analyzing test coverage Download PDFInfo
- Publication number
- TW412674B TW412674B TW88108421A TW88108421A TW412674B TW 412674 B TW412674 B TW 412674B TW 88108421 A TW88108421 A TW 88108421A TW 88108421 A TW88108421 A TW 88108421A TW 412674 B TW412674 B TW 412674B
- Authority
- TW
- Taiwan
- Prior art keywords
- variable
- simulation
- level language
- original high
- description code
- Prior art date
Links
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
412674_ 五、發明說明(1) 發明背景 發明之領域 本發明大體上係關於資料處理系統,尤其關於一電路 接受既定之複數組測試用輸入資料時,用以分析其測試涵 蓋率(test coverage)之方法與系統。 習知拮術之描述 美國專利第5,6 0 4,8 9 5號中揭露一種方法,係用以將 電腦程式碼插入一電路之高階語言軟體模型中,俾於接受 測試輸入時,監測軟體模型之測試涵蓋率。此方法具有下 列各缺點:其產生電路之擴增描述碼,藉以決定測試涵蓋 率,但擴增之描述碼必將多佔若干電腦儲存空間;以模擬 軟體或硬體工具執行擴增描述碼時,將產生若干多出之檔 案,亦必將多佔電腦儲存空間;如此決定測試涵蓋率,將 導致使用模擬軟體或硬體工具之成本;以及使用模擬軟髏 或硬體工具決定測試涵蓋率頗為耗時。 為避免用以分析電路高階語言模型於接受測試輸入時 之測試涵蓋率的該先前技藝方法之各項缺點,本案發明人 考慮將模擬軟體或硬體工具所產生之傾出檔〔dump f i 1 e ( s )〕用於分析軟體模型接受測試輸入時之測試涵蓋 率。 發明概要 因而,本發明之一目的在於提供一種方法與系統,用 以分析一軟體模型接受測試輸入時之測試涵蓋率,其不產 生受分析電路之任何額外擴增描述碼,且不產生任何額外412674_ V. Description of the invention (1) Background of the invention The present invention relates generally to data processing systems, and particularly to the analysis of test coverage of a circuit when it accepts input data for a given complex array test. Methods and systems. Description of the conventional technique US Patent No. 5,604,895, discloses a method for inserting computer code into a high-level language software model of a circuit, and monitoring software when receiving test input Test coverage of the model. This method has the following disadvantages: it generates an augmented description code of the circuit to determine the test coverage rate, but the expanded description code will occupy more computer storage space; when the augmented description code is simulated by software or hardware tools , Which will generate a few extra files, which will also occupy more computer storage space; determining the test coverage rate in this way will result in the cost of using simulated software or hardware tools; and the use of simulated soft bones or hardware tools to determine the test coverage rate Is time consuming. In order to avoid the shortcomings of the prior art method used to analyze the test coverage of the high-level language model of the circuit when receiving test input, the inventor of the present case considered dumping the dump file generated by the simulation software or hardware tool [dump fi 1 e (s)] Used to analyze the test coverage rate when the software model accepts test inputs. SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a method and system for analyzing a test coverage rate when a software model accepts a test input, which does not generate any additional augmented description codes of the analysis circuit and does not generate any additional
第6頁 -442674- 五 '發明說明(2) 之傾出稽。 本發明之另一目的在於提供一種方法與系統,用以分 析一軟體模型接受測試輸入時之測試涵蓋率,其於分析測 試涵蓋率時,無需使用模擬軟體或硬體工具。 本發明之又另一目的在於提供一種方法與系統,用以 分析一軟體模型接受測試輸入時之測試涵蓋率,其於分析 測試涵蓋率時所耗之時間遠少於該先前技藝方法所耗者。 為達前述與其他各目的,本發明提供一方法,用以藉 由一模擬程式所輸出之至少一傾出檔,決定代表一電路之 原始高階語言描述碼之測試涵蓋率,此高階描述碼具有至 少一可執行指定語句,作為電路之模型,此至少一可執行 指定語句之左侧與右側被一指定算子分開,左側為一變 數,’右側為一表示式,其中具有至少一變數與至少一邏輯 算子,右側之表示式於計算時,決定待指定至左侧變數之 數值,傾出檔之資料包含模擬開始時刻至模擬終了時刻間 之原始高階語言描述碼中所有變數之數值,此方法包含: 一描述碼匯入步驟,用以匯入原始高階語言描述碼,作為 一電路設計之資料庫;一傾出檔匯入步驟,用以匯入傾出 檔;以及一測試涵蓋率決定步驟,利用模擬開始時刻至模 擬終了時刻間之原始高階語言描述碼中所有變數於各時刻 之數值,決定該原始高階語言描述碼之測試涵蓋率。 圖式之簡箪說明 由以下較佳實施例之詳細說明,並參照下列圊式,當 可充分明瞭本發明之較佳實施例茲參考下列圖式,詳細說-442674- Page 6 'Explanation of invention description (2). Another object of the present invention is to provide a method and system for analyzing a test coverage rate when a software model accepts a test input. When analyzing the test coverage rate, it is not necessary to use simulation software or hardware tools. Yet another object of the present invention is to provide a method and system for analyzing the test coverage rate of a software model when receiving test input. The time it takes to analyze the test coverage rate is much less than that consumed by the prior art method. . To achieve the foregoing and other objectives, the present invention provides a method for determining a test coverage rate of an original high-level language description code representing a circuit by using at least one dump file output by an analog program. The high-level description code has At least one executable specified statement is used as a model of the circuit. The left side and the right side of the at least one executable specified statement are separated by a specified operator, the left side is a variable, and the 'right side is an expression, which has at least one variable and at least A logical operator. The expression on the right determines the value of the variable to be assigned to the left when calculating. The data of the dump file contains the values of all variables in the original high-level language description code from the simulation start time to the simulation end time. The method includes: a description code import step to import the original high-level language description code as a database of circuit design; a dump file import step to import the dump file; and a test coverage rate decision Steps: use the values of all variables in the original high-level language description code at the moment between the start of the simulation and the end of the simulation to determine Test coverage of the original high-level language description code. Brief description of the drawings From the detailed description of the following preferred embodiments, and with reference to the following formulas, when the preferred embodiments of the present invention can be fully understood, reference is made to the following drawings in detail,
412674_ 五、發明說明(3) 明本發明之前述與其他各目的及功效: 圖1(a)顯示一小段Verilog程式; 圖1(b)顯示圖1(a)中所示一小段Verilog程式之事件 模型圖; 圖2(a)顯示一小段VHDL程式; 圖2(b)顯示圖2(a)中所示一小段VHDL程式之事件模型 圖; 圖3(a)顯示一小段Verilog程式; 圖3(b)顯示圖3(a)中所示一小段Verilog程式之語句 樹〔statement tree〕模型圖; 圖4顯示信號改變之追蹤方式; 圖5顯示決定已執行語句之程序; 圖6顯示依本發明方法較佳實施例之各步驟; 圖7顯示圖6中所示測試涵蓋率決定步驟之各子步驟; 圖8(a)顯示一有限狀態機模型圖〔finite state machine graph〕;以及 圖8(b)顯示對應於圖8(a)之事件模型圖。 標號說明 6 1 描 述 碼 匯 入 步 驟 62 事 件 模 型 圖 構 建步驟 63 語 句 樹 構 建 步 驟 64 FSM資訊抽取步驟. 65 傾 出 檔 匯 入 步 驟 66 變 數 選 擇 步 驟412674_ V. Description of the invention (3) The foregoing and other objects and effects of the present invention are illustrated: Figure 1 (a) shows a small section of Verilog program; Figure 1 (b) shows a small section of Verilog program shown in Figure 1 (a) Event model diagram; Figure 2 (a) shows a small segment of VHDL program; Figure 2 (b) shows the event model of a small segment of VHDL program shown in Figure 2 (a); Figure 3 (a) shows a small segment of Verilog program; Figure 3 (b) shows a model diagram of the statement tree of the Verilog program shown in Figure 3 (a); Figure 4 shows the tracking of signal changes; Figure 5 shows the procedure for determining executed statements; Figure 6 shows Steps of the preferred embodiment of the method of the present invention; Figure 7 shows the sub-steps of the test coverage determination step shown in Figure 6; Figure 8 (a) shows a finite state machine graph [finite state machine graph]; and 8 (b) shows an event model diagram corresponding to FIG. 8 (a). Label description 6 1 Description code import step 62 Event model map construction step 63 Sentence tree construction step 64 FSM information extraction step. 65 Dump file import step 66 Variable selection step
第8頁 412674 五、發明說明(4) 6 7 測試涵蓋率決定步驟 7 1 時間排定步驟 72 受影響條件式標示步驟 73 已觸發事件撿取步驟 7 4 語句樹察看步驟 较佳實施例之詳細說明 在本發明之一較佳實施例中,事件模型圖與語句樹模 型圖皆用以說明代表一電路之原始高階語言描述碼。一事 件模型圖基本上為分階層之有方向性模型圖〔G ( V,E )〕。 在此種模型中,一事件定義為一 H DL程式於模擬時,將自 動被執行之最大單元。Verilog程式中之每一 Always語句 或VHDL程式中之每一 Process語句皆能夠產生一事件模型 圖。一事件模型圖中之每一頂點〔vertex〕veV代表HDL 設計中之事件。每一事件之可執行碼亦與一頂點有關。每 一事件可具有若干子節點child(v),亦即child(v)係由頂 點v產生。例如,若將事件j之程式碼插入事件i中,則於 Verilog設計中,可使用@、wait、或延遲語句,或使用 VHDL 設計中之wait on/until/for,或延遲語句〔after〕 將此二事件中之程式碼分開。就此等事件之觸發時間 〔triggered timing〕言,其間具有階層關係。每一事件 模型圖具有一候選事件〔candidate event〕,代表目前 待觸發之點,若此事件受觸發,則下一階層事件變成此事 件模型圖之新候選事件。 現在請參閱圖1(a)與圖1(b),依前述定義,圖1(a)中Page 8 412674 V. Description of the invention (4) 6 7 Test coverage determination step 7 1 Time schedule step 72 Affected conditional labeling step 73 Triggered event picking step 7 4 Sentence tree viewing step details of the preferred embodiment Description In a preferred embodiment of the present invention, both the event model diagram and the sentence tree model diagram are used to describe the original high-level language description code representing a circuit. An event model diagram is basically a directional model diagram [G (V, E)]. In this model, an event is defined as the largest unit that an HDL program will automatically execute during simulation. Each Always statement in a Verilog program or each Process statement in a VHDL program can generate an event model diagram. Each vertex in an event model diagram [vertex] veV represents an event in the HDL design. The executable code of each event is also related to a vertex. Each event can have several child nodes child (v), that is, child (v) is generated by the vertex v. For example, if you insert the code of event j into event i, you can use @, wait, or deferred statements in Verilog design, or use wait on / until / for in VHDL design, or deferred statements [after] The codes in these two events are separated. Regarding the triggering timing of these events, there is a hierarchical relationship between them. Each event model diagram has a candidate event [candidate event], which represents the current point to be triggered. If this event is triggered, the next-level event becomes a new candidate event of the event model diagram. Please refer to FIG. 1 (a) and FIG. 1 (b). According to the foregoing definition, in FIG. 1 (a)
412674 五、發明說明(5) 所示之Verilog程式可分成五個事件,其關係建立於圖 1(b)所示之事件模型圖中,其令之箭號表示事件間之關 係。在起始狀態中,每一事件模型圖之待觸發點皆在根事 件上。若候選事件受觸發,則待觸發點移至次一事件。每 一事件模型圖中之每一頂點皆有二欄位,其中之上欄位為 事件之觸發條件,下欄位為事件之可執行碼。在圖1 ( b) 中,El、E2、及E3皆為根事件,將首先受觸發。El 1與E21 分別由E1與E2產生。於E 2執行後,經一固定延遲時間執行 E 2 1 ,因而其觸發條件可設定為其將被執行之絕對時間, 此絕對時間可自目前時間輕易算出。相同之概念可用以訂 出一 VHDL程式之事件模型圖,如圖2中所示= 前述程式皆頗簡單,因而事件模型圖中能夠直接顯示 每一事件之可執行碼。在實際案例中,一事件之可執行碼 可能頗複雜。因此,可使用語句樹,以保留每一事件之複 雜行為。一語句樹為有根且有方向性之模型圖,其中之頂 點集合N具有二種頂點。一非終端頂點具有一個或更多個 子頂點child(n) eN。一終端頂點,代表HDL碼中之終端區 塊,無子頂點,但具有一組指定語句記錄於a c t i ο η ( η ) 中。每一端點之進入條件記錄於cond(n)中。 圖3(b)中例示一段Verilog程式碼之語句樹。每一語 句樹具有二欄位,其中之上攔位為頂點之進入條件 cond(),下爛位為頂點之一組可執行碼action()。 由事件模型圖,可輕易知道一事件受觸發後,將執行 哪些程式碼。例如,在圖1 ( b )中,E 1受觸發後,將執行L 6412674 V. The Verilog program shown in the description of the invention (5) can be divided into five events, the relationship of which is established in the event model diagram shown in Figure 1 (b), and its arrow indicates the relationship between events. In the initial state, the trigger point of each event model diagram is on the root event. If the candidate event is triggered, the point to be triggered is moved to the next event. Each vertex of each event model diagram has two fields, where the upper field is the trigger condition of the event, and the lower field is the executable code of the event. In Figure 1 (b), El, E2, and E3 are root events and will be triggered first. El 1 and E21 are generated by E1 and E2, respectively. After E 2 is executed, E 2 1 is executed with a fixed delay time, so its trigger condition can be set to the absolute time it will be executed. This absolute time can be easily calculated from the current time. The same concept can be used to customize the event model diagram of a VHDL program, as shown in Figure 2 = The foregoing programs are quite simple, so the event model diagram can directly display the executable code of each event. In practical cases, the executable code for an event can be quite complex. Therefore, a statement tree can be used to preserve the complex behavior of each event. A sentence tree is a rooted and directional model graph, where the vertex set N has two kinds of vertices. A non-terminal vertex has one or more child vertices child (n) eN. A terminal vertex represents the terminal block in the HDL code and has no child vertices, but has a set of specified sentences recorded in a c t i ο η (η). The entry conditions for each endpoint are recorded in cond (n). Figure 3 (b) illustrates a sentence tree of Verilog code. Each sentence tree has two columns, where the upper block is the entry condition for the vertex cond (), and the lower block is a set of executable code action () for the vertex. From the event model diagram, you can easily know what code will be executed after an event is triggered. For example, in Figure 1 (b), after E 1 is triggered, L 6 will be executed
第10頁 412674_ 五、發明說明(6) 與L7語句。在一 HDL程式中,若已知每一變數於任何時間 之值,則能夠知道每一事件已受觸發若干次,且知道每一 語句已執行若干次。 ' 傾出檔通常係於模擬程序中產生,用以追蹤HDL程式 設計中各選定變數之改變。因此,若從頭讀取一傾出檔, 即能夠得到傾出檔中所記錄之每一變數於任何時刻之值。 此意謂,適當選擇變數,即能夠以此傾出檔得知每一語句 之執行次數°由此等統計資料,即可輕易算出測試涵蓋 率。 測試涵蓋率傾出檔分析法(D U C A )頗類似於模擬法,但 其複雜度極低。其理由如下:首先,測試涵蓋率傾出擋分 析法中可省略排程運算,此種運算在模擬法中是最費時之 步驟,但在測試涵蓋率傾出檔分析法卻屬不必要之步驟。 傾出檔中清楚紀錄一事件應於何時觸發,因而僅依循傾出 檔中程式碼之順序,即可得到正確之排程。再者,在測試 涵蓋率傾出檔分析法中,可跳過許多語句,而僅需評估某 些事件與進入條件。哪些程式碼已被執行才是重點,每一 變數之值卻無關重要。因此,運算結果不影響哪些程式碼 將被執行者,此等運算將被忽略。縱使運算結果有必要用 於決定哪些程式碼被執行,亦可自傾出檔中取出其運算結 果。因而,在產生傾出檔之模擬程序已執行的運算中,僅 少數運算需在測試涵蓋率傾出檔分析法中重新計算,故能 夠大量減低計算之複雜度。 如上所述,於決定哪些程式碼已被執行,並非所有資Page 10 412674_ 5. Explanation of the invention (6) and L7 sentence. In an HDL program, if you know the value of each variable at any time, you can know how many times each event has been triggered, and how many times each statement has been executed. 'Dump files are usually generated in simulation programs to track changes to selected variables in HDL programming. Therefore, if a dump file is read from the beginning, the value of each variable recorded in the dump file at any time can be obtained. This means that by properly selecting the variables, you can know the number of executions of each statement in this dump file. From this statistical data, you can easily calculate the test coverage. The test coverage rate dump analysis method (DUCA) is similar to the simulation method, but its complexity is extremely low. The reasons are as follows: First, the schedule calculation can be omitted in the test coverage ratio dump analysis method. This operation is the most time-consuming step in the simulation method, but it is an unnecessary step in the test coverage ratio dump analysis method. . The dump file clearly records when an event should be triggered, so only by following the order of the codes in the dump file, you can get the correct schedule. Furthermore, in test coverage dump analysis, many sentences can be skipped and only certain events and entry conditions need to be evaluated. Which code is executed is the key, but the value of each variable is irrelevant. Therefore, the result of the operation does not affect which code will be executed, and these operations will be ignored. Even if the calculation result is necessary to determine which codes are executed, the calculation results can be taken from the dump file. Therefore, among the calculations performed by the simulation program that generates dump files, only a few calculations need to be recalculated in the test coverage dump file analysis method, so the complexity of the calculation can be greatly reduced. As stated above, not all code is used to determine which code has been executed.
第11頁 _412674_ 五、發明說明(7) 訊皆屬必要,故為增進測試涵蓋率傾出檔分析法之效率, 宜先分析找出影響決定之各變數,亦即有必要追蹤此等變 數之改變。實際上,此等變數為出現於每一事件模型圖之 每一頂點的觸發條件中之變數,或語句樹之每一頂點的進 入條件中之變數。此變數選擇作業亦提供分析部分測試碼 涵蓋率之能力。若使用者僅關切整個程式碼中一部份之測 試涵蓋率,則僅需選擇追蹤此部分程式碼所需之變數,因 而能夠進一步縮短分析時間。若使用者僅關切某一語句是 否已執行,則該等a c t i ο η ()執行一次後,即可忽略各條件 之所有評估。當傾出檔頗大時,此訣竅能夠節省許多時 間。 於變數選擇步驟後,藉追蹤傾出檔中該等變數之改 變,即可開始分析涵蓋率。圖4中顯示一實例,用以更清 楚說明涵蓋率分析之作業。若一信號在傾出檔中改變其數 值,首先找出此信號之波及範圍,亦即此改變所影響之範 圍,然後在事件模型圖與語句樹中標出相關之各位置。若 受影響之程式碼為事件模型圖中之觸發條件,則將其標示 為Τ (已觸發),若受影響之程式碼為語句樹中之進入條 件,則將其標示為Μ(已變更),此等標示能夠幫助避免下 述步驟中不必要之重複計算。於經歷相同時間之所有信號 變化後,即可追蹤受觸發事件之語句樹,以決定哪些程式 碼已執行。 對於每一已觸發之事件,必須考察其語句樹,以決定 哪些程式碼已執行,如圖5中所示。於向下考察語句樹Page 11_412674_ V. Explanation of the invention (7) All information is necessary, so in order to improve the efficiency of the test coverage rate dump analysis method, it is advisable to analyze and find out the variables that affect the decision, that is, it is necessary to track these variables The change. In fact, these variables are variables that appear in the trigger condition of each vertex of each event model graph, or variables in the entry conditions of each vertex of the statement tree. This variable selection operation also provides the ability to analyze the coverage of some test codes. If the user is only concerned about the test coverage of a part of the entire code, then only the variables needed to track this part of the code need to be selected, which can further reduce the analysis time. If the user is only concerned about whether a certain sentence has been executed, then after a c t i ο η () is executed once, all evaluations of each condition can be ignored. This trick can save a lot of time when dumping out is quite large. After the variable selection step, you can begin to analyze coverage by tracking changes to these variables in the dump file. An example is shown in Figure 4 to illustrate the operation of coverage analysis more clearly. If a signal changes its value in the dump file, first find out the scope of the signal, that is, the range affected by the change, and then mark the relevant positions in the event model diagram and the sentence tree. If the affected code is a triggering condition in the event model diagram, mark it as T (triggered), and if the affected code is an entry condition in the statement tree, mark it as M (changed) These labels can help avoid unnecessary double counting in the following steps. After all signal changes at the same time, the statement tree of the triggered event can be traced to determine which codes have been executed. For each triggered event, the statement tree must be examined to determine which code has been executed, as shown in Figure 5. Looking down at the statement tree
第12頁 412674 五、發明說明(8) 時,若目前之頂點已變更,則須再度計算進入條件值,以 決定依何路徑進行;否則,可使用先前之計算結果’以 免不必要之計算。對於標示為M(已變更),但不在追縱 中之各頂點’暫時無必要計算其條件值。此等頂點之 M (已變更)標記需保持至其最後位於考窣路#中A v‘ 在上述各步禅中,於察看傾出稽之後^^//哪止此程 碼已執行及執行次數之統計資料。然而,有多種不同之& 蓋率測法需要不同之涵蓋率報告。因此,可加—後程序步 驟,以產生使用者選定之涵蓋率測法。 ’ 請參閱圖6,其顯示依本發明一較佳實施例之方法, 此方法包含一描述碼匯入步驟6 1 ,用以匯入原始高階語言 =述碼,以形成電路設計資料庫;—事件模型圖構建步^ 2,用以察看電路設計資料庫,並找出各基本事件單元, 2構建各事件模型圖;一語句樹構建步驟63,用以構建各 ς本事件單元之語句樹;—FSM資訊抽取步驟64,用以自 1路設計資料庫抽取FSM資訊〔包括轉移與狀態資訊〕, 6 5寄轉移與狀態資訊附加至語句樹中;一傾出棺匯入步驟 數.用以匯入傾出檔;一變數選擇步驟66,用以自所有變 中 選擇將至少觸發一事件單元,或至少出現於一語句樹 示之各變數;以及一測試涵蓋率決定步驟67。如圖7中所 影输測試涵蓋率決定步驟6 7包含一時間排定步驟Ή、一受 語句 件式標示步驟72、一已觸發事件撿取步驟73、及一 ^ ^樹察看步驟74。時間排定步驟71係用以依一預定之時 9量’監控自模擬開始時刻至模擬結束時刻之各時刻,Page 12 412674 V. In the description of the invention (8), if the current vertex has been changed, the entry condition value must be calculated again to decide which path to follow; otherwise, the previous calculation result can be used to avoid unnecessary calculation. It is not necessary to calculate the condition value for each vertex labeled M (changed) but not in the pursuit. The M (changed) mark of these vertices must be kept until it is finally located in Kao Lu Road # 中 A v 'In the above steps, after watching the dumping, ^^ // Which code has been executed and executed Statistics of times. However, there are many different coverage methods that require different coverage reports. Therefore, post-procedure steps can be added to generate the coverage test method selected by the user. 'Please refer to FIG. 6, which shows a method according to a preferred embodiment of the present invention. This method includes a description code import step 6 1 for importing the original high-level language = description code to form a circuit design database; Event model diagram building step 2 is used to view the circuit design database and find out the basic event units, 2 to build each event model diagram; a sentence tree building step 63 is used to build a sentence tree for each event unit; —FSM information extraction step 64, used to extract FSM information [including transfer and status information] from the 1-way design database, and send the transfer and status information to the statement tree; In and out files; a variable selection step 66 for selecting at least one event unit or all variables appearing in a sentence tree from all variables; and a test coverage determination step 67. As shown in FIG. 7, the coverage test determining step 67 includes a time scheduling step Ή, a sentence recognition step 72, a triggered event retrieval step 73, and a ^ tree inspection step 74. The time scheduling step 71 is used to monitor the time from the simulation start time to the simulation end time according to a predetermined time.
412674 五、發明說明(9) 且對於此等每一時刻,產生一迭代循環。受影響條件式標-示步驟72係用以標示變數選擇步驟66中所選定變數影響所 及之每一語句樹中的條件式,此影響乃因此等選定變數在 相應於目前迭代循環之時刻與其前一時刻間之變數值改變 所造成者。已觸發事件撿取步驟73係用以撿取變數選擇步 驟66中所選定變數所觸發之各事件單元,其觸發乃因此等 選定變數在相應於目前迭代循環之時刻與其前一時刻間之 變數值改變所造成者。語句樹察看步驟74係用以察看一基 本事件單元之語句樹,以決定哪些條件式或語句已執行。 因而,可得到測試涵蓋率資料,並寫入一測試涵蓋率資料 庫中。 換言之,具有至少一可執行指定語句之原始高階語言 描述碼經分析後,可獲得此種描述碼之事件模型圖與語句 樹模型圖。待追蹤之各變數與其數值係於變數選擇步驟中 決定。完成所有準備後,即可開始察看傾出檔,以獲得執 行之統計結果。一旦自傾出檔讀出一次時間變更,即以正 確之執行順序察看各受觸發事件之語句樹,並決定哪些語 句已執行。如此,能夠找出前次時間改變與剛過時刻之間 已執行之程式碼。執行之統計結果將保留於一代碼,例如 Execution_Stats中。於察看各語句樹後,開始自傾出檔 讀取下一時段中將變更之信號。每一信號變更將更新各事 件模型圖與語句樹t之相關標記,俾在下一次時間變更 時,能夠正確決定已執行之程式碼。最後,藉一後處理副 程式處理執行之統計結果,以產生使用者選擇之測試涵蓋412674 V. Description of the invention (9) And for each of these moments, an iterative cycle is generated. Affected conditional labeling-showing step 72 is used to mark the conditional expression in each statement tree affected by the variable selected in the variable selection step 66. This effect is therefore to wait for the selected variable to Caused by a change in the value of the previous moment. The triggered event picking step 73 is used to pick up each event unit triggered by the selected variable in the variable selection step 66, and its trigger is therefore to wait for the selected variable at the time corresponding to the current iteration cycle and its previous time. Caused by change. The statement tree viewing step 74 is used to view the statement tree of a basic event unit to determine which condition or statement has been executed. Therefore, test coverage data can be obtained and written into a test coverage database. In other words, after analyzing the original high-level language description code with at least one executable specified sentence, an event model diagram and a sentence tree model diagram of the description code can be obtained. The variables to be tracked and their values are determined in the variable selection step. After completing all the preparations, you can start to look at the dump file to get the execution statistics. Once the time change is read out from the dump file, the statement tree of each triggered event is viewed in the correct execution order, and which statements are executed. In this way, it is possible to find out the code that has been executed between the last time change and the moment just after. The execution statistics will be kept in a code, such as Execution_Stats. After looking at each sentence tree, start to dump out files and read the signals that will change in the next period. Each signal change will update each event model diagram and the related mark of the statement tree t, so that the next time the change is made, the executed code can be correctly determined. Finally, a post processing subroutine is used to process the statistical results to generate the test coverage selected by the user.
第14頁 412674 五、發明說明(ίο) 率報告。 有限狀態機測試涵蓋率〔亦即狀態與狀態轉移測試涵 蓋率〕係確認有限狀態機之一種重要測試涵蓋率測法。事 實上,事件模型圖可作為有限狀態機之模型。例如,圖 8(a)中所示之有限狀態機具有三個狀態與五個狀態轉移條 件,可利用圖8(b)中所示之事件模型圖表示,其具有三個 事件,且各狀態轉移條件亦與相對應之事件相關聯。測試 涵蓋率傾出檔分析法亦可用以得到此種測試涵蓋率統計結 果。其些微差異在於對每一事件,需評估哪一條件之真假 值為「真」,以決定當此事件已被觸發時,哪一狀態轉移 條件已執行。就有限狀態機測試涵蓋率分析而言,需選擇 傾出檔中待追蹤之變數。若已訂出有限狀態機模型,則一 道測試涵蓋率分析程序,即能夠得到有限狀態機測試涵蓋 率之統計結果。 利用本發明,可得到各種測試涵蓋率,例如: •語句涵蓋率:報告每一語句是否已執行。 •分叉涵蓋率:報告控制結構中每一受測試之布林表 示式是否曾算過為「真j ,亦曾算過為「假」。 •條件涵蓋率:報告每一布林子表示式之真假結果, 此等結果發生時,被「邏輯與」及「邏輯或」分開。 •多條件涵蓋率:報告每一布林子表示式之每種可能 組合是否發生。 •路徑涵蓋率:報告每一函數中之每一可能路徑曾經 成為執行路徑。Page 14 412674 V. Description of the invention (ίο) Rate report. The finite state machine test coverage rate (ie, the state and state transition test coverage rate) is an important test coverage test method to confirm the finite state machine. In fact, the event model diagram can be used as a model for a finite state machine. For example, the finite state machine shown in FIG. 8 (a) has three states and five state transition conditions, which can be represented by the event model diagram shown in FIG. 8 (b), which has three events, and each state Transition conditions are also associated with corresponding events. The test coverage rate dump analysis method can also be used to obtain such test coverage statistics. The slight difference is that for each event, it is necessary to evaluate which condition is true or false to determine which state transition condition has been executed when this event has been triggered. For FSM test coverage analysis, the variables to be tracked in the dump file need to be selected. If a finite state machine model has been ordered, a test coverage analysis procedure can be used to obtain the statistical results of the finite state machine test coverage. With the present invention, various test coverage rates can be obtained, such as: • Statement coverage rate: Reports whether each statement has been executed. • Fork coverage rate: Reports whether each tested Bollinger expression in the control structure has ever been counted as "true j" or "false". • Condition coverage rate: Report the true and false results of each Brinzi expression. When these results occur, they are separated by "logical AND" and "logical OR". • Multi-condition coverage: Reports whether each possible combination of each Bollinger expression occurs. • Path Coverage: Reports that every possible path in each function used to be an execution path.
第15頁 41267 :_ 五、發明說明(11) •轉換涵蓋率:報告模擬過程中曾經轉換過之邏輯位 元。 •有限狀態機涵蓋率:如前段所述。 由上述說明,本技藝之一般人士當可輕易瞭解本發明 之較佳實施例能夠達成本發明之各項目的。 以上較佳實施例之詳細說明中僅用以說明本發明之技 術内容,本發明之精神與範圍當不受其限制。凡依本發明 所做的任何變更,皆屬本發明申請專利之精神與範圍。Page 15 41267: _ V. Description of the invention (11) • Conversion coverage: Reports the logical bits that have been converted during the simulation. • Finite state machine coverage: as described in the previous paragraph. From the above description, a person of ordinary skill in the art can easily understand that the preferred embodiments of the present invention can achieve the various objects of the invention. The detailed description of the above preferred embodiments is only used to explain the technical content of the present invention, and the spirit and scope of the present invention should not be limited by it. Any changes made in accordance with the present invention are within the spirit and scope of the present invention patent application.
第16頁Page 16
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW88108421A TW412674B (en) | 1999-05-20 | 1999-05-20 | Method and system for analyzing test coverage |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW88108421A TW412674B (en) | 1999-05-20 | 1999-05-20 | Method and system for analyzing test coverage |
Publications (1)
Publication Number | Publication Date |
---|---|
TW412674B true TW412674B (en) | 2000-11-21 |
Family
ID=21640809
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW88108421A TW412674B (en) | 1999-05-20 | 1999-05-20 | Method and system for analyzing test coverage |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW412674B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI564714B (en) * | 2012-02-14 | 2017-01-01 | Alibaba Group Services Ltd | Code coverage method and system, code covers detection methods and systems |
-
1999
- 1999-05-20 TW TW88108421A patent/TW412674B/en active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI564714B (en) * | 2012-02-14 | 2017-01-01 | Alibaba Group Services Ltd | Code coverage method and system, code covers detection methods and systems |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109739755B (en) | Fuzzy test system based on program tracking and mixed execution | |
US9141350B2 (en) | Embedded system performance | |
CN104573124B (en) | A kind of education cloud application statistical method based on parallelization association rule algorithm | |
US5852564A (en) | Method and apparatus for interactively displaying signal information during computer simulation of an electrical circuit | |
EP3391224B1 (en) | Method and apparatus for data mining from core traces | |
US7409602B2 (en) | Methodology for debugging RTL simulations of processor based system on chip | |
US8020123B2 (en) | Transaction-based system and method for abstraction of hardware designs | |
JP3366475B2 (en) | How to evaluate data processing speed | |
US6691079B1 (en) | Method and system for analyzing test coverage | |
US7231337B1 (en) | Using assignment decision diagrams with control nodes for sequential review during behavioral simulation | |
CN110058958A (en) | For managing the method, equipment and computer program product of data backup | |
CN114282752A (en) | Method and device for generating flow task, electronic equipment and storage medium | |
CN114860586A (en) | Binary multi-executive software instrumentation method based on dynamic instrumentation | |
US6895562B2 (en) | Partitioning integrated circuit hierarchy | |
US20120290282A1 (en) | Reachability analysis by logical circuit simulation for providing output sets containing symbolic values | |
US20080201556A1 (en) | Program instruction rearrangement methods in computer | |
US8700380B2 (en) | Method for generating performance evaluation model | |
CN114116475A (en) | Software debugging method based on log | |
TW412674B (en) | Method and system for analyzing test coverage | |
US20080071515A1 (en) | System and Method for Circuit Symbolic Timing Analysis of Circuit Designs | |
CN115345600B (en) | RPA flow generation method and device | |
US6745374B2 (en) | Algorithms for determining path coverages and activity | |
US7606692B2 (en) | Gate-level netlist reduction for simulating target modules of a design | |
US6961690B1 (en) | Behaviorial digital simulation using hybrid control and data flow representations | |
US7130784B2 (en) | Logic simulation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent |