Debug program, information processing device, and debug method

By chronologically writing event information and segregating it into protected and secondary areas upon detecting abnormal events, the method ensures crucial data is preserved, improving debugging efficiency and product quality in semiconductor device simulations.

JP2024147049APending Publication Date: 2024-10-16FUJITSU LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023059817
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2024-10-16

AI Technical Summary

Technical Problem

The limited storage capacity of trace memories in semiconductor device simulations leads to the overwriting of crucial event information during logical failures, making it difficult to identify the cause of such failures.

Method used

A method where event information is written to a storage area chronologically, with a specified write address that updates upon detection of an abnormal event, separating useful event information into a protected area and continuing writing in a secondary area, ensuring that the first storage area remains untouched by subsequent events.

Benefits of technology

Prevents the overwriting of critical event information, enhancing debugging efficiency and product quality by preserving valuable data for identifying and correcting logical failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024147049000001_ABST
    Figure 2024147049000001_ABST
Patent Text Reader

Abstract

To prevent event information useful for debugging from being deleted.SOLUTION: A processing section 12 designates a write address with respect to a trace RAM11a for storing event information related to events generated during the execution of simulation of a verification target circuit 15 in times series to write the event information. The processing section 12 updates the write address each time writing, and sets a first storage region 11a1 in which the write address when the occurrence of an abnormal event is detected becomes an end address and event information related to an event that has occurred before the abnormal event is written. The processing section 12 writes event information related to an event that has occurred after setting the first storage region 11a1 to a second storage region 11a2 other than the first storage region 11a1. When writing the event information up to the end address of the second storage region 11a2, the processing section 12 returns the write address to a start address of the second storage region 11a2 and continues to write the event information.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a debugging program, an information processing device, and a debugging method. [Background technology]

[0002] Before actually manufacturing a semiconductor device such as an ASIC (Application Specific Integrated Circuit) or SoC (System on a Chip), circuit information for the semiconductor device is created. Then, based on the circuit information, a simulation is performed on a computer to verify whether the designed circuit operates normally. This type of simulation is also called logic verification.

[0003] In a simulation, in order to realize a debugging function for finding logic faults (bugs) in a circuit, event information related to events occurring during the execution of the simulation may be stored in chronological order. A memory for storing such event information is sometimes called a trace memory. For example, there is a method for holding CPU execution history information in a trace memory when a simulation is executed using a simulation model of a circuit including a CPU and memory (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2003-50717 A Summary of the Invention [Problem to be solved by the invention]

[0005] Since the memory capacity for storing event information is finite, after event information has been written to the last address of the memory, it may be written again from the first address of the memory. However, with this method, when an abnormal event such as a logical error occurs, event information useful for identifying the cause of the occurrence (i.e., useful for debugging) may be overwritten by event information related to a subsequent event and may be lost.

[0006] In one aspect, the present invention aims to prevent event information useful for debugging from being deleted. [Means for solving the problem]

[0007] In one embodiment, there is provided a debugging program that causes a computer to execute a process of specifying a write address for a storage area that chronologically stores event information relating to events that occur during execution of a circuit simulation, writing the event information to the storage area, updating the write address each time the event information is written to the storage area, setting a first storage area in which the event information relating to the event that occurred before the abnormal event was written to the storage area, when an abnormal event is detected, the write address at the time the abnormal event was detected becomes an end address, writing the event information relating to the event that occurred before the abnormal event to a second storage area other than the first storage area in the storage area, and when the event information has been written up to the end address of the second storage area, returning the write address to the start address of the second storage area and continuing writing of the event information.

[0008] In one embodiment, an information processing device is provided. Also, in one embodiment, a debugging method is provided. Effect of the Invention

[0009] In one aspect, the present invention can prevent event information useful for debugging from being deleted. [Brief description of the drawings]

[0010] [Figure 1] FIG. 1 illustrates an example of an information processing device and a debugging method according to a first embodiment. [Diagram 2] FIG. 11 is a block diagram illustrating an example of hardware of an information processing apparatus according to a second embodiment. [Diagram 3] FIG. 2 is a block diagram showing an example of functions of the information processing device; [Figure 4] FIG. 1 is a diagram illustrating an example of a simulation model. [Diagram 5] FIG. 13 is a diagram illustrating another example of a simulation model. [Figure 6] FIG. 2 illustrates an example of a trace RAM unit. [Figure 7] FIG. 11 illustrates an example of how event information is stored; [Figure 8] FIG. 13 is a diagram illustrating another example of how event information is stored. [Figure 9] 13 is a flowchart illustrating an example of a processing procedure of an information processing apparatus according to a second embodiment. [Figure 10] 13 is a flowchart illustrating an example of a procedure for setting a protected area. [Figure 11] FIG. 13 is a diagram showing an example of setting a protected area. [Figure 12] FIG. 13 is a diagram showing another example of setting the protect area. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0011] Hereinafter, an embodiment of the invention will be described with reference to the drawings. (First embodiment) The information processing device according to the first embodiment stores event information related to events occurring during execution of a simulation of a circuit to be verified in a storage area in chronological order. Since the event information is used for debugging, the process of storing the event information is sometimes referred to as a debugging method.

