TWI839671B - Debug system, microprocessing device and debug method - Google Patents
Debug system, microprocessing device and debug method Download PDFInfo
- Publication number
- TWI839671B TWI839671B TW110149275A TW110149275A TWI839671B TW I839671 B TWI839671 B TW I839671B TW 110149275 A TW110149275 A TW 110149275A TW 110149275 A TW110149275 A TW 110149275A TW I839671 B TWI839671 B TW I839671B
- Authority
- TW
- Taiwan
- Prior art keywords
- signal
- serial
- debugging
- data
- mentioned
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 28
- 230000005540 biological transmission Effects 0.000 claims description 12
- 238000010586 diagram Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000005022 packaging material Substances 0.000 description 1
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/25—Pc structure of the system
- G05B2219/25257—Microcontroller
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本發明之實施例主要係有關於一除錯技術,特別係有關於僅藉由一接腳傳送重置信號、資料信號和時鐘訊之除錯技術。The embodiments of the present invention are mainly related to a debugging technology, and more particularly to a debugging technology for transmitting a reset signal, a data signal and a clock signal through only one pin.
序列線偵錯(serial wire debug;SWD)介面是一種除錯介面。序列線偵錯介面可應用於晶片或處理器之除錯。傳統之序列線偵錯介面需要有SWDIO接腳、SWDCLC接腳和RESET接腳以分別接收資料信號、時鐘信號和重置信號。The serial wire debug (SWD) interface is a debugging interface. The serial wire debug interface can be applied to debugging chips or processors. The traditional serial wire debug interface requires SWDIO pins, SWDCLK pins and RESET pins to receive data signals, clock signals and reset signals respectively.
在微控制器單元(microcontroller unit,MCU)之設計上,降低接腳之數量將可降低外部設備走線複雜度。因此,如何降低配置在微控制器單元之序列線偵錯介面之接腳數量,將是值得研究之課題。In the design of microcontroller units (MCUs), reducing the number of pins will reduce the complexity of external device routing. Therefore, how to reduce the number of pins of the serial line debugging interface configured in the microcontroller unit will be a topic worth studying.
有鑑於上述先前技術之問題,本發明之實施例提供了一種除錯系統、微處理裝置和除錯方法。In view of the above-mentioned problems of the prior art, the embodiments of the present invention provide a debugging system, a microprocessor device and a debugging method.
根據本發明之一實施例提供了一種除錯系統。除錯系統包括一除錯器和一目標裝置。除錯器可用以輸出一輸出信號。上述輸出信號係一第一編碼信號或一重置信號,且上述第一編碼信號係由一第一資料信號和一第一時鐘信號編碼後所產生。目標裝置包括一串列除錯介面電路和一除錯存取埠。串列除錯介面電路耦接上述除錯器,以接收上述輸出信號。此外,串列除錯介面電路可解碼上述第一編碼信號,以產生上述第一資料信號和上述第一時鐘信號。除錯存取埠耦接串列除錯介面電路。除錯存取埠從串列除錯介面電路接收上述資料信號和上述時鐘信號,以進行目標裝置之除錯。According to one embodiment of the present invention, a debugging system is provided. The debugging system includes a debugger and a target device. The debugger can be used to output an output signal. The output signal is a first coded signal or a reset signal, and the first coded signal is generated by encoding a first data signal and a first clock signal. The target device includes a serial debugging interface circuit and a debugging access port. The serial debugging interface circuit is coupled to the debugger to receive the output signal. In addition, the serial debugging interface circuit can decode the first coded signal to generate the first data signal and the first clock signal. The debugging access port is coupled to the serial debugging interface circuit. The debug access port receives the data signal and the clock signal from the serial debug interface circuit to debug the target device.
在一些實施例中,串列除錯介面電路更包括一判斷電路。判斷電路判斷上述輸出信號之一週期時間是否大於一臨界值,以判斷上述輸出信號係上述第一編碼信號或上述重置信號。當上述輸出信號之上述週期時間大於一臨界值時,判斷電路判斷上述輸出信號係上述重置信號,以及當上述輸出信號之上述週期時間未大於上述臨界值時,判斷電路判斷上述輸出信號係上述第一編碼信號。In some embodiments, the serial debug interface circuit further includes a judgment circuit. The judgment circuit judges whether a cycle time of the output signal is greater than a critical value to judge whether the output signal is the first coded signal or the reset signal. When the cycle time of the output signal is greater than a critical value, the judgment circuit judges that the output signal is the reset signal, and when the cycle time of the output signal is not greater than the critical value, the judgment circuit judges that the output signal is the first coded signal.
在一些實施例中,串列除錯介面電路更包括一解碼器。解碼器耦接判斷電路。解碼器可解碼上述第一編碼信號,以產生上述第一資料信號和上述第一時鐘信號。In some embodiments, the serial debugging interface circuit further includes a decoder. The decoder is coupled to the determination circuit and can decode the first coded signal to generate the first data signal and the first clock signal.
在一些實施例中,串列除錯介面電路更包括一分析電路。分析電路耦接解碼器和除錯存取埠。分析電路根據上述第一資料信號,判斷上述第一資料信號和上述第一時鐘信號之一第一傳輸方向,以將上述第一資料信號和上述第一時鐘信號傳送給上述除錯存取埠。分析電路更從除錯存取埠接收一第二資料信號和一第二時鐘信號,並根據上述第一資料信號,判斷上述第二資料信號和上述第二時鐘信號之一第二傳輸方向。In some embodiments, the serial debug interface circuit further includes an analysis circuit. The analysis circuit is coupled to the decoder and the debug access port. The analysis circuit determines a first transmission direction of the first data signal and the first clock signal according to the first data signal, so as to transmit the first data signal and the first clock signal to the debug access port. The analysis circuit further receives a second data signal and a second clock signal from the debug access port, and determines a second transmission direction of the second data signal and the second clock signal according to the first data signal.
在一些實施例中,串列除錯介面電路更包括一編碼電路。編碼電路耦接分析電路。編碼電路可接收上述第二資料信號和上述第二時鐘信號,以及編碼上述第二資料信號和上述第二時鐘信號,以產生一第二編碼資料。In some embodiments, the serial debugging interface circuit further includes a coding circuit. The coding circuit is coupled to the analysis circuit. The coding circuit can receive the second data signal and the second clock signal, and encode the second data signal and the second clock signal to generate a second coded data.
在一些實施例中,上述第一編碼資料和上述第二編碼資料係經由一曼徹斯特編碼所產生。In some embodiments, the first coded data and the second coded data are generated via a Manchester code.
根據本發明之一實施例提供了一種微處理裝置。微處理裝置包括一串列除錯介面電路和一除錯存取埠。串列除錯介面電路耦接一除錯器,以接收一輸出信號。此外,串列除錯介面電路解碼一第一編碼信號,以產生一第一資料信號和一第一時鐘信號。上述輸出信號係上述第一編碼信號或一重置信號,且上述第一編碼信號係由上述第一資料信號和上述第一時鐘信號編碼後所產生。除錯存取埠耦接串列除錯介面電路。除錯存取埠可從串列除錯介面電路接收上述資料信號和上述時鐘信號,以進行上述微處理裝置之除錯。According to one embodiment of the present invention, a microprocessor device is provided. The microprocessor device includes a serial debug interface circuit and a debug access port. The serial debug interface circuit is coupled to a debugger to receive an output signal. In addition, the serial debug interface circuit decodes a first coded signal to generate a first data signal and a first clock signal. The output signal is the first coded signal or a reset signal, and the first coded signal is generated after encoding the first data signal and the first clock signal. The debug access port is coupled to the serial debug interface circuit. The debug access port can receive the data signal and the clock signal from the serial debug interface circuit to debug the microprocessor device.
根據本發明之一實施例提供了一種除錯方法。除錯方法適用一除錯系統,其中除錯系統包括一除錯器和一目標裝置。除錯方法之步驟包括:藉由除錯器輸出一輸出信號,其中上述輸出信號係一第一編碼信號或一重置信號,且上述第一編碼信號係由一第一資料信號和一第一時鐘信號編碼後所產生;藉由目標裝置之一串列除錯介面電路接收上述輸出信號;當上述輸出信號係上述第一編碼信號時,藉由上述串列除錯介面電路解碼上述第一編碼信號,以產生上述第一資料信號和上述第一時鐘信號;以及藉由上述目標裝置之一除錯存取埠,從上述串列除錯介面電路接收上述資料信號和上述時鐘信號,以進行目標裝置之除錯。According to an embodiment of the present invention, a debugging method is provided. The debugging method is applicable to a debugging system, wherein the debugging system includes a debugger and a target device. The steps of the debugging method include: outputting an output signal through a debugger, wherein the output signal is a first coded signal or a reset signal, and the first coded signal is generated by encoding a first data signal and a first clock signal; receiving the output signal through a serial debugging interface circuit of a target device; when the output signal is the first coded signal, decoding the first coded signal through the serial debugging interface circuit to generate the first data signal and the first clock signal; and receiving the data signal and the clock signal from the serial debugging interface circuit through a debugging access port of the target device to debug the target device.
關於本發明其他附加的特徵與優點,此領域之熟習技術人士,在不脫離本發明之精神和範圍內,當可根據本案實施方法中所揭露之除錯系統、微處理裝置和除錯方法,做些許的更動與潤飾而得到。As for other additional features and advantages of the present invention, those skilled in the art can obtain them by making some modifications and improvements based on the debugging system, microprocessor device and debugging method disclosed in the implementation method of this case without departing from the spirit and scope of the present invention.
本章節所敘述的是實施本發明之較佳方式,目的在於說明本發明之精神而非用以限定本發明之保護範圍,本發明之保護範圍當視後附之申請專利範圍所界定者為準。This section describes the preferred method of implementing the present invention, and its purpose is to illustrate the spirit of the present invention rather than to limit the scope of protection of the present invention. The scope of protection of the present invention shall be subject to the scope of the attached patent application.
第1圖係顯示根據本發明之一實施例所述之一除錯系統100之方塊圖。如第1圖所示,除錯系統100可包括一除錯器(debugger)110和一目標裝置120。注意地是,在第1圖中所示之方塊圖,僅係為了方便說明本發明之實施例,但本發明並不以第1圖為限。FIG. 1 is a block diagram showing a debugging system 100 according to an embodiment of the present invention. As shown in FIG. 1, the debugging system 100 may include a debugger 110 and a target device 120. It should be noted that the block diagram shown in FIG. 1 is only for the convenience of explaining the embodiment of the present invention, but the present invention is not limited to FIG. 1.
根據本發明一實施例,目標裝置120可係一微控制器單元(microcontroller unit,MCU)或一晶片。如第1圖所示,根據本發明一實施例,目標裝置120可包括一串列除錯介面電路210、一串列(Serial Wire Debug,SWD)除錯存取埠(Debug Access Port,DAP)220和一處理器核心230。根據本發明一實施例,目標裝置120可藉由串列除錯介面電路210耦接至除錯器110,以進行串列除錯。串列除錯介面電路210可耦接至串列除錯存取埠220和處理器核心230。此外,串列除錯存取埠220可耦接至處理器核心230。注意地是,在第1圖中所示之目標裝置120僅係為了方便說明本發明之實施例,但本發明並不以第1圖為限。目標裝置120中亦可包含其他元件。According to an embodiment of the present invention, the target device 120 may be a microcontroller unit (MCU) or a chip. As shown in FIG. 1 , according to an embodiment of the present invention, the target device 120 may include a serial debug interface circuit 210, a serial (Serial Wire Debug, SWD) debug access port (Debug Access Port, DAP) 220 and a processor core 230. According to an embodiment of the present invention, the target device 120 may be coupled to the debugger 110 via the serial debug interface circuit 210 to perform serial debugging. The serial debug interface circuit 210 may be coupled to the serial debug access port 220 and the processor core 230. In addition, the serial debug access port 220 may be coupled to the processor core 230. It should be noted that the target device 120 shown in FIG. 1 is only for the convenience of explaining the embodiment of the present invention, but the present invention is not limited to FIG. 1. The target device 120 may also include other components.
根據本發明之實施例,串列除錯介面電路210可應用於串列除錯技術。如第1圖所示,根據本發明一實施例,串列除錯介面電路210可包括一判斷電路211、一解碼器212、一編碼器213和一分析電路214。According to an embodiment of the present invention, the serial debugging interface circuit 210 can be applied to the serial debugging technology. As shown in FIG. 1 , according to an embodiment of the present invention, the serial debugging interface circuit 210 can include a determination circuit 211, a decoder 212, a encoder 213 and an analysis circuit 214.
根據本發明一實施例,判斷電路211可利用一計時器(timer)。根據本發明之一實施例,當除錯器110要對目標裝置120進行除錯時,除錯器110會發送一輸出信號S out至目標裝置120之串列除錯介面電路210。當串列除錯介面電路210之判斷電路211接收到輸出信號S out後,判斷電路211會判斷目前接收到之輸出信號之週期時間是否大於一臨界值(例如:100微秒( ),但本發明不以此為限)。特別說明地是,在本發明所述之週期時間係表示輸出信號S out從高位準轉換為低位準或從低位準轉換為高位準所經過之時間。 According to an embodiment of the present invention, the judgment circuit 211 can use a timer. According to an embodiment of the present invention, when the debugger 110 is to debug the target device 120, the debugger 110 will send an output signal S out to the serial debug interface circuit 210 of the target device 120. After the judgment circuit 211 of the serial debug interface circuit 210 receives the output signal S out , the judgment circuit 211 will judge whether the cycle time of the currently received output signal is greater than a critical value (for example, 100 microseconds (μs)). ), but the present invention is not limited thereto). Specifically, the cycle time described in the present invention refers to the time taken for the output signal S out to switch from a high level to a low level or from a low level to a high level.
當判斷電路211判斷目前接收到之輸出信號之週期時間大於一臨界值時,判斷電路211會判斷輸出信號S out係一重置(Reset)信號S reset,且將重置信號S reset傳送給處理器核心230。根據本發明一實施例,判斷電路211可先將重置信號S reset傳送給處理器核心230。根據本發明一實施例,當重置信號S reset係一高位準時,目標裝置120不會進入重置,以及當重置信號S reset係一低位準時,目標裝置120進入一重置狀態。 When the determination circuit 211 determines that the cycle time of the currently received output signal is greater than a critical value, the determination circuit 211 determines that the output signal S out is a reset signal S reset and transmits the reset signal S reset to the processor core 230. According to an embodiment of the present invention, the determination circuit 211 may first transmit the reset signal S reset to the processor core 230. According to an embodiment of the present invention, when the reset signal S reset is a high level, the target device 120 will not enter a reset state, and when the reset signal S reset is a low level, the target device 120 enters a reset state.
當判斷電路211判斷目前接收到之輸出信號S out之週期時間未大於一臨界值時,判斷電路211會判斷輸出信號S out係一編碼信號S encode。接著,判斷電路211會將編碼信號S encode傳送給解碼器212。根據本發明一實施例,除錯器110所輸出之編碼信號S encode係預先經由一編碼技術來編碼一資料信號S data和一時鐘信號S clock所產生。根據本發明一實施例,本發明所採用之編碼技術可係曼徹斯特編碼(Manchester Coding)。解碼器212會根據所採用之編碼技術來解碼編碼信號S encode,以產生除錯器110所要傳送之資料信號S data和時鐘信號S clock。接著,解碼器212會將資料信號S data和時鐘信號S clock傳送給分析電路214。 When the judging circuit 211 judges that the cycle time of the currently received output signal S out is not greater than a critical value, the judging circuit 211 judges that the output signal S out is a coded signal S encode . Then, the judging circuit 211 transmits the coded signal S encode to the decoder 212. According to an embodiment of the present invention, the coded signal S encode output by the debugger 110 is generated by encoding a data signal S data and a clock signal S clock in advance through a coding technique. According to an embodiment of the present invention, the coding technique adopted by the present invention can be Manchester Coding. The decoder 212 decodes the coded signal S encode according to the adopted coding technique to generate the data signal S data and the clock signal S clock to be transmitted by the debugger 110 . Then, the decoder 212 transmits the data signal S data and the clock signal S clock to the analysis circuit 214 .
根據本發明一實施例,分析電路214會根據來自解碼器212之資料信號S data中的命令位元(例如:RnW位元),判斷後續資料信號S data和時鐘信號S clock之傳輸方向。也就是說,分析電路214會根據來自解碼器212之資料信號S data中的命令位元(例如:RnW位元),判斷除錯器110所要求進行之操作係一寫入操作(即要從除錯器110寫入資料至目標裝置120)或是一讀取操作(即要從目標裝置120讀取資料至除錯器110)。根據本發明一實施例,當命令位元係一第一數值(例如:0)時,分析電路214會判斷資料信號S data和時鐘信號S clock係要從除錯器110寫入目標裝置120;以及當命令位元係一第二數值(例如:1)時,分析電路214會判斷係要從目標裝置120讀取資料信號S data和時鐘信號S clock至除錯器110。此外,根據本發明一實施例,分析電路214會根據資料信號S data中的確認位元(例如:ACK位元),判斷是否有成功接收到資料信號S data。當分析電路214有成功接收到資料信號S data,分析電路214將可根據資料信號S data之傳輸方向,來傳送資料信號S data。 According to an embodiment of the present invention, the analysis circuit 214 determines the transmission direction of the subsequent data signal S data and the clock signal S clock according to the command bit (e.g., RnW bit) in the data signal S data from the decoder 212. In other words, the analysis circuit 214 determines whether the operation required by the debugger 110 is a write operation (i.e., writing data from the debugger 110 to the target device 120) or a read operation (i.e., reading data from the target device 120 to the debugger 110) according to the command bit (e.g., RnW bit) in the data signal S data from the decoder 212. According to an embodiment of the present invention, when the command bit is a first value (e.g., 0), the analysis circuit 214 determines that the data signal S data and the clock signal S clock are to be written from the debugger 110 to the target device 120; and when the command bit is a second value (e.g., 1), the analysis circuit 214 determines that the data signal S data and the clock signal S clock are to be read from the target device 120 to the debugger 110. In addition, according to an embodiment of the present invention, the analysis circuit 214 determines whether the data signal S data is successfully received according to the confirmation bit (e.g., ACK bit) in the data signal S data . When the analysis circuit 214 successfully receives the data signal S data , the analysis circuit 214 can transmit the data signal S data according to the transmission direction of the data signal S data .
根據本發明一實施例,當分析電路214根據來自解碼器212之資料信號S data判斷資料信號S data和時鐘信號S clock之傳輸方向要從除錯器110寫入目標裝置120時,分析電路214會將解碼器212所解碼之資料信號S data和時鐘信號S clock傳送給串列除錯存取埠220。根據本發明一實施例,分析電路214可經由一資料路徑,傳送資料信號S data給串列除錯存取埠220,以及經由一時鐘路徑,傳送時鐘信號S clock給串列除錯存取埠220。串列除錯存取埠220接收到資料信號S data和時鐘信號S clock後,會將資料信號S data和時鐘信號S clock傳送給處理器核心230,以進行除錯之程序。 According to an embodiment of the present invention, when the analysis circuit 214 determines that the transmission direction of the data signal S data and the clock signal S clock is to be written from the debugger 110 to the target device 120 according to the data signal S data from the decoder 212, the analysis circuit 214 transmits the data signal S data and the clock signal S clock decoded by the decoder 212 to the serial debug access port 220. According to an embodiment of the present invention, the analysis circuit 214 can transmit the data signal S data to the serial debug access port 220 via a data path, and transmit the clock signal S clock to the serial debug access port 220 via a clock path. After receiving the data signal S data and the clock signal S clock , the serial debug access port 220 transmits the data signal S data and the clock signal S clock to the processor core 230 to perform a debugging procedure.
根據本發明一實施例,當分析電路214根據來自解碼器212之資料信號S data判斷資料信號S data和時鐘信號S clock之傳輸方向要從目標裝置120讀取至除錯器110時,分析電路214會將從串列除錯存取埠220接收到之資料信號S data和時鐘信號S clock傳送給編碼器213。根據本發明一實施例,分析電路214可經由資料路徑,從串列除錯存取埠220接收資料信號S data和時鐘信號S clock。編碼器213會經由一編碼技術(例如:曼徹斯特編碼(Manchester Coding))將資料信號S data和時鐘信號S clock編碼成一編碼信號S ’ encode。接著,編碼器213會將編碼信號S ’ encode傳送給判斷電路211。判斷電路211會再將編碼信號S ’ encode傳送給除錯器110。 According to an embodiment of the present invention, when the analysis circuit 214 determines that the transmission direction of the data signal S data and the clock signal S clock is to be read from the target device 120 to the debugger 110 according to the data signal S data from the decoder 212, the analysis circuit 214 transmits the data signal S data and the clock signal S clock received from the serial debug access port 220 to the encoder 213. According to an embodiment of the present invention, the analysis circuit 214 can receive the data signal S data and the clock signal S clock from the serial debug access port 220 via the data path. The encoder 213 encodes the data signal S data and the clock signal S clock into a coded signal S'encode by a coding technique (e.g., Manchester Coding). Then, the encoder 213 transmits the encoded signal S'encode to the determination circuit 211. The determination circuit 211 transmits the encoded signal S'encode to the debugger 110.
根據本發明一實施例,除錯器110亦可包含一解碼器和一編碼器,以解碼編碼信號S ’ encode和產生編碼信號S encode。 According to an embodiment of the present invention, the debugger 110 may also include a decoder and an encoder to decode the coded signal S'encode and generate the coded signal Sencode .
根據本發明所提出之除錯系統100,目標裝置120將可僅藉由一接腳連接至除錯器110,就可傳輸串列除錯介面所要傳輸之重置信號S reset、資料信號S data和時鐘信號S clock。也就是說,本發明所提出之除錯系統100可將串列除錯介面之SWDIO接腳、SWDCLC接腳和RESET接腳整合成一接腳。因此,本發明提出之除錯系統100將可降低目標裝置120要進行串列除錯所需配置之接腳之數量。 According to the debugging system 100 proposed by the present invention, the target device 120 can transmit the reset signal S reset , the data signal S data and the clock signal S clock to be transmitted by the serial debugging interface by connecting to the debugger 110 through only one pin. In other words, the debugging system 100 proposed by the present invention can integrate the SWDIO pin, the SWDCLC pin and the RESET pin of the serial debugging interface into one pin. Therefore, the debugging system 100 proposed by the present invention can reduce the number of pins required to be configured by the target device 120 for serial debugging.
第2圖係根據本發明之一實施例所述之一除錯方法之流程圖。除錯方法可適用除錯系統100。如第2圖所示,在步驟S210,藉由除錯系統100之除錯器,輸出一輸出信號,其中輸出信號係一第一編碼信號或一重置信號,且第一編碼信號係由一第一資料信號和一第一時鐘信號編碼後所產生。FIG. 2 is a flow chart of a debugging method according to an embodiment of the present invention. The debugging method can be applied to the debugging system 100. As shown in FIG. 2, in step S210, the debugger of the debugging system 100 outputs an output signal, wherein the output signal is a first coded signal or a reset signal, and the first coded signal is generated by encoding a first data signal and a first clock signal.
在步驟S220,藉由除錯系統100之目標裝置之一串列除錯介面電路接收輸出信號。In step S220, the output signal is received by a serial debug interface circuit of the target device of the debugging system 100.
在步驟S230,當輸出信號係第一編碼信號時,藉由串列除錯介面電路解碼第一編碼信號,以產生第一資料信號和第一時鐘信號。In step S230, when the output signal is a first coded signal, the first coded signal is decoded by the serial debug interface circuit to generate a first data signal and a first clock signal.
在步驟S240,藉由目標裝置之一串列除錯存取埠,從串列除錯介面電路接收資料信號和時鐘信號,以進行目標裝置之除錯。In step S240, a data signal and a clock signal are received from a serial debug interface circuit via a serial debug access port of the target device to debug the target device.
根據本發明一實施例,除錯方法之步驟更包括,藉由串列除錯介面電路之一判斷電路,判斷輸出信號之一週期時間是否大於一臨界值,以判斷輸出信號係第一編碼信號或重置信號。當輸出信號之週期時間大於臨界值時,判斷電路判斷輸出信號係重置信號,以及當輸出信號之週期時間未大於臨界值時,判斷電路判斷輸出信號係第一編碼信號。According to an embodiment of the present invention, the debugging method further includes, by a judgment circuit of the serial debugging interface circuit, judging whether a cycle time of the output signal is greater than a critical value, so as to judge whether the output signal is the first coded signal or the reset signal. When the cycle time of the output signal is greater than the critical value, the judgment circuit judges that the output signal is the reset signal, and when the cycle time of the output signal is not greater than the critical value, the judgment circuit judges that the output signal is the first coded signal.
根據本發明一實施例,除錯方法之步驟S230更包括,藉由串列除錯介面電路之一解碼器解碼上述第一編碼信號,以產生上述第一資料信號和上述第一時鐘信號。According to an embodiment of the present invention, step S230 of the debugging method further includes decoding the first coded signal by a decoder of the serial debugging interface circuit to generate the first data signal and the first clock signal.
根據本發明一實施例,除錯方法之步驟更包括,藉由串列除錯介面電路之一分析電路根據第一資料信號,判斷第一資料信號和第一時鐘信號之一第一傳輸方向,以將第一資料信號和第一時鐘信號傳送給串列除錯存取埠。此外,除錯方法之步驟更包括,藉由串列除錯介面電路之分析電路根據第一資料信號,判斷從一第二傳輸方向接收來自串列除錯存取埠之第二資料信號和第二時鐘信號。According to an embodiment of the present invention, the debugging method further includes, by means of an analysis circuit of the serial debugging interface circuit, judging a first transmission direction of the first data signal and the first clock signal according to the first data signal, so as to transmit the first data signal and the first clock signal to the serial debugging access port. In addition, the debugging method further includes, by means of an analysis circuit of the serial debugging interface circuit, judging, by means of the first data signal, that a second data signal and a second clock signal are received from the serial debugging access port in a second transmission direction.
根據本發明一實施例,除錯方法之步驟更包括,藉由串列除錯介面電路之一編碼電路,接收第二資料信號和第二時鐘信號,以及編碼第二資料信號和第二時鐘信號,以產生一第二編碼資料。According to an embodiment of the present invention, the steps of the debugging method further include receiving a second data signal and a second clock signal through an encoding circuit of the serial debugging interface circuit, and encoding the second data signal and the second clock signal to generate a second encoded data.
根據本發明一實施例,在除錯方法中,第一編碼資料和第二編碼資料係經由一曼徹斯特編碼所產生。According to an embodiment of the present invention, in the debugging method, the first coded data and the second coded data are generated via a Manchester coding.
根據本發明提出之除錯方法,除錯系統100之目標裝置將可僅藉由一接腳連接至除錯系統100之除錯器,就可傳輸重置信號S reset、資料信號S data和時鐘信號S clock。因此,本發明提出之除錯方法將可降低串列除錯時所需配置之接腳之數量。 According to the debugging method proposed by the present invention, the target device of the debugging system 100 can be connected to the debugger of the debugging system 100 by only one pin, and the reset signal S reset , the data signal S data and the clock signal S clock can be transmitted. Therefore, the debugging method proposed by the present invention can reduce the number of pins required for serial debugging.
本說明書中以及申請專利範圍中的序號,例如「第一」、「第二」等等,僅係為了方便說明,彼此之間並沒有順序上的先後關係。The serial numbers in this specification and the scope of the patent application, such as "first", "second", etc., are only for the convenience of explanation and there is no sequential relationship between them.
本發明之說明書所揭露之方法和演算法之步驟,可直接透過執行一處理器直接應用在硬體以及軟體模組或兩者之結合上。一軟體模組(包括執行指令和相關數據)和其它數據可儲存在數據記憶體中,像是隨機存取記憶體(RAM)、快閃記憶體(flash memory)、唯讀記憶體(ROM)、可抹除可規化唯讀記憶體(EPROM)、電子可抹除可規劃唯讀記憶體(EEPROM)、暫存器、硬碟、可攜式應碟、光碟唯讀記憶體(CD-ROM)、DVD或在此領域習之技術中任何其它電腦可讀取之儲存媒體格式。一儲存媒體可耦接至一機器裝置,舉例來說,像是電腦/處理器(爲了說明之方便,在本說明書以處理器來表示),上述處理器可透過來讀取資訊(像是程式碼),以及寫入資訊至儲存媒體。一儲存媒體可整合一處理器。一特殊應用積體電路(ASIC)包括處理器和儲存媒體。一用戶設備則包括一特殊應用積體電路。換句話說,處理器和儲存媒體以不直接連接用戶設備的方式,包含於用戶設備中。此外,在一些實施例中,任何適合電腦程序之產品包括可讀取之儲存媒體,其中可讀取之儲存媒體包括和一或多個所揭露實施例相關之程式碼。在一些實施例中,電腦程序之產品可包括封裝材料。The methods and algorithm steps disclosed in the specification of the present invention can be directly applied to hardware and software modules or a combination of the two by executing a processor. A software module (including execution instructions and related data) and other data can be stored in a data memory, such as random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable read-only memory (EPROM), electronically erasable programmable read-only memory (EEPROM), register, hard disk, portable disk, compact disk read-only memory (CD-ROM), DVD or any other computer-readable storage medium format in the art. A storage medium can be coupled to a machine device, for example, such as a computer/processor (for ease of explanation, the processor is represented in this specification), through which the processor can read information (such as program code) and write information to the storage medium. A storage medium can integrate a processor. A special application integrated circuit (ASIC) includes a processor and a storage medium. A user device includes a special application integrated circuit. In other words, the processor and the storage medium are included in the user device in a manner that is not directly connected to the user device. In addition, in some embodiments, any product suitable for a computer program includes a readable storage medium, wherein the readable storage medium includes program code related to one or more disclosed embodiments. In some embodiments, a product of a computer program may include packaging materials.
以上段落使用多種層面描述。顯然的,本文的教示可以多種方式實現,而在範例中揭露之任何特定架構或功能僅為一代表性之狀況。根據本文之教示,任何熟知此技藝之人士應理解在本文揭露之各層面可獨立實作或兩種以上之層面可以合併實作。The above paragraphs use multiple layers for description. Obviously, the teachings of this article can be implemented in multiple ways, and any specific architecture or function disclosed in the examples is only a representative situation. According to the teachings of this article, anyone familiar with this technology should understand that each layer disclosed in this article can be implemented independently or two or more layers can be implemented in combination.
雖然本揭露已以實施例揭露如上,然其並非用以限定本揭露,任何熟習此技藝者,在不脫離本揭露之精神和範圍內,當可作些許之更動與潤飾,因此發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present disclosure has been disclosed as above by way of embodiments, it is not intended to limit the present disclosure. Anyone skilled in the art may make some changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the protection scope of the invention shall be subject to the definition of the attached patent application scope.
100:除錯系統 110:除錯器 120:目標裝置 210:串列除錯介面電路 211:判斷電路 212:解碼器 213:編碼器 214:分析電路 220:串列除錯存取埠 230:處理器核心 S out:輸出信號 S encode、S ’ encode:編碼信號 S reset:重置信號 S data:資料信號 S clock:時鐘信號 S210~S240:步驟 100: debugging system 110: debugger 120: target device 210: serial debugging interface circuit 211: judgment circuit 212: decoder 213: encoder 214: analysis circuit 220: serial debugging access port 230: processor core S out : output signal S encode , S ' encode : encoding signal S reset : reset signal S data : data signal S clock : clock signal S210~S240: steps
第1圖係顯示根據本發明之一實施例所述之一除錯系統100之方塊圖。 第2圖係根據本發明之一實施例所述之一除錯方法之流程圖。 FIG. 1 is a block diagram showing a debugging system 100 according to an embodiment of the present invention. FIG. 2 is a flow chart of a debugging method according to an embodiment of the present invention.
100:除錯系統 100: Debug system
110:除錯器 110: Debugger
120:目標裝置 120: Target device
210:串列除錯介面電路 210: Serial debug interface circuit
211:判斷電路 211: Judgment circuit
212:解碼器 212:Decoder
213:編碼器 213: Encoder
214:分析電路 214: Analyzing Circuits
220:除錯存取埠 220: Debug access port
230:處理器核心 230: Processor core
Sout:輸出信號 S out : output signal
Sencode、Sencode:編碼信號 S encode , S encode : coded signal
Sreset:重置信號 S reset : reset signal
Sdata:資料信號 S data : data signal
Sclock:時鐘信號 S clock : clock signal
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW110149275A TWI839671B (en) | 2021-12-29 | 2021-12-29 | Debug system, microprocessing device and debug method |
| CN202211047181.4A CN116414059A (en) | 2021-12-29 | 2022-08-29 | Debugging system, micro-processing device and debugging method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW110149275A TWI839671B (en) | 2021-12-29 | 2021-12-29 | Debug system, microprocessing device and debug method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202326436A TW202326436A (en) | 2023-07-01 |
| TWI839671B true TWI839671B (en) | 2024-04-21 |
Family
ID=87050325
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW110149275A TWI839671B (en) | 2021-12-29 | 2021-12-29 | Debug system, microprocessing device and debug method |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN116414059A (en) |
| TW (1) | TWI839671B (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040221201A1 (en) * | 2003-04-17 | 2004-11-04 | Seroff Nicholas Carl | Method and apparatus for obtaining trace data of a high speed embedded processor |
| US20060195311A1 (en) * | 2000-03-02 | 2006-08-31 | Swoboda Gary L | Synchronizing On-Chip Data Processor Trace and Timing Information for Export |
| US20060255981A1 (en) * | 2005-05-16 | 2006-11-16 | Swoboda Gary L | Paced Trace Transmission |
| TW201614421A (en) * | 2009-06-30 | 2016-04-16 | Intel Corp | Link power savings mode with state retention |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN100377097C (en) * | 2002-08-26 | 2008-03-26 | 联发科技股份有限公司 | Debugging device |
| TW201118566A (en) * | 2009-11-20 | 2011-06-01 | Inventec Corp | System debugging |
| CN103823725A (en) * | 2012-11-16 | 2014-05-28 | 英业达科技有限公司 | Debugging device and debugging method |
-
2021
- 2021-12-29 TW TW110149275A patent/TWI839671B/en active
-
2022
- 2022-08-29 CN CN202211047181.4A patent/CN116414059A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20060195311A1 (en) * | 2000-03-02 | 2006-08-31 | Swoboda Gary L | Synchronizing On-Chip Data Processor Trace and Timing Information for Export |
| US20040221201A1 (en) * | 2003-04-17 | 2004-11-04 | Seroff Nicholas Carl | Method and apparatus for obtaining trace data of a high speed embedded processor |
| US20060255981A1 (en) * | 2005-05-16 | 2006-11-16 | Swoboda Gary L | Paced Trace Transmission |
| TW201614421A (en) * | 2009-06-30 | 2016-04-16 | Intel Corp | Link power savings mode with state retention |
Also Published As
| Publication number | Publication date |
|---|---|
| CN116414059A (en) | 2023-07-11 |
| TW202326436A (en) | 2023-07-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20040255225A1 (en) | Control circuit for error checking and correction and memory controller | |
| KR101879708B1 (en) | Unified data masking, data poisoning, and data bus inversion signaling | |
| KR101558687B1 (en) | Serial communication test device, system including the same and method thereof | |
| US7882395B2 (en) | Debug device for embedded systems and method thereof | |
| KR100680473B1 (en) | Flash memory device with reduced access time | |
| US10860518B2 (en) | Integrated circuit system | |
| US20150052405A1 (en) | Data bus network interface module and method therefor | |
| CN111858141B (en) | System-on-chip memory control device and system-on-chip | |
| CN105915890B (en) | SVAC coding and decoding video chip checking device and methods based on FPGA | |
| TWI839671B (en) | Debug system, microprocessing device and debug method | |
| KR102795641B1 (en) | Integrated circuit system | |
| JP2003085123A (en) | Memory control device and serial memory | |
| CN112068985B (en) | NORFLASH memory ECC error detection and correction method and system with programming instruction recognition | |
| CN205139625U (en) | HDLC transceiver controller based on FPGA | |
| WO2008028400A1 (en) | Method for concurrently processing multiple groups of data with one ecc circuit | |
| CN102568605B (en) | System bus error detection and error correction method and NAND FLASH controller | |
| TWI590246B (en) | Timing optimization for memory devices employing error detection coded transactions | |
| CN114461440B (en) | Storage system and method for hiding ECC coding delay | |
| CN117524290A (en) | On-chip storage error correction system | |
| CN111813180B (en) | System chip storage control method, device and system chip | |
| CN102832962A (en) | High-safety transponder ground electronic unit and method for improving safety of high-safety transponder ground electronic unit | |
| CN101714412A (en) | Test system for memory and related storage module | |
| KR20080049376A (en) | Codec Automated Verification System and Method | |
| CN119718997B (en) | AHB bus bridge with ECC bus function and control method thereof | |
| CN107748805B (en) | Single-wire interface method for on-chip debugging |