TW201704997A - Debugging system and control method thereof - Google Patents
Debugging system and control method thereof Download PDFInfo
- Publication number
- TW201704997A TW201704997A TW104124680A TW104124680A TW201704997A TW 201704997 A TW201704997 A TW 201704997A TW 104124680 A TW104124680 A TW 104124680A TW 104124680 A TW104124680 A TW 104124680A TW 201704997 A TW201704997 A TW 201704997A
- Authority
- TW
- Taiwan
- Prior art keywords
- function
- pin
- emulator
- pins
- tested
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/26—Pc applications
- G05B2219/2604—Test of external equipment
Abstract
Description
本發明係有關於一種偵錯系統,特別是有關於一種偵錯系統之控制方法。 The present invention relates to a debugging system, and more particularly to a method for controlling a debugging system.
微控制器(MicroController Unit,MCU)或微處理器(Microprocessor)被廣泛應用在各種工業、家庭電器產品或設備之中。目前,微控制器/微處理器的程式開發必須使用到晶片模擬系統,並利用斷點(breakpoint)來監控程式的執行狀態,以便對程式進行偵錯。 MicroController Units (MCUs) or microprocessors (Microprocessors) are widely used in various industrial and home electrical products or devices. Currently, microcontroller/microprocessor program development must use a wafer emulation system and use breakpoints to monitor the execution state of the program in order to debug the program.
本發明提供一種偵錯系統。上述偵錯系統包括一仿真器以及一印刷電路板。上述仿真器包括:一第一組接腳,具有一第一接腳與一第二接腳;以及,一第二組接腳,具有一第三接腳與一第四接腳。 The invention provides a debugging system. The above debug system includes an emulator and a printed circuit board. The emulator includes: a first set of pins having a first pin and a second pin; and a second set of pins having a third pin and a fourth pin.
上述印刷電路板包括:一待測晶片,包括:一第一多功能接腳,選擇性地支援一偵錯功能以及一特定功能之一者;以及一第二多功能接腳,選擇性地支援上述偵錯功能以及上述特定功能之該者;至少一週邊元件,支援上述特定功能;以及一切換器,選擇性地將上述待測晶片之上述第一與第二多功能接腳耦接於上述仿真器的上述第一組接腳或是上述週邊 元件。當上述待測晶片之上述第一與第二多功能接腳支援上述偵錯功能時,上述切換器將上述待測晶片之上述第一與第二多功能接腳耦接於上述仿真器的上述第一組接腳,以執行上述偵錯功能,並將上述仿真器的上述第二組接腳耦接於上述週邊元件,以執行上述特定功能。 The printed circuit board includes: a chip to be tested, comprising: a first multi-function pin, selectively supporting one of a debugging function and a specific function; and a second multi-function pin for selectively supporting The above-mentioned debugging function and the above-mentioned specific function; at least one peripheral component supporting the specific function; and a switch for selectively coupling the first and second multi-function pins of the chip to be tested to the above The first set of pins of the emulator or the periphery element. When the first and second multi-function pins of the chip to be tested support the debugging function, the switch couples the first and second multi-function pins of the chip to be tested to the emulator described above. The first set of pins are configured to perform the above-described debugging function, and the second set of pins of the emulator are coupled to the peripheral components to perform the specific functions described above.
再者,本發明提供一種控制方法,適用於一偵錯系統,其中上述偵錯系統包括一仿真器以及一印刷電路板,其中上述印刷電路板包括一待測晶片,具有選擇性地支援一偵錯功能以及一特定功能之一者的一第一多功能接腳以及一第二多功能接腳。當上述待測晶片之上述第一與第二多功能接腳支援上述偵錯功能時,經由上述印刷電路板之一切換器將上述待測晶片之上述第一與第二多功能接腳分別耦接於上述仿真器的一第一接腳以及一第二接腳,以執行上述偵錯功能,並經由上述印刷電路板之上述切換器將上述仿真器的一第三接腳與一第四接腳耦接於上述週邊元件,以執行上述特定功能。當上述待測晶片之上述第一與第二多功能接腳支援上述特定功能時,經由上述印刷電路板之上述切換器將上述待測晶片之上述第一與第二多功能接腳耦接於上述印刷電路板之至少一週邊元件,以執行上述特定功能。 Furthermore, the present invention provides a control method suitable for use in a debug system, wherein the debug system includes an emulator and a printed circuit board, wherein the printed circuit board includes a wafer to be tested, and selectively supports a detective A first multi-function pin and a second multi-function pin of the wrong function and one of the specific functions. When the first and second multi-function pins of the chip to be tested support the debugging function, respectively coupling the first and second multi-function pins of the chip to be tested via one switch of the printed circuit board Connecting to a first pin and a second pin of the emulator to perform the above-mentioned debugging function, and connecting a third pin and a fourth port of the emulator via the switch of the printed circuit board The foot is coupled to the peripheral components described above to perform the specific functions described above. When the first and second multi-function pins of the chip to be tested support the specific function, the first and second multi-function pins of the chip to be tested are coupled to the device via the switch of the printed circuit board. At least one peripheral component of the printed circuit board described above to perform the specific functions described above.
100‧‧‧印刷電路板 100‧‧‧Printed circuit board
110‧‧‧切換器 110‧‧‧Switcher
120-170‧‧‧週邊元件 120-170‧‧‧ peripheral components
150‧‧‧待測晶片 150‧‧‧Samps to be tested
155‧‧‧微控制器 155‧‧‧Microcontroller
200‧‧‧橋接器 200‧‧‧ Bridge
250‧‧‧仿真器 250‧‧‧ Simulator
300‧‧‧處理裝置 300‧‧‧Processing device
310‧‧‧顯示單元 310‧‧‧Display unit
320‧‧‧處理器 320‧‧‧ processor
CTRL‧‧‧控制信號 CTRL‧‧‧ control signal
IC_P1、IC_P2‧‧‧多功能接腳 IC_P1, IC_P2‧‧‧ multi-function pin
ICE_P1-ICE_P4、PD_P1-PD_P2‧‧‧接腳 ICE_P1-ICE_P4, PD_P1-PD_P2‧‧‧ pins
PG1‧‧‧第一組接腳 PG1‧‧‧First set of pins
PG2‧‧‧第一組接腳 PG2‧‧‧First set of pins
Path1-Path2‧‧‧信號路徑 Path1-Path2‧‧‧Signal Path
第1圖係顯示根據本發明一實施例所述之偵測系統;第2圖係顯示根據本發明一實施例所述之第1圖中印刷電路板以及橋接器之主要元件的示意圖; 第3圖係顯示第2圖中待測晶片的兩多功能接腳被指派來執行特定功能的示意圖;第4圖係顯示第2圖中待測晶片的兩多功能接腳被指派來執行偵測功能的示意圖;第5圖係顯示根據本發明一實施例所述之偵錯系統之控制方法的流程圖;第5圖係顯示根據本發明另一實施例所述之偵錯系統之控制方法的流程圖;以及第7圖係顯示根據本發明另一實施例所述之偵錯系統之控制方法的流程圖。 1 is a view showing a detection system according to an embodiment of the present invention; and FIG. 2 is a view showing main components of a printed circuit board and a bridge in FIG. 1 according to an embodiment of the present invention; Figure 3 is a diagram showing the two multi-function pins of the wafer to be tested in Figure 2 assigned to perform a specific function; Figure 4 is a diagram showing that the two multi-function pins of the wafer to be tested in Figure 2 are assigned to perform the detection. FIG. 5 is a flowchart showing a control method of a debugging system according to an embodiment of the present invention; FIG. 5 is a diagram showing a control method of a debugging system according to another embodiment of the present invention. FIG. 7 is a flow chart showing a method of controlling a debug system according to another embodiment of the present invention.
為讓本發明之上述和其他目的、特徵、和優點能更明顯易懂,下文特舉出較佳實施例,並配合所附圖式,作詳細說明如下:為對微控制器/微處理器進行偵錯,可使用在線模擬器(In Circuit Emulator,ICE)。待測的微控制器/微處理器可設置在印刷電路板上的積體電路內,而在線模擬器可耦接於印刷電路板以及處理裝置之間。處理裝置可為個人電腦、平板或手機等電腦/電子裝置,且上述處理裝置具有整合型發展系統軟體(Integrated Development Environment,IDE)。因此,工程師可透過整合型發展系統軟體來模擬晶片上微控制器/微處理器的行為,以便縮短程式開發以及偵錯的時間。 The above and other objects, features and advantages of the present invention will become more <RTIgt; For debugging, use the In Circuit Emulator (ICE). The microcontroller/microprocessor to be tested can be placed in an integrated circuit on a printed circuit board, and the in-circuit simulator can be coupled between the printed circuit board and the processing device. The processing device may be a computer/electronic device such as a personal computer, a tablet or a mobile phone, and the processing device has an integrated development environment (IDE). As a result, engineers can simulate the behavior of microcontrollers/microprocessors on a chip through integrated development system software to reduce program development time and debug time.
第1圖係顯示根據本發明一實施例所述之偵測系統10。偵錯系統10包括印刷電路板100、橋接器200以及處理裝 置300,其中待測晶片150係設置於印刷電路板100上並具有複數接腳。此外,印刷電路板100更包括切換器110以及複數週邊元件120-170,其中週邊元件110-170能與待測晶片150共同執行不同的特定功能。處理裝置300包括顯示單元310以及處理器320。在此實施例中,處理裝置300為具有整合型發展系統軟體(IDE)的個人電腦。橋接器(bridge)200包括可在整合型發展系統軟體環境下使用的仿真器(emulator)250,例如ULink、J-Link或是Nu-Link等。在此實施例中,藉由整合型發展系統軟體,處理裝置300內的處理器320可透過橋接器200來存取印刷電路板100中待測晶片150內的暫存器以及記憶體,以便控制待測晶片150內的微控制器155來執行不同程式,並得到執行結果。同時地,在整合型發展系統軟體環境下,處理器320可在顯示單元310顯示不同程式的執行結果,於是使用者便能透過顯示單元310來觀看並診斷待測晶片150的操作狀態。 Figure 1 shows a detection system 10 in accordance with an embodiment of the present invention. The debug system 10 includes a printed circuit board 100, a bridge 200, and a processing device 300, wherein the wafer to be tested 150 is disposed on the printed circuit board 100 and has a plurality of pins. In addition, the printed circuit board 100 further includes a switch 110 and a plurality of peripheral components 120-170, wherein the peripheral components 110-170 can perform different specific functions in conjunction with the wafer under test 150. The processing device 300 includes a display unit 310 and a processor 320. In this embodiment, the processing device 300 is a personal computer with an integrated development system software (IDE). The bridge 200 includes an emulator 250 that can be used in an integrated development system software environment, such as ULink, J-Link, or Nu-Link. In this embodiment, by the integrated development system software, the processor 320 in the processing device 300 can access the register and the memory in the chip 150 to be tested in the printed circuit board 100 through the bridge 200 for control. The microcontroller 155 in the wafer under test 150 executes different programs and obtains an execution result. At the same time, in the integrated development system software environment, the processor 320 can display the execution results of different programs on the display unit 310, so that the user can view and diagnose the operation state of the wafer to be tested 150 through the display unit 310.
第2圖係顯示根據本發明一實施例所述之第1圖中印刷電路板100以及橋接器200之主要元件的示意圖。值得注意的是,在第2圖中印刷電路板100以及橋接器200的元件僅作為例子,並非用以限定本發明。印刷電路板100包括切換器110、待測晶片150以及週邊元件120。在印刷電路板100中,待測晶片150為主(master)元件,而週邊元件120為僕(slave)元件,例如記憶體等,其中待測晶片150的微控制器155可控制週邊元件120來執行特定操作。此外,橋接器200中的仿真器250包括第一組接腳PG1以及第二組接腳PG2。第一組接腳PG1包括接腳ICE_P1與接腳ICE_P2,而第二組接腳PG2包括接腳ICE_P3與接 腳ICE_P4,其中仿真器250的第一組接腳PG1與第二組接腳PG2皆耦接於印刷電路板100的切換器110。此外,待測晶片150具有多功能(multi-functional)接腳IC_P1與IC_P2,其中待測晶片150的微控制器155可指派多功能接腳IC_P1與IC_P2來執行複數功能之一者,即多功能接腳IC_P1與IC_P2可用來執行多種功能。一般而言,使用多功能接腳可減少晶片的接腳數,以降低晶片的製造成本。在此實施例中,待測晶片150的微控制器155可指派多功能接腳IC_P1與IC_P2為在線模擬器(ICE)接腳或是通用輸入輸出(General Purpose Input/Output,GPIO)接腳。若多功能接腳IC_P1與IC_P2為在線模擬器接腳,則待測晶片150可經由多功能接腳IC_P1與IC_P2耦接於橋接器200的仿真器250,以便與仿真器250進行通訊而執行偵錯功能。反之,若多功能接腳IC_P1與IC_P2為通用輸入輸出接腳,則待測晶片150可經由多功能接腳IC_P1與IC_P2耦接於印刷電路板100的週邊元件120,以便與週邊元件120進行通訊而執行通用輸入輸出功能。傳統上,當待測晶片的多功能接腳被指派為在線模擬器接腳而執行偵錯功能時,該多功能接腳會無法執行其他功能,而印刷電路板上耦接於該多功能接腳的週邊元件亦會無法正常操作。因此,使用者無法同時對該週邊元件所支援的特定功能進行驗證,即在傳統的印刷電路板上,待測晶片的特定功能與偵錯功能係無法同時被執行。 2 is a schematic view showing main components of the printed circuit board 100 and the bridge 200 in Fig. 1 according to an embodiment of the present invention. It should be noted that the components of the printed circuit board 100 and the bridge 200 in FIG. 2 are merely examples and are not intended to limit the present invention. The printed circuit board 100 includes a switch 110, a wafer to be tested 150, and a peripheral component 120. In the printed circuit board 100, the wafer to be tested 150 is a master component, and the peripheral component 120 is a slave component such as a memory or the like, wherein the microcontroller 155 of the wafer under test 150 can control the peripheral component 120. Perform specific actions. Further, the emulator 250 in the bridge 200 includes a first set of pins PG1 and a second set of pins PG2. The first set of pins PG1 includes the pin ICE_P1 and the pin ICE_P2, and the second set of pins PG2 includes the pin ICE_P3 and the connection The pin ICE_P4, wherein the first set of pins PG1 and the second set of pins PG2 of the emulator 250 are coupled to the switch 110 of the printed circuit board 100. In addition, the wafer to be tested 150 has multi-functional pins IC_P1 and IC_P2, wherein the microcontroller 155 of the wafer under test 150 can assign the multi-function pins IC_P1 and IC_P2 to perform one of the plural functions, that is, the multi-function Pins IC_P1 and IC_P2 can be used to perform a variety of functions. In general, the use of multi-function pins reduces the number of pins on the wafer to reduce the cost of manufacturing the wafer. In this embodiment, the microcontroller 155 of the wafer under test 150 can assign the multi-function pins IC_P1 and IC_P2 as an in-line emulator (ICE) pin or a general purpose input/output (GPIO) pin. If the multi-function pins IC_P1 and IC_P2 are the in-circuit emulator pins, the to-be-tested chip 150 can be coupled to the emulator 250 of the bridge 200 via the multi-function pins IC_P1 and IC_P2 to communicate with the emulator 250 to perform the detection. Wrong function. On the other hand, if the multi-function pins IC_P1 and IC_P2 are general-purpose input and output pins, the wafer to be tested 150 can be coupled to the peripheral component 120 of the printed circuit board 100 via the multi-function pins IC_P1 and IC_P2 to communicate with the peripheral component 120. And perform general-purpose input and output functions. Conventionally, when the multi-function pin of the wafer to be tested is assigned as an in-circuit emulator pin and the debug function is performed, the multi-function pin cannot perform other functions, and the printed circuit board is coupled to the multi-function The peripheral components of the foot will also not operate properly. Therefore, the user cannot simultaneously verify the specific functions supported by the peripheral components, that is, on a conventional printed circuit board, the specific functions and debug functions of the wafer to be tested cannot be simultaneously executed.
在第2圖中,切換器110會根據控制信號CTRL而選擇性地將待測晶片150的多功能接腳IC_P1與IC_P2耦接於仿真器250的第一組接腳PG1(即接腳ICE_P1與ICE_P2)或是週邊元 件120的接腳PD_P1與PD_P2。此外,當切換器110將待測晶片150的多功能接腳IC_P1與IC_P2耦接於仿真器250的第一組接腳PG1時,切換器110亦會根據控制信號CTRL而將仿真器250的第二組接腳PG2(即接腳ICE_P3與ICE_P4)耦接於週邊元件120的接腳PD_P1與PD_P2。於是,當待測晶片150的多功能接腳IC_P1與IC_P2被指派為在線模擬器接腳來執行偵錯功能時,待測晶片150可經由仿真器250與週邊元件120進行通訊,以執行特定功能。於是,在印刷電路板100上,當待測晶片150的多功能接腳IC_P1與IC_P2被指派來執行偵錯功能時,待測晶片150的特定功能與偵錯功能可以同時被執行。此外,控制信號CTRL可由待測晶片150或是仿真器250所提供。在一實施例中,控制信號CTRL可由使用者手動設定。 In FIG. 2, the switch 110 selectively couples the multi-function pins IC_P1 and IC_P2 of the wafer to be tested 150 to the first group of pins PG1 of the emulator 250 according to the control signal CTRL (ie, the pin ICE_P1 and ICE_P2) or surrounding yuan Pins PD_P1 and PD_P2 of the device 120. In addition, when the switch 110 couples the multi-function pins IC_P1 and IC_P2 of the chip to be tested 150 to the first group pin PG1 of the emulator 250, the switch 110 also applies the emulator 250 according to the control signal CTRL. The two sets of pins PG2 (ie, the pins ICE_P3 and ICE_P4) are coupled to the pins PD_P1 and PD_P2 of the peripheral component 120. Thus, when the multi-function pins IC_P1 and IC_P2 of the wafer under test 150 are assigned as the in-circuit emulator pins to perform the debug function, the wafer under test 150 can communicate with the peripheral component 120 via the emulator 250 to perform a specific function. . Thus, on the printed circuit board 100, when the multi-function pins IC_P1 and IC_P2 of the wafer to be tested 150 are assigned to perform the debug function, the specific function and the debug function of the wafer under test 150 can be simultaneously performed. Additionally, the control signal CTRL can be provided by the wafer under test 150 or the emulator 250. In an embodiment, the control signal CTRL can be manually set by the user.
第3圖係顯示第2圖中待測晶片150的多功能接腳IC_P1與IC_P2被指派來執行特定功能的示意圖。在第3圖中,切換器110會根據控制信號CTRL而將待測晶片150的多功能接腳IC_P1與IC_P2耦接於週邊元件120的接腳PD_P1與PD_P2。於是,待測晶片150可與週邊元件120進行通訊而執行特定功能。 Fig. 3 is a view showing that the multi-function pins IC_P1 and IC_P2 of the wafer to be tested 150 in Fig. 2 are assigned to perform a specific function. In FIG. 3, the switch 110 couples the multi-function pins IC_P1 and IC_P2 of the wafer to be tested 150 to the pins PD_P1 and PD_P2 of the peripheral component 120 according to the control signal CTRL. Thus, the wafer under test 150 can communicate with the peripheral component 120 to perform a particular function.
第4圖係顯示第2圖中待測晶片150的多功能接腳IC_P1與IC_P2被指派來執行偵測功能的示意圖。在第4圖中,切換器110會根據控制信號CTRL而將待測晶片150的多功能接腳IC_P1與IC_P2耦接於仿真器250的第一組接腳PG1,以建立信號路徑Path1。於是,待測晶片150可與仿真器250經由信號路徑Path1進行通訊而執行偵錯功能。在此實施例中,仿真器250的接腳ICE_P1為資料接腳(例如ICE_DAT),而仿真器250的 接腳ICE_P2為時脈接腳(例如ICE_CLK)。此外,切換器110亦會根據控制信號CTRL而將仿真器250的第二組接腳PG1耦接於週邊元件120的接腳PD_P1與PD_P2,以建立信號路徑Path2。於是,待測晶片150可透過仿真器250以及信號路徑Path2與週邊元件120進行通訊而執行特定功能,例如通用輸入輸出(GPIO)、通用非同步收發器(universal asynchronous receiver/transmitter,UART)、脈波寬度調變(PWM)或是內部積體電路(Inter Integrated Circuit,I2C)功能等。 Fig. 4 is a view showing that the multi-function pins IC_P1 and IC_P2 of the wafer to be tested 150 in Fig. 2 are assigned to perform the detecting function. In FIG. 4, the switch 110 couples the multi-function pins IC_P1 and IC_P2 of the wafer to be tested 150 to the first set of pins PG1 of the emulator 250 according to the control signal CTRL to establish the signal path Path1. Thus, the wafer under test 150 can perform a debug function by communicating with the emulator 250 via the signal path Path1. In this embodiment, the pin ICE_P1 of the emulator 250 is a data pin (eg, ICE_DAT), and the emulator 250 Pin ICE_P2 is a clock pin (eg ICE_CLK). In addition, the switch 110 also couples the second set of pins PG1 of the emulator 250 to the pins PD_P1 and PD_P2 of the peripheral component 120 according to the control signal CTRL to establish the signal path Path2. Thus, the wafer under test 150 can perform specific functions by communicating with the peripheral component 120 through the emulator 250 and the signal path Path2, such as a general-purpose input/output (GPIO), a universal asynchronous receiver/transmitter (UART), and a pulse. Wave width modulation (PWM) or internal integrated circuit (I2C) function.
第5圖係顯示根據本發明一實施例所述之偵錯系統之控制方法的流程圖。同時參考第4圖與第5圖,在此實施例中,待測晶片150會透過仿真器250來與週邊元件120進行通訊,以執行通用輸入輸出功能,其中仿真器250的接腳ICE_P3及/或接腳ICE_P4會模擬多功能接腳IC_P1與IC_P2被指派為支援通用輸入輸出功能之輸出接腳的情況。首先,待測晶片150會經由信號路徑Path1提供指令BKPT1(例如斷點)至仿真器250,以便通知仿真器250來將接腳ICE_P3及/或接腳ICE_P4設定為可支援通用輸入輸出功能,如標號510所顯示。接著,當設定完成後,仿真器250會發送確認信號ACK1(例如返回)至待測晶片150,如標號520所顯示。接著,在接收到確認信號ACK1之後,待測晶片150會提供指令BKPT2至仿真器250,以便將接腳ICE_P3及/或接腳ICE_P4設定為輸出(OUT),並將接腳ICE_P3及/或接腳ICE_P4的信號位準設定為VAL(例如高邏輯位準或是低邏輯位準),如標號530所顯示。接著,接腳ICE_P3及/或接腳ICE_P4會經由信號路徑Path2而提供具有信號位準VAL之信 號至週邊元件120的接腳PD_P1及/或接腳PD_P2,如標號540所顯示。於是,相應於具有信號位準VAL之信號,週邊元件120可執行所對應之操作。因此,在印刷電路板100上,可同時執行待測晶片150的通用輸入輸出功能與偵錯功能。此外,當提供具有信號位準VAL之信號至週邊元件120之後,仿真器250會發送確認信號ACK2至待測晶片150,如標號550所顯示。在一實施例中,待測晶片150會依序提供指令BKPT1以及指令BKPT2至仿真器250,即仿真器250不需發送確認信號ACK1。 Figure 5 is a flow chart showing a method of controlling a debug system according to an embodiment of the present invention. Referring to FIG. 4 and FIG. 5 simultaneously, in this embodiment, the wafer to be tested 150 communicates with the peripheral component 120 through the emulator 250 to perform a general-purpose input/output function, wherein the pins ICE_P3 and/or of the emulator 250 are implemented. Or the pin ICE_P4 simulates the case where the multi-function pins IC_P1 and IC_P2 are assigned to support the output pin of the general-purpose input/output function. First, the chip under test 150 provides an instruction BKPT1 (eg, a breakpoint) to the emulator 250 via the signal path Path1 to notify the emulator 250 to set the pin ICE_P3 and/or the pin ICE_P4 to support general-purpose input and output functions, such as The symbol 510 is displayed. Then, when the setting is completed, the emulator 250 sends an acknowledgment signal ACK1 (eg, returns) to the wafer 150 to be tested, as indicated by reference numeral 520. Then, after receiving the acknowledgment signal ACK1, the chip to be tested 150 provides the instruction BKPT2 to the emulator 250 to set the pin ICE_P3 and/or the pin ICE_P4 as the output (OUT), and the pin ICE_P3 and/or The signal level of pin ICE_P4 is set to VAL (eg, high logic level or low logic level) as indicated by reference numeral 530. Then, the pin ICE_P3 and/or the pin ICE_P4 will provide a signal with a signal level VAL via the signal path Path2. The pin PD_P1 and/or pin PD_P2 to the peripheral component 120 are shown as reference numeral 540. Thus, corresponding to the signal having the signal level VAL, the peripheral component 120 can perform the corresponding operation. Therefore, on the printed circuit board 100, the general-purpose input/output function and the debug function of the wafer to be tested 150 can be simultaneously performed. In addition, after providing a signal having signal level VAL to peripheral component 120, emulator 250 sends an acknowledgment signal ACK2 to wafer 150 to be tested, as indicated by reference numeral 550. In an embodiment, the wafer under test 150 sequentially provides the instruction BKPT1 and the instruction BKPT2 to the emulator 250, that is, the emulator 250 does not need to send the acknowledgment signal ACK1.
第6圖係顯示根據本發明另一實施例所述之偵錯系統之控制方法的流程圖。同時參考第4圖與第6圖,在此實施例中,待測晶片150會透過仿真器250來與週邊元件120進行通訊,以執行通用輸入輸出功能,其中仿真器250的接腳ICE_P3及/或接腳ICE_P4會模擬多功能接腳IC_P1與IC_P2被指派為支援通用輸入輸出功能之輸入接腳的情況。首先,待測晶片150會經由信號路徑Path1提供指令BKPT1(例如斷點)至仿真器250,以便通知仿真器250來將接腳ICE_P3及/或接腳ICE_P4設定為可支援通用輸入輸出功能,如標號610所顯示。接著,當設定完成後,仿真器250會發送確認信號ACK1(例如返回)至待測晶片150,如標號620所顯示。接著,在接收到確認信號ACK1之後,待測晶片150會提供指令BKPT2至仿真器250,以便將接腳ICE_P3及/或接腳ICE_P4設定為輸出(IN),如標號630所顯示。於是,接腳ICE_P3及/或接腳ICE_P4會經由信號路徑Path2得到來自週邊元件120的接腳PD_P1及/或接腳PD_P2之具有信號位準VAL的信號,如標號640所顯示。接著,在接收到具有信號 位準VAL的信號之後,仿真器250會發送確認信號ACK2至待測晶片150,如標號650所顯示,以便通知待測晶片150已接收到具有信號位準VAL的信號。於是,相應於具有信號位準VAL之信號,待測晶片150可執行所對應之操作。因此,在印刷電路板100上,可同時執行待測晶片150的通用輸入輸出功能與偵錯功能。在一實施例中,待測晶片150會依序提供指令BKPT1以及指令BKPT2至仿真器250,即仿真器250不需發送確認信號ACK1。 Figure 6 is a flow chart showing a control method of a debug system according to another embodiment of the present invention. Referring to FIG. 4 and FIG. 6 simultaneously, in this embodiment, the wafer to be tested 150 communicates with the peripheral component 120 through the emulator 250 to perform a general-purpose input/output function, wherein the pins ICE_P3 and/or of the emulator 250 are implemented. Or the pin ICE_P4 simulates the case where the multi-function pins IC_P1 and IC_P2 are assigned to support the input pin of the general-purpose input/output function. First, the chip under test 150 provides an instruction BKPT1 (eg, a breakpoint) to the emulator 250 via the signal path Path1 to notify the emulator 250 to set the pin ICE_P3 and/or the pin ICE_P4 to support general-purpose input and output functions, such as The symbol 610 is displayed. Then, when the setting is completed, the emulator 250 sends an acknowledgment signal ACK1 (eg, returns) to the wafer 150 to be tested, as indicated by reference numeral 620. Next, after receiving the acknowledgment signal ACK1, the wafer under test 150 provides the instruction BKPT2 to the emulator 250 to set the pin ICE_P3 and/or the pin ICE_P4 as an output (IN), as indicated by reference numeral 630. Thus, the pin ICE_P3 and/or the pin ICE_P4 will obtain a signal having a signal level VAL from the pin PD_P1 and/or the pin PD_P2 of the peripheral component 120 via the signal path Path2, as indicated by reference numeral 640. Then, after receiving the signal After the signal of the level VAL, the emulator 250 sends an acknowledgment signal ACK2 to the wafer under test 150, as indicated by reference numeral 650, to inform the wafer under test 150 that a signal having the signal level VAL has been received. Thus, corresponding to the signal having the signal level VAL, the wafer under test 150 can perform the corresponding operation. Therefore, on the printed circuit board 100, the general-purpose input/output function and the debug function of the wafer to be tested 150 can be simultaneously performed. In an embodiment, the wafer under test 150 sequentially provides the instruction BKPT1 and the instruction BKPT2 to the emulator 250, that is, the emulator 250 does not need to send the acknowledgment signal ACK1.
第7圖係顯示根據本發明另一實施例所述之偵錯系統之控制方法的流程圖。同時參考第4圖與第7圖,在此實施例中,待測晶片150會透過仿真器250來與週邊元件120進行通訊,以執行通用輸入輸出功能,其中仿真器250的接腳ICE_P3及/或接腳ICE_P4會模擬多功能接腳IC_P1與IC_P2被指派為支援通用輸入輸出功能之中斷(interrupt)接腳的情況。首先,待測晶片150會經由信號路徑Path1提供指令BKPT1(例如斷點)至仿真器250,以便通知仿真器250來將接腳ICE_P3及/或接腳ICE_P4設定為可支援通用輸入輸出功能的中斷接腳,如標號710所顯示。接著,當設定完成後,仿真器250會發送確認信號ACK1(例如返回)至待測晶片150,如標號720所顯示。接著,當仿真器250偵測到接腳ICE_P3及/或接腳ICE_P4上有來自週邊元件120的中斷事件INT(例如從低邏輯位準變為高邏輯位準)發生時,如標號730所顯示,仿真器250可透過信號路徑Path1來通知待測晶片150有中斷事件INT發生,如標號740所顯示。於是,相應於來自週邊元件120的中斷事件INT,待測晶片150 可執行所對應之中斷服務程式(Interrupt Service Routine,ISR)因此,在印刷電路板100上,可同時執行待測晶片150的通用輸入輸出功能與偵錯功能。 Figure 7 is a flow chart showing a method of controlling a debug system according to another embodiment of the present invention. Referring to FIG. 4 and FIG. 7 simultaneously, in this embodiment, the wafer to be tested 150 communicates with the peripheral component 120 through the emulator 250 to perform a general-purpose input/output function, wherein the pins ICE_P3 and/or of the emulator 250 are implemented. Or the pin ICE_P4 simulates the case where the multi-function pins IC_P1 and IC_P2 are assigned to support the interrupt pin of the general-purpose input/output function. First, the chip under test 150 provides an instruction BKPT1 (eg, a breakpoint) to the emulator 250 via the signal path Path1 to notify the emulator 250 to set the pin ICE_P3 and/or the pin ICE_P4 to an interrupt capable of supporting the general-purpose input/output function. The pin is shown as reference numeral 710. Next, when the setting is completed, the emulator 250 sends an acknowledgment signal ACK1 (eg, a return) to the wafer 150 to be tested, as indicated by reference numeral 720. Then, when the emulator 250 detects that the interrupt event INT from the peripheral component 120 (for example, from a low logic level to a high logic level) occurs on the pin ICE_P3 and/or the pin ICE_P4, as shown by reference numeral 730. The emulator 250 can notify the chip under test 150 that an interrupt event INT occurs through the signal path Path1, as indicated by reference numeral 740. Thus, the wafer to be tested 150 corresponds to the interrupt event INT from the peripheral element 120. The corresponding Interrupt Service Routine (ISR) can be executed. Therefore, on the printed circuit board 100, the general-purpose input/output function and the debugging function of the wafer 150 to be tested can be simultaneously performed.
雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中包括通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the present invention has been disclosed in the above preferred embodiments, it is not intended to limit the invention, and it is intended that the invention may be modified and modified without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.
100‧‧‧印刷電路板 100‧‧‧Printed circuit board
110‧‧‧切換器 110‧‧‧Switcher
120‧‧‧週邊元件 120‧‧‧ peripheral components
150‧‧‧待測晶片 150‧‧‧Samps to be tested
155‧‧‧微控制器 155‧‧‧Microcontroller
200‧‧‧橋接器 200‧‧‧ Bridge
250‧‧‧仿真器 250‧‧‧ Simulator
CTRL‧‧‧控制信號 CTRL‧‧‧ control signal
IC_P1、IC_P2‧‧‧多功能接腳 IC_P1, IC_P2‧‧‧ multi-function pin
ICE_P1-ICE_P4、PD_P1-PD_P2‧‧‧接腳 ICE_P1-ICE_P4, PD_P1-PD_P2‧‧‧ pins
PG1‧‧‧第一組接腳 PG1‧‧‧First set of pins
PG2‧‧‧第一組接腳 PG2‧‧‧First set of pins
Claims (13)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104124680A TWI541646B (en) | 2015-07-30 | 2015-07-30 | Debugging system and control method thereof |
CN201510648094.8A CN106406154B (en) | 2015-07-30 | 2015-10-09 | debugging system and control method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW104124680A TWI541646B (en) | 2015-07-30 | 2015-07-30 | Debugging system and control method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI541646B TWI541646B (en) | 2016-07-11 |
TW201704997A true TW201704997A (en) | 2017-02-01 |
Family
ID=56997084
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW104124680A TWI541646B (en) | 2015-07-30 | 2015-07-30 | Debugging system and control method thereof |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106406154B (en) |
TW (1) | TWI541646B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107528571B (en) * | 2017-09-07 | 2021-01-26 | 成都航天通信设备有限责任公司 | FPGA simulator switching device and method |
TWI748328B (en) * | 2019-01-18 | 2021-12-01 | 仁寶電腦工業股份有限公司 | Debug system |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06290076A (en) * | 1993-04-05 | 1994-10-18 | Nec Ic Microcomput Syst Ltd | Debugger device |
US7257784B2 (en) * | 2005-03-24 | 2007-08-14 | Taiwan Semiconductor Manufacturing Co., Ltd. | Method for integrally checking chip and package substrate layouts for errors |
TWI317871B (en) * | 2006-06-16 | 2009-12-01 | Via Tech Inc | Debug device and method for bus |
CN103678073A (en) * | 2012-09-25 | 2014-03-26 | 上海华虹集成电路有限责任公司 | Simulation system |
CN104699476A (en) * | 2014-07-01 | 2015-06-10 | 北京邮电大学 | Simulation method, simulation device and simulation system |
CN104063298A (en) * | 2014-07-02 | 2014-09-24 | 南通国芯微电子有限公司 | Single-chip microcomputer simulation chip and single-chip microcomputer simulation method |
-
2015
- 2015-07-30 TW TW104124680A patent/TWI541646B/en active
- 2015-10-09 CN CN201510648094.8A patent/CN106406154B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106406154B (en) | 2018-10-23 |
CN106406154A (en) | 2017-02-15 |
TWI541646B (en) | 2016-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20130268708A1 (en) | Motherboard test device and connection module thereof | |
CN107077409B (en) | Method and apparatus for multi-interface debugging in an electronic system | |
KR20010109282A (en) | On-chip debug system | |
US8570092B2 (en) | Control circuit for connector | |
CN114064458A (en) | JTAG debugging method and system with extensible interface and universality | |
TWI273264B (en) | Test system and method | |
TWI541646B (en) | Debugging system and control method thereof | |
US20080126862A1 (en) | System and Method for Testing Software Code for Use on a Target Processor | |
US6973607B2 (en) | Method and apparatus for testing electronic components | |
Maier | On-chip debug support for embedded systems-on-chip | |
TWI234705B (en) | Detecting method for PCI system | |
TW201430358A (en) | Switchable debug card | |
US9291672B2 (en) | Debug system, apparatus and method thereof for providing graphical pin interface | |
TWI426388B (en) | Super i/o module, computer system and control method thereof | |
US11698875B2 (en) | IC, monitoring system and monitoring method thereof | |
JP2017010432A (en) | IC chip | |
TWI547700B (en) | Method for distinguishing i/o port of chip | |
TWI317470B (en) | ||
TWI774116B (en) | Automatic detection circuit for integrated circuit and automatic detection method for the same | |
JP2002268911A (en) | Development support device for electronic computer | |
JP2009258857A (en) | Debugging device and debugging method | |
CN207946806U (en) | A kind of debugger and debugging apparatus | |
US20070168765A1 (en) | Method for detecting and transmitting error messages | |
Yen et al. | VLSI Implementation of RISC MCU with In-Circuit Debugger | |
TW463085B (en) | Multi-function in-circuit emulator debug device |