[0012] In recent years, the speed of circuits under verification (e.g., processors) has increased, and event information used for debugging may occur frequently. Therefore, even if a relatively large capacity memory is used, the capacity may be used up quickly. Therefore, a trace memory that writes to the end address and then writes again from the top address (such an operation is sometimes called cyclic) is sometimes used.

[0013] However, when an abnormal event such as a logical error occurs, event information useful for debugging may be overwritten by event information related to a subsequent event and may be lost. Event information related to an event before the occurrence of the abnormal event (for example, immediately before the occurrence of the abnormal event) is useful for identifying the cause of the occurrence of the abnormal event, and is useful for debugging.

[0014] The information processing device of the first embodiment prevents such event information useful for debugging from being deleted. FIG. 1 illustrates an example of an information processing apparatus and a debugging method according to a first embodiment.

[0015] The information processing device 10 includes a storage unit 11 and a processing unit 12. The information processing device 10 may be a client device or a server device. The information processing device 10 may be called a computer.

[0016] The storage unit 11 may be a volatile semiconductor memory such as a random access memory (RAM) or a non-volatile storage such as a hard disk drive (HDD) or a flash memory. The storage unit 11 may include both a volatile semiconductor memory and a non-volatile storage. The storage unit 11 includes a trace memory area 11a.

[0017] The memory area 11a stores event information related to events occurring during execution of a simulation of a circuit to be verified in chronological order. Such a memory area 11a can be implemented using, for example, a volatile semiconductor memory such as a RAM. Hereinafter, the memory area 11a will be referred to as a trace RAM 11a. However, the trace RAM 11a may be a memory area of ​​a non-volatile storage such as a flash memory.

[0018] The storage unit 11 also stores circuit information 11b of the circuit to be verified. The circuit information 11b is described, for example, in HDL (Hardware Description Language) or the like. In the following example, a circuit to be verified 15 (for example, ASIC or SoC) including a processor 15a and a memory 15b is used as the circuit to be verified. Such a circuit to be verified 15 can also be called a simulation model. Note that the circuit to be verified is not limited to the circuit to be verified 15 shown in FIG. 1.

[0019] The processing unit 12 is, for example, a processor such as a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP). The processor executes a program (for example, a debug program) stored in a memory such as a RAM (which may be the storage unit 11). A set of processors may be called a multiprocessor or simply a "processor". However, the processing unit 12 may be realized by an electronic circuit such as an ASIC or a field programmable gate array (FPGA). In that case, the information processing device 10 may also be called a simulation circuit.

[0020] The processing unit 12 reads the circuit information 11b from the storage unit 11, and executes a simulation on the verification target circuit 15. In the simulation, for example, hardware / software collaborative verification is performed to verify whether the verification target circuit 15 operates normally.

[0021] The processing unit 12 specifies a write address (hereinafter referred to as a write address) for the trace RAM 11a, and writes event information relating to an event that occurs during execution of a simulation of the circuit 15 under verification.

[0022] The event information is, for example, the value of a program counter (not shown) included in the processor 15a, memory access information when the processor 15a accesses the memory 15b, etc. The memory access information includes, for example, an access command to the memory 15b (a write command or a read command), data read from the memory 15b, data written to the memory 15b, or an address of the accessed memory 15b. However, the event information is not limited to the value of the program counter and memory access information.

[0023] The timing at which the processing unit 12 writes event information is, for example, every clock cycle when writing the program counter, and every time an event occurs when writing memory access information.

[0024] The processing unit 12 updates the write address (for example, by incrementing it by 1) every time the event information is written to the trace RAM 11a. When the processing unit 12 detects the occurrence of an abnormal event during a simulation, the write address at that time becomes the end address, and the first memory area 11a1 in which event information relating to an event that occurred before the abnormal event is written is set in the trace RAM 11a.

