This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2011-027949, filed on Feb. 10, 2011, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to circuit verification.
Conventionally, simulations using assertions concerning a circuit-under-test as well as simulations that monitor registers of a circuit-under-test have been disclosed (see, for example, Japanese Laid-open Patent Publication No. 2008-181227)
Nonetheless, with the conventional arts above a problem arises in that if a suitable model of the behavior of a circuit-under-test is to be generated according to specifications and the specifications are complicated, the generation of a circuit model that behaves correctly is extremely time consuming.
Meanwhile, even when the accuracy of a circuit model is low, if an assertion (also referred to as an assertion property and a verification property) concerning a circuit-under-test can be correctly described from the specifications, the occurrence of an error in the behavior of the circuit-under-test can be detected in the circuit model. However, if the verification engineer is to describe the assertion concerning the circuit-under-test and multiple verification scenarios exist for one register, a problem arises in that description of the assertion is difficult.
Accordingly, a change in a register value occurring outside assertion-defined verification scenarios cannot be detected by assertions. Further, if the circuit-under-test operates under multiple clocks, the behavior of the circuit model becomes more complicated, making the detection of a change in a register value, occurring outside the assertion-defined verification scenarios more difficult.
According to an aspect of an embodiment, a computer-readable medium stores therein a verification support program that causes a computer to execute a process including first detecting an assertion that evaluates to true during simulation of a circuit, the assertion being detected from an assertion group prescribing values of registers to be met by the circuit; updating, at a clock tick subsequent to a clock tick at which the assertion is detected at the first detecting, an expected value of a register, to a value of the register as prescribed by the assertion; second detecting inconsistency between the expected value that has been updated at the updating and the value of the register; determining, based on a detection result obtained at the second detecting, validity of a change in the value of the register; and outputting a determination result obtained at the determining.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed.
Preferred embodiments of the present invention will be explained with reference to the accompanying drawings. Hereinafter, a circuit-under-test operating under a single clock will be described in a first embodiment, while a circuit-under-test operating under multiple clocks will be described in a second embodiment. Additionally, a register that is in the circuit-under-test and checked by an assertion will be referred to as “register R”.
Assertion A1 confirms that “if ‘1’ is input as input I at a rising edge of clock Clk, the value of register R changes to ‘3’ after 1 cycle”. Assertion A2 confirms that “if ‘2’ is input as input I at a rising edge of clock Clk, the value of register R changes to ‘4’ after 1 cycle”.
Further, “updateR_spec” is described in assertions A1, A2. Description, like “updateR_spec”, inserted at the tail of an assertion is sub-assertion that a subroutine called up if the assertion to which the sub-assertion has been inserted, evaluates to true. Here, the inserted description “updateR_spec” instructs the updating of an expected value R_spec. Thus, if the assertion to which the sub-assertion has been inserted is assertion A1 and if assertion A1 evaluates to true, the expected value R_spec is updated to “3”, the value of register R for assertion A1.
Further, the circuit-under-test operates according to clock Clk and is a circuit model for which input I and the behavior of register R are prescribed. Specifically, input I changes from “5” to “1” at clock tick t1, a rising edge of clock Clk. Further, register R changes from “2” to “3” at clock tick t2, a rising edge of clock Clk, and changes from “3” to “5” at clock tick t5.
Here, since input I has changed from “5” to “1” at clock tick t1 and the value of register R has changed from “2” to “3” at clock tick t2, a rising edge one cycle thereafter, it is confirmed that assertion A1 evaluates to true.
Thus, if it is confirmed that assertion A1 evaluates to true, the expected value R_spec of register R is updated from “2” to “3” at clock tick t3, a rising edge one cycle later. Consequently, the expected value R_spec of register R at clock tick t3 (a rising edge) and thereafter is R_spec=3, coinciding with the value of register R (R=3) in the circuit model for which assertion A1 evaluates to true, enabling consistency to be maintained.
On the other hand, although the value of register R has changed from “3” to “5” at clock tick t5, a rising edge of clock Clk, this change is not expected according to either assertion A1 or A2. Specifically, at clock tick t6, a rising edge one cycle thereafter, the value of register R “5” and the expected value R_spec “3” do not coincide, thereby a change in the value of register R, occurring outside the assertion is detected as an error.
Thus, in the present embodiment, if assertion A1, A2 evaluates to true like the behavior at clock ticks t1 to t2 (rising edges) and the expected value R_spec of register R is updated to the value of register R when assertion A1, A2 evaluates to true, the value of register R and the expected value R_spec will coincide after assertion A1, A2 has evaluated to true. Therefore, once assertion A1, A2 has evaluated to true, it can be guaranteed that no change has occurred in the value of register R until an unexpected change of register R occurs outside assertion A1, A2 concerning circuit-under-test.
On the other hand, if a change in the value of register R occurs outside assertion A1, A2, like the unexpected change in the value of register R at clock tick t5 (a rising edge), the unexpected change is reported as an error, whereby a bug can be easily identified irrespective the lack of such definition by assertions A1, A2. Thus, bugs occurring in scenarios not defined by assertions A1, A2 can be detected and therefore, even if the behavior of the circuit-under-test cannot be covered by an assertion, bug detection is possible.
By the verification engineer debugging identified bugs, the value of register R can be guaranteed to not change outside the assertions concerning the circuit-under-test.
The CPU 201 governs overall control of the verification support apparatus. The ROM 202 stores therein programs such as a boot program. The RAM 203 is used as a work area of the CPU 201. The magnetic disk drive 204, under the control of the CPU 201, controls the reading and writing of data with respect to the magnetic disk 205. The magnetic disk 205 stores therein data written under control of the magnetic disk drive 204.
The optical disk drive 206, under the control of the CPU 201, controls the reading and writing of data with respect to the optical disk 207. The optical disk 207 stores therein data written under control of the optical disk drive 206, the data being read by a computer.
The display 208 displays, for example, data such as text, images, functional information, etc., in addition to a cursor, icons, and/or tool boxes. A cathode ray tube (CRT), a thin-film-transistor (TFT) liquid crystal display, a plasma display, etc., may be employed as the display 208.
The I/F 209 is connected to a network 214 such as a local area network (LAN), a wide area network (WAN), and the Internet through a communication line and is connected to other apparatuses through the network 214. The I/F 209 administers an internal interface with the network 214 and controls the input/output of data from/to external apparatuses. For example, a modem or a LAN adaptor may be employed as the I/F 209.
The keyboard 210 includes, for example, keys for inputting letters, numerals, and various instructions and performs the input of data. Alternatively, a touch-panel-type input pad or numeric keypad, etc. may be adopted. The mouse 211 is used to move the cursor, select a region, or move and change the size of windows. A track ball or a joy stick may be adopted provided each respectively has a function similar to a pointing device.
The scanner 212 optically reads an image and takes in the image data into the verification support apparatus. The scanner 212 may have an optical character reader (OCR) function as well. The printer 213 prints image data and text data. The printer 213 may be, for example, a laser printer or an ink jet printer.
Next, an example of a functional configuration of the verification support apparatus according to the first embodiment will be described.
Assertion groups 310, 320 are collections of assertions concerning the circuit-under-test. The assertion group 310 is an assertion group prior to modification by the modifying processor 301. The assertion group 310 includes assertions into which “updateR_spec” has not been inserted, such as assertions A1, A2 depicted in
The selecting unit 311 selects from the assertion group 310, an assertion that has yet to be selected. The selecting unit 311 continues selecting assertions until no unselected assertion remains. The modifying unit 312 inserts into the assertion selected by the selecting unit 311 (selected assertion), update instruction description instructing an update of the expected value of the register in the circuit-under-test. The inserted update instruction description is description that calls up an expected-value updating subroutine.
The update instruction description is, for example, “updateR_spec” depicted in
The checker module group CM includes n checker modules CM1, . . . , CMi, . . . , CMn, respectively prepared for each register in the circuit-under-test (where, n is the number of registers defined by assertions). The checker modules Cmi execute the same processing, but the registers and assertions (assertions in the assertion group 320) subject to the processing respectively differ among the checker modules Cmi.
The first detecting unit 401 detects an assertion that evaluates to true during simulation of the circuit-under-test operating under a single clock. The assertion is detected from the assertion group 320 prescribing register R values to be met by the circuit-under-test. Operation under a single clock Clk may be with respect to the entire circuit-under-test or a portion of the circuit-under-test such as a circuit block. During simulation, the first detecting unit 401 detects an assertion (an assertion in the assertion group 320) that evaluates to true for a register R checked by the checker module CMi. For example, as depicted in
The updating unit 402, at the clock tick subsequent to the clock tick when the assertion is detected by the first detecting unit 401, updates the expected value R_spec of register R to the value of register R prescribed by the assertion. Specifically, the updating unit 402 is an updating subroutine updating the expected value R_spec by executing the update instruction description “updateR_spec” of the assertion that has evaluated to true. Thus, the expected value R_spec is updated at the clock tick subsequent to the clock tick of detection, to the value of register R under simulation (i.e., the value of register R prescribed by the assertion that has evaluated to true). Therefore, if the circuit-under-test has been correctly designed and provided that an assertion does not evaluate to true, after the updating by the updating unit 402, the value of register R and the expected value R_spec should continue to be the same value.
The second detecting unit 403 detects inconsistency between the expected value R_spec of register R after the updating by the updating unit 402 and the value of register R. Specifically, for example, the second detecting unit 403 monitors changes in the value of register R under test by the checker module CMi, at each rising edge clock tick of clock Clk (or falling edge clock tick). Thus, if the circuit-under-test has been correctly designed and provided none of the assertions concerning register R in the assertion group 320 evaluates to true, the value of register R and the expected value R_spec should be consistent. On the other hand, inconsistency indicates a change in the value of register R, not defined by the assertion group 320.
The determining unit 404, based on the detection result obtained by the second detecting unit 403, determines whether the change in the value of register R is valid. Specifically, for example, if inconsistency is detected by the second detecting unit 403, the determining unit 404 determines the change in the value of register R to be a change not prescribed by the assertion group 320 (erroneous change). On the other hand, if consistency is detected by the second detecting unit 403, the change in the value of register R is determined to be an expected change (correct change).
Configuration may be such that the determining unit 404 executes determination processing only when inconsistency is detected by the second detecting unit 403. Although the second detecting unit 403 executes determination processing at each execution of detection processing, presumably the number of detections of inconsistency is lower than the number of detections of consistency and therefore, the execution of determination processing only upon detection of inconsistency can facilitate faster verification support processing.
The output unit 405 outputs a determination result obtained by the determining unit 404. Specifically, for example, if the determining unit 404 has determined a change to be an erroneous change, the output unit 405 outputs identification information for register R and the clock tick at which the inconsistency of register R was detected. Identification information is information uniquely identifying register R, e.g., a register name. For instance, in the example depicted in
Further, the output unit 405 outputs identification information for register R and the clock tick that is one cycle subsequent to the clock tick at which the inconsistency of register R was detected. For instance, in the example depicted in
The output unit 405 may output such results by display on the display 208, print out by the printer 213, transmission to a communicable computer, etc. Further, the output unit 405 may store the results to an internal storage device (RAM 203, magnetic disk 205) of the verification support apparatus.
If an unselected assertion remains (step S501: YES), the selecting unit 311 selects an unselected assertion from the assertion group 310 (step S502). The modifying unit 312 inserts into the selected assertion, the update instruction description that calls up the expected-value updating subroutine (step S503). Thereafter, the modifying unit 312 retains the selected assertion after the insertion, in an internal storage device of the verification support apparatus (step S504), and the flow returns to step S501.
At step S501, if no unselected assertion remains (step S501: NO), the modification has been completed, ending the modification process. Thus, the unmodified assertion group 310 is modified into the assertion group 320 into which the update instruction description has been inserted, whereby the expected value R_spec can be automatically updated when an assertion evaluates to true in the check process of the checker module group CM.
First, the checker module Cmi waits until the first detecting unit 401 detects in the assertion group 320, an assertion evaluating to true for a register R under test by the checker module CMi (step S601: NO). When an assertion is detected (step S601: YES), the updating unit 402, at the subsequent cycle (the subsequent clock tick), updates the value of register R of the detected assertion to the expected value R_spec (step S602), and the flow returns to step S601. The processing in the flowchart depicted in
First, the second detecting unit 403 awaits a rising edge clock tick of clock Clk (step S701: NO), and upon a rising edge clock tick (step S701: YES), judges whether the value of register R and the expected value R_spec are consistent (step S702). If the values are consistent (step S702: YES), the flow returns to step S701.
On the other hand, if the values are inconsistent (step S702: NO), the determining unit 404, at the subsequent cycle (the subsequent clock tick), determines the change in the value of register R to be an erroneous change not prescribed by the assertion group 320 (step S703). The output unit 405 outputs a determination result (step S704), and the flow returns to step S701. The processing in the flowchart depicted in
Thus, in the first embodiment, each time an assertion evaluates to true, the expected value R_spec is updated to the value of register R, whereby after the update, the value of register R and the expected value R_spec continue to coincide if the design is correct. Therefore, if an inconsistency between the value of register R and the expected value R_spec is detected, irrespective of none of the assertions in the assertion group 320 evaluating to true, the value of register R has changed.
Therefore, since the change is clearly not one prescribed by any of the assertions in the assertion group 320, a bug that cannot be detected by the assertion group can be efficiently detected. Further, by the verification engineer debugging identified bugs, the value of register R can be guaranteed to not change outside the assertions concerning the circuit-under-test.
In addition, although the circuit-under-test of the first embodiment has been described as a circuit operating under a single clock Clk, the circuit-under-test may operate under multiple clocks, where each clock domain is subject to verification, enabling application of the first embodiment.
Next, a second embodiment will be described. In the first embodiment, 1 clock operates register R under verification. Therefore, by inserting update instruction description in an assertion, when the assertion evaluates to true, the expected value R_spec is updated, creating a state in which “if the design is correct, the value of register R and the expected value R_spec will coincide”. Consequently, if the value of register R and the expected value R_spec do not coincide, the unexpected change in the value of register R is detected to be an erroneous change not defined by any assertion in the assertion group 320.
In contrast, if multiple clocks operate register R under verification, a false error occurs. Specifically, if the expected value R_spec is updated at the clock tick subsequent to the clock tick when an assertion evaluates to true as in the first embodiment and the subsequent clock tick belongs to a clock different from the clock of the clock tick at which the assertion evaluated to true, the value of register R and the expected value R_spec do not coincide. Here, description is given with reference to
In
Thus, at clock ticks t14 to t17 (rising edges of clock Clk1) occurring temporally between clock ticks t22 to t23 (rising edges of clock Clk2), a discrepancy between the value of register R and the expected value R_spec (“3”≠“2”) occurs. In other words, between clock ticks t22 to t23 (rising edges of clock Clk2), irrespective of operation according to assertion A11, an error of assertion A11 evaluating to false is detected.
Therefore, an example in the second embodiment will be described where even if register R in the circuit-under-test operates under multiple clocks, bugs that cannot be detected by the assertion group 320 are efficiently detected, without the occurrence of the false error described above. In the second embodiment, description is given with respect to 3 clocks (clocks Clk1 to Clk3) as one example. Further, with respect to
CoChecker3 (R, Clk3) is a co-checker module CCMi3 detecting assertion evaluation to true occurring when register R operates under clock Clk3. Thus, with respect to a given register R, the number of co-checker modules created corresponds to the number of clocks.
Further in
“CoChecker2.triggerOK” inserted into assertion A20 is a subroutine called up if the assertion (assertion A20) to which the “CoChecker2.triggerOK” has been inserted, evaluates to true. “CoChecker2.triggerOK” is a notification subroutine giving ‘assertion true’ notification of “OK” to the check process in the co-checker module CCMi2.
In
When the check processes CPi1 to CPi3 start, a global variable C in the check processes CPi1 to CPi3 is incremented. In the present example, since there are 3 co-checker modules, C equals 3, i.e., the global variable C is equal to the number of clocks under which the given register R operates. C is successively decremented.
C is decremented and if all of the check processes CPi1 to CPi3 have ended before C becomes 0, the evaluation to true of assertion A20 can be appropriately confirmed, without the false error depicted in
Clock tick t23 is the clock tick subsequent to clock tick t22 when assertion A20 evaluates to true and therefore, notification subroutine “CoChecker2.triggerOK” of co-checker module CCMi2 is called up. Consequently, co-checker module CCMi2 issues ‘assertion true’ notification of “OK” for assertion A20 to the check process CPi2, enabling the check process CPi2 to receive ‘assertion true’ notification of “OK” for assertion A20. The check process CPi2 having received ‘assertion true’ notification of “OK”, does not decrement C (i.e., leaves C=2 as is) and ends.
Consequently, in co-checker module CCMi3, since ‘assertion true’ notification of “OK” is not received at clock tick t32, the check process CPi3 decrements C, whereby C equals 1, and the check process CPi3 ends. Therefore, before C becomes 0, the check processes CPi1 to CPi3 end.
In this way, in the second embodiment, the evaluation to true of assertion A20 can be appropriately confirmed, without the false error depicted in
In
When the check processes CPi1 to CPi3 start, the global variable C is incremented in the check processes CPi1 to CPi3. In the present example, since there are 3 co-checker modules, C equals 3, i.e., the global variable C equals the number of clocks under which the given register R operates. C is successively decremented.
C is decremented and if all of the check processes CPi1 to CPi3 have ended before C equals 0, the evaluation to true of assertion A20 can be appropriately confirmed, without the false error depicted in
Although clock tick t23 is the clock tick subsequent to clock tick t22 when the register R changed under clock Clk2, assertion A20 evaluates to false. Therefore, in co-checker module CCMi2, since ‘assertion true’ notification of “OK” is not received at clock tick t23, the check process CPi2 decrements C, whereby C equals 1, and the check process CPi2 ends.
In this way, since C equals 0 when all of the check processes CPi1 to CPi3 have ended, a change in the value of register R, not defined by any assertion in the assertion group, is detected at clock tick t22 (a rising edge of clock Clk2). Consequently, even when a register in a circuit-under-test operates under multiple clocks, a bug that cannot be detected by the assertion group can be efficiently detected, without the occurrence of the false error described above.
Next a functional configuration of the verification support apparatus according to the second embodiment will be described. Components identical to those in the first embodiment are given the same reference numerals used in the first embodiment and description therefor is omitted. Further, an example of a hardware configuration of the verification support apparatus according to the second embodiment is identical to that depicted in
Respective functions of the modifying/creating processor 1900 (the selecting unit 1901 to the creating unit 1904) and the co-checker module group set CCM are implemented specifically, for example, by the CPU 201 executing a program stored to a storage device such as the ROM 202, the RAM 203, the magnetic disk 205, and the optical disk 207 depicted in
Assertion group 1910 is an assertion group prior to modification by the modifying/creating processor 1900. The assertion group 1910 includes assertions into which “CoChecker2.triggerOK” has not been inserted, such as assertion A20 depicted in
The selecting unit 1901 selects from the assertion group 1910, an assertion that has yet to be selected. The selecting unit 1901 continues selecting assertions until no unselected assertion remains. The modifying unit 1902 inserts into the assertion selected by the selecting unit 1901 (selected assertion), description related to ‘assertion true’ notification giving notification of an assertion evaluating to true. The inserted description related to ‘assertion true’ notification is description that calls up a subroutine that notifies the check process of an assertion evaluating to true.
Description related to ‘assertion true’ notification is, for example, “CoChecker2.triggerOK” depicted in
Typically, if it is desirable to give co-checker module CCMi# notification concerning an assertion evaluating to true at a rising edge of clock Clk# (or falling edge), adoption of “CoChecker#.triggerOK” is sufficient. Thus, at the modifying unit 1902, description related to ‘assertion true’ notification is inserted into each assertion, whereby after modification, the assertion group 1920 can be generated. The modified assertion group 1920 is referred to by the co-checker module group set CCM.
The identifying unit 1903 identifies, from the assertion into which the subroutine has been inserted, register identification information and clock identification information. Register identification information is information uniquely identifying a register and is, for example, a register name. Clock identification information is information uniquely identifying a clock and is, for example, a clock name. For example, if the selected assertion is assertion A20, “R” and “Clk2” are identified as the register name and the clock name, respectively.
The creating unit 1904, based on the register identification information and the clock identification information identified by the identifying unit 1903, creates a co-checker module group. Specifically, for example, since the number of clocks is known (herein, the 3 clocks, Clk1 to Clk3), if clock name “Clk2” is identified, for the identified register R, co-checker modules CCMi1 to CCMi3 are created. The creating unit 1904 preliminarily retains operation description for co-checker module CCMi as a template and therefore, can create a co-checker module by merely providing a register name and a clock name to the template.
The co-checker module group set CCM includes co-checker module groups CCM1, . . . , CCMi, . . . , CCMn, where “n” is the number of registers described by an assertion. The co-checker module groups CCMi execute the same processing, but the registers and assertions (assertions in the assertion group 1920) subject to the processing respectively differ among the co-checker module groups CCMi.
Functions of the first detecting unit 2001 to the output unit 2006, specifically, for example, are implemented by the CPU 201 executing a program stored to a storage device such as the ROM 202, the RAM 203, the magnetic disk 205, and the optical disk 207 depicted in
The first detecting unit 2001 detects an assertion that evaluates to true during simulation of the circuit. The assertion is detected from an assertion group prescribing for a register R in the circuit operating under multiple clocks, values to be met by the circuit, at the timing of any one of the clocks.
Specifically, for example, from the assertion group 1920 concerning a circuit-under-test having an internal register R that operates under 3 clocks (clocks Clk1 to Clk3), the first detecting unit 2001 detects an assertion that evaluates to true during simulation. For example, as depicted in
The second detecting unit 2002 detects a change in the value of register R. Here, a change in the value of register R is irrespective of whether an assertion evaluates to true. For example, using co-checker module CCMi2, the second detecting unit 2002, as depicted in FIG. 10, detects the change (“2”→“3”) in the value of register R occurring at clock tick t22 of clock Clk2. Similarly, using co-checker module CCMi2, the second detecting unit 2002, as depicted in
The judging unit 2003 judges for each of the clock ticks immediately subsequent to the detection of a change in the register value by the second detecting unit, whether the clock to which the clock tick belongs is the clock prescribed by the assertion detected by the first detecting unit 2001. Specifically, for example, the judging unit 2003 is not executed if an assertion that evaluates to true is not detected by the first detecting unit 2001, i.e., in the example depicted in
On the other hand, in the example depicted in
Similarly, the judging unit 2003, as depicted in
Further, the judging unit 2003, as depicted in
If a change in the value of register R is detected by the second detecting unit 2002, the generating unit 2004, generates for each clock of register R, a check process that awaits ‘assertion true’ notification giving notification of assertion evaluation to true. Specifically, for example, as depicted in
Thereafter, in the example of
In the example depicted in
The determining unit 2005, based on the judgment result obtained by the judging unit 2003, determines whether the change in the value of register R is valid. Specifically, for example, according to a judgment that the clocks are the same by the judging unit 2003, if clock Clkj among clocks Clk1 to Clkm is judged to be the same clock as that prescribed, C will not become 0 even if the global variable C is decremented and therefore, the change in the value of register R is determined to be a correct change that is expected.
For example, as depicted by the example in
On the other hand, according to a judgment that the clocks are not the same by the judging unit 2003, if none of the clocks among clocks Clk1 to Clkm is judged to be the same clock as that prescribed, the global variable C is decremented and eventually becomes 0. Accordingly, the determining unit 2005 determines the change in the value of register R to be an erroneous change that is not defined by any assertion.
For example, as depicted by the example in
The output unit 2006 outputs the determination result obtained by the determining unit 2005. Specifically, for example, the output unit 2006 outputs the clock detecting the change in the value of register R, the clock tick of the change, and identification information for register R, if the change is determined by the determining unit 2005, to be an erroneous change. Identification information is information uniquely identifying register R and is, for example, a register name. For instance, in the example depicted in
Further, the output unit 2006 may output the clock detecting the change in the value of register R, the time of the change, and identification information for register R, if the change is determined by the determining unit 2005, to be a correct change. For instance, in the example depicted in
Further, the output unit 2006 may output the clock detecting the change in the value of register R, the clock tick at which ‘assertion true’ notification of “OK” was received, and identification information for register R, if the change is determined by the determining unit 2005, to be a correct change. For instance, in the example depicted in
The output unit 2006 may output such results by display on the display 208, print out by the printer 213, and transmission to a communicable computer. Further, the output unit 2006 may store the results to an internal storage device of the verification support apparatus.
If an unselected assertion remains (step S2101: YES), the selecting unit 1901 selects an unselected assertion from the assertion group 1910 (step S1902). The modifying unit 1902 inserts into the selected assertion, description related to calling up an ‘assertion true’ notification subroutine that gives ‘assertion true’ notification (step S2103). Thereafter, the modifying unit 1902 retains the selected assertion after the insertion, in an internal storage device of the verification support apparatus (step S2104).
Further, the identifying unit 1903, from the selected assertion, identifies identification information for the clock prescribed by selected assertion and identification information for the register also prescribed (step S2105). The creating unit 1904, based on the identified clock identification information and the identified register identification information, judges whether creation of the co-checker module group CCMi has been completed (step S2106).
If creation has been completed (step S2106: YES), the flow returns to step S2101. On the other hand, if creation has not been completed (step S2106: NO), the creating unit 1904 creates the co-checker module group CCMi based on the identified clock identification information and register identification information, and retains the co-checker module group CCMi in a storage device (step S2107). Subsequently, the flow proceeds to step S2101.
At step S2101, if no unselected assertion remains (step S2101: NO), the modification/creation process ends. Thus, the unmodified assertion group 1910 is modified into the assertion group 1920 into which description related to ‘assertion true’ notification has been inserted, whereby if an assertion evaluates to true during a check process of the co-checker module group set CCM, the validity of the change in the value of register R can be identified without the occurrence of a false error.
First, the co-checker module CCMij waits until the first detecting unit 2001 detects in the assertion group 1920, an assertion evaluating to true for a register R under test by the co-checker module group CCMi (step S2201: NO). When an assertion is detected (step S2201: YES), the co-checker module CCMij by reading out the description in the assertion that has evaluated to true, gives ‘assertion true’ notification of “OK” to the check process CPij of the co-checker module CCMij (step S2202), and the flow returns to step S2201. The processing of the flowchart in
Subsequently, the global variable C is incremented (step S2303). Since the number of co-checker modules CCMij corresponds to the total number of clocks m, each of the co-checker modules CCMij increments the global variable C, whereby C equals m, ending the startup process for the check process CPij.
First, the second detecting unit 2002 awaits a rising edge clock tick of clock Clk (step S2401: NO) and upon a rising edge clock tick (step S2401: YES), judges whether ‘assertion true’ notification of “OK” has been received from the co-checker module CCMij (step S2402). If ‘assertion true’ notification of “OK” has been received (step S2402: YES), without decrementing the global variable C, the check process CPij ends (step S2407).
On the other hand, if ‘assertion true’ notification of “OK” has not been received (step S2402: NO), the judging unit 2003 decrements the global variable (step S2403), and judges whether the resulting value of C is greater than 0 (step S2404). If C is greater than 0 (step S2404: YES), the flow proceeds to step S2407, and the check process CPij ends (step S2407).
On the other hand, if C is not greater than 0 (step S2404: NO), the determining unit 2005 determines the change in the value of register R to be an erroneous change not defined by any assertion (step S2405). Subsequently, the output unit 2006 outputs the determination result obtained by the determining unit 2005 (step S2406), and the check process CPij ends (step S2407).
Thus, in the second embodiment, each time an assertion evaluates to true, a check process CPij is started for each co-checker module CCMij, and ‘assertion true’ notification is awaited. If there is even 1 check process CPij that has received ‘assertion true’ notification, the change in the value of register R is guaranteed to be a change expected according to an assertion. On the other hand, if there it not even 1 check process CPij that has received ‘assertion true’ notification, the change in the value of register R is clearly an erroneous change not prescribed by any assertion.
Thus, in the second embodiment, if an assertion has evaluated to true, the event of an assertion evaluating to true can be appropriately confirmed, without the occurrence of a false error like that the depicted in
In this way, even if register R in the circuit-under-test operates under multiple clocks, a bug that cannot be detected by the assertion group can be efficiently detected without the occurrence of the false error above. Further, by the verification engineer debugging identified bugs, the value of register R can be guaranteed to not change outside the assertions concerning the circuit-under-test.
The verification support method described in the present embodiment may be implemented by executing a prepared program on a computer such as a personal computer and a workstation. The program is stored on a computer-readable medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, read out from the recording medium, and executed by the computer. The program may be distributed through a network such as the Internet. However, the computer-readable medium does not include a transitory medium such as a propagation signal.
According to one embodiment of the present invention, easy identification of a bug occurring outside scenarios defined for a circuit is possible.
A11 examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2011-027949 | Feb 2011 | JP | national |