TWI857544B - Simulation method of digital circuit - Google Patents
Simulation method of digital circuit Download PDFInfo
- Publication number
- TWI857544B TWI857544B TW112112718A TW112112718A TWI857544B TW I857544 B TWI857544 B TW I857544B TW 112112718 A TW112112718 A TW 112112718A TW 112112718 A TW112112718 A TW 112112718A TW I857544 B TWI857544 B TW I857544B
- Authority
- TW
- Taiwan
- Prior art keywords
- digital circuit
- synthesizable
- simulation
- initial
- synthesized
- Prior art date
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000001514 detection method Methods 0.000 claims abstract description 18
- 230000001960 triggered effect Effects 0.000 claims description 14
- 238000012986 modification Methods 0.000 description 10
- 230000004048 modification Effects 0.000 description 10
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 6
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 6
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
Images
Landscapes
- Tests Of Electronic Circuits (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
Abstract
Description
本案是一種能找出電路內的所有迴圈,並在模擬時對迴圈做監控的模擬方法。This case is a simulation method that can find all loops in a circuit and monitor the loops during simulation.
在數位電路的模擬中,若有存在於電路內的迴圈,如:零延遲時鐘發生器、組合邏輯電路迴圈或傳輸閘迴圈於模擬時觸發,會導致模擬時間無法前進,進而使模擬失敗。對於這些存在於電路內的迴圈,通常會於模擬前使用商用的程式分析工具對於電路的程式碼進行分析,以找出這些迴圈。In the simulation of digital circuits, if there are loops in the circuit, such as zero-delay clock generators, combinational logic circuit loops, or transmission gate loops, which are triggered during simulation, the simulation time will not be able to advance, thus causing the simulation to fail. For these loops in the circuit, commercial program analysis tools are usually used to analyze the circuit code before simulation to find these loops.
然而,程式分析工具只能在可合成(synthesizable)之語法之電路程式碼找出迴圈,不能在不可合成(unsynthesizable)之語法之電路程式碼找出迴圈。因此,若迴圈出現於不可合成之語法之電路程式碼內部,程式分析工具便無法找出而遺漏掉這些位於不可合成之語法之電路程式碼內部之迴圈。且若迴圈於模擬時觸發,電路設計者並無法即時得知是電路中的哪一個迴圈觸發而花大量時間除錯而影響到驗證效率。However, program analysis tools can only find loops in circuit code with synthesizable syntax, but not in circuit code with unsynthesizable syntax. Therefore, if loops appear in circuit code with unsynthesizable syntax, program analysis tools cannot find them and miss them. Moreover, if loops are triggered during simulation, circuit designers cannot immediately know which loop in the circuit is triggered and spend a lot of time debugging, which affects verification efficiency.
在一實施例中,一種數位電路的模擬方法包含:解析初始數位電路,以找出初始數位電路內部之多個無法合成之模塊;將初始數位電路內部之多個無法合成之模塊取代為多個可合成之模塊,以取得可合成數位電路;對可合成數位電路進行迴圈檢測,以找出可合成數位電路內部之多個迴圈;設置檢查機制於多個迴圈,以取得第二可合成數位電路;及對第二可合成數位電路進行模擬。In one embodiment, a simulation method for a digital circuit includes: analyzing an initial digital circuit to find multiple modules that cannot be synthesized within the initial digital circuit; replacing the multiple modules that cannot be synthesized within the initial digital circuit with multiple synthesizable modules to obtain a synthesizable digital circuit; performing loop detection on the synthesizable digital circuit to find multiple loops within the synthesizable digital circuit; setting a check mechanism on multiple loops to obtain a second synthesizable digital circuit; and simulating the second synthesizable digital circuit.
在一實施例中,一種數位電路的模擬方法包含:解析初始數位電路,以找出初始數位電路內部之多個無法合成之模塊;移除初始數位電路內部之多個無法合成之模塊,以取得可合成數位電路;對可合成數位電路進行迴圈檢測,以找出可合成數位電路內部之多個迴圈;設置檢查機制於多個迴圈,以取得第二可合成數位電路;及對第二可合成數位電路進行模擬。In one embodiment, a simulation method for a digital circuit includes: analyzing an initial digital circuit to find multiple modules that cannot be synthesized within the initial digital circuit; removing multiple modules that cannot be synthesized within the initial digital circuit to obtain a synthesizable digital circuit; performing loop detection on the synthesizable digital circuit to find multiple loops within the synthesizable digital circuit; setting a check mechanism on multiple loops to obtain a second synthesizable digital circuit; and simulating the second synthesizable digital circuit.
在一實施例中,一種數位電路的模擬方法包含:解析初始數位電路,以找出初始數位電路內部之多個無法合成之模塊;將初始數位電路內部之多個無法合成之模塊取代為多個可合成之模塊,以取得可合成數位電路;對可合成數位電路進行迴圈檢測,以找出可合成數位電路內部之多個迴圈;移除多個迴圈,以取得第二可合成數位電路;及對第二可合成數位電路進行模擬。In one embodiment, a simulation method for a digital circuit includes: analyzing an initial digital circuit to find multiple modules that cannot be synthesized within the initial digital circuit; replacing the multiple modules that cannot be synthesized within the initial digital circuit with multiple synthesizable modules to obtain a synthesizable digital circuit; performing loop detection on the synthesizable digital circuit to find multiple loops within the synthesizable digital circuit; removing multiple loops to obtain a second synthesizable digital circuit; and simulating the second synthesizable digital circuit.
在一實施例中,一種數位電路的模擬方法包含:解析初始數位電路,以找出初始數位電路內部之多個無法合成之模塊;移除初始數位電路內部之多個無法合成之模塊,以取得可合成數位電路;對可合成數位電路進行迴圈檢測,以找出可合成數位電路內部之多個迴圈;移除多個迴圈,以取得第二可合成數位電路;及對第二可合成數位電路進行模擬。In one embodiment, a simulation method for a digital circuit includes: analyzing an initial digital circuit to find multiple modules that cannot be synthesized within the initial digital circuit; removing multiple modules that cannot be synthesized within the initial digital circuit to obtain a synthesizable digital circuit; performing loop detection on the synthesizable digital circuit to find multiple loops within the synthesizable digital circuit; removing multiple loops to obtain a second synthesizable digital circuit; and simulating the second synthesizable digital circuit.
在一實施例中,一種數位電路的模擬裝置包含電路解析模組、電路修改模組、迴圈檢測模組、檢查設置模組及模擬模組。電路解析模組用以解析初始數位電路,以找出初始數位電路內部之多個無法合成之模塊。電路修改模組用以將初始數位電路內部之多個無法合成之模塊取代為多個可合成之模塊,以取得可合成數位電路。迴圈檢測模組用以對可合成數位電路進行迴圈檢測,以找出可合成數位電路內部之多個迴圈。檢查設置模組用以設置檢查機制於多個迴圈,以取得第二可合成數位電路。模擬模組用以對第二可合成數位電路進行模擬。In one embodiment, a simulation device for a digital circuit includes a circuit analysis module, a circuit modification module, a loop detection module, a check setting module, and a simulation module. The circuit analysis module is used to analyze the initial digital circuit to find out multiple modules that cannot be synthesized inside the initial digital circuit. The circuit modification module is used to replace multiple modules that cannot be synthesized inside the initial digital circuit with multiple synthesizable modules to obtain a synthesizable digital circuit. The loop detection module is used to perform loop detection on the synthesizable digital circuit to find out multiple loops inside the synthesizable digital circuit. The check setting module is used to set a check mechanism on multiple loops to obtain a second synthesizable digital circuit. The simulation module is used to simulate the second synthesizable digital circuit.
以下在實施方式中詳細敘述本案之詳細特徵以及優點,其內容足以使任何熟習相關技藝者瞭解本案之技術內容並據以實施,且根據本說明書所揭露之內容、申請專利範圍及圖式,任何熟習相關技藝者可輕易地理解本案相關之目的及優點。The detailed features and advantages of the present invention are described in detail in the following implementation method, and the content is sufficient for anyone familiar with the relevant technology to understand the technical content of the present invention and implement it accordingly. Moreover, according to the content disclosed in this specification, the scope of the patent application and the drawings, anyone familiar with the relevant technology can easily understand the relevant purposes and advantages of the present invention.
圖1為數位電路的模擬裝置1之一實施例的方塊示意圖。圖2為數位電路的模擬方法之一實施例之流程圖。請參閱圖1及圖2。數位電路的模擬裝置1包含電路解析模組10、電路修改模組20、迴圈檢測模組30、檢查設置模組40及模擬模組50。FIG1 is a block diagram of an embodiment of a
電路解析模組10用以解析初始數位電路CI,以找出初始數位電路CI內部之多個無法合成之模塊(步驟S11)。在一些實施例中,解析初始數位電路CI,以找出初始數位電路CI內部之多個無法合成之模塊,可為但不限於,在初始數位電路CI之程式碼內搜尋僅會出現於多個無法合成之模塊之多個關鍵字。在一些實施例中,在初始數位電路CI之程式碼內搜尋僅會出現於多個無法合成之模塊之多個關鍵字,可為但不限於,在初始數位電路CI之程式碼內搜尋資料狀態為實數(real)的變數、硬體描述語言內部之原語(primitive)、硬體描述語言內部之單元(cell)、邊緣觸發和非邊緣觸發同時存在之區塊(block)或冪運算運算子(**)。在一些實施例中,初始數位電路CI內部之多個無法合成之模塊可為但不限於類比電路。The
電路修改模組20用以將初始數位電路CI內部之多個無法合成之模塊取代為多個可合成之模塊,以取得可合成數位電路C1(步驟S12)。在一些實施例中,將初始數位電路CI內部之多個無法合成之模塊取代為多個可合成之模塊,以取得可合成數位電路C1,可為但不限於,在電路解析模組10搜尋到初始數位電路CI之程式碼內僅會出現於多個無法合成之模塊之多個關鍵字時,將多個關鍵字所在之程式碼修改為可合成之程式碼。在一些實施例中,在搜尋到初始數位電路CI之程式碼內僅會出現於多個無法合成之模塊之多個關鍵字時,將多個關鍵字所在之程式碼修改為可合成之程式碼,可為但不限於,將資料狀態為實數的變數修改為資料狀態為整數(integer)的變數、將硬體描述語言內部之原語或硬體描述語言內部之單元修改為可合成之程式碼、將邊緣觸發和非邊緣觸發同時存在之區塊修改為僅存在邊緣觸發之區塊或僅存在非邊緣觸發之區塊或將冪運算運算子修改為加法運算子(+)。The
迴圈檢測模組30用以對可合成數位電路C1進行迴圈檢測,以找出可合成數位電路C1內部之多個迴圈(步驟S13)。在一些實施例中,對可合成數位電路C1進行迴圈檢測,以找出可合成數位電路C1內部之多個迴圈,可為但不限於,透過程式分析工具分析可合成數位電路C1之程式碼。在一些實施例中,程式分析工具可為但不限於SpyGlass。The
檢查設置模組40用以設置檢查機制於可合成數位電路C1內部之多個迴圈,以取得第二可合成數位電路C2(步驟S14)。在一些實施例中,設置檢查機制於可合成數位電路C1內部之多個迴圈,以取得第二可合成數位電路C2,可為但不限於,在多個迴圈內部加入檢查訊號,並於觸發迴圈時對檢查訊號之切換(toggle)次數進行偵測,且當檢查訊號之切換次數大於閾值時,顯示警告訊息並暫停模擬。在一些實施例中,閾值可為但不限於10000。在一些實施例中,警告訊息會顯示檢查訊號或迴圈之名稱及模擬時間使電路設計者得知因哪個迴圈導致模擬暫停。The
模擬模組50用以對第二可合成數位電路C2進行模擬(步驟S15)。當對第二可合成數位電路C2進行模擬時觸發多個迴圈之一時,模擬模組50執行檢查設置模組40所設置之檢查機制。換言之,於模擬時若觸發多個迴圈之一時,模擬模組50即開始對檢查訊號之切換次數進行偵測,且當檢查訊號之切換次數大於閾值時顯示警告訊息並暫停模擬。舉例而言,若閾值為10000,當模擬時多個迴圈之一遭觸發,模擬模組50即對遭觸發之迴圈內部之檢查訊號進行切換次數之偵測,當切換次數大於10000時,模擬模組50即顯示警告訊息並暫停模擬。在一些實施例中,於顯示警告訊息並暫停模擬時,電路設計者可依據警告訊息所顯示之資訊對特定訊號賦予固定值並繼續模擬。在一些實施例中,於顯示警告訊息並暫停模擬時,電路設計者可依據警告訊息所顯示之資訊停止模擬。The
圖3為數位電路的模擬方法之另一實施例之流程圖。請參閱圖1及圖3。在一些實施例中,電路修改模組20移除初始數位電路CI內部之多個無法合成之模塊,以取得可合成數位電路C1(步驟S22)。在一些實施例中,移除初始數位電路CI內部之多個無法合成之模塊,以取得可合成數位電路C1,可為但不限於在搜尋到初始數位電路CI之程式碼內僅會出現於多個無法合成之模塊之多個關鍵字後,將多個關鍵字所在之模塊之程式碼刪除。FIG3 is a flow chart of another embodiment of the simulation method of the digital circuit. Please refer to FIG1 and FIG3. In some embodiments, the
圖4為數位電路的模擬方法之又一實施例之流程圖。請參閱圖1及圖4。在一些實施例中,檢查設置模組40移除可合成數位電路C1內部之多個迴圈,以取得第二可合成數位電路C2(步驟S24)。在一些實施例中,移除可合成數位電路C1內部之多個迴圈,可為但不限於,在透過程式分析工具分析可合成數位電路C1之程式碼,以找出可合成數位電路C1內部之多個迴圈後,將多個迴圈之程式碼刪除。FIG4 is a flow chart of another embodiment of the digital circuit simulation method. Please refer to FIG1 and FIG4. In some embodiments, the
圖5為數位電路的模擬方法之再一實施例之流程圖。請參閱圖1及圖5。在一些實施例中,電路修改模組20移除初始數位電路CI內部之多個無法合成之模塊,以取得可合成數位電路C1(步驟S22)且檢查設置模組40移除可合成數位電路C1內部之多個迴圈,以取得第二可合成數位電路C2(步驟S24)。FIG5 is a flow chart of another embodiment of the simulation method of the digital circuit. Please refer to FIG1 and FIG5. In some embodiments, the
在一些實施例中,前述電路解析模組10、電路修改模組20、迴圈檢測模組30、檢查設置模組40及模擬模組50係可由一個或多個處理單元實現。其中,處理單元可以是微處理器、微控制器、數位信號處理器、中央處理器、可編程邏輯控制器、狀態器或任何基於操作指令操作信號的類比和/或數位裝置,在此並不限制處理單元的種類。In some embodiments, the aforementioned
綜上所述,在一些實施例中,數位電路的模擬裝置1透過電路解析模組10及電路修改模組20將初始數位電路CI內部之多個無法合成之模塊取代為多個可合成之模塊,使程式分析工具能完整找出初始數位電路CI之所有迴圈,而不會遺漏掉設置於初始數位電路CI中不可合成之語法之電路程式碼內部之迴圈。且透過檢查設置模組40設置檢查機制於可合成數位電路C1內部之多個迴圈,可使電路設計者於模擬中迴圈觸發時能即時得知是電路中的哪一個迴圈觸發而不需花大量時間除錯,進而大幅提升驗證效率。In summary, in some embodiments, the
雖然本案的技術內容已經以較佳實施例揭露如上,然其並非用以限定本案,任何熟習此技藝者,在不脫離本案之精神所作些許之更動與潤飾,皆應涵蓋於本案的範疇內,因此本案之保護範圍當視後附之申請專利範圍所界定者為準。Although the technical content of this case has been disclosed as above with the preferred embodiment, it is not used to limit this case. Any slight changes and embellishments made by anyone familiar with this technology without departing from the spirit of this case should be included in the scope of this case. Therefore, the protection scope of this case shall be defined by the scope of the attached patent application.
1:數位電路的模擬裝置 10:電路解析模組 20:電路修改模組 30:迴圈檢測模組 40:檢查設置模組 50:模擬模組 CI:初始數位電路 C1:可合成數位電路 C2:第二可合成數位電路 S11~S15:步驟 S22:步驟 S24:步驟1: Digital circuit simulation device 10: Circuit analysis module 20: Circuit modification module 30: Loop detection module 40: Inspection setting module 50: Simulation module CI: Initial digital circuit C1: Synthesizable digital circuit C2: Second synthesizable digital circuit S11~S15: Steps S22: Steps S24: Steps
圖1為數位電路的模擬裝置之一實施例的方塊示意圖。 圖2為數位電路的模擬方法之一實施例之流程圖。 圖3為數位電路的模擬方法之另一實施例之流程圖。 圖4為數位電路的模擬方法之又一實施例之流程圖。 圖5為數位電路的模擬方法之再一實施例之流程圖。 FIG1 is a block diagram of an embodiment of a simulation device for a digital circuit. FIG2 is a flow chart of an embodiment of a simulation method for a digital circuit. FIG3 is a flow chart of another embodiment of a simulation method for a digital circuit. FIG4 is a flow chart of another embodiment of a simulation method for a digital circuit. FIG5 is a flow chart of another embodiment of a simulation method for a digital circuit.
1:數位電路的模擬裝置 1: Analog device for digital circuits
10:電路解析模組 10: Circuit analysis module
20:電路修改模組 20: Circuit modification module
30:迴圈檢測模組 30: Loop detection module
40:檢查設置模組 40: Check the settings module
50:模擬模組 50:Simulation module
CI:初始數位電路 CI: Initial digital circuit
C1:可合成數位電路 C1: can synthesize digital circuits
C2:第二可合成數位電路 C2: The second synthesizable digital circuit
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112112718A TWI857544B (en) | 2023-03-31 | 2023-03-31 | Simulation method of digital circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW112112718A TWI857544B (en) | 2023-03-31 | 2023-03-31 | Simulation method of digital circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TWI857544B true TWI857544B (en) | 2024-10-01 |
| TW202441404A TW202441404A (en) | 2024-10-16 |
Family
ID=94081836
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW112112718A TWI857544B (en) | 2023-03-31 | 2023-03-31 | Simulation method of digital circuit |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI857544B (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6553514B1 (en) * | 1999-09-23 | 2003-04-22 | International Business Machines Corporation | Digital circuit verification |
| TW200636519A (en) * | 2005-04-07 | 2006-10-16 | Sunplus Technology Co Ltd | Backward simulation method for use in a digital circuit |
| TW200919246A (en) * | 2007-10-17 | 2009-05-01 | Synopsys Inc | Enhancing speed of simulation of an IC design while testing scan circuitry |
| US20090228849A1 (en) * | 2008-03-05 | 2009-09-10 | Mossawir Kathryn M | Method for Using an Equivalence Checker to Reduce Verification Effort in a System Having Analog Blocks |
| TW202219810A (en) * | 2020-11-06 | 2022-05-16 | 瑞昱半導體股份有限公司 | Integrated circuit simulation and design method and system thereof |
-
2023
- 2023-03-31 TW TW112112718A patent/TWI857544B/en active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6553514B1 (en) * | 1999-09-23 | 2003-04-22 | International Business Machines Corporation | Digital circuit verification |
| TW200636519A (en) * | 2005-04-07 | 2006-10-16 | Sunplus Technology Co Ltd | Backward simulation method for use in a digital circuit |
| TW200919246A (en) * | 2007-10-17 | 2009-05-01 | Synopsys Inc | Enhancing speed of simulation of an IC design while testing scan circuitry |
| US20090228849A1 (en) * | 2008-03-05 | 2009-09-10 | Mossawir Kathryn M | Method for Using an Equivalence Checker to Reduce Verification Effort in a System Having Analog Blocks |
| TW202219810A (en) * | 2020-11-06 | 2022-05-16 | 瑞昱半導體股份有限公司 | Integrated circuit simulation and design method and system thereof |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202441404A (en) | 2024-10-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20090204931A1 (en) | Method And Apparatus For Processing Assertions In Assertion-Based Verification of A Logic Design | |
| US20090248390A1 (en) | Trace debugging in a hardware emulation environment | |
| US6453437B1 (en) | Method and system for performing transition fault simulation along long circuit paths for high-quality automatic test pattern generation | |
| US20080137800A1 (en) | Method, Apparatus, and Program for Detecting the Correlation Between Repeating Events | |
| US20080263489A1 (en) | Method to identify and generate critical timing path test vectors | |
| WO2013179076A1 (en) | A simulation system and method for testing a simulation of a device against one or more violation rules | |
| US8219376B2 (en) | Verification using directives having local variables | |
| CN113935041A (en) | Vulnerability detection system and method for real-time operating system equipment | |
| US7124383B2 (en) | Integrated proof flow system and method | |
| Wu et al. | Mantra: Mutation testing of hardware design code based on real bugs | |
| CN112948193B (en) | An FPGA comprehensive tool defect detection method based on differential testing | |
| US6810507B2 (en) | Method and apparatus for isolating the root of indeterminate logic values in an HDL simulation | |
| US10228422B2 (en) | Driving pervasive commands using breakpoints in a hardware-accelerated simulation environment | |
| TWI857544B (en) | Simulation method of digital circuit | |
| CN117521085A (en) | Internet of Things terminal security vulnerability detection system and method based on heap management mechanism | |
| US20070180414A1 (en) | Facilitating structural coverage of a design during design verification | |
| US9495504B2 (en) | Using traces of original model to verify a modified model | |
| De Paula et al. | TAB-BackSpace: Unlimited-length trace buffers with zero additional on-chip overhead | |
| Mefenza et al. | Automatic uvm environment generation for assertion-based and functional verification of systemc designs | |
| Liu et al. | On signal tracing for debugging speedpath-related electrical errors in post-silicon validation | |
| Tang et al. | Diagnosing timing related cell internal defects for FinFET technology | |
| CN106919748B (en) | Apparatus and method for improving FPGA prototype verification efficiency | |
| CN111782695B (en) | MPW multi-product joint measurement data processing method, storage medium and computer equipment | |
| US20180189435A1 (en) | System and method for capturing transaction specific stage-wise log data | |
| Rodopoulos et al. | Understanding timing impact of BTI/RTN with massively threaded atomistic transient simulations |