[0025] For example, the processing unit 12 calculates the start address of the first storage area 11a1 from the end address. In calculating the start address, the processing unit 12 may calculate the start address by inverting the most significant bit of the end address and adding 1 to the result. In this case, half of the storage area of ​​the trace RAM 11a can be allocated to the first storage area 11a1.

[0026] The processing unit 12 may also obtain information on the ratio of the first storage area 11a1 to the second storage area 11a2 in the trace RAM 11a, and calculate the top address of the first storage area 11a1 so as to achieve the ratio. An abnormal event is, for example, a circuit operation that differs from the specifications.

[0027] The processing unit 12 writes event information related to an event that occurs after the setting of the first storage area 11a1 to a second storage area 11a2 other than the first storage area 11a1 in the trace RAM 11a. In other words, the first storage area 11a1 becomes a protected area, and event information related to an event that occurs after the setting of the first storage area 11a1 is not written to the first storage area 11a1.

[0028] When the processing unit 12 writes the event information up to the end address of the second storage area 11a2, the processing unit 12 returns the write address to the start address of the second storage area 11a2 and continues writing the event information. In the example of FIG. 1, the second storage area 11a2 is divided into two with the first storage area 11a1 in between. In the example of FIG. 1, the end address of the latter half of the second storage area 11a2 is equal to the end address of the trace RAM 11a itself. Also, the start address of the first half of the second storage area 11a2 is equal to the start address of the trace RAM 11a itself. Therefore, in the example of FIG. 1, when the event information is written up to the end address of the trace RAM 11a, the processing unit 12 returns the write address to the start address of the trace RAM 11a and continues writing the event information.

[0029] In addition, the address next to the end address of the first storage area 11a1 can also be called the start address of the second storage area 11a2, and the address immediately before the start address of the first storage area 11a1 can also be called the end address of the second storage area 11a2.

[0030] When the write address is the start address of the first storage area 11a1, the processing unit 12 changes the write address to an address obtained by adding 1 to the end address of the first storage area 11a1. This makes it possible to skip writing of the event information to the first storage area 11a1.

[0031] When the simulation of the verification target circuit 15 is completed, the processing unit 12 reads out the event information stored in the trace RAM 11a, for example, based on a read command input by a user. The processing unit 12 outputs the read out event information. For example, the processing unit 12 outputs the event information to a display device (not shown) for display. The processing unit 12 may transmit the read out event information to another information processing device.

[0032] The user performs debugging based on the read event information. For example, the user investigates the cause of the abnormal event based on the read event information and corrects the logic of the circuit under test 15 where the bug occurs.

[0033] As described above, the processing unit 12 of the information processing device 10 according to the first embodiment specifies a write address for the trace RAM 11a that stores event information related to events occurring during the execution of a circuit simulation in chronological order, and writes the event information. The processing unit 12 updates the write address every time the processing unit 12 writes the event information to the trace RAM 11a. When the processing unit 12 detects the occurrence of an abnormal event, the processing unit 12 sets the first storage area 11a1, in which the write address at that time becomes the end address and in which the event information related to the event occurring before the abnormal event is written, to the trace RAM 11a. The processing unit 12 then writes the event information related to the event occurring after the setting of the first storage area 11a1 to the second storage area 11a2 other than the first storage area 11a1 in the trace RAM 11a. When the processing unit 12 writes the event information up to the end address of the second storage area 11a2, the processing unit 12 returns the write address to the start address of the second storage area 11a2 and continues writing the event information.

[0034] This makes it possible to prevent event information useful for debugging from being overwritten and deleted by event information related to a subsequent event when an abnormal event such as a logical error occurs. Furthermore, by using such event information useful for debugging, it is possible to improve debugging efficiency, thereby improving product quality, shortening the shipping process, and other effects.

[0035] (Second embodiment) Next, a second embodiment will be described. FIG. 2 is a block diagram illustrating an example of hardware of an information processing apparatus according to the second embodiment.

[0036] The information processing device 20 may be a client device or a server device, and may be called a computer. The information processing device 20 has a CPU 21, a RAM 22, a HDD 23, a GPU 24, an input interface 25, a medium reader 26, and a communication interface 27, all connected via a bus. The CPU 21 corresponds to the processing unit 12 in the first embodiment. The RAM 22 or the HDD 23 corresponds to the storage unit 11 in the first embodiment.

