US20020010882A1 - Integrated circuit device and its control method - Google Patents

Integrated circuit device and its control method Download PDF

Info

Publication number
US20020010882A1
US20020010882A1 US09/123,525 US12352598A US2002010882A1 US 20020010882 A1 US20020010882 A1 US 20020010882A1 US 12352598 A US12352598 A US 12352598A US 2002010882 A1 US2002010882 A1 US 2002010882A1
Authority
US
United States
Prior art keywords
trace
data
integrated circuit
buffer
circuit device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US09/123,525
Other versions
US6421795B2 (en
Inventor
Fumiaki Yamashita
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Electronics Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Assigned to NEC CORPORATION reassignment NEC CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: YAMASHITA, FUMIAKI
Publication of US20020010882A1 publication Critical patent/US20020010882A1/en
Application granted granted Critical
Publication of US6421795B2 publication Critical patent/US6421795B2/en
Assigned to NEC ELECTRONICS CORPORATION reassignment NEC ELECTRONICS CORPORATION ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: NEC CORPORATION
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware

Definitions

  • the present invention relates to an integrated circuit device having at least a central processing unit and a trace buffer and to its operation control method.
  • an integrated circuit device has been used in various types of data processing.
  • This type of integrated circuit has a central processing unit, such as a Central Processing Unit (CPU) core, which reads a program for execution of data processing.
  • CPU Central Processing Unit
  • the user program is read into the central processing unit for execution of data processing, and trace data generated by the central processing unit during execution of data processing is collected by the debug device.
  • Checking the collected trace data which is the execution history data on the central processing unit, shows how the central processing unit performed data processing during execution of the user program.
  • trace data need not be output to an external device when the integrated circuit device described above is used in a production run
  • the trace data is output via the debug interface provided for debugging purposes only.
  • this debug interface is structured most simply because it is not used during a production run. That is, the debug interface is usually structured as a single serial port through which trace data is output serially.
  • connecting the debug device to the conventional integrated circuit device allows trace data to be collected from the central processing unit which executes data processing requested by the user program. Collected trace data is then used in checking the behavior of the central processing unit.
  • trace data is output serially from one serial port of the integrated circuit device
  • some trace data collected by the debug device may be lost if trace data is generated faster than it is sent serially to the debug device. This happens more frequently when the speed at which central processing unit outputs trace data is not constant. In this case, the speed at which trace data is output by the central processing unit tends to instantaneously exceed the maximum speed at which trace data is sent from the serial port to the debug device.
  • an integrated circuit device comprising a central processing unit executing data processing in response to an interrupt signal and outputting trace data during execution; a trace buffer temporarily storing the trace data; a serial port used to output the trace data to an external unit; and a buffer monitoring circuit causing to suspend the data processing according to the usage amount of the trace buffer
  • the trace buffer comprises means for detecting the amount of trace data that is input in parallel; means for converting the trace data from parallel to serial; and a plurality of shift registers sequentially storing the trace data that has been converted to serial
  • the buffer monitoring circuit comprises means for calculating, based on the detected amount of trace data, the number of shift registers to be used; means for outputting an interrupt signal to the processor according to the calculated number of shift registers; means for outputting rotate instruction data according to the calculated number of shift registers; and means for generating a shift/load signal for the plurality of shift registers according to the calculated number of shift registers.
  • the central processing unit outputs trace data serially to the serial port during data processing. Therefore, connecting a debug device to the serial port allows a user to collect trace data.
  • the trace data is temporarily stored in the trace buffer, it is output to the serial port at a constant speed even when the central processing unit outputs the trace data at a speed that is not constant.
  • the central processing unit suspends data processing, thus making it possible to collect all trace data output by the central processing unit.
  • this simply-structure device is capable of calculating the approximate usage amount of the trace buffer without having to monitor the trace buffer usage.
  • this integrated circuit device converts from parallel to serial the trace data entered into the trace buffer and then sequentially stores the converted data into the plurality of shift registers, allowing the trace data from the central processing unit to be stored in the trace buffer efficiently.
  • a method of controlling an integrated circuit device comprising a central processing unit for outputting trace data, a trace buffer for temporarily storing the trace data, and a serial port for outputting the trace data to an external unit, the method comprising the steps of executing data processing in accordance with a program and outputting the trace data indicating an execution history; temporarily storing the trace data according to a usage amount of the trace buffer; and outputting the trace data temporarily stored in the trace buffer to the external unit via the serial port.
  • the central processing unit outputs trace data serially to the serial port during data processing. Therefore, connecting a debug device to the serial port allows a user to collect trace data.
  • the trace data is temporarily stored in the trace buffer, it is output to the serial port at a constant speed even when the central processing unit outputs the trace data at a speed that is not constant.
  • the central processing unit suspends data processing, thus making it possible to collect all trace data output by the central processing unit.
  • FIG. 1 is a block diagram depicting the configuration of a microprocessor, which is an integrated circuit device, and a debug device used in an embodiment of the present invention.
  • FIG. 2 is a block diagram depicting a trace buffer and a buffer monitoring circuit of the microprocessor.
  • FIG. 1 is a block diagram depicting the internal structure of the integrated circuit device used in the embodiment
  • FIG. 2 is a block diagram showing an internal tracer.
  • a microprocessor 100 used as the integrated circuit device in this embodiment has a CPU core (processor) 1 which is the central processing unit executing various types of data processing.
  • a trace buffer 3 is connected via a parallel bus 2 to a predetermined output terminal on this CPU core 1 .
  • a buffer monitoring circuit (trace controller) 4 is connected to an input terminal of the trace buffer 3 and to a predetermined control terminal of the CPU core 1 .
  • the CPU core 1 executes various types of data processing requested by a program and outputs trace data indicating the execution history.
  • the trace buffer 3 temporarily stores trace data that is output in parallel by the CPU core 1 .
  • the buffer monitoring circuit 4 suspends the data processing of the CPU core 1 and, when a preset period of time elapses, releases the suspension of data processing of the CPU core 1 .
  • a serial port 6 one of the connection terminals of the debug interface (not shown in the figure), is connected via a serial bus 5 to the output terminal of the trace buffer 3 . And, a trace memory 11 of an independent and removable debug device 200 is connected to the serial port 6 via a serial connector 12 .
  • Trace data temporarily stored in the trace buffer 3 is output serially via the serial port 6 .
  • the debug device 200 gets the trace data serially output from the microprocessor 100 , and stores it in the trace memory 11 .
  • the trace buffer 3 comprises an input control block (detector) 21 , a rotate circuit 22 which acts as a data conversion circuit, and a plurality of shift registers 23 to 27 .
  • the rotate circuit 22 is connected to the parallel bus 2 via the input control block 21 , and the serially-connected shift registers 23 - 26 are connected to the rotate circuit 22 .
  • the last shift register 26 is connected to the serial bus 5 via a shift register 27 .
  • the buffer monitoring circuit 4 comprises a buffer pointer counter (calculator) 31 , a rotate instruction block 32 , a signal generation block 33 , and a number-of-shift-registers monitor block 34 (Blocks 32 , 33 , and 34 are collectively called a signal generator).
  • the buffer pointer counter 31 is connected to the input control block 21 . And, to the buffer pointer counter 31 , the rotate instruction block 32 , the signal generating block 33 , and the number-of-shift-registers monitor block 34 are connected.
  • the rotate instruction block 32 is connected to the rotate circuit 22 , the signal generation block 33 is connected to the shift registers 23 - 26 , and the number-of-shift-registers monitor block 34 is connected to the control terminal on the CPU core 1 .
  • the input control block 21 of the trace buffer 3 checks the amount of trace data that is received in parallel via the parallel bus 2 . Then, based on the amount of trace data checked by the input control block 21 , the buffer pointer counter 31 of the buffer monitoring circuit 4 calculates the number of shift registers 23 - 26 in the trace buffer 3 to be used for storing the trace data.
  • the rotate instruction block 32 Based on the number of shift registers calculated by the buffer pointer counter 31 as described above, the rotate instruction block 32 sends a rotate instruction to the rotate circuit 22 . Upon receiving the instruction, the rotate circuit 22 converts the trace data from parallel to serial. Also, based on the number of shift registers calculated above, the signal generation block 33 generates a shift/load signal for the shift registers 23 - 26 . This signal causes the four serially-connected shift registers, 23 - 26 , to sequentially store the serially-converted trace data.
  • the number-of-shift-registers monitor block 34 contains a preset number. For example, it contains 2 . This number indicates the maximum allowable number of shift registers 23 - 26 which may be used for storing data. When the number of shift registers calculated as described above exceeds this maximum allowable number (2 in the above example), the number-of-shift-registers monitor block 34 sends to the CPU core 1 an interrupt signal BRKINT for debug to suspend the generation of debug data.
  • BRKINT interrupt signal
  • the number-of-shift-registers monitor block 34 has a clock mechanism such as an internal clock. When a preset time has elapsed from the time the interrupt signal BRKINT is generated, the number-of-shift-registers monitor block 34 stops sending the interrupt signal to allow the CPU core 1 to resume generating debug data.
  • a separate external memory (not shown in the figure) containing a user program is connected to the microprocessor 100 used in this embodiment.
  • the CPU core 1 reads the user program from the external memory for execution of various types of data processing.
  • connecting the serial connector 12 of the debug device 200 to the serial port 6 of the microprocessor 100 allows the debug device 200 to receive trace data generated by the CPU core 1 of the microprocessor 100 during data processing.
  • the debug device 200 uses this trace data for checking the internal operation of the microprocessor 100 .
  • the microprocessor 100 used in the embodiment temporarily stores trace data, generated by the CPU core 1 during data processing, into the trace buffer 3 before outputting it to an external device via the serial port 6 .
  • This makes it possible for trace data to be output from the serial port 6 at a constant speed even if the CPU core 1 outputs trace data speedily and irregularly, enabling the debug device 200 to receive trace data without loss.
  • trace data output by the CPU core 1 is converted from parallel to serial before it is stored sequentially into the plurality of serially-connected registers, 23 - 26 , in the trace buffer 3 .
  • This structure allows the trace buffer 3 to receive trace data without taking up much buffer space and to output trace data serially, preventing the circuit from getting large while still allowing much trace data to be stored temporarily.
  • a trace buffer 3 with this structure is described in detail in Japanese Patent Laid-Open Publication No. A-9-45346.
  • the buffer monitoring circuit 4 tells the CPU core 1 to suspend data processing. This allows all trace data from the CPU core 1 to be temporarily stored in the trace buffer 3 , enabling the debug device 200 to get trace data without loss.
  • trace data temporarily stored in the trace buffer 3 is output to an external device at a constant speed via the serial port 6 . Therefore, given the amount of trace data sent to the trace buffer 3 , it is possible to calculate the usage amount of the trace buffer 3 .
  • the monitoring circuit 4 of the microprocessor 100 calculates the usage amount of the trace buffer 3 from the amount of trace data sent from the CPU core 1 to the trace buffer 3 . This simple structure makes it possible to calculate the approximate usage amount of the trace buffer 3 , eliminating the need to actually monitor the usage amount of the trace buffer 3 .
  • the buffer monitoring circuit 4 calculates the number of shift registers in use to find the usage amount of the trace buffer 3 . For example, if two shift registers are used when there are four, the buffer monitoring circuit 4 tells the CPU core 1 to suspend outputting trace data. This ensures that all trace data output from the CPU core 1 is stored temporarily in the trace buffer 3 .
  • the buffer monitoring circuit 4 allows the CPU core 1 to resume outputting trace data. That is, as trace data is output sequentially from the trace buffer 3 at a constant speed, the usage amount of the trace buffer 3 will be decreased, within the predetermined time, to a predetermined amount that is low enough to receive trace data temporarily.
  • the buffer monitoring circuit 4 is implemented by logical circuits.
  • the buffer monitoring circuit 4 may also be implemented by a program and a processor.

Abstract

An integrated circuit device sending trace data generated by a central processing unit (CPU) to a debug device without loss and a method of controlling the operation of the integrated circuit device. The integrated circuit device has the CPU executing various types of data processing. A trace buffer is connected via a parallel bus to a predetermined output terminal of the CPU. A buffer monitoring circuit is connected to an input terminal of the trace buffer and to a predetermined control terminal of the CPU. The CPU executes various types of data processing requested by a program and outputs trace data indicating an execution history. The trace buffer temporarily stores the trace data that is output in parallel by the CPU. When a usage amount of the trace buffer exceeds a preset threshold, the buffer monitoring circuit sends an interrupt signal BRKINT to the CPU to suspend the data processing of the CPU and, when a preset period of time elapses, releases the suspension of data processing of the CPU.

Description

    BACKGROUND OF THE INVENTION
  • 1. Field of the Invention [0001]
  • The present invention relates to an integrated circuit device having at least a central processing unit and a trace buffer and to its operation control method. [0002]
  • 2. Description of the Related Art [0003]
  • Conventionally, an integrated circuit device has been used in various types of data processing. This type of integrated circuit has a central processing unit, such as a Central Processing Unit (CPU) core, which reads a program for execution of data processing. [0004]
  • When this type of integrated circuit is in the process of development, it is necessary to test the internal operation. One of the methods for testing the internal operation is tracing the behavior of the central processing unit. When performing the trace, an external memory containing a user program is connected to the external bus of the integrated circuit device with a debug device, such as an In-Circuit Emulator (ICE) system, connected to the debug interface (I/F) of the integrated circuit. [0005]
  • To do the test, the user program is read into the central processing unit for execution of data processing, and trace data generated by the central processing unit during execution of data processing is collected by the debug device. Checking the collected trace data, which is the execution history data on the central processing unit, shows how the central processing unit performed data processing during execution of the user program. [0006]
  • Because trace data need not be output to an external device when the integrated circuit device described above is used in a production run, the trace data is output via the debug interface provided for debugging purposes only. In addition, this debug interface is structured most simply because it is not used during a production run. That is, the debug interface is usually structured as a single serial port through which trace data is output serially. [0007]
  • As described above, connecting the debug device to the conventional integrated circuit device allows trace data to be collected from the central processing unit which executes data processing requested by the user program. Collected trace data is then used in checking the behavior of the central processing unit. [0008]
  • However, since trace data is output serially from one serial port of the integrated circuit device, some trace data collected by the debug device may be lost if trace data is generated faster than it is sent serially to the debug device. This happens more frequently when the speed at which central processing unit outputs trace data is not constant. In this case, the speed at which trace data is output by the central processing unit tends to instantaneously exceed the maximum speed at which trace data is sent from the serial port to the debug device. [0009]
  • SUMMARY OF THE INVENTION
  • In view of the foregoing, it is an object of the present invention to provide an integrated circuit device sending trace data generated by a central processing unit to a debug device without loss and a method of controlling the operation of the integrated circuit device. [0010]
  • According to one aspect of the present invention, there is provided an integrated circuit device comprising a central processing unit executing data processing in response to an interrupt signal and outputting trace data during execution; a trace buffer temporarily storing the trace data; a serial port used to output the trace data to an external unit; and a buffer monitoring circuit causing to suspend the data processing according to the usage amount of the trace buffer, wherein the trace buffer comprises means for detecting the amount of trace data that is input in parallel; means for converting the trace data from parallel to serial; and a plurality of shift registers sequentially storing the trace data that has been converted to serial; and wherein the buffer monitoring circuit comprises means for calculating, based on the detected amount of trace data, the number of shift registers to be used; means for outputting an interrupt signal to the processor according to the calculated number of shift registers; means for outputting rotate instruction data according to the calculated number of shift registers; and means for generating a shift/load signal for the plurality of shift registers according to the calculated number of shift registers. [0011]
  • With this invention, the central processing unit outputs trace data serially to the serial port during data processing. Therefore, connecting a debug device to the serial port allows a user to collect trace data. In this case, because the trace data is temporarily stored in the trace buffer, it is output to the serial port at a constant speed even when the central processing unit outputs the trace data at a speed that is not constant. When the amount of temporarily-stored trace data exceeds a maximum allowable amount that is predetermined, the central processing unit suspends data processing, thus making it possible to collect all trace data output by the central processing unit. In addition, this simply-structure device is capable of calculating the approximate usage amount of the trace buffer without having to monitor the trace buffer usage. And, this integrated circuit device converts from parallel to serial the trace data entered into the trace buffer and then sequentially stores the converted data into the plurality of shift registers, allowing the trace data from the central processing unit to be stored in the trace buffer efficiently. [0012]
  • According to another aspect of the present invention, there is provided a method of controlling an integrated circuit device comprising a central processing unit for outputting trace data, a trace buffer for temporarily storing the trace data, and a serial port for outputting the trace data to an external unit, the method comprising the steps of executing data processing in accordance with a program and outputting the trace data indicating an execution history; temporarily storing the trace data according to a usage amount of the trace buffer; and outputting the trace data temporarily stored in the trace buffer to the external unit via the serial port. [0013]
  • With this invention, the central processing unit outputs trace data serially to the serial port during data processing. Therefore, connecting a debug device to the serial port allows a user to collect trace data. In this case, because the trace data is temporarily stored in the trace buffer, it is output to the serial port at a constant speed even when the central processing unit outputs the trace data at a speed that is not constant. When the amount of temporarily-stored trace data exceeds a maximum allowable amount that is predetermined, the central processing unit suspends data processing, thus making it possible to collect all trace data output by the central processing unit.[0014]
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is a block diagram depicting the configuration of a microprocessor, which is an integrated circuit device, and a debug device used in an embodiment of the present invention; and [0015]
  • FIG. 2 is a block diagram depicting a trace buffer and a buffer monitoring circuit of the microprocessor.[0016]
  • DESCRIPTION OF THE PREFERRED EMBODIMENTS
  • Referring to FIGS. 1 and 2, the following describes an embodiment of the present invention. FIG. 1 is a block diagram depicting the internal structure of the integrated circuit device used in the embodiment, and FIG. 2 is a block diagram showing an internal tracer. [0017]
  • As shown in FIG. 1, a [0018] microprocessor 100 used as the integrated circuit device in this embodiment has a CPU core (processor) 1 which is the central processing unit executing various types of data processing. A trace buffer 3 is connected via a parallel bus 2 to a predetermined output terminal on this CPU core 1. A buffer monitoring circuit (trace controller) 4 is connected to an input terminal of the trace buffer 3 and to a predetermined control terminal of the CPU core 1.
  • The CPU core [0019] 1 executes various types of data processing requested by a program and outputs trace data indicating the execution history. The trace buffer 3 temporarily stores trace data that is output in parallel by the CPU core 1. When the usage amount of the trace buffer 3 exceeds a preset threshold, the buffer monitoring circuit 4 suspends the data processing of the CPU core 1 and, when a preset period of time elapses, releases the suspension of data processing of the CPU core 1.
  • A [0020] serial port 6, one of the connection terminals of the debug interface (not shown in the figure), is connected via a serial bus 5 to the output terminal of the trace buffer 3. And, a trace memory 11 of an independent and removable debug device 200 is connected to the serial port 6 via a serial connector 12.
  • Trace data temporarily stored in the [0021] trace buffer 3 is output serially via the serial port 6. The debug device 200 gets the trace data serially output from the microprocessor 100, and stores it in the trace memory 11.
  • As shown in FIG. 2, the [0022] trace buffer 3 comprises an input control block (detector) 21, a rotate circuit 22 which acts as a data conversion circuit, and a plurality of shift registers 23 to 27. The rotate circuit 22 is connected to the parallel bus 2 via the input control block 21, and the serially-connected shift registers 23-26 are connected to the rotate circuit 22. The last shift register 26 is connected to the serial bus 5 via a shift register 27.
  • The [0023] buffer monitoring circuit 4 comprises a buffer pointer counter (calculator) 31, a rotate instruction block 32, a signal generation block 33, and a number-of-shift-registers monitor block 34 ( Blocks 32, 33, and 34 are collectively called a signal generator). The buffer pointer counter 31 is connected to the input control block 21. And, to the buffer pointer counter 31, the rotate instruction block 32, the signal generating block 33, and the number-of-shift-registers monitor block 34 are connected.
  • The [0024] rotate instruction block 32 is connected to the rotate circuit 22, the signal generation block 33 is connected to the shift registers 23-26, and the number-of-shift-registers monitor block 34 is connected to the control terminal on the CPU core 1.
  • The [0025] input control block 21 of the trace buffer 3 checks the amount of trace data that is received in parallel via the parallel bus 2. Then, based on the amount of trace data checked by the input control block 21, the buffer pointer counter 31 of the buffer monitoring circuit 4 calculates the number of shift registers 23-26 in the trace buffer 3 to be used for storing the trace data.
  • Based on the number of shift registers calculated by the [0026] buffer pointer counter 31 as described above, the rotate instruction block 32 sends a rotate instruction to the rotate circuit 22. Upon receiving the instruction, the rotate circuit 22 converts the trace data from parallel to serial. Also, based on the number of shift registers calculated above, the signal generation block 33 generates a shift/load signal for the shift registers 23-26. This signal causes the four serially-connected shift registers, 23-26, to sequentially store the serially-converted trace data.
  • Initially, the number-of-shift-[0027] registers monitor block 34 contains a preset number. For example, it contains 2. This number indicates the maximum allowable number of shift registers 23-26 which may be used for storing data. When the number of shift registers calculated as described above exceeds this maximum allowable number (2 in the above example), the number-of-shift-registers monitor block 34 sends to the CPU core 1 an interrupt signal BRKINT for debug to suspend the generation of debug data.
  • The number-of-shift-registers monitor [0028] block 34 has a clock mechanism such as an internal clock. When a preset time has elapsed from the time the interrupt signal BRKINT is generated, the number-of-shift-registers monitor block 34 stops sending the interrupt signal to allow the CPU core 1 to resume generating debug data.
  • In the configuration described above, a separate external memory (not shown in the figure) containing a user program is connected to the [0029] microprocessor 100 used in this embodiment. The CPU core 1 reads the user program from the external memory for execution of various types of data processing.
  • Then, connecting the [0030] serial connector 12 of the debug device 200 to the serial port 6 of the microprocessor 100 allows the debug device 200 to receive trace data generated by the CPU core 1 of the microprocessor 100 during data processing. The debug device 200 uses this trace data for checking the internal operation of the microprocessor 100.
  • And, the [0031] microprocessor 100 used in the embodiment temporarily stores trace data, generated by the CPU core 1 during data processing, into the trace buffer 3 before outputting it to an external device via the serial port 6. This makes it possible for trace data to be output from the serial port 6 at a constant speed even if the CPU core 1 outputs trace data speedily and irregularly, enabling the debug device 200 to receive trace data without loss.
  • In this embodiment, it should be noted that trace data output by the CPU core [0032] 1 is converted from parallel to serial before it is stored sequentially into the plurality of serially-connected registers, 23-26, in the trace buffer 3. This structure allows the trace buffer 3 to receive trace data without taking up much buffer space and to output trace data serially, preventing the circuit from getting large while still allowing much trace data to be stored temporarily. A trace buffer 3 with this structure is described in detail in Japanese Patent Laid-Open Publication No. A-9-45346.
  • In addition, when the usage amount of the [0033] trace buffer 3 in which trace data is temporarily stored exceeds a preset maximum allowable amount, the buffer monitoring circuit 4 tells the CPU core 1 to suspend data processing. This allows all trace data from the CPU core 1 to be temporarily stored in the trace buffer 3, enabling the debug device 200 to get trace data without loss.
  • Note that trace data temporarily stored in the [0034] trace buffer 3 is output to an external device at a constant speed via the serial port 6. Therefore, given the amount of trace data sent to the trace buffer 3, it is possible to calculate the usage amount of the trace buffer 3. In this embodiment, the monitoring circuit 4 of the microprocessor 100 calculates the usage amount of the trace buffer 3 from the amount of trace data sent from the CPU core 1 to the trace buffer 3. This simple structure makes it possible to calculate the approximate usage amount of the trace buffer 3, eliminating the need to actually monitor the usage amount of the trace buffer 3.
  • More specifically, the [0035] buffer monitoring circuit 4 calculates the number of shift registers in use to find the usage amount of the trace buffer 3. For example, if two shift registers are used when there are four, the buffer monitoring circuit 4 tells the CPU core 1 to suspend outputting trace data. This ensures that all trace data output from the CPU core 1 is stored temporarily in the trace buffer 3.
  • In addition, when a predetermined time has elapsed, the [0036] buffer monitoring circuit 4 allows the CPU core 1 to resume outputting trace data. That is, as trace data is output sequentially from the trace buffer 3 at a constant speed, the usage amount of the trace buffer 3 will be decreased, within the predetermined time, to a predetermined amount that is low enough to receive trace data temporarily.
  • This means that the simply-structured [0037] buffer monitoring circuit 4 allows the CPU core 1 to resume trace data generation at a right time according to the status of the trace buffer 3.
  • In the present invention, the [0038] buffer monitoring circuit 4 is implemented by logical circuits. The buffer monitoring circuit 4 may also be implemented by a program and a processor.
  • The invention may be embodied in other specific forms without departing from the spirit or essential characteristic thereof. The present embodiments is therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. [0039]
  • The entire disclosure of Japanese Patent Application No. 9-203403 (Filed on Jul. 29th, 1997) including specification, claims, drawings and summary are incorporated herein by reference in its entirety. [0040]

Claims (22)

What is claimed is:
1. A method of controlling an integrated circuit device comprising a central processing unit for outputting trace data, a trace buffer for temporarily storing the trace data, and a serial port for outputting the trace data to an external unit, the method comprising the steps of:
executing data processing in accordance with a program and outputting the trace data indicating an execution history;
temporarily storing the trace data according to a usage amount of the trace buffer; and
outputting the trace data temporarily stored in the trace buffer to the external unit via the serial port.
2. The method of controlling an integrated circuit device according to claim 1, further comprising the step of:
continuing data processing when the usage amount of the trace buffer does not exceed a maximum allowable amount.
3. The method of controlling an integrated circuit device according to claim 1, further comprising the step of:
suspending data processing when the usage amount of the trace buffer exceeds a maximum allowable amount.
4. The method of controlling an integrated circuit device according to claim 3, further comprising the step of:
releasing the suspension of data processing when a predetermined period of time has elapsed.
5. The method of controlling an integrated circuit device according to claim 4, wherein said predetermined period of time is set according to a period of time required for said maximum allowable amount of trace data to be output from the serial port to the external unit.
6. An integrated circuit device outputting execution trace data during data processing, the integrated circuit device comprising:
a processor executing data processing and outputting execution trace data;
a trace buffer sequentially and temporarily storing the trace data; and
a port used to output the trace data temporarily stored in the trace buffer to an external unit.
7. The integrated circuit device according to claim 6, further comprising:
a detector detecting an amount of trace data stored in the trace buffer; and
a trace controller controlling the continuation and suspension of the processor according to the amount of detected trace data.
8. An integrated circuit device outputting execution trace data during data processing comprising a processor executing data processing and outputting the execution trace data, a trace buffer sequentially storing the trace data, a serial port used to output the trace data temporarily stored in the trace buffer to an external unit, and a trace controller controlling the data processing of the processor and causing the integrated circuit device to:
continue data processing when a usage amount of the trace buffer does not exceed a maximum allowable amount;
suspend data processing when the usage amount of the trace buffer exceeds the maximum allowable amount; and
release the suspension of data processing when a predetermined period of time has elapsed.
9. The integrated circuit device according to claim 8, wherein said predetermined period of time is set according to a period of time required for said maximum allowable amount of trace data to be output from the serial port to the external unit.
10. An integrated circuit device outputting execution trace data during data processing, the integrated circuit device comprising:
means for executing data processing and outputting execution trace data;
means for storing the trace data sequentially and temporarily in a trace buffer; and
means for outputting the trace data temporarily stored in the trace buffer to an external unit.
11. An integrated circuit device outputting trace data during execution of data processing, the integrated circuit device comprising:
a processor executing or suspending data processing in response to an interrupt signal and outputting parallel trace data;
a detector detecting an amount of the parallel trace data received for entry into the trace buffer;
a rotate circuit converting the trace data from parallel to serial in response to rotate instruction data;
a trace: buffer composed of a plurality of shift registers and storing the trace data which has been converted to serial in response to a shift/load signal; and
a trace controller connected to the trace buffer and controlling the operation of the processor;
wherein the trace controller comprises:
a calculator calculating, based on the amount of detected trace data, a number of registers to be used for storing the trace data; and
a signal generator generating the interrupt signal to be sent to the processor, the rotate instruction data to be sent to the rotate circuit, and the shift/load signal to be sent to the plurality of shift registers.
12. An integrated circuit device according to claim 11, wherein the trace controller allows the processor to continue data processing when a usage amount of the trace buffer does not exceed a maximum allowable amount.
13. An integrated circuit device according to claim 11, wherein the trace controller causes the processor to suspend data processing when a usage amount of the trace buffer exceeds a maximum allowable amount.
14. An integrated circuit device according to claim 13, wherein the trace controller releases the suspension of data processing when a predetermined period of time has elapsed.
15. An integrated circuit device comprising:
a central processing unit executing data processing in response to an interrupt signal and outputting trace data during execution;
a trace buffer temporarily storing the trace data;
a serial port used to output the trace data to an external unit; and
a buffer monitoring circuit causing the output of the trace data to be suspended according to a usage amount of the trace buffer,
wherein the trace buffer comprises:
means for detecting an amount of trace data that is input in parallel;
means for converting the trace data from parallel to serial; and
a plurality of shift registers sequentially storing the trace data that has been converted to serial; and
wherein the buffer monitoring circuit comprises:
means for calculating, based on the detected amount of trace data, a number of shift registers to be used;
means for outputting an interrupt signal to the processor according to the calculated number of shift registers;
means for outputting rotate instruction data according to the calculated number of shift registers; and
means for generating a shift/load signal for the plurality of shift registers according to the calculated number of shift registers.
16. The integrated circuit device according to claim 15, further comprising means for continuing data processing when the usage amount of the trace buffer does not exceed a maximum allowable amount.
17. The integrated circuit device according to claim 15, further comprising means for suspending data processing when the usage amount of the trace buffer exceeds a maximum allowable amount.
18. The integrated circuit device according to claim 17, further comprising means for releasing the suspension of data processing when a predetermined period of time has elapsed.
19. A computer program product stored on a storage medium for controlling an integrated circuit device comprising a processor executing data processing and outputting trace data; a trace buffer temporarily storing the trace data; and a serial port used to output the trace data to an external unit, wherein the program causes the integrated circuit device to:
execute data processing in accordance with a user program and outputting the trace data indicating an execution history;
temporarily store the trace data according to a usage amount of the trace buffer; and
output the trace data temporarily stored in the trace buffer to the external unit via the serial port.
20. The computer program product according to claim 19, wherein the computer program further causes the integrated circuit device to:
continue data processing when the usage amount of the trace buffer does not exceed a maximum allowable amount.
21. The computer program product according to claim 19, wherein the computer program further causes the integrated circuit device to:
suspend data processing when the usage amount of the trace buffer exceeds a maximum allowable amount.
22. The computer program product according to claim 21, wherein the computer program further causes the integrated circuit device to:
release the suspension of data processing when a predetermined period of time has elapsed.
US09/123,525 1997-07-29 1998-07-28 Integrated circuit device and its control method Expired - Fee Related US6421795B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP09-203403 1997-07-29
JP20340397A JP3542463B2 (en) 1997-07-29 1997-07-29 Integrated circuit device and operation control method thereof
JP9-203403 1997-07-29

Publications (2)

Publication Number Publication Date
US20020010882A1 true US20020010882A1 (en) 2002-01-24
US6421795B2 US6421795B2 (en) 2002-07-16

Family

ID=16473486

Family Applications (1)

Application Number Title Priority Date Filing Date
US09/123,525 Expired - Fee Related US6421795B2 (en) 1997-07-29 1998-07-28 Integrated circuit device and its control method

Country Status (3)

Country Link
US (1) US6421795B2 (en)
JP (1) JP3542463B2 (en)
DE (1) DE19834191C2 (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020129300A1 (en) * 2001-03-08 2002-09-12 International Business Machines Corporation Guaranteed method and apparatus for capture of debug data
US20020162055A1 (en) * 2001-04-25 2002-10-31 Mitsubishi Denki Kabushiki Kaisha Trace circuit
US20030084374A1 (en) * 2001-10-31 2003-05-01 Ibm Corporation Dynamic sizing logic for dump list generation
US20040250242A1 (en) * 2003-06-05 2004-12-09 International Business Machines Corporation Method, system and computer program product for tracing software methods
US20050114567A1 (en) * 2003-11-25 2005-05-26 Emil Lambrache Serial peripheral interface (SPI) apparatus with write buffer for improving data throughput
US6912673B1 (en) * 2001-02-02 2005-06-28 Cradle Technologies, Inc. Bus analyzer unit with programmable trace buffers
US20050240727A1 (en) * 2004-04-23 2005-10-27 Shishir Shah Method and system for managing storage area networks
US20050273672A1 (en) * 2004-05-18 2005-12-08 Konda Dharma R Method and system for efficiently recording processor events in host bus adapters
US20050288828A1 (en) * 2004-06-28 2005-12-29 Micrel, Incorporated System and method for monitoring serially-connected devices
US20060064531A1 (en) * 2004-09-23 2006-03-23 Alston Jerald K Method and system for optimizing data transfer in networks
GB2459652A (en) * 2008-04-28 2009-11-04 Imagination Tech Ltd System for Providing Trace Data in a Data Processor Having a Pipelined Architecture
US20100235686A1 (en) * 2009-03-16 2010-09-16 Fujitsu Microelectronics Limited Execution history tracing method
US20110113406A1 (en) * 2009-11-10 2011-05-12 International Business Machines Corporation Symmetric multi-processor lock tracing
US20150277968A1 (en) * 2014-03-26 2015-10-01 Justin E. Gottschlich Software replayer for transactional memory programs
US20160321153A1 (en) * 2015-04-30 2016-11-03 Advantest Corporation Method and system for advanced fail data transfer mechanisms
CN110427333A (en) * 2018-05-01 2019-11-08 株式会社东芝 Signal control circuit

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6754852B2 (en) * 2000-03-02 2004-06-22 Texas Instruments Incorporated Debug trigger builder
US6651111B2 (en) * 2001-02-16 2003-11-18 Microsoft Corporation System and method for managing a serial port
DE10132313A1 (en) * 2001-07-06 2003-01-23 Infineon Technologies Ag Program controlled unit
US20040117690A1 (en) * 2002-12-13 2004-06-17 Andersson Anders J. Method and apparatus for using a hardware disk controller for storing processor execution trace information on a storage device
US7216276B1 (en) 2003-02-27 2007-05-08 Marvell International Ltd. Apparatus and method for testing and debugging an integrated circuit
US7496818B1 (en) 2003-02-27 2009-02-24 Marvell International Ltd. Apparatus and method for testing and debugging an integrated circuit
US7444571B1 (en) 2003-02-27 2008-10-28 Marvell International Ltd. Apparatus and method for testing and debugging an integrated circuit
US7565576B2 (en) * 2003-04-17 2009-07-21 Seagate Technology Llc Method and apparatus for obtaining trace data of a high speed embedded processor
US8166217B2 (en) * 2004-06-28 2012-04-24 Marvell International Ltd. System and method for reading and writing data using storage controllers
US7496899B2 (en) * 2005-08-17 2009-02-24 Arm Limited Preventing loss of traced information in a data processing apparatus
US20080031279A1 (en) * 2006-08-03 2008-02-07 Takeshi Hatakeyama Network chip and network transmission/reception device
US8639855B2 (en) * 2008-10-20 2014-01-28 International Business Machines Corporation Information collection and storage for single core chips to 'N core chips
CN108509306A (en) * 2018-05-22 2018-09-07 郑州云海信息技术有限公司 A kind of GPU simulators

Family Cites Families (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5917468B2 (en) 1976-08-25 1984-04-21 株式会社日立製作所 Program counter trajectory storage device
US4238834A (en) * 1978-03-06 1980-12-09 International Business Machines Corporation Apparatus for coordinating real time transfer of data from a processor to a magnetic media device
JPS60238944A (en) 1984-05-14 1985-11-27 Mitsubishi Electric Corp Storage device for tracing
US4833655A (en) * 1985-06-28 1989-05-23 Wang Laboratories, Inc. FIFO memory with decreased fall-through delay
JPS63103103A (en) 1986-10-10 1988-05-07 ローテツク・インダストリーズ・インコーポレイテツド Concrete finishing machine
JPS6429946A (en) 1987-07-24 1989-01-31 Nec Corp Data processor
JPS6454547A (en) 1987-08-25 1989-03-02 Nec Corp Information processor with program trace function
US5274811A (en) * 1989-06-19 1993-12-28 Digital Equipment Corporation Method for quickly acquiring and using very long traces of mixed system and user memory references
JPH03175541A (en) 1989-12-04 1991-07-30 Fujitsu Ltd Continuous trace system
JPH04294430A (en) 1991-03-22 1992-10-19 Japan Electron Control Syst Co Ltd Data monitoring device for microcomputer
JPH04350737A (en) 1991-05-29 1992-12-04 Nec Corp Microcomputer
JPH0512157A (en) * 1991-06-29 1993-01-22 Nec Corp Serial data transmitter
US5619681A (en) * 1992-11-23 1997-04-08 Zilog, Inc. Delayed FIFO status for serial shift emulation
KR100255026B1 (en) * 1994-12-28 2000-05-01 디. 크레이그 노룬드 Microprocessor and debug system
JPH0945346A (en) 1995-07-26 1997-02-14 Fuji Electric Co Ltd Phosphoric acid type fuel cell
DE19544723C2 (en) 1995-11-30 1999-11-11 Siemens Ag Processor analysis system
JP3443720B2 (en) * 1995-12-12 2003-09-08 株式会社日立製作所 emulator
US5991899A (en) * 1997-03-21 1999-11-23 Samsung Electronics Co., Ltd. Method and apparatus for a real-time diagnostic tool using a non-intrusive trace technique
US6018809A (en) * 1997-03-28 2000-01-25 Emc Corp Apparatus and method for capturing information off a plurality of bi-directional communication buses
US6094729A (en) * 1997-04-08 2000-07-25 Advanced Micro Devices, Inc. Debug interface including a compact trace record storage
US6148381A (en) * 1997-04-08 2000-11-14 Advanced Micro Devices, Inc. Single-port trace buffer architecture with overflow reduction
US6154857A (en) * 1997-04-08 2000-11-28 Advanced Micro Devices, Inc. Microprocessor-based device incorporating a cache for capturing software performance profiling data
US5944841A (en) * 1997-04-15 1999-08-31 Advanced Micro Devices, Inc. Microprocessor with built-in instruction tracing capability
US6115760A (en) * 1998-08-24 2000-09-05 3Com Corporation Intelligent scaleable FIFO buffer circuit for interfacing between digital domains

Cited By (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6912673B1 (en) * 2001-02-02 2005-06-28 Cradle Technologies, Inc. Bus analyzer unit with programmable trace buffers
US6760867B2 (en) * 2001-03-08 2004-07-06 International Business Machines Corporation Guaranteed method and apparatus for capture of debug data
US20020129300A1 (en) * 2001-03-08 2002-09-12 International Business Machines Corporation Guaranteed method and apparatus for capture of debug data
US6813732B2 (en) * 2001-04-25 2004-11-02 Renesas Technology Corp. Trace circuit
US20020162055A1 (en) * 2001-04-25 2002-10-31 Mitsubishi Denki Kabushiki Kaisha Trace circuit
US6898736B2 (en) * 2001-10-31 2005-05-24 International Business Machines Corporation Dynamic sizing logic for dump list generation
US20030084374A1 (en) * 2001-10-31 2003-05-01 Ibm Corporation Dynamic sizing logic for dump list generation
US7904888B2 (en) * 2003-06-05 2011-03-08 International Business Machines Corporation Method, system and computer program product for tracing software methods
US20040250242A1 (en) * 2003-06-05 2004-12-09 International Business Machines Corporation Method, system and computer program product for tracing software methods
US7082481B2 (en) * 2003-11-25 2006-07-25 Atmel Corporation Serial peripheral interface (SPI) apparatus with write buffer for improving data throughput
US20050114567A1 (en) * 2003-11-25 2005-05-26 Emil Lambrache Serial peripheral interface (SPI) apparatus with write buffer for improving data throughput
US20050240727A1 (en) * 2004-04-23 2005-10-27 Shishir Shah Method and system for managing storage area networks
US20050273672A1 (en) * 2004-05-18 2005-12-08 Konda Dharma R Method and system for efficiently recording processor events in host bus adapters
US7669190B2 (en) * 2004-05-18 2010-02-23 Qlogic, Corporation Method and system for efficiently recording processor events in host bus adapters
US20050288828A1 (en) * 2004-06-28 2005-12-29 Micrel, Incorporated System and method for monitoring serially-connected devices
US7424348B2 (en) * 2004-06-28 2008-09-09 Micrel, Incorporated System and method for monitoring serially-connected devices
US20060064531A1 (en) * 2004-09-23 2006-03-23 Alston Jerald K Method and system for optimizing data transfer in networks
WO2009133354A2 (en) * 2008-04-28 2009-11-05 Imagination Technologies Limited System for providing trace data in a data processor having a pipelined architecture
US8775875B2 (en) 2008-04-28 2014-07-08 Imagination Technologies, Limited System for providing trace data in a data processor having a pipelined architecture
US20090287907A1 (en) * 2008-04-28 2009-11-19 Robert Graham Isherwood System for providing trace data in a data processor having a pipelined architecture
GB2459652B (en) * 2008-04-28 2010-09-22 Imagination Tech Ltd Controlling instruction scheduling based on the space in a trace buffer
GB2459652A (en) * 2008-04-28 2009-11-04 Imagination Tech Ltd System for Providing Trace Data in a Data Processor Having a Pipelined Architecture
WO2009133354A3 (en) * 2008-04-28 2009-12-23 Imagination Technologies Limited System for providing trace data in a data processor having a pipelined architecture
US20100235686A1 (en) * 2009-03-16 2010-09-16 Fujitsu Microelectronics Limited Execution history tracing method
US9507688B2 (en) 2009-03-16 2016-11-29 Cypress Semiconductor Corporation Execution history tracing method
US8578216B2 (en) * 2009-03-16 2013-11-05 Spansion Llc Execution history tracing method
US8453122B2 (en) * 2009-11-10 2013-05-28 International Business Machines Corporation Symmetric multi-processor lock tracing
US20110113406A1 (en) * 2009-11-10 2011-05-12 International Business Machines Corporation Symmetric multi-processor lock tracing
US20150277968A1 (en) * 2014-03-26 2015-10-01 Justin E. Gottschlich Software replayer for transactional memory programs
US9697040B2 (en) * 2014-03-26 2017-07-04 Intel Corporation Software replayer for transactional memory programs
US20160321153A1 (en) * 2015-04-30 2016-11-03 Advantest Corporation Method and system for advanced fail data transfer mechanisms
US9842038B2 (en) * 2015-04-30 2017-12-12 Advantest Corporation Method and system for advanced fail data transfer mechanisms
CN110427333A (en) * 2018-05-01 2019-11-08 株式会社东芝 Signal control circuit

Also Published As

Publication number Publication date
DE19834191A1 (en) 1999-02-25
JP3542463B2 (en) 2004-07-14
US6421795B2 (en) 2002-07-16
DE19834191C2 (en) 2002-01-03
JPH1145194A (en) 1999-02-16

Similar Documents

Publication Publication Date Title
US6421795B2 (en) Integrated circuit device and its control method
KR100546087B1 (en) Trace cache for a microprocessor-based device
JP4138021B2 (en) Processor-based device, method for providing software performance profiling information, and software development system for generating and analyzing software performance profiling information
US6145122A (en) Development interface for a data processor
EP0084431A2 (en) Monitoring computer systems
JP3188862B2 (en) Power consumption analysis method and device
US20110289357A1 (en) Information processing device
US4493078A (en) Method and apparatus for testing a digital computer
CN108351907B (en) Method and circuit for debugging a circuit design
US8185772B2 (en) Determining execution times of commands
JP3116901B2 (en) Program inspection method, program inspection device, and recording medium recording program inspection program
EP0530816A2 (en) Microprocessor with cache memory and trace analyzer therefor
EP0062978A2 (en) Apparatus for assisting fault-finding in data processing systems
US7051237B2 (en) Program-controlled unit
CN112634977B (en) Chip with debug memory interface and debug method thereof
JPH10254738A (en) Emulator device and emulation method
JP2001249823A (en) Microcomputer development assisting device
JPH10307763A (en) Bus monitor device
CN116719746B (en) Debugging method, equipment, product to be debugged and computer storage medium
JP2006185365A (en) Semiconductor device and debugging method
JP6897050B2 (en) Measurement control devices, electronic devices, host devices, information processing systems, methods and programs
KR20230162413A (en) Debug device, debug system and debug method for testing storage device
JPH1021114A (en) Method for debugging incorporated-type data processor and debugging card therefor
JPH09237201A (en) Microcomputer analyzer
JPH01169642A (en) Runaway detecting circuit

Legal Events

Date Code Title Description
AS Assignment

Owner name: NEC CORPORATION, JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:YAMASHITA, FUMIAKI;REEL/FRAME:009361/0680

Effective date: 19980707

FEPP Fee payment procedure

Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

AS Assignment

Owner name: NEC ELECTRONICS CORPORATION, JAPAN

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:NEC CORPORATION;REEL/FRAME:013774/0295

Effective date: 20021101

FPAY Fee payment

Year of fee payment: 4

REMI Maintenance fee reminder mailed
LAPS Lapse for failure to pay maintenance fees
STCH Information on status: patent discontinuation

Free format text: PATENT EXPIRED DUE TO NONPAYMENT OF MAINTENANCE FEES UNDER 37 CFR 1.362

FP Lapsed due to failure to pay maintenance fee

Effective date: 20100716