Semiconductor device, debugging system, and debugging method
The semiconductor device synchronizes trace data across multiple chips using timestamp and difference counters, addressing asynchronous issues and reducing data loss, thereby improving debugging efficiency and data transmission.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-03-25
AI Technical Summary
In semiconductor devices with a chiplet configuration, synchronizing trace data output from multiple chips is challenging due to asynchronous timestamp counters, leading to unclear chronological order of software execution results and potential data loss through excessive trace data output.
A semiconductor device with a first chip having a timestamp counter and marker generation unit, and a second chip with a difference counter, synchronizes trace data by associating timestamp values with execution results, reducing data volume through marker-based synchronization and differential counting.
Synchronizes trace data across multiple chips, clarifies software execution sequences, reduces data loss, and optimizes data transmission by integrating arbitration and trace interfaces within a single chip, enhancing debugging efficiency.
Smart Images

Figure 0007835665000001 
Figure 0007835665000002 
Figure 0007835665000003
Abstract
Description
Technical Field
[0002] , , , , , , , ,
[0004] , ,
[0006] , , , , , , , , ,
[0005] , , ,
[0003] , , , , , ,
[0001] The present disclosure relates to a semiconductor device, a debug system, and a debug method.
Background Art
[0002] Patent Document 1 discloses that a semiconductor device having a plurality of CPU (Central Processing Unit) cores outputs trace data of the plurality of CPU cores. The semiconductor device of Patent Document 1, for example, shares a time stamp when two CPU cores generate trace data at the same time. Thereby, the time stamps are synchronized. Further, the semiconductor device of Patent Document 1 reduces trace data by sharing and consolidating the time stamps into one.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] In a semiconductor device having a chiplet configuration composed of a plurality of chips each having a CPU core, it is desirable that each trace data output from each chip is synchronized.
[0005] Other problems and novel features will become apparent from the description of this specification and the accompanying drawings.
Means for Solving the Problems
[0006] According to one embodiment, the semiconductor device includes a first chip and a second chip arranged on a substrate. The first chip includes a timestamp counter that holds a series of first timestamp values corresponding to the first standard time, obtained by sequentially counting the first standard time; a marker generation unit that generates a marker indicating a predetermined time in the first standard time and outputs the marker to the second chip; a first processing unit that executes the software to be debugged; and a first control unit that outputs timestamp data including the first timestamp value and first trace data that associates the first timestamp value with the execution result obtained by the first processing unit executing the software. The second chip includes a difference counter that holds a series of difference values between the second standard time and the marker, obtained by sequentially counting the second standard time; a second processing unit that executes the software; and a second control unit that outputs second trace data that associates the difference value with the execution result obtained by the second processing unit executing the software. The execution result obtained by the second processing unit executing the software is associated with a series of second timestamp values corresponding to the first standard time in the debugger.
[0007] According to one embodiment, the debugging system comprises a semiconductor device and a debugger, wherein the semiconductor device includes a first chip and a second chip arranged on a substrate, the first chip having a timestamp counter that holds a series of first timestamp values corresponding to the first standard time obtained by sequentially counting the first standard time, a marker generation unit that generates a marker indicating a predetermined time of the first standard time and outputs the marker to the second chip, a first processing unit that executes software, and a first control unit that outputs timestamp data including the first timestamp value and first trace data that associates the first timestamp value with the execution result obtained by the first processing unit executing the software, the second chip having a difference counter that holds a series of difference values between the second standard time and the marker obtained by sequentially counting the second standard time, a second processing unit that executes software, and a second control unit that outputs second trace data that associates the difference value with the execution result obtained by the second processing unit executing the software, and the debugger calculates a series of second timestamp values corresponding to the first standard time and associates the calculated second timestamp values with the execution result obtained by the second processing unit executing the software.
[0008] According to one embodiment, the debugging method comprises a semiconductor device and a debugger, wherein the semiconductor device prepares a debugging system including a first chip and a second chip arranged on a substrate, the first chip stores a series of first timestamp values corresponding to the first standard time obtained by sequentially counting the first standard time, generates a marker indicating a predetermined time in the first standard time, outputs the marker to the second chip, executes software, outputs timestamp data including the first timestamp values and first trace data associating the first timestamp values with the execution results obtained by executing the software, the second chip stores a series of difference values between the second standard time and the marker obtained by sequentially counting the second standard time, executes software, outputs second trace data associating the difference values with the execution results obtained by executing the software, the debugger calculates a series of second timestamp values corresponding to the first standard time, and associates the calculated second timestamp values with the execution results obtained by the second chip executing the software. [Effects of the Invention]
[0009] According to the above embodiment, a semiconductor device, a debugging system, and a debugging method can be provided that can synchronize trace data output from multiple chips. [Brief explanation of the drawing]
[0010] [Figure 1] Figure 1 is a diagram illustrating the configuration of a debugging system related to Comparative Example 1. [Figure 2] Figure 2 is a diagram illustrating a debugging system according to Embodiment 1. [Figure 3] Figure 3 is a block diagram illustrating a semiconductor device chip in the debugging system according to Embodiment 1. [Figure 4] Figure 4 is a block diagram illustrating a semiconductor device chip in the debugging system according to Embodiment 1. [Figure 5] Figure 5 is a block diagram illustrating a semiconductor device chip in the debugging system according to Embodiment 1. [Figure 6] Figure 6 is a block diagram illustrating a debugger in the debugging system according to Embodiment 1. [Figure 7] Figure 7 is a diagram illustrating the timestamp value and difference value in the debugging system according to Embodiment 1. [Figure 8] Figure 8 is a diagram illustrating timestamp data and trace data in the debugging system according to Embodiment 1. [Figure 9] Figure 9 is a flowchart illustrating a debugging method according to Embodiment 1. [Figure 10] Figure 10 is a sequence diagram illustrating the method for outputting timestamp data and trace data in the debugging method according to Embodiment 1. [Figure 11] Figure 11 is a sequence diagram illustrating the method for calculating timestamp data in the debugging method according to Embodiment 1. [Figure 12] Figure 12 is a diagram illustrating a debugging system according to Embodiment 2. [Figure 13] Figure 13 is a block diagram illustrating a semiconductor device chip in the debugging system according to Embodiment 2. [Modes for carrying out the invention]
[0011] For clarity, the following descriptions and drawings have been omitted and simplified as appropriate. Furthermore, the same elements are denoted by the same reference numerals in each drawing, and redundant explanations have been omitted where necessary.
[0012] First, a debugging system related to a comparative example and the problems identified by the inventor with respect to it will be described. Then, a semiconductor device, debugging system, and debugging method according to an embodiment will be described. Note that the debugging system and problems related to the comparative example are also included within the scope of the technical concept of the embodiment.
[0013] (Comparative Example) FIG. 1 is a configuration diagram illustrating a debug system according to Comparative Example 1. As shown in FIG. 1, the debug system 101 of the comparative example includes a semiconductor device 110, an emulator 120, and a debugger 130. The semiconductor device 110 includes, for example, a chiplet configuration device composed of chiplets. The chiplet configuration device includes chip A 111, chip B 112, and chip C 113. Therefore, the semiconductor device 110 includes a plurality of chips. <XXXXXX><XXXXXX><XXXXXX>The software operating on the semiconductor device 110 of the chiplet configuration device is processed in cooperation among chip A 111, chip B 112, and chip C 113. In the semiconductor device 110 of the comparative example, the timestamp counters in each chip measure time individually. Then, each timestamp counter in each chip adds a timestamp value to the trace data and outputs it. The arbitration circuit 114 merges the trace data of each chip and outputs the trace data from the trace interface 115. The method of merging trace data generally uses a FIFO (First In First Out) memory. An ID for identifying each chip is added to the trace data so that it can be identified.
[0015] The trace data is output to the debugger 130 via the emulator 120. The debugger 130 displays the trace data. In such a comparative example, there are the following problems.
[0016] The software operating on the semiconductor device 110 of the chiplet configuration device is processed in cooperation among chip A 111, chip B 112, and chip C 113. Therefore, in debugging the software, if trace data is acquired for each chip, the cooperative operation with other chips cannot be grasped. Thus, the development efficiency of the software cannot be improved.
[0017] For example, in a chiplet configuration semiconductor device 110 equipped with multiple chips, including a processor such as a CPU core, the timestamp counters of each chip operate asynchronously. Therefore, the time units and reference times of the timestamp counters of each chip differ. Consequently, even when examining the trace data of each chip side by side, the reference points for the timestamp values differ. Therefore, the chronological order of the software execution results of each chip becomes unclear. For this reason, it is necessary to synchronize the timestamp values of each chip when debugging the software.
[0018] Furthermore, the semiconductor device 110 of the chiplet configuration device requires numerous interfaces to input and output various types of data. Therefore, the semiconductor device 110 has many external terminals that are used for purposes other than outputting trace data. Consequently, the large number of external terminals makes it difficult to secure a trace interface 115 for each chip. Therefore, the trace interface 115 for outputting trace data may be integrated into a single interface. In that case, each trace data from each chip is output from the single integrated trace interface 115 in the semiconductor device 110.
[0019] If the amount of trace data to be output exceeds the capacity of a single trace interface 115, trace data loss may occur. This makes it impossible to obtain the necessary trace data. Therefore, it is necessary to reduce the amount of trace data to decrease the frequency of data loss.
[0020] (Embodiment 1) Next, the debugging system of this embodiment will be described. Figure 2 is a configuration diagram illustrating the debugging system according to Embodiment 1. Figures 3 to 5 are block diagrams illustrating the semiconductor device chip in the debugging system according to Embodiment 1. Figure 6 is a block diagram illustrating the debugger in the debugging system according to Embodiment 1. As shown in Figure 2, the debugging system 1 includes a semiconductor device 10, an emulator 20, and a debugger 30.
[0021] The semiconductor device 10 has multiple chips, an arbitration circuit 14, and a trace interface 15. For example, the semiconductor device 10 includes a chiplet configuration device composed of chiplets. The chiplet configuration device has multiple chips mounted on a substrate. The chiplet configuration device is a device configured to function as a single device by connecting multiple chips with the substrate. The multiple chips include, for example, chip A11, chip B12, and chip C13. Note that the multiple chips are not limited to three chips; they may be two chips or four or more chips. Also, in Figure 2, only a part of the configuration of each chip is shown to avoid making the diagram too complex.
[0022] As shown in Figure 3, chip A11 has a timestamp counter 11a, a processing unit 11b, a control unit 11c, and a marker generation unit 11d. Chip A11 has a large-capacity timestamp counter 11a, which is the main chip in the semiconductor device 10 of the chiplet configuration device. The timestamp counter 11a may have a larger capacity than the differential counter 12a of the other chip B12 and the differential counter 13a of chip C13.
[0023] The timestamp counter 11a sequentially counts time. The timestamp counter 11a obtains a timestamp value TS1 corresponding to the counted sequence of time. The timestamp counter 11a then stores the obtained timestamp value TS1. The time applied by chip A11 is called, for example, the first standard time. In this case, the timestamp counter 11a stores a series of timestamp values TS1 corresponding to the first standard time, obtained by sequentially counting the first standard time.
[0024] Figure 7 is a diagram illustrating timestamp values and difference values in the debugging system according to Embodiment 1. As shown in Figure 7, the timestamp counter 11a holds a series of timestamp values TS1 corresponding to the first standard time that has been counted, namely 00000000 00000000, 00000000 00000001, 00000000 00000002, ..., 00000000 00000008, ....
[0025] The processing unit 11b executes the software to be debugged. The execution result obtained by the processing unit 11b executing the software is called the execution result R1. The software running on the semiconductor device 10, which includes a chiplet configuration device, is processed in cooperation between chips A11, B12, and C13.
[0026] The control unit 11c outputs trace data TD1, which associates the timestamp value TS1 with the execution result R1, to the arbitration circuit 14. The control unit 11c also outputs timestamp data TSD, which includes the timestamp value TS1, to the arbitration circuit 14. In other words, the control unit 11c outputs timestamp data TSD, which includes only the timestamp value TS1 and does not include the execution result R1, to the arbitration circuit 14.
[0027] The marker generation unit 11d generates a marker MK indicating a predetermined time in the first standard time. The marker generation unit 11d then outputs the generated marker MK to chips B12 and C13. The marker generation unit 11d outputs the marker MK to chips B12 and C13 when the control unit 11c outputs the timestamp data TSD and trace data TD1 to the arbitration circuit 14.
[0028] Furthermore, the marker generation unit 11d monitors the difference counters 12a and 13a, which will be described later. Specifically, the marker generation unit 11d monitors the amount of data held in the difference counters 12a and 13a, the amount of free data that can be held in the difference counters 12a and 13a, etc. The marker generation unit 11d outputs the marker MK to chips B12 and C13 before the capacity of the difference counters 12a and 13a is exceeded. For example, the marker generation unit 11d periodically outputs the marker MK to chips B12 and C13 to prevent the difference counters 12a and 13a from overflowing. The difference counters 12a and 13a are reset when the marker MK is received. For example, the difference values Δ1 and Δ2 held in the difference counters 12a and 13a are reset.
[0029] As shown in Figure 4, chip B12 has a differential counter 12a, a processing unit 12b, and a control unit 12c. The capacity of the differential counter 12a may be smaller than that of the timestamp counter 11a.
[0030] The difference counter 12a sequentially counts time. The time applied by chip B12 is called, for example, the second standard time. The difference counter 12a acquires a series of difference times between the second standard time and the time indicated by the marker MK output from the marker generation unit 11d of chip A11. The difference counter 12a stores the acquired difference times as difference values Δ1. That is, the difference counter 12a stores a series of difference values Δ1 between the second standard time and the marker MK, which are acquired by sequentially counting the second standard time. The difference counter 12a is reset when it receives the marker MK output from the marker generation unit 11d.
[0031] For example, as shown in Figure 7, the difference counter 12a holds the difference values Δ1 as 000000, 000001, ..., 000020. The difference counter 12a is reset when it receives the marker MK. Therefore, the marker MK is also a reset signal. After being reset, the difference counter 12a holds a series of difference values Δ1 between the second standard time and the marker MK by sequentially counting the second standard time again.
[0032] The processing unit 12b executes the software to be debugged. The execution result obtained by the processing unit 12b executing the software is called the execution result R2. The software running on the semiconductor device 10, which includes a chiplet configuration device, is processed in cooperation with chips A11, B12, and C13. The control unit 12c outputs trace data TD2, which associates the difference value Δ1 with the execution result R2, to the arbitration circuit 14.
[0033] As shown in Figure 5, the chip C13 has a differential counter 13a, a processing unit 13b, and a control unit 13c. The capacity of the differential counter 13a may be smaller than that of the timestamp counter 11a.
[0034] The difference counter 13a sequentially counts time. The time applied by chip C13 is called, for example, the third standard time. The difference counter 13a acquires a series of difference times between the third standard time and the time indicated by the marker MK output from the marker generation unit 11d of chip A11. The difference counter 13a stores the acquired difference times as difference values Δ2. That is, the difference counter 13a stores a series of difference values Δ2 between the third standard time and the marker MK, which are acquired by sequentially counting the third standard time. The difference counter 13a is reset when it receives the marker MK output from the marker generation unit 11d.
[0035] For example, as shown in Figure 7, the difference counter 13a holds the difference values Δ2 as 000000, 000001, ..., 000010. The difference counter 13a is reset when it receives the marker MK. Therefore, the marker MK is also a reset signal. After being reset, the difference counter 13a again holds a series of difference values Δ2 between the third standard time and the marker MK by sequentially counting the third standard time.
[0036] The processing unit 13b executes the software to be debugged. The execution result obtained by the processing unit 13b executing the software is called the execution result R3. The software running on the semiconductor device 10, which includes a chiplet configuration device, is processed in cooperation with chips A11, B12, and C13. The control unit 13c outputs trace data TD3, which associates the difference value Δ2 with the execution result R3, to the arbitration circuit 14.
[0037] The arbitration circuit 14 outputs timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3 to the trace interface 15. When the arbitration circuit 14 receives timestamp data TSD and trace data TD1 to TD3, etc. from the control units 11c to 13c, it determines the output order according to priority. For example, the arbitration circuit 14 may output trace data TD1 to TD3, etc., received at the same time in a predetermined order. For example, the arbitration circuit 14 may output in the order of trace data TD1 (including timestamp data TSD) → trace data TD2 → trace data TD3.
[0038] The trace interface 15 outputs the timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3 output by the arbitration circuit 14 from its output terminal. The trace interface 15 outputs the timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3 to the debugger 30 via the emulator 20.
[0039] Figure 8 is a diagram illustrating the timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3 in the debugging system according to Embodiment 1. As shown in Figure 8, the trace interface 15 outputs the timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3 to the debugger 30 via the emulator 20 from its output terminal. There may be one output terminal, or there may be multiple output terminals depending on the circumstances.
[0040] Trace data TD1 includes an ID (Identification) that identifies chip A11, a timestamp value TS1, and execution result R1 obtained by the processing unit 11b executing the software. Execution result R1 includes branches and data access when the software was executed. Timestamp data TSD includes an ID that identifies chip A11 and a timestamp value TS1. Trace data TD2 includes an ID that identifies chip B12, a difference value Δ1, and execution result R2 obtained by the processing unit 12b executing the software. Trace data TD3 includes an ID that identifies chip C13, a difference value Δ2, and execution result R3 obtained by the processing unit 13b executing the software.
[0041] The emulator 20 passes the timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3 received from the trace interface 15 to the debugger 30.
[0042] The debugger 30 debugs the software running on the semiconductor device 10. As shown in Figure 6, the debugger 30 has a receiving unit 31, a holding unit 32, a calculation unit 33, and a display unit 34. The receiving unit 31 receives timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3 via the emulator 20.
[0043] The storage unit 32 stores the timestamp value TS1 contained in the timestamp data TSD as the reference time. In other words, the timestamp value TS1 contained in the timestamp data TSD is stored as the reference time in the debugger 30. When the control unit 11c outputs the next timestamp data TSD, the storage unit 32 updates the reference time to the timestamp value TS1 contained in the next timestamp data TSD. In other words, when the control unit 11c outputs the next timestamp data TSD, the reference time in the debugger 30 is updated to the timestamp value TS1 contained in the next timestamp data TSD.
[0044] The holding unit 32 holds the operating clock frequencies of each chip. Specifically, for example, the operating clock of chip A11 is the first frequency. The operating clock of chip B12 is the second frequency. The operating clock of chip C13 is the third frequency. In this case, the holding unit 32 holds the first frequency of the operating clock of chip A11, the second frequency of the operating clock of chip B12, and the third frequency of the operating clock of chip C13. Note that the first, second, and third frequencies may all be different frequencies, or they may all be the same frequency. Also, some frequencies may be the same frequency, and some frequencies may be different frequencies.
[0045] The calculation unit 33 calculates a timestamp value TS2 based on the timestamp value TS1 contained in the timestamp data TSD and the difference value Δ1 contained in the trace data TD2. The timestamp value TS2 corresponds to the first standard time. The calculation unit 33 then associates the calculated timestamp value TS2 with the execution result R2 obtained by the processing unit 12b executing the software. In this way, the execution result R2 is associated in the debugger 30 with a series of timestamp values TS2 calculated based on the timestamp value TS1 contained in the timestamp data TSD and the difference value Δ1 contained in the trace data TD2.
[0046] Furthermore, the calculation unit 33 calculates a timestamp value TS3 based on the timestamp value TS1 contained in the timestamp data TSD and the difference value Δ2 contained in the trace data TD3. The timestamp value TS3 corresponds to the first standard time. The calculation unit 33 then associates the calculated timestamp value TS3 with the execution result R3 obtained by the processing unit 13b executing the software. In this way, the execution result R3 is associated in the debugger 30 with a series of timestamp values TS3 calculated based on the timestamp value TS1 contained in the timestamp data TSD and the difference value Δ2 contained in the trace data TD3.
[0047] If the operating clock frequencies of each chip are different, the calculation unit 33 converts the difference value Δ1 contained in the trace data TD2 into a time interval in the first standard time based on the first frequency and the second frequency. Based on the converted time interval and reference time, the calculation unit 33 calculates a series of timestamp values TS2 corresponding to the first standard time. Then, the calculation unit 33 associates the timestamp values TS2 with the execution result R2 obtained by the processing unit 12b executing the software.
[0048] Furthermore, the calculation unit 33 converts the difference value Δ2 included in the trace data TD3 into a time interval in the first standard time based on the first frequency and the third frequency. Based on the converted time interval and reference time, the calculation unit 33 calculates a series of timestamp values TS3 corresponding to the first standard time. Then, the calculation unit 33 associates the timestamp values TS3 with the execution result R3 obtained by the processing unit 13b executing the software.
[0049] In this way, the difference value Δ1 contained in the trace data TD2 is converted in the debugger 30 to a time interval in the first standard time based on the first frequency and the second frequency. The difference value Δ2 contained in the trace data TD3 is converted in the debugger 30 to a time interval in the first standard time based on the first frequency and the third frequency. Therefore, the execution result R2 obtained by the processing unit 12b executing the software is associated in the debugger 30 with a timestamp value TS2 calculated based on the converted time interval and reference time. The execution result R3 obtained by the processing unit 13b executing the software is associated in the debugger 30 with a timestamp value TS3 based on the converted time interval and reference time.
[0050] The display unit 34 displays the timestamp data TSD, trace data TD1, trace data TD2, and trace data TD3. The display unit 34 also displays the execution result R2 associated with the timestamp value TS2 and the execution result R3 associated with the timestamp value TS3.
[0051] Next, a debugging method using the debugging system 1 will be described. Figure 9 is a flowchart illustrating a debugging method according to Embodiment 1. As shown in Figure 9, the debugging method of this embodiment includes a step S11 of preparing the debugging system 1, a step S12 of outputting timestamp data TSD and trace data TD1 to TD3, and a step S13 of calculating timestamps TS2 and TS3.
[0052] First, in step S11, a debug system 1 is prepared, which includes a semiconductor device 10 and a debugger 30. The semiconductor device 10 has multiple chips, including chips A11, B12, and C13 arranged on a substrate, an arbitration circuit 14, and a trace interface 15. The debugger 30 debugs the software running on the semiconductor device 10.
[0053] Next, in step S12, timestamp data TSD and trace data TD1 to TD3 are output. Figure 10 is a sequence diagram illustrating the method for outputting timestamp data TSD and trace data TD1 to TD3 in the debugging method according to Embodiment 1. As shown in step S21 of Figure 10, the chip A11 acquires a series of timestamp values TS1 corresponding to the first standard time by sequentially counting the first standard time, and stores them in the timestamp counter 11a.
[0054] Next, as shown in step S22, the software is executed on chip A11, and the software execution result R1 is obtained by the processing unit 11b.
[0055] Next, as shown in step S23, the chip A11 causes the arbitration circuit 14 to output to the control unit 11c a timestamp data TSD including a timestamp value TS1, and trace data TD1 which associates the timestamp value TS1 with the execution result R1 obtained by executing the software.
[0056] Next, as shown in step S24, chip A11 causes the marker generation unit 11d to generate a marker MK indicating a predetermined time of the first standard time, and causes the marker generation unit 11d to output the marker MK to chips B12 and C13. When outputting the marker MK, chip A11 may output the marker MK to chips B12 and C13 at the same time as outputting the timestamp data TSD and trace data TD1. Alternatively, chip A11 may monitor the difference counters 12a and 13a that hold the difference values in chips B12 and C13, and output the marker MK to chips B12 and C13 before the capacity of the difference counters 12a and 13a is exceeded. In this case, when chips B12 and C13 receive the marker MK, they reset the difference counters 12a and 13a.
[0057] Next, as shown in step S25, the chip B12 sequentially counts the second standard time, and a series of difference values Δ1 between the second standard time and the marker MK are stored in the difference counter 12a.
[0058] Next, as shown in step S26, the software is executed on chip B12, and the execution result R2 obtained by executing the software is to be acquired by the processing unit 12b.
[0059] Next, as shown in step S27, the chip B12 outputs trace data TD2, which is obtained by associating the difference value Δ1 with the execution result R2 obtained by executing the software, to the control unit 12c via the arbitration circuit 14.
[0060] Next, as shown in step S28, the chip C13 is used to sequentially count the third standard time, and a series of difference values Δ2 between the third standard time and the marker MK are stored in the difference counter 13a.
[0061] Next, as shown in step S29, the software is executed on chip C13, and the execution result R3 obtained by executing the software is to be acquired by the processing unit 13b.
[0062] Next, as shown in step S30, the chip C13 outputs trace data TD3, which is obtained by associating the execution result R3 obtained by executing the software with a difference value Δ2, to the control unit 13c via the arbitration circuit 14.
[0063] Next, as shown in step S31, the arbitration circuit 14 outputs the timestamp data TDS, trace data TD1, trace data TD2, and trace data TD3 to the trace interface 15. Then, the trace interface 15 outputs the timestamp data TDS, trace data TD1, trace data TD2, and trace data TD3 to the debugger 30 via the emulator 20.
[0064] Figure 11 is a sequence diagram illustrating the method for calculating timestamp data in the debugging method according to Embodiment 1.
[0065] As shown in step S41 of Figure 11, in the debugger 30, the receiving unit 31 receives timestamp data TDS, trace data TD1, trace data TD2, and trace data TD3 via the emulator 20.
[0066] Next, as shown in step S42, the debugger 30 may have the holding unit 32 hold the timestamp value TS1 included in the timestamp data TSD as the reference time KJ. Then, when the next timestamp data TSD is output from chip A11, the holding unit 32 may update the reference time KJ to the timestamp value TS1 included in the next timestamp data TSD. In addition, the holding unit 32 may hold the first operating clock frequency of chip A11, the second operating clock frequency of chip B12, and the third operating clock frequency of chip C13.
[0067] Next, as shown in step S43, the debugger 30 causes the holding unit 32 to output the reference time and each frequency to the calculation unit 33.
[0068] Next, as shown in step S44, the debugger 30 causes the receiving unit 31 to output trace data TD2 and TD3 to the calculation unit 33.
[0069] Next, as shown in step S45, the debugger 30 causes the calculation unit 33 to calculate a series of timestamp values TS2 corresponding to the first standard time based on the timestamp value TS1 included in the timestamp data TSD and the difference value Δ1 included in the trace data TD2. When calculating the timestamp values TS2, the difference value Δ1 included in the trace data TD2 may be converted into a time interval in the first standard time based on the first frequency and the second frequency. Then, a series of timestamp values TS2 corresponding to the first standard time may be calculated based on the time interval and the reference time KJ. After that, the calculation unit 33 associates the timestamp values TS2 with the execution result R2 obtained by the chip B12 executing the software.
[0070] Similarly, as shown in step S46, the debugger 30 causes the calculation unit 33 to calculate a series of timestamp values TS3 corresponding to the first standard time based on the timestamp value TS1 included in the timestamp data TSD and the difference value Δ2 included in the trace data TD3. When calculating the timestamp values TS3, the difference value Δ2 included in the trace data TD3 may be converted into a time interval in the first standard time based on the first frequency and the third frequency. Then, a series of timestamp values TS3 corresponding to the first standard time may be calculated based on the time interval and the reference time KJ. Subsequently, the calculation unit 33 associates the timestamp values TS3 with the execution result R3 obtained by the chip C13 executing the software.
[0071] Next, as shown in step S47, the display unit 34 of the debugger 30 displays trace data TD1. Trace data TD1 is the result of execution R1 obtained by chip A11 executing the software, with the timestamp value TS1 associated with it. Also, as shown in step S48, the display unit 34 displays trace data TD20 and trace data TD30. Trace data TD20 is the result of execution R2 obtained by chip B12 executing the software, with the timestamp value TS2 associated with it. Trace data TD30 is the result of execution R3 obtained by chip C13 executing the software, with the timestamp value TS3 associated with it.
[0072] Timestamp values TS1, TS2, and TS3 correspond to the first standard time. Therefore, the debugger 30 can synchronize the timestamp values of each chip.
[0073] Next, the effects of this embodiment will be explained. In the debugging system 1 of this embodiment, the execution results R1 to R3 obtained by each chip executing software are associated with synchronized timestamp values TS1 and TS3. Therefore, when debugging, the sequence of events of the software execution results R1 to R3 of each chip can be clearly identified.
[0074] Furthermore, the amount of trace data TD1 to TD3 transmitted from the semiconductor device 10 to the debugger 30 can be reduced. This makes it possible to suppress the loss of trace data TD1 to TD3 even if the output terminals of the trace interface 15 are limited.
[0075] For example, let's assume that there are n chips, and that each chip outputs each trace data once. We will consider the following case where the timestamp value has a width of 64 bits, the difference value is 16 bits, and the software execution result data is 128 bits.
[0076] 1. Case with 3 chips (n=3) Comparison example: (Timestamp value 64 bits × 3) + (Data 128 bits × 3) = 578 bits This embodiment: (Timestamp value 64 bits × 1) + (Difference value 16 bits × 2) + (Data 128 bits × 3) = 480 bits Therefore, the amount of trace data transferred will increase by 20%.
[0077] 2. In the case of 5 chips (n=5) Comparison example: (Timestamp value 64 bits × 5) + (Data 128 bits × 5) =960 bits This embodiment: (Timestamp value 64 bits × 1) + (Difference value 16 bits × 4) + (Data 128 bits × 5) = 768 bits Therefore, the amount of trace data transferred is increased by 25%.
[0078] 3. In the case of 7 chips (n=7) Comparison example: (Timestamp value 64 bits × 7) + (Data 128 bits × 7) = 1344 bits This embodiment: (Timestamp value 64 bits × 1) + (Difference value 16 bits × 6) + (Data 128 bits × 7) = 1056 bits Therefore, the amount of trace data transferred is improved by 27%.
[0079] 4. Case with 2 chips (n=2) Comparison example: (Timestamp value 64 bits × 2) + (Data 128 bits × 2) = 384 bits This embodiment: (Timestamp value 64 bits × 1) + (Difference value 16 bits × 1) + (Data 128 bits × 2) = 336 bits In this case as well, the amount of trace data transferred is improved. Thus, according to this embodiment, the amount of data transferred can be improved compared to the comparative example.
[0080] (Embodiment 2) Next, before describing the debugging system according to Embodiment 2, we will explain the problems of the debugging system 1 according to Embodiment 1. Problem 1 is as follows: In the debugging system 1 of Embodiment 1, the semiconductor device 10 requires the development of new chips for the arbitration circuit 14 and the trace interface 15. Problem 2 is as follows: In the debugging system 1 of Embodiment 1, the semiconductor device 10 requires a large number of wires for trace data. Specifically, the trace data wires are connected on the chiplet between chips A11, B12, and C13 and the arbitration circuit 14. As a result, the number of wires on the chiplet increases, and the area of the semiconductor device 10 with a chiplet configuration increases. For example, the number of wires required is 192 wires × 3 systems = 576 wires for trace data.
[0081] Therefore, the debugging system of this embodiment incorporates the arbitration circuit 14 and the trace interface 15 into chip A11. This eliminates the need to place the arbitration circuit 14 and the trace interface 15 on the board in a chiplet configuration. Thus, the number of wires between chips A11, B12, and C13 and the arbitration circuit 14 can be reduced.
[0082] Figure 12 is a configuration diagram illustrating a debugging system according to Embodiment 2. Figure 13 is a block diagram illustrating a semiconductor device chip in the debugging system according to Embodiment 2. As shown in Figures 12 and 13, the debugging system 2 of this embodiment includes a semiconductor device 40, an emulator 20, and a debugger 30. The semiconductor device 40 includes a plurality of chips arranged on a substrate. The plurality of chips include, for example, chip A41, chip B12, and chip C13.
[0083] Chip A41 has, in addition to the configuration of chip A11, an arbitration circuit 14 and a trace interface 15. In other words, chip A41 has a timestamp counter 11a, a processing unit 11b, a control unit 11c, a marker generation unit 11d, an arbitration circuit 14, and a trace interface 15. The arbitration circuit 14 and the trace interface 15 are located on chip A41. The other configurations and operations of the debug system 2 are the same as those of the debug system 1 of Embodiment 1.
[0084] According to this embodiment, by integrating the arbitration circuit 14 and the trace interface 15 into chip A41, the chips for the arbitration circuit 14 and the trace interface 15 can be eliminated. Furthermore, the wiring on the chiplet between chip A41 and the arbitration circuit 14 can be eliminated, reducing the number of wires on the chiplet.
[0085] Although the present invention has been specifically described above based on embodiments, it goes without saying that the present invention is not limited to the above embodiments and can be modified in various ways without departing from its essence. Furthermore, combinations of the configurations of Embodiments 1 and 2 are also within the scope of the technical idea. [Explanation of Symbols]
[0086] 1, 2 Debugging System 10 Semiconductor Devices 11 Chip A 11a Timestamp Counter 11b Processing Unit 11c Control Unit 11d Marker generation unit 12 Chip B 12a Difference Counter 12b Processing Unit 12c Control Unit 13 Chip C 13a Difference counter 13b Processing Unit 13c Control Unit 14 Arbitration circuit 15 Trace Interface 20 Emulators 30 Debugger 31 Receiver 32 Holding part 33 Calculation Section 34 Display section 40 Semiconductor Equipment 41 Chip A 101 Debugging System 110 Semiconductor Equipment 111 Chip A 112 Chip B 113 Chip C 114 Arbitration circuit 115 Trace Interface 120 emulators 130 Debugger
Claims
1. Multiple chips, including a first chip and a second chip, arranged on a substrate, Mediation circuit and Trace interface and Equipped with, The first chip is A timestamp counter that holds a series of first timestamp values corresponding to the first standard time, obtained by sequentially counting the first standard time, A marker generation unit generates a marker indicating a predetermined time of the first standard time and outputs the marker to the second chip, A first processing unit that executes the software to be debugged, A first control unit outputs timestamp data including the first timestamp value, and first trace data in which the first timestamp value is associated with the execution result obtained by the first processing unit executing the software, to the arbitration circuit. It has, The second chip is A difference counter that holds a series of difference values between the second standard time and the marker, obtained by sequentially counting the second standard time, A second processing unit that executes the aforementioned software, A second control unit outputs to the arbitration circuit second trace data which associates the difference value with the execution result obtained by the second processing unit executing the software, It has, The arbitration circuit outputs the timestamp data, the first trace data, and the second trace data to the trace interface. The trace interface outputs the timestamp data, the first trace data, and the second trace data to the debugger that performs the debugging of the software via the emulator. The execution result obtained by the second processing unit executing the software is a second timestamp value calculated by the debugger based on the first timestamp value included in the timestamp data and the difference value included in the second trace data, and is associated with a series of second timestamp values corresponding to the first standard time. Semiconductor equipment.
2. The marker generation unit outputs the marker to the second chip when the first control unit outputs the timestamp data and the first trace data. The semiconductor device according to claim 1.
3. The marker generation unit monitors the difference counter and outputs the marker to the second chip before the capacity of the difference counter is exceeded. The difference counter is reset when the marker is received. The semiconductor device according to claim 1.
4. The first timestamp value included in the timestamp data is retained as a reference time in the debugger. The semiconductor device according to claim 1.
5. When the next timestamp data is output from the first control unit, the reference time is updated to the first timestamp value included in the next timestamp data. The semiconductor device according to claim 4.
6. The operating clock of the first chip is a first frequency, The operating clock of the second chip is a second frequency, The difference value included in the second trace data is converted in the debugger to a time interval in the first standard time based on the first frequency and the second frequency. The execution result obtained by the second processing unit executing the software is associated in the debugger with the second timestamp value calculated based on the time interval and the reference time. The semiconductor device according to claim 4.
7. The arbitration circuit and the trace interface are located on the first chip. The semiconductor device according to claim 1.
8. Binding machines and A debugger for debugging software running on the aforementioned semiconductor device, Equipped with, The aforementioned semiconductor device is Multiple chips, including a first chip and a second chip, arranged on a substrate, Mediation circuit and Trace interface and It has, The first chip is A timestamp counter that holds a series of first timestamp values corresponding to the first standard time, obtained by sequentially counting the first standard time, A marker generation unit generates a marker indicating a predetermined time of the first standard time and outputs the marker to the second chip, A first processing unit that executes the aforementioned software, A first control unit outputs timestamp data including the first timestamp value, and first trace data in which the first timestamp value is associated with the execution result obtained by the first processing unit executing the software, to the arbitration circuit. It has, The second chip is A difference counter that holds a series of difference values between the second standard time and the marker, obtained by sequentially counting the second standard time, A second processing unit that executes the aforementioned software, A second control unit outputs to the arbitration circuit second trace data which associates the difference value with the execution result obtained by the second processing unit executing the software, It has, The arbitration circuit outputs the timestamp data, the first trace data, and the second trace data to the trace interface. The trace interface outputs the timestamp data, the first trace data, and the second trace data to the debugger via the emulator. The aforementioned debugger, A receiving unit that receives the timestamp data, the first trace data and the second trace data via the emulator, A calculation unit calculates a series of second timestamp values corresponding to the first standard time based on the first timestamp value included in the timestamp data and the difference value included in the second trace data, It has, The calculation unit associates the calculated second timestamp value with the execution result obtained by the second processing unit executing the software. Debugging system.
9. The marker generation unit outputs the marker to the second chip when the first control unit outputs the timestamp data and the first trace data. The debugging system according to claim 8.
10. The marker generation unit monitors the difference counter and outputs the marker to the second chip before the capacity of the difference counter is exceeded. The difference counter is reset when the marker is received. The debugging system according to claim 8.
11. The aforementioned debugger, The system further includes a holding unit that holds the first timestamp value included in the timestamp data as a reference time. The debugging system according to claim 8.
12. The holding unit updates the reference time to the first timestamp value included in the next timestamp data when the next timestamp data is output from the first control unit. The debugging system according to claim 11.
13. The holding unit holds the first frequency of the operating clock of the first chip and the second frequency of the operating clock of the second chip. The calculation unit described above, The difference value included in the second trace data is converted into a time interval in the first standard time based on the first frequency and the second frequency. Based on the aforementioned time interval and the aforementioned reference time, a series of second timestamp values corresponding to the first standard time are calculated. The second processing unit associates the execution result obtained by executing the software with the second timestamp value. The debugging system according to claim 11.
14. The arbitration circuit and the trace interface are located on the first chip. The debugging system according to claim 8.
15. Binding machines and A debugger for debugging software running on the aforementioned semiconductor device, Equipped with, The aforementioned semiconductor device is Multiple chips, including a first chip and a second chip, arranged on a substrate, Mediation circuit and Trace interface and Prepare a debugging system that has the following features: In the first chip, A series of first timestamp values corresponding to the first standard time are obtained by sequentially counting the first standard time, and these values are stored. A marker indicating a predetermined time in the first standard time is generated, and the marker is output to the second chip. Run the aforementioned software, The arbitration circuit is output timestamp data including the first timestamp value, and first trace data in which the first timestamp value is associated with the execution result obtained by executing the software. In the second chip, The system stores a series of difference values between the second standard time and the marker, obtained by sequentially counting the second standard time. Run the aforementioned software, The arbitration circuit is output a second trace data, which associates the difference value with the execution result obtained by executing the software described above. In the aforementioned mediation circuit, The timestamp data, the first trace data, and the second trace data are output to the trace interface. In the aforementioned trace interface, The timestamp data, the first trace data, and the second trace data are output to the debugger via the emulator. In the aforementioned debugger, The emulator receives the timestamp data, the first trace data, and the second trace data. Based on the first timestamp value included in the timestamp data and the difference value included in the second trace data, a series of second timestamp values corresponding to the first standard time are calculated. The second chip associates the calculated second timestamp value with the execution result obtained by executing the software. Debugging methods.
16. When the first chip outputs the timestamp data and the first trace data, it outputs the marker to the second chip. The debugging method according to claim 15.
17. In the first chip, The difference counter that holds the difference value in the second chip is monitored, Before the capacity of the differential counter is exceeded, the second chip is instructed to output the marker. In the second chip, When the aforementioned marker is received, the difference counter is reset. The debugging method according to claim 15.
18. In the debugger, the first timestamp value included in the timestamp data is retained as the reference time. The debugging method according to claim 15.
19. In the debugger, when the next timestamp data is output from the first chip, the reference time is updated to the first timestamp value included in the next timestamp data. The debugging method according to claim 18.
20. In the aforementioned debugger, The first frequency of the operating clock of the first chip and the second frequency of the operating clock of the second chip are maintained. The difference value included in the second trace data is converted into a time interval in the first standard time based on the first frequency and the second frequency. Based on the aforementioned time interval and the aforementioned reference time, a series of second timestamp values corresponding to the first standard time are calculated. The second chip associates the execution result obtained by executing the software with the second timestamp value. The debugging method according to claim 18.
Citation Information
Patent Citations
In-circuit emulator, trace memory control device, trace message generation device, and method for processing trace message
JP2013109621A
Synchronized hardware event collection
JP2020512613A
Operation trace device
JP2021026648A