[0037] The CPU 21 is a processor that executes instructions of a program. The CPU 21 loads the program and data stored in the HDD 23 into the RAM 22 and executes the program. The information processing device 20 may have multiple processors.

[0038] The RAM 22 is a volatile semiconductor memory that temporarily stores programs executed by the CPU 21 and data used in calculations by the CPU 21. The information processing device 20 may have a type of volatile memory other than the RAM.

[0039] The HDD 23 is a non-volatile storage that stores software programs such as an operating system (OS), middleware, and application software, and data. The information processing device 20 may have other types of non-volatile storage, such as a flash memory or a solid state drive (SSD).

[0040] The GPU 24 performs image processing in cooperation with the CPU 21, and outputs an image to a display device 24a connected to the information processing device 20. The display device 24a is, for example, a CRT (Cathode Ray Tube) display, a liquid crystal display, an organic EL (Electro Luminescence) display, or a projector. Other types of output devices such as a printer may be connected to the information processing device 20.

[0041] The GPU 24 may be used as a general purpose computing on graphics processing unit (GPGPU). The GPU 24 may execute a program in response to an instruction from the CPU 21. The information processing device 20 may have a volatile semiconductor memory other than the RAM 22 as a GPU memory.

[0042] The input interface 25 receives an input signal from an input device 25a connected to the information processing device 20. The input device 25a is, for example, a mouse, a touch panel, or a keyboard. A plurality of input devices may be connected to the information processing device 20.

[0043] The medium reader 26 is a reading device that reads the programs and data recorded on the recording medium 26a. The recording medium 26a is, for example, a magnetic disk, an optical disk, or a semiconductor memory. The magnetic disk includes a flexible disk (FD) and a HDD. The optical disk includes a compact disc (CD) and a digital versatile disc (DVD). The medium reader 26 copies the programs and data read from the recording medium 26a to another recording medium such as the RAM 22 or the HDD 23. The read programs may be executed by the CPU 21.

[0044] The recording medium 26a may be a portable recording medium. The recording medium 26a may be used to distribute programs and data. The recording medium 26a and the HDD 23 may be called computer-readable recording media.

[0045] The communication interface 27 communicates with other information processing devices via the network 27a. The communication interface 27 may be a wired communication interface connected to a wired communication device such as a switch or a router, or a wireless communication interface connected to a wireless communication device such as a base station or an access point.

[0046] Next, the functions of the information processing device 20 will be described. FIG. 3 is a block diagram illustrating an example of functions of the information processing device. The information processing device 20 has a verification target circuit information storage unit 31, an event information storage unit 32, a simulation execution unit 33, an event information writing unit 34, an event information reading unit 35, and an event information output unit 36. The verification target circuit information storage unit 31 and the event information storage unit 32 are implemented, for example, by using the RAM 22 or the HDD 23. The simulation execution unit 33, the event information writing unit 34, the event information reading unit 35, and the event information output unit 36 ​​are implemented, for example, by using the CPU 21 and a program.

[0047] The verification target circuit information storage unit 31 stores circuit information of the verification target circuit. The event information storage unit 32 stores, in chronological order, event information relating to events that occur during execution of a simulation of the circuit under verification. The event information storage unit 32 functions as a trace RAM.

[0048] The simulation execution unit 33 reads the circuit information from the verification target circuit information storage unit 31, and executes a simulation for the verification target circuit. The event information writing unit 34 writes, into the event information storage unit 32, event information relating to events that occur during execution of a simulation of the circuit under verification.

[0049] The event information reading unit 35 reads the event information stored in the event information storage unit 32 based on a read command input by a user operating the input device 25a, for example.

[0050] The event information output unit 36 ​​outputs the read event information. For example, the event information output unit 36 ​​outputs the event information to the display device 24a for display. The event information output unit 36 ​​may transmit the read event information to another information processing device via the network 27a.

[0051] (Simulation model) An example of a simulation model handled by the information processing device 20 according to the second embodiment will be described below.

[0052] FIG. 4 is a diagram illustrating an example of a simulation model. The simulation model 40a includes a verification target circuit (for example, an ASIC or SoC) including a processor 41 and a main memory 42 connected to the processor 41, and a trace RAM unit 43.

[0053] The processor 41 is, for example, a CPU, a GPU, a DSP, etc. The processor 41 includes a program counter 41a and an ER register 41b. The program counter 41a holds, as a counter value, the address in the main memory 42 where the instruction to be executed next by the processor 41 is stored.

[0054] The ER register 41b is a register in which a flag value indicating that an abnormal event has been detected during the execution of a simulation is set. The main memory 42 is a memory in which the programs executed by the processor 41 are stored.

[0055] The trace RAM unit 43 acquires event information from the circuit under test and stores the acquired event information in chronological order. In the simulation model 40a of Fig. 4, the trace RAM unit 43 stores the counter value of the program counter 41a as event information. The trace RAM unit 43 also detects the occurrence of an abnormal event from the flag value of the ER register 41b.

[0056] Fig. 5 is a diagram showing another example of a simulation model, in which the same elements as those shown in Fig. 4 are denoted by the same reference numerals. In the simulation model 40b of FIG. 5, a processor 41 includes a memory access information holding register 41c.

[0057] The memory access information holding register 41c stores information (memory access information) related to a memory access when the memory access occurs to the main memory 42 of the processor 41. The memory access information includes, for example, an access command to the main memory 42, data to be read from the main memory 42, data to be written to the main memory 42, or an address of the accessed main memory 42.

[0058] In the simulation model 40b of FIG. 5, the trace RAM unit 43 stores the memory access information stored in the memory access information holding register 41c in chronological order as event information.

[0059] A simulation of a circuit under verification including the processor 41 and main memory 42 as described above is executed by the simulation execution unit 33. FIG. 6 is a diagram illustrating an example of a trace RAM unit.

[0060] The trace RAM unit 43 includes a trace RAM 43a, a write address register 43b, a write address incrementer 43c, and a write enable register 43d. The trace RAM unit 43 further includes a protect valid register 43f, a protect area bottom register 43g, and a protect area top register 43h.

[0061] The trace RAM 43a stores event information. The write address register 43b holds an address (write address) of the trace RAM 43a to which the event information is written.

[0062] The write address incrementer 43c increments the write address by +1 every time event information is written to the trace RAM 43a, and causes the write address register 43b to hold the incremented write address.

[0063] The write enable register 43d holds a value (value of the write enable signal) indicating whether or not to write to the trace RAM 43a. In the following, it is assumed that 1 is set when writing to the trace RAM 43a, and 0 is set when writing to the trace RAM 43a is not performed.

[0064] The write data register 43e holds event information to be written to the trace RAM 43a. The protect enable register 43f holds a value indicating whether or not the setting of the protect area 43a1 is enabled. In the following description, it is assumed that 1 is set to the protect enable register 43f when the setting of the protect area 43a1 is enabled, and 0 is set to the protect enable register 43f when the setting of the protect area 43a1 is not enabled.

[0065] Protected area bottom register 43g holds the end address of protected area 43a1. The protected area top register 43h holds the top address of the protected area 43a1.

[0066] Event information relating to an event that occurs after the protected area 43a1 is set is stored in a storage area 43a2 outside the protected area 43a1. The setting of values ​​in each register of the trace RAM unit 43 and the writing of event information in the trace RAM 43a are performed by, for example, the event information writing unit 34 in FIG.

[0067] Each register of the trace RAM unit 43 can also be implemented using a register in the information processing device 10, 20 (for example, a register included in the processing unit 12 or the CPU 21).

[0068] The procedure for writing event information using the trace RAM unit 43 will be described later. (Example of storing event information) FIG. 7 is a diagram illustrating an example of how event information is stored.

[0069] The example of Fig. 7 shows an example of storage of event information when the simulation model 40a shown in Fig. 4 is used. That is, the counter value (PC value) of the program counter 41a is stored in the trace RAM 43a as event information.

[0070] For example, a counter value "00001000" is stored at address "0000" of the trace RAM 43a, and a counter value "00001004" is stored at address "0001".

[0071] If the event information is a counter value, for example, the counter value is written to the trace RAM 43a at each clock cycle of the processor 41. FIG. 8 is a diagram showing an example of how other event information is stored.

[0072] The example of Fig. 8 shows an example of storage of event information when the simulation model 40b shown in Fig. 5 is used. That is, the memory access information of the memory access information holding register 41c is stored as event information in the trace RAM 43a.

[0073] The memory access information includes a memory address, memory data, and an access instruction. The memory address is the address of the accessed main memory 42. The memory data is data to be read from the main memory 42 or data to be written to the main memory 42. The access instruction is a read instruction from the main memory 42 (also called a load instruction) or a write instruction to the main memory 42 (also called a store instruction). For example, a read instruction is represented as "01" and a write instruction is represented as "02".

[0074] For example, at address "0000" of the trace RAM 43a, memory address "00F00000", memory data "AABBCCDD" read from the main memory 42, and "01" indicating a read command are stored.

[0075] When the event information is memory access information, for example, each time the processor 41 accesses the main memory 42, the memory access information as described above is written to the trace RAM 43a.

[0076] (Processing Procedure) Next, a processing procedure of the information processing device 20 according to the second embodiment will be described. FIG. 9 is a flowchart of an example of a processing procedure of the information processing apparatus according to the second embodiment.

[0077] The event information writing unit 34 performs an initial setting (or reset) for writing the event information (step S10). In the process of step S10, for example, 0 is set as an initial value in the protection valid register 43f in Fig. 6. 0 or 1 is set as an initial value of the write enable signal in the write enable register 43d.

[0078] When event information is written for each clock cycle, such as the counter value of the program counter 41a, the write enable register 43d may be set to 1 at the initial setting stage. When event information is written for each event occurrence, the initial value of the write enable signal may be 0. In that case, the write enable signal may be set to 1 each time an event occurs for which event information is to be obtained.

[0079] The start address of the trace RAM 43a into which the event information is written is set as an initial address in the write address register 43b. The initial values ​​of the protect area bottom register 43g and the protect area top register 43h may be indefinite values.

[0080] The simulation execution unit 33 executes a simulation of the circuit under verification (step S11). The event information writing unit 34 determines whether an event for obtaining event information has occurred (step S12). If the event information writing unit 34 determines that an event for obtaining event information has occurred, it performs the process of step S13. If the event information writing unit 34 determines that an event for obtaining event information has not occurred, it performs the process of step S20.

[0081] In the process of step S13, the event information writing unit 34 judges whether or not an abnormal event has occurred, the value of the write enable signal is 1, and the value of the protect enable register 43f is 0. In the simulation models 40a and 40b of FIG. 4 and FIG. 5, the event information writing unit 34 judges that an abnormal event has occurred when, for example, a flag value of 1 is set in the ER register 41b. When the event information writing unit 34 judges that an abnormal event has occurred, the value of the write enable signal is 1, and the value of the protect enable register 43f is 0, the event information writing unit 34 performs the process of step S14. When the event information writing unit 34 judges that an abnormal event has not occurred, the value of the write enable signal is not 1, or the value of the protect enable register 43f is not 0, the event information writing unit 34 performs the process of step S15.

[0082] In the process of step S14, the event information writing unit 34 performs a process of setting the protected area. An example of the procedure of the process of setting the protected area 43a1 will be described later. After the process of step S14, the process of step S15 is performed.

[0083] In the process of step S15, the event information writing unit 34 determines whether or not the value of the write enable signal is 1. If the event information writing unit 34 determines that the value of the write enable signal is 1, it performs the process of step S16. If the event information writing unit 34 determines that the value of the write enable signal is not 1, it performs the process of step S20.

[0084] In the process of step S16, the event information writing unit 34 judges whether or not the value of the protection valid register 43f is 1. Furthermore, the event information writing unit 34 judges whether or not the write address is the top address of the protected area 43a1. The event information writing unit 34 makes this judgment by comparing the write address set in the write address register 43b with the top address of the protected area 43a1 set in the protected area top register 43h.

[0085] If the event information writing unit 34 determines that the value of the protection valid register 43f is 1 and that the write address is the start address of the protected area 43a1, it performs the process of step S17. If the event information writing unit 34 determines that the value of the protection valid register 43f is not 1 or that the write address is not the start address of the protected area 43a1, it performs the process of step S18.

[0086] In the process of step S17, the event information writing unit 34 sets the write address to a value obtained by adding 1 to the end address of the protected area 43a1. The changed write address is set in the write address register 43b. After the process of step S17, the process of step S18 is performed.

[0087] In the process of step S18, the event information writing unit 34 writes the event information to the write address of the trace RAM 43a set in the write address register 43b. After that, the event information writing unit 34 causes the write address incrementer 43c to increment (+1) the write address (step S19).

[0088] In the process of step S20, the simulation execution unit 33 judges whether or not the simulation has satisfied a predetermined end condition and ended. If it is judged that the simulation has ended, the process of step S21 is performed, and if it is not judged that the simulation has ended, the process from step S12 is repeated.

[0089] In the process of step S21, the event information reading unit 35 reads the event information stored in the event information storage unit 32 functioning as the trace RAM 43a based on a read command input by, for example, a user operating the input device 25a. Then, the event information output unit 36 ​​outputs the read event information.

[0090] This completes the processing of the information processing device 20. FIG. 10 is a flowchart illustrating an example of a procedure for setting a protected area. First, the event information writing unit 34 sets 1 in the protection valid register 43f (step S30).

[0091] Then, the event information writing unit 34 sets the current write address as the end address of the protected area 43a1 (step S31). The process of step S31 is performed by setting the write address set in the write address register 43b in the protected area bottom register 43g.

[0092] Next, the event information writing unit 34 sets a value obtained by inverting the most significant bit of the write address (= the end address of the protected area 43a1) and adding 1 to it as the start address of the protected area 43a1 (step S32). The process of step S32 is performed by inverting the most significant bit of the write address set in the write address register 43b, adding 1 to it, and setting the address calculated in the protected area top register 43h. This allows half of the storage area of ​​the trace RAM 43a to be assigned to the protected area 43a1.

[0093] This completes the process of setting the protected area 43a1. It should be noted that the order of the processes shown in FIGS. 9 and 10 is merely an example, and the order of the processes may be changed as appropriate.

[0094] (Example of protection area settings) FIG. 11 is a diagram showing an example of setting the protect area. 11, the storage capacity of the trace RAM 43a is 21 bits. In this case, the start address of the trace RAM 43a is 0x000000, and the end address is 0x1FFFFF.

[0095] As described above, the start address of the protected area 43a1 is calculated based on the end address of the protected area 43a1. If the write address at the time of the occurrence of the abnormal event is 0x123456, this address is set in the protected area bottom register 43g. Since the most significant bit of 0x123456 is 0x1, when this is inverted and incremented by +1, it becomes 0x023456+0x1=0x023457. Therefore, this address is set in the protected area top register 43h. Therefore, the protected area 43a1 is set in the address range of 0x023457 to 0x123456.

[0096] When such a protected area 43a1 is set, event information related to an event that occurs after the setting is stored in the storage area 43a2 other than the protected area 43a1. Event information after the occurrence of an abnormal event is written from 0x123457, which is the start address of the storage area 43a2. When the write address reaches 0x1FFFFF, which is the end address of the trace RAM 43a, the address set in the write address register 43b returns to 0x000000. When the writing of the event information proceeds and the write address reaches 0x023457, which is the start address of the protected area, the write address becomes 0x123456+1=0x123457 by the process of step S17 described above, which becomes the start address of the storage area 43a2. As a result, writing of the event information to the protected area 43a1 is skipped.

[0097] FIG. 12 is a diagram showing another example of setting the protect area. In the example of FIG. 12, the trace RAM 43a also has a storage capacity of 21 bits. If the write address at the time of the occurrence of the abnormal event is 0x023456, this address is set in the protect area bottom register 43g. Since the most significant bit of 0x023456 is 0x0, when this is inverted and incremented by +1, it becomes 0x123456+0x1=0x123457. Therefore, this address is set in the protect area top register 43h. Therefore, the protect area 43a1 is set in the range from 0x123457 to 0x1FFFFF, which is the end address of the trace RAM 43a, and from 0x000000, which is the start address of the trace RAM 43a, to 0x023456.

[0098] When such a protected area 43a1 is set, event information after an abnormal event occurs is written from 0x023457, which is the starting address of the storage area 43a2. When the writing of the event information progresses and the write address reaches 0x123457, which is the starting address of the protected area, the write address becomes 0x023456+1=0x023457, which is the starting address of the storage area 43a2, by the process of step S17 described above. As a result, writing of the event information to the protected area 43a1 is skipped.

[0099] As described above, the information processing device 20 according to the second embodiment cyclically stores event information relating to events occurring during the simulation of the circuit under verification in the trace RAM 43a. Then, the information processing device 20 sets the protected area 43a1 in the trace RAM 43a, the end address of which is the write address at the time of detecting the occurrence of an abnormal event. The information processing device 20 writes event information relating to events occurring after the setting of the protected area 43a1 in the memory area 43a2 other than the protected area 43a1 in the trace RAM 43a. When the information processing device 20 has written the event information up to the end address of the memory area 43a2, it returns the write address to the start address of the memory area 43a2 and continues writing the event information.

[0100] This makes it possible to prevent event information useful for debugging from being overwritten and deleted by event information related to a normal event that occurs afterwards when an abnormal event such as a logical fault occurs. Furthermore, by using such event information useful for debugging, it is possible to improve debugging efficiency, thereby improving product quality, shortening the shipping process, and other effects.

[0101] As described above, the start address of protected area 43a1 can be calculated by inverting the most significant bit of the end address of protected area 43a1 and adding 1 to the value, thereby allowing protected area 43a1 to be set with a relatively simple calculation.

[0102] However, in the above method, half of the storage area of ​​the trace RAM 43a is allocated to the protected area 43a1, but the ratio of the storage area allocated to the protected area 43a is not limited to this.

[0103] As described above, the above process can be realized by causing the information processing device 20 to execute a program (eg, a debug program). The program may be recorded on a computer-readable recording medium (e.g., recording medium 26a). For example, a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory may be used as the recording medium. Magnetic disks include FDs and HDDs. Optical disks include CDs, CD-R (Recordable) / RW (Rewritable), DVDs, and DVD-R / RWs. The program may be recorded on a portable recording medium and distributed. In that case, the program may be copied from the portable recording medium to another recording medium (e.g., HDD 23) and executed.

[0104] While one aspect of the debugging program, information processing device, and debugging method of the present invention has been described above based on the embodiment, these are merely examples and the present invention is not limited to the above description. [Explanation of symbols]

[0105] 10. Information processing device 11 Storage section 11a Trace memory area (trace RAM) 11a1 1st storage area 11a2 2nd storage area 11b Circuit information 12 Processing section 15 Circuit to be verified 15a Processor 15b Memory

Claims

1. specifying a write address in a storage area for storing event information relating to events occurring during execution of a circuit simulation in chronological order, and writing the event information; updating the write address each time the event information is written to the storage area; when detecting an occurrence of an abnormal event, the write address at the time of detecting the occurrence of the abnormal event becomes an end address, and a first storage area in which the event information related to the event which occurred before the abnormal event is written is set as the storage area; writing the event information relating to the event that occurs after the setting of the first storage area into a second storage area other than the first storage area in the storage area; when the event information has been written up to the end address of the second storage area, the write address is returned to the start address of the second storage area, and writing of the event information is continued. A debugging program that causes a computer to execute a process.

2. 2. The debugging program according to claim 1, wherein the process of setting the first storage area includes a process of calculating a head address of the first storage area from an end address of the first storage area.

3. 2. The debugging program according to claim 1, wherein the process of setting the first memory area includes a process of calculating a starting address of the first memory area by inverting a most significant bit of an address at the end of the first memory area and adding 1 to the value.

4. 2. The debugging program according to claim 1, which causes the computer to execute a process in which, when the write address is the start address of the first memory area, the write address is changed to an address which is an end address of the first memory area plus 1.

5. A simulation model including the circuit is a trace memory corresponding to the storage area; a first register for holding the write address; a second register that holds a value indicating whether the first storage area is set; a third register for holding a head address of the first storage area; a fourth register for holding an address of an end of the first storage area; 2. The debugging program according to claim 1, comprising:

6. the circuitry includes a processor and a memory coupled to the processor; The event information includes a value of a program counter included in the processor, an access instruction to the memory, data to be read from the memory, data to be written to the memory, or an address of the memory that is accessed.

2. The debugging program according to claim 1.

7. a storage unit including a storage area for storing, in chronological order, event information relating to events occurring during execution of a circuit simulation; a processing unit which specifies a write address for the storage area, writes the event information, updates the write address each time the event information is written to the storage area, and when an occurrence of an abnormal event is detected, the write address at the time of detecting the occurrence of the abnormal event becomes an end address, sets in the storage area a first storage area in which the event information related to the event occurring before the abnormal event has been written, writes the event information related to the event occurring after the setting of the first storage area to a second storage area other than the first storage area in the storage area, and when the event information has been written up to the end address of the second storage area, returns the write address to the start address of the second storage area and continues writing of the event information; An information processing device having the above configuration.

8. The processing unit: specifying a write address in a storage area for storing event information relating to events occurring during execution of a circuit simulation in chronological order, and writing the event information; updating the write address each time the event information is written to the storage area; when detecting an occurrence of an abnormal event, the write address at the time of detecting the occurrence of the abnormal event becomes an end address, and a first storage area in which the event information related to the event which occurred before the abnormal event is written is set as the storage area; writing the event information relating to the event that occurs after the setting of the first storage area into a second storage area other than the first storage area in the storage area; when the event information has been written up to the end address of the second storage area, the write address is returned to the start address of the second storage area, and writing of the event information is continued. How to debug.

Citation Information

Patent Citations

  • Device and method for program tracing

    JP2003050717A