Home
Patent Search
IMT Blog
REGISTER
|
SIGN IN
United States Patent Application
20050010880
Kind Code
A1
Schubert, Nils Endric ; et al.
January 13, 2005
Method and user interface for debugging an electronic system
Abstract
Techniques and systems for analysis, diagnosis and debugging fabricated hardware designs at a Hardware Description Language (HDL) level are described. Although the hardware designs (which were designed in HDL) have been fabricated in integrated circuit products with limited input/output pins, the techniques and systems enable the hardware designs within the integrated circuit products to be comprehensively analyzed, diagnosed, and debugged at the HDL level at speed. The ability to debug hardware designs at the HDL level facilitates correction or adjustment of the HDL description of the hardware designs.
Inventors:
Schubert; Nils Endric
(Sunnyvale, CA)
, Beardslee; John Mark
(Menlo Park, CA
)
, Koch; Gernot Heinrich
(Santa Clara, CA
)
, Poeppe; Olaf
(San Jose, CA
)
Correspondence Name and Address:
12400 WILSHIRE BOULEVARD SEVENTH FLOOR
BLAKELY SOKOLOFF TAYLOR & ZAFMAN
LOS ANGELES
CA
90025-1030
US
Series Code:
915516
Filed:
August 9, 2004
U.S. Current Class:
716/004;
716/011
U.S. Class at Publication:
716/004;
716/011
Intern'l Class:
G06F 017/50;
G06F 009/455
Claims
What is claimed is:
1-41. (Canceled).
42. A computer readable medium having computer readable code for performing a method for facilitating debugging of a fabricated integrated circuit, the method comprising: displaying, on a display device associated with a user, at least a portion of a high level hardware description language (HDL) description of electronic circuitry to be included within the fabricated integrated circuit; determining aspects of the electronic circuitry to be examined and/or modified during debugging of the fabricated integrated circuit, the aspects of the electronic circuitry being determined through selections made with respect to the high level HDL description of the electronic circuitry; displaying, on the display device, a visual indication of the selections that have been made with respect to the high level HDL description of the electronic circuitry; creating a design for design instrumentation circuitry based on the aspects of the electronic circuitry determined to be examined and/or modified; and incorporating the design for the design instrumentation circuitry into the high level HDL description or a circuit representation derived from the high level HDL description of the electronic circuitry so as to facilitate debugging of the fabricated integrated circuit.
43. The computer readable medium as recited in claim 42, wherein the selections made with respect to the high level HDL description are made automatically without user interaction.
44. The computer readable medium as recited in claim 42, wherein the selections are automatically made by an instrumentor.
45. The computer readable medium as recited in claim 42, wherein the selections made with respect to the high level HDL description are made through user interaction with a command line interface.
46. The computer readable medium as recited in claim 42, wherein the selections made with respect to the high level HDL description are made either interactively or in batch mode at various levels of granularity.
47. The computer readable medium as recited in claim 42, wherein said displaying of the visual indication of the selections that have been made displays tags with the displayed at least a portion of the high level HDL description of the electronic circuitry.
48. The computer readable medium as recited in claim 42, wherein said determining aspects permits alteration of the design instrumentation circuitry to tradeoff debugging coverage versus area cost.
49. The computer readable medium as recited in claim 48, wherein said method further comprises: displaying the area cost on the display device during or after said determining aspects.
50. The computer readable medium as recited in claim 48, wherein the area cost is dependent on a target technology for the electronic circuitry.
51. The computer readable medium as recited in claim 48, wherein the area cost is with respect to one of FPGA slices, PLD logic elements, or ASIC gate equivalents.
52. A computer readable medium having computer readable code for performing a method for facilitating debugging of a fabricated integrated circuit, the method comprising: displaying a graphical user interface, the graphical user interface comprising: (i) a hardware description language (HDL) code pane that displays at least a portion of HDL code that describes an electronic system design; (ii) a design navigation pane that displays a navigable, hierarchical description of the electronic system design; determining one or more aspects of the electronic system to be examined and/or modified during debugging of the electronic system after fabrication of the electronic system, the aspects of the electronic system being determined through selections made with respect to the HDL code; displaying, on a display device, a visual indication of the selections that have been made with respect to the HDL code; creating a design for design instrumentation circuitry based on the aspects of the electronic system determined to be examined or modified; incorporating the design of the design instrumentation circuitry into the HDL code or a circuit description derived from the HDL code; and, displaying debug information with a section of the HDL code, said debugging information a consequence of operating the electronic system in its target environment at its target speed.
53. The computer readable medium as recited in claim 52, wherein the navigable, hierarchical description is displayed in said design navigation pane in a tree-like structure.
54. The computer readable medium as recited in claim 52, wherein visual indicators are displayed in said HDL code pane interrelated with the HDL code.
55. The computer readable medium as recited in claim 54, wherein the debugging information indicates the status of at least one of a break-point and a watch-point.
56. The computer readable medium as recited in claim 54, wherein the debugging information indicates the status of at least one of design visibility and design patching.
57. The computer readable medium as recited in claim 54, wherein the visual indicators indicate selections with respect to the HDL code being displayed in said HDL code pane.
58. The computer readable medium as recited in claim 57, wherein said graphical user interface further comprises: a status pane that displays status information pertaining to at least the selections.
59. The computer readable medium recited in claim 58, wherein said graphical user interface further comprises: a command line interface pane capable of receiving a command input thereto.
60. The computer readable medium as recited in claim 58, wherein said status pane and said command line interface share a common pane.
61. The computer readable medium as recited in claim 52, wherein said graphical user interface further comprises: a status and command line pane that displays status information pertaining to at least the selections and that of receiving a command input.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is a Continuation-In-Part of U.S. patent application Ser. No. 09/724,840, filed Nov. 28, 2000, and entitled "METHOD AND SYSTEM FOR DEBUGGING AN ELECTRONIC SYSTEM WITH ENHANCED DEBUGGING CAPABILITIES," which is hereby incorporated by reference herein, and which claims the benefit of: (i) U.S. Provisional Patent Application No. 60/168,266, filed Nov. 30, 1999, and entitled "INTERACTIVE DEBUGGING OF HDL SOURCE CODE," and (ii) U.S. Provisional Patent Application No. 60/230,068, filed Aug. 31, 2000, and entitled "HDL-BASED HARDWARE DEBUGGING," each of which is hereby incorporated by reference herein.
[0002] This application also claims the benefit of: (i) U.S. Provisional Patent Application No. 60/387,261 filed Jun. 7, 2002, and entitled "ENHANCED HARDWARE DEBUGGING IN A HARDWARE DESCRIPTION LANGUAGE," which is hereby incorporated by reference herein, and (ii) U.S. Provisional Patent Application No. 60/360,627, filed Mar. 1, 2002, and entitled "HARDWARE-BASED HDL CODE COVERAGE AND DESIGN ANALYSIS," which is hereby incorporated by reference herein.
BACKGROUND OF THE INVENTION
[0003] 1. Field of the Invention
[0004] The present invention relates to electronic systems and, more particularly, to debugging of electronic systems.
[0005] 2. Description of the Related Art
[0006] Electronic systems are designed by designers to operate in specific ways. Electronic systems are systems that contain digital and/or analog electronic components connected together to perform specific operations or functions. Besides the electronic components, electronic systems may also include software. Once designed, the electronic systems may need to be debugged. Debugging electronic systems is a process which involves detection, diagnosis, and correction of functional failures. In the detection step, the designer of the electronic system observes a functional failure. When the designer is able to gather enough information about the incorrect behavior of the electronic system, the designer of the electronic system can draw the necessary conclusions to diagnose the functional failure. For correction of the functional failure, a fix is applied and subsequently tested. When the design is provided in a Hardware Description Language (HDL), such a fix may be a textual change to the HDL description of the electronic system.
[0007] In general, debugging has conventionally been performed by various different approaches. In particular, debugging has been performed by computer software debugging, hardware description language functional verification, hardware logic level analysis, or hardware behavioral source level emulation. These different approaches are discussed below.
[0008] Computer software debugging is conventionally performed using a computer software debugger. A computer software debugger is a software tool that allows a software developer to control the execution of a running computer software program by setting break-points, sequentially single-stepping through the execution of the computer software program, and looking at the program's state by examining and displaying variables and expressions. One example of such a software debugging tool is the GNU Debugger (GDB), which can be obtained from Red Hat, Inc. in Sunnyvale, Calif.
[0009] Software debuggers usually offer interactive debugging of software programs which are sequentially executed on computers. However, some software debuggers also support limited concurrency such as threaded program execution. Some software debuggers support debugging programs written at different levels of abstraction from high-level computer languages such as C++ down to assembler code and/or machine code. To assist with debugging of programs written in high-level computer languages, the software debugging system can add extra debug information (e.g., symbolic names and references to source code) to the compiled code during compilation of the computer software program. In combination with in-circuit emulators, software debuggers may provide a limited capability to analyze the underlying Central Processing Unit (CPU) of the computer executing the computer software program. A major disadvantage of software debuggers is, however, that they cannot be used for efficiently debugging general hardware of electronic systems.
[0010] Hardware description language functional verification is used to verify that the parts of an electronic system which are described using HDL match their functional specification. Such functional verification can be achieved through functional simulation or formal verification.
[0011] Functional simulation is performed by a functional simulator. A functional simulator is a software program that runs on a host computer and simulates the operation of an electronic system using its HDL description. Examples of functional simulators include VCS and VSS from Synopsys, Inc. in Mountain View, Calif., and ModelSim from Mentor Graphics Corp. in Wilsonville, Oreg. To increase simulation performance some functional simulators additionally make use of special purpose hardware which acts as a co-processor and accelerates the simulation. An example of a hardware-accelerated functional simulator is the Hammer system from Tharas Systems, Inc. in Santa Clara, Calif. Unfortunately, one major disadvantage of functional simulation is the need for simulation models. In order to be able to simulate, there must exist a simulation model with the proper functional behavior for each component of the HDL design for the electronic system. For some components such simulation models may not be readily available and must be generated. Additionally, the HDL design must be stimulated by a testbench. Since the ideal testbench must correctly and exhaustively match the behavior of the target environment, creation of a testbench can be very difficult and time consuming. On the other hand, a testbench that is too simple will not provide the necessary coverage to find all the design errors. Although functional simulation is useful, using functional simulation to debug design errors is too burdensome. Not only are the testbenches difficult to create, but also the more complex the HDL design is, the lower the performance of functional simulation. For state-of-the-art HDL designs simulation is now a million times slower than the fabricated hardware. Hardware-acceleration can typically speedup functional simulation by a factor on the order of one-hundred. Accordingly, its low performance makes it impractical to use functional simulation either to debug real-time applications or to concurrently debug hardware and software of complex electronic systems.
[0012] Formal verification is performed by a formal verification tool. Formal verification can help with the problem of incomplete coverage in functional simulation due to testbench limitations. One approach checks the HDL description for properties. Such properties may be explicitly provided by the designer of the electronic system or implicitly extracted from the HDL description by the formal verification tool. An example of such a formal verification tool is Solidify from Averant, Inc. in Sunnyvale, Calif. One disadvantage of formal verification is that it is impractical to use to re-produce functional failures observed in a running electronic system.
[0013] Both techniques, functional simulation and formal verification, have the major disadvantage that they do not operate on fabricated hardware. Instead, both techniques operate on a model of the electronic system and a model of the environment in which the electronic system runs, i.e., a testbench. Thus, their use is limited to debugging design errors. As such, neither technique is applicable for debugging manufacturing faults, environment errors, timing errors and/or tool errors. Also, inadequacies in the testbench have the potential to hide or introduce design errors in the HDL design during functional simulation which can later, when the HDL design is fabricated, show up as functional failures of the running electronic system.
[0014] Hardware logic level analysis is a technique that works at the logic level of a fabricated electronic system. The logic level of abstraction is also referred to as gate-level. Since electronic systems have been designed at the logic level for many years (for example using schematic entry of logic gates and flip-flops), there exists a wide variety of different techniques for debugging at logic level, including: digital logic analyzers, in-circuit emulators, Design-For-Test (DFT) techniques, and hardware emulation, each of these different techniques are discussed below.
[0015] Digital logic analyzers operate to probe a limited number of digital signals and record their logic values. Probing is accomplished by physically connecting probes of the digital logic analyzer to exposed pins and/or circuitry on the fabricated design. Recording is controlled by trigger conditions, which are conditional expressions built upon the values of the recorded signals provided by the probes. The values for the recorded signals are stored in dedicated memory inside the digital logic analyzer so as to be available for subsequent display. Digital logic analyzers can be external devices or blocks embedded inside the digital circuits of an electronic system. An example of an external digital logic analyzer is the Agilent 16715A from Agilent Technologies, Inc. in Palo Alto, Calif. Examples of embedded logic analyzers are SignalTap from Altera Corporation in San Jose, Calif., or ChipScope from Xilinx, Inc. in San Jose, Calif. Another example of an embedded logic analyzer was presented at the 1999 IEEE International Test Conference by Bulent Dervisoglu in "Design for Testability: It is time to deliver it for Time-to-Market". Since embedded logic analyzers are added to the circuitry of the design, they can probe internal signals. Thus, embedded digital logic analyzers overcome the limited access to internal signals problem of external logic analyzers because access to the internal signals is not restricted by the pins of the fabricated circuits.
[0016] An in-circuit emulator is a specialized piece of hardware that connects to a CPU for debugging the CPU and the software that runs on the CPU. An example of an in-circuit emulator is visionICE from Windriver in Alameda, Calif. However, since in-circuit emulators only work for the specific target CPU for which they were built, in-circuit emulators are inappropriate for debugging general digital circuits.
[0017] DFT techniques, such as boundary scan and built-in self test, provide access to the internal registers of a running fabricated digital circuit. An example of such technique is described in the IEEE 1149.1
JTAG standard available from the Institute of Electrical and Electronic Engineers in Piscataway, N.J. DFT techniques are also described in "Digital Logic Testing and Simulation" by Alexander Miczo, published by Wiley, John and Sons Inc., 1985. DFT techniques were originally developed for and applied to testing of manufacturing faults and have the major disadvantage that they do not relate back to the HDL description.
[0018] Hardware emulation systems map a synthesized HDL design onto special emulation hardware. Such emulation hardware comprises many re-programmable FPGA devices and/or special purpose processors. The emulation hardware then executes a model of the HDL design. Thus hardware emulation has the same disadvantage as functional simulation, namely, that it works on a model of the electronic system and not on the fabricated hardware. As a result, hardware emulation systems are limited to design error debugging, and cannot be used for diagnosing manufacturing faults, tool errors, timing errors, etc. An example of such a hardware emulation system is System Realizer from Quickturn Systems, in San Jose, Calif. Specially built prototyping systems comprising FPGAs/PLDs can also be seen as hardware emulation systems. Since hardware emulation is usually much faster than functional simulation, hardware emulation systems may enable use of the software that is supposed to run on the HDL design to be used as a testbench. Even so, hardware emulation typically runs at speeds below one MegaHertz (MHz) while the HDL design is supposed to run at many hundred MegaHertz. In some cases the emulator speed may allow the user to connect the HDL design to the target environment which makes the design of testbenches unnecessary. Even so, with the high speeds of state-of-the-art HDL designs, hardware emulation is not capable of debugging the majority of real-time applications. Another disadvantage is that the special synthesis, mapping, and multi-chip partitioning steps required to bring an HDL design into a hardware emulation system are very complicated and time consuming.
[0019] A major drawback of all logic level debugging techniques is that they work at the logic level of abstraction. Since the HDL-based design methodology of electronic systems is much more efficient for todays complex designs, HDL designs have largely replaced logic level designs. Application of logic level debugging techniques to HDL design methodology is highly inefficient. Since logic level debugging does not relate back to the HDL description, it normally would not provide the designer of the electronic system with sufficient information to correctly diagnose a functional failure.
[0020] Hardware behavioral source level emulation provides hardware emulation of source level designs. One technique for debugging HDL designs described at the behavioral level HDL using hardware emulation is described in "Interaktives Debugging algorithmischer Hardware-Verhaltensbeschreibungen mit Emulation" by Gernot H. Koch, Shaker Verlag, Germany, 1998. Some of which is also described in Koch et al., "Breakpoints and Breakpoint Detection in Source Level Emulation," ACM Transactions on Design Automation of Electronic Systems, Vol. 3, No. 2, 1998. The therein described technique is referred to as Source Level Emulation (SLE) and offers an approach for emulating HDL designs, however only if such designs are described in behavioral VHDL. During behavioral synthesis a behavioral HDL design is enhanced for debugging by generating and adding additional circuitry for break-point detection. The behavioral synthesis tool writes out synthesized VHDL which contains a register transfer level description of the enhanced HDL design. The register transfer level description is then synthesized, mapped, and multi-chip partitioned into the emulation hardware. During hardware emulation with a hardware model of the HDL design, the user is able to examine particular variables in the behavioral HDL description.
[0021] Control is provided via break-points which are detected using the additional circuitry inside the running hardware model. Break-points in SLE have a very specific meaning. In particular, such break-points are closely tied to behavioral operations in the data-flow of the behavioral HDL description, and are associated with particular states of a controller which is generated by the behavioral synthesis. Additionally, break-points can be made conditioned upon particular values of data-path registers. When a break-point is detected, the execution of the hardware model is stopped. This is done by halting some or all of the system clocks and prevents the registers from changing their current values. Once halted, internal registers can be read. These registers form a scan-chain such that their values can be read by an emulation debugging tool.
[0022] Examination of variables in the behavioral HDL description is done in two ways. For variables which are mapped by the behavioral synthesis into registers in the hardware model, their values can be read and related back to HDL identifiers. This is done using map files which keep track of the transformations in behavioral synthesis, register transfer level synthesis, mapping, and multi-chip partitioning. For variables which have not been mapped to registers in the hardware model, their values are computed using a functional model of the behavioral HDL design. This functional model is created during behavioral synthesis and requires the existence of functional models of its components. The values, either read or computed, are then displayed in the behavioral HDL description. Optionally, by overwriting some or all of the registers of the hardware model while the hardware model is halted, the behavior of the HDL design can be modified once the execution of the hardware model is resumed.
[0023] Although source level emulation provides a debugging method which works at the level of the HDL description (in this case behavioral VHDL), it has various drawbacks which limits its use in practice. Several of the drawbacks are as follows. First, enhancements for source level emulation must be done inside a behavioral synthesis tool, since it needs special information about the behavioral HDL design which is only available during the behavioral synthesis process. Second, source level emulation does not allow the designer to perform customization. For example, a designer is not able to select trade-offs between hardware overhead and debugging support. Third, source level emulation cannot handle HDL descriptions on levels of abstraction other than the one provided by behavioral VHDL. Explicitly, source level emulation is not applicable for the most commonly used levels of abstraction of RTL HDL and gate-level HDL. Fourth, source level emulation supports neither hierarchy nor re-use of pre-designed blocks. Fifth, there are various limitations and difficulties in relating registers back to behavioral HDL source code. Sixth, in order to examine the state of the hardware model, it is required that some or all of the system clocks be halted and the hardware stopped, which makes source level emulation inapplicable for debugging the majority of today's electronic systems which are not to be stopped.
[0024] Thus, there is a need for efficient and effective approaches for debugging HDL-based electronic system designs.
SUMMARY OF THE INVENTION
[0025] Broadly speaking, the invention relates to techniques and systems for analysis, diagnosis and debugging fabricated hardware designs at a Hardware Description Language (HDL) level. Although the hardware designs (which were designed in HDL) have been fabricated in integrated circuit products with limited input/output pins, the invention enables the hardware designs within the integrated circuit products to be comprehensively analyzed, diagnosed, and debugged at the HDL level at speed. The ability to debug hardware designs at the HDL level facilitates correction or adjustment of the HDL description of the hardware designs.
[0026] The invention can be implemented in numerous ways including, a method, system, device, graphical user interface and computer readable medium. Several embodiments of the invention are discussed below.
[0027] As a method for facilitating debugging of a fabricated integrated circuit, one embodiment of the invention includes at least the acts of: receiving a high level hardware description language (HDL) description or a representation derived therefrom for electronic circuitry to be produced within the fabricated integrated circuit; displaying the high level HDL description for the electronic circuitry on a display device associated with a user; determining aspects of the electronic circuitry to be examined or modified during debugging of the fabricated integrated circuit, such determining operates to determine the aspects of the electronic circuitry through selections made with respect to the high level HDL description for the electronic circuitry; displaying, on the display device, a visual indication of the selections that have been made with respect to the high level HDL description for the electronic circuitry; determining design instrumentation circuitry based on the aspects of the electronic circuitry determined to be examined or modified; and incorporating the design instrumentation circuitry into the electronic circuitry, thereby facilitating debugging of the fabricated integrated circuit.
[0028] As a graphical user interface for instrumenting or debugging an electronic system design, one embodiment of the invention includes at least: a hardware description language (HDL) code pane that displays HDL code describing the electronic system design; and a design navigation pane that displays a navigable, hierarchical description of the electronic system design.
[0029] As a computer readable medium including at least computer program code for facilitating debugging of a fabricated integrated circuit, one embodiment of the invention includes at least: computer program code for receiving a high level hardware description language (HDL) description or a representation derived therefrom for electronic circuitry to be produced within the fabricated integrated circuit; computer program code for displaying the high level HDL description for the electronic circuitry associated with a user; computer program code for determining aspects of the electronic circuitry to be examined or modified during debugging of the fabricated integrated circuit, the aspects of the electronic circuitry being determined through selections made with respect to the high level HDL description for the electronic circuitry; computer program code for displaying a visual indication of the selections that have been made with respect to the high level HDL description for the electronic circuitry; computer program code for determining design instrumentation circuitry based on the aspects of the electronic circuitry determined to be examined or modified; and computer program code for incorporating the design instrumentation circuitry into the electronic circuitry, thereby facilitating debugging of the fabricated integrated circuit.
[0030] Other aspects and advantages of the invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings which illustrate, by way of example, the principles of the invention.
BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The invention will be readily understood by the following detailed description in conjunction with the accompanying drawings, wherein like reference numerals designate like structural elements, and in which:
[0032] FIG. 1A is a block diagram of a hardware debugging system according to one embodiment of the invention.
[0033] FIG. 1B is a block diagram of a hardware debugging system according to another embodiment of the invention.
[0034] FIG. 2 is a flow diagram of basic instrumentation processing according to one embodiment of the invention.
[0035] FIG. 3 is a block diagram of an instrumentation system according to one embodiment of the invention.
[0036] FIGS. 4A and 4B are flow diagrams of detailed design instrumentation processing according to one embodiment of the invention.
[0037] FIG. 5A is a flow diagram of selection processing according to one embodiment of the invention.
[0038] FIG. 5B is a flow diagram of break-point processing according to one embodiment of the invention.
[0039] FIG. 5C is a flow diagram of explicit trigger condition selection processing according to one embodiment of the invention.
[0040] FIG. 5D is a flow diagram of sampling signal selection processing according to one embodiment of the invention.
[0041] FIG. 6 is a diagram of a design instrumentation database according to one embodiment of the invention.
[0042] FIG. 7A is a block diagram of an instrumentation system according to one embodiment of the invention.
[0043] FIG. 7B is a diagram of a hard block resolution system according to one embodiment of the invention.
[0044] FIG. 8 is a block diagram of a representative Design Instrumentation Circuit (DIC) according to one embodiment of the invention.
[0045] FIG. 9 describes a representative generic configurable circuitry which can implement design sampling and design patching according to one embodiment of the invention.
[0046] FIG. 10 illustrates a representative generic configurable trigger detection circuit according to one embodiment of the invention.
[0047] FIG. 11 illustrates a representative state based Finite State Machine design control circuit according to one embodiment of the invention.
[0048] FIG. 12 illustrates a representative transition based Finite State Machine design control circuit according to one embodiment of the invention.
[0049] FIG. 13 illustrates a representative data-path register design control circuit according to one embodiment of the invention.
[0050] FIG. 14 illustrates a representative part of the design control circuit according to one embodiment of the invention.
[0051] FIG. 15 is a block diagram of a portion of an instrumentation system which includes a cross-reference analysis module and a cross-reference database according to one embodiment of the invention.
[0052] FIG. 16 is a block diagram of a portion of an instrumentation system which includes a DFT analysis module according to one embodiment of the invention.
[0053] FIG. 17 is a data flow diagram illustrating DIC creation processing according to one embodiment of the invention.
[0054] FIG. 18 is a flow diagram of HDL-based hardware debugging processing according to one embodiment of the invention.
[0055] FIGS. 19-1 and 19-2 illustrate a data flow diagram of a debugging process performed by a HDL-based hardware debugger according to one embodiment of the invention.
[0056] FIG. 20 is a block diagram of a hardware/software co-debugging system according to one embodiment of the invention.
[0057] FIG. 21 is a block diagram of a hardware/software co-debugging system according to one embodiment of the invention.
[0058] FIG. 22 is a flow diagram of a design instrumentation user interface according to one embodiment of the invention. FIG. 23 is a flow diagram of a HDL-based hardware debugger user interface according to one embodiment of the invention.
[0059] FIG. 24 is a block diagram of resource sharing in design instrumentation circuitry according to one embodiment of the invention.
[0060] FIG. 25 is a block diagram of a JTAG chain of multiple instances of design instrumentation circuitry according to one embodiment of the invention.
[0061] FIG. 26 is a flow diagram a HDL-based hardware debugging method according to one embodiment of the invention.
[0062] FIG. 27 is a flow diagram of a HDL-based hardware debugging method in conjunction with multi-chip partitioning according to one embodiment of the invention.
[0063] FIG. 28 is a flow diagram of a HDL-based hardware debugging method in conjunction with multi-chip partitioning according to one embodiment of the invention.
[0064] FIG. 29 is a screen-shot of a design instrumentation graphical user interface showing a tagged HDL source file according to one embodiment of the invention.
[0065] FIG. 30 is a screen-shot of a design instrumentation graphical user interface showing selected HDL source file tags according to one embodiment of the invention.
[0066] FIG. 31 is a screen-shot of a design instrumentation graphical user interface showing additional selections of HDL source file tags according to one embodiment of the invention.
[0067] FIG. 32 is a screen-shot of a design instrumentation graphical user interface showing additional selections of HDL source file tags according to one embodiment of the invention.
[0068] FIG. 33 is a screen-shot of a design instrumentation graphical user interface showing HDL source file tags of selected break-points according to one embodiment of the invention.
[0069] FIG. 34 is a screen-shot of a design instrumentation graphical user interface showing HDL source file tags of additional selected break-points according to one embodiment of the invention.
[0070] FIG. 35 is a screen-shot of a design instrumentation graphical user interface showing a selection menu for HDL source files according to one embodiment of the invention.
[0071] FIG. 36 is a screen-shot of a HDL-based hardware debugging graphical user interface showing HDL source file tags of design instrumentation according to one embodiment of the invention.
[0072] FIG. 37 is a screen-shot of a HDL-based hardware debugging graphical user interface showing activated HDL source file tags according to one embodiment of the invention.
[0073] FIG. 38 is a screen-shot of a HDL-based hardware debugging graphical user interface showing HDL source file tags of back-annotated sample data according to one embodiment of the invention.
[0074] FIG. 39 is a screen-shot of a HDL-based hardware debugging graphical user interface showing a menu for entering watch-points according to one embodiment of the invention.
[0075] FIG. 40 is a screen-shot of a HDL-based hardware debugging graphical user interface showing a watch-point menu according to one embodiment of the invention.
[0076] FIG. 41 is a screen-shot of a HDL-based hardware debugging graphical user interface showing an activated watch-point according to one embodiment of the invention.
[0077] FIG. 42 is a screen-shot of a HDL-based hardware debugging graphical user interface showing HDL source file tags of back-annotated sample data according to one embodiment of the invention.
[0078] FIG. 43 is a block diagram of design instrumentation circuitry for a HDL design that contains folded hierarchy.
[0079] FIGS. 44-1, 44-2 and 44-3 are exemplary VHDL designs that contain folded hierarchy.
[0080] FIGS. 45-1, 45-2 and 45-3 are instrumented and annotated versions of the exemplary VHDL designs that contain folded hierarchy.
DETAILED DESCRIPTION OF THE INVENTION
[0081] The present invention relates to techniques and systems for analysis, diagnosis and debugging fabricated hardware designs at a Hardware Description Language (HDL) level. Although the hardware designs (which were designed in HDL) have been fabricated in integrated circuit products with limited input/output pins, the invention enables the hardware designs within the integrated circuit products to be comprehensively analyzed, diagnosed, and debugged at the HDL level at speed. The ability to debug hardware designs at the HDL level facilitates correction or adjustment to the HDL of the hardware designs.
[0082] The following discussions will be made clearer by a brief review of the relevant terminology as it is typically (but not exclusively) used. Accordingly, to assist readers in understanding the terminology used herein, the following definitions are provided.
[0083] "Software" is defined as but not limited to programming language content written using a programming language. Examples of programming languages include C, C++, Basic, assembly, and Java.
[0084] "HDL" is a Hardware Description Language. A hardware description language is defined as any programming language that can describe the hardware portion of an electronic system. Examples of HDLs include VHDL which is described in the IEEE Standard VHDL Language Reference Manual available from the Institute of Electrical and Electronic Engineers in Piscataway, N.J., which is hereby incorporated by reference; Verilog HDL which is described in Hardware Modeling with Verilog HDL by Eliezer Sternheim, Rajvir Singh, and Yatin Trivedi, published by Automata Publishing Company, Palo Alto, Calif., 1990, which is hereby incorporated by reference; the various extensions of Verilog HDL, for example, OVL or SystemVerilog as, for example, described in "SystemVerilog 3.0--Accellera's Extensions to Verilog", both published by the Accellera Organization, Inc. in Napa Calif.; the SuperLog language from Co-Design Automation in Los Altos, Calif.; the Sugar verification language, originally developed by IBM Haifa Research Lab, Haifa, Israel; the "e" Verification Language from Verisity, Inc. in Mountain View, Calif.; and SystemC which stems from the Open SystemC Initiative (OSCI) originally started by Synopsys, Inc. of Mountain View, Calif. General purpose programming languages such as JAVA, C++, C, and assembly languages may also be used as a HDL.
[0085] A "high level HDL description" is a HDL description in which at least a portion of the description is at register transfer level (RTL) or higher. For VHDL this synthesizable, register transfer level subset is described in the IEEE 1076.6-1999 Standard for VHDL Register Transfer Level (RTL) Synthesis, available from the Institute of Electrical and Electronic Engineers in Piscataway, N.J., which is hereby incorporated by reference. The synthesizable register transfer level subset of the Verilog HDL is described in "Verilog HDL: A Guide to Digital Design and Synthesis" by Samir Palnitkar, SunSoft Press, 1996.
[0086] A "RAM" is a Random Access Memory--defined as an electronic component capable of storing data.
[0087] "ASIC" is an Application Specific Integrated Circuit. An ASIC device is an electronic component of a system. ASICs are custom devices created for a specific purpose within the electronic system. ASIC devices are easier and faster to create with respect to a full custom semiconductor device. An ASIC may be described using HDL and implemented using synthesis.
[0088] An "FPGA" is a Field Programmable Gate Array. FPGAs are electronic components that have a configurable function. These devices are able to change their functionality via an information stream transferred to the device. These electronic components are available from a number of different suppliers in a wide range of sizes and speeds. One example of these devices are the Virtex FPGA devices from Xilinx, Inc. located in San Jose, Calif. An FPGA design may be described using HDL and implemented using synthesis.
[0089] A "Central Processing Unit" or "CPU" is circuitry controlling the interpretation and execution of software programmed instructions, performs arithmetic and logical operations on data, and controls input/output functions. For the following descriptions the term CPU will be used to also denote other processing elements such as microprocessors, digital signal processors, microcontrollers, etc.
[0090] A "register" is an element in digital circuitry which can store one or more bits. Examples for registers are the various types of flip-flops and latches.
[0091] A "PLD" is an Programmable Logic Device. PLDs are electronic components that have a configurable function. These devices are able to change their functionality via an information stream transferred to the device. These electronic components are available from a number of different suppliers in a wide range of sizes and speeds. One example of these devices are the Apex PLD devices from Altera Corporation in San Jose, Calif. A PLD design may be described using HDL and implemented using synthesis.
[0092] "Electronic Components" are defined as but not limited to, transistors, logic gates, integrated circuits, semi-custom integrated circuits, full custom integrated circuits, application specific integrated circuits (ASICs), gate arrays, programmable logic devices (PLDs), field programmable gate arrays (FPGAs), CPUs, Random Access Memory (RAM), mixed signal integrated circuits, systems on a chip (SOC), and systems on a printed circuit board.
[0093] An "Electronic System" is defined as a system that contains one or more digital and/or analog Electronic Components connected together to perform specific operations or functions. An Electronic System can be implemented entirely of hardware (Electronic Components) or consist of a mix of hardware and software (programming language content).
[0094] "Mixed-signal designs" are defined as Electronic System designs which incorporate both digital and analog signals.
[0095] The "HDL Design" is referred to as the portion of the electronic system which is described in HDL and implemented in hardware. It is also referred to as the "Design under Test" (DUT).
[0096] An "SOC" is a System On Chip. A SOC is defined as a device large enough to contain an entire electronic system implementation. SOC devices can integrate a number of electronic devices into one device.
[0097] An "HDL description" is the textual description of an HDL Design.
[0098] "HDL source code" is referring to the text files which contain the HDL description.
[0099] An "HDL identifier" is an object in an HDL description which represents a signal, a set of signals, a storage element, or a set of storage elements and which can take a value from a set of possible values. Each HDL identifier is associated with a particular scope defined by the syntax of the underlying hardware description language.
[0100] A "Technology Mapping Process" is defined as the process of transforming a particular representation of an electronic design into a design consisting entirely of primitive electronic elements from a design library for a target technology. The representation of said electronic design from which the Technology Mapping Process begins is dependent on the particular Technology Mapping Process being employed. However, said representation usually consists of simple boolean elements. For example, said representation may consist entirely of an interconnected set of 2-input/1-output logic elements with each said element performing the NAND function. An example of a tool that performs the Technology Mapping Process is Design Compiler from Synopsys, Inc. in Mountain View, Calif.
[0101] "Synthesis" is defined as the process of creating an electronic implementation from the functional description of a system. An example of a tool that performs this operation is Design Compiler from Synopsys in Mountain View, Calif. which reads electronic system descriptions written in a synthesizable subset of VHDL and Verilog and produces a technology mapped design as an output.
[0102] "Behavioral HDL" is an HDL description at an algorithmic level of abstraction in which neither the timing behavior nor the structure of the HDL Design is explicitly described.
[0103] "Behavioral synthesis" transforms a behavioral HDL description into a register transfer level (RTL) description where the timing behavior and the structure of the HDL Design is fixed. This RTL description is then processed in synthesis and technology mapping. An example of a tool that performs behavioral synthesis is Behavioral Compiler from Synopsys, Inc. of Mountain View, Calif.
[0104] A "System Clock" is defined as a main timekeeping signal in a design. All operations that are relative to the System Clock will proceed when the System Clock becomes active.
[0105] "Constraints" are defined as limits placed on parameters for the implementation of an electronic system. Parameters of an electronic system can include but are not limited to register to register propagation delay, system clock frequency, primitive element count, and power consumption. These constraints can be used by synthesis tools to guide the implementation of the electronic design.
[0106] "Fabrication" is the process of transforming a synthesized and technology mapped design into one or more devices of the target technology. For example, the fabrication of ASICs involves manufacturing and the fabrication of FPGAs and PLDs involves device configuration.
[0107] "DFT" is Design-for-test. DFT is defined as a process in which an electronic system designer will include structures in the electronic system that facilitates manufacturing testing.
[0108] "Design Rule Check" (DRC) are checks performed before integrated circuit manufacturing to ensure that in the placed and routed technology mapped design none of the rules of the target technology process is violated. Examples for such DRC are checks for shorts, spacing violations, or other design-rule problems between logic cells. An example for a tool that does DRC is Dracula from Cadence Design Systems, Inc. in San Jose, Calif.
[0109] A "Functional Specification" is defined as the documentation that describes the necessary features and operations of a system.
[0110] A "functional failure" is a behavior of a design which does not meet the functional specification which was used in the creation of the design. Every step in the design process can potentially cause a functional failure. Functional failures can be classified depending on which step of the design process caused the functional failure.
[0111] A "fault" is a specific type of functional failure. This type of failure is due to one or more manufacturing defects causing a functional failure in the fabricated design.
[0112] A "design error" is a specific type of functional failure where the HDL description's behavior did not match the functional specification.
[0113] A "tool error" is a specific type of functional failure which was introduced by design tools because the HDL description was not properly processed such that the functional specification is not met by the implementation.
[0114] An "environment error" is a specific type of functional failure caused by a particular combination of environmental parameters such as temperature, humidity, pressure, etc.
[0115] A "Functional Simulator" is a tool that mimics the functional behavior of a model of an electronic system which is described using HDL.
[0116] A "Testbench" is defined as an electronic system description that presents stimulus to and/or gathers information from the target electronic system design to be verified. In some cases the testbench ignores the response from the target electronic system design. A testbench is used to mimic the behavior of the target environment in which the electronic system being developed will operate. A testbench may comprise both hardware and software.
[0117] A "Target Environment" is the system the electronic system is specified to interact with and/or to run in. A target environment may comprise both hardware and software.
[0118] The "Target Speed" of an electronic system is the speed and/or the speed range the electronic system is specified to run at. Examples for measures for the target speed and the speed range are clock frequency, response time, time to propagate, and cycle time.
[0119] "Debugging" is the process of comparing the behavior of an implementation of the electronic system to the electronic system functional specification. The purpose of debugging is to find causes and remedies for functional failures.
[0120] "Co-Debugging" or "hardware/software co-debugging" is defined as the process of debugging the software and hardware of an electronic system concurrently.
[0121] A "FSM" is Finite State Machine--defined as an electronic system control structure. The design and implementation of FSM is described in great detail in Synthesis and Optimization of Digital Circuits, by Giovanni DeMicheli, McGraw Hill, 1994.
[0122] A "HDL Building Block" is a functional unit of an HDL Design from which the HDL Design is constructed. A HDL Building Block (BB) performs calculations on the signals to which it is connected and communicates with other BBs in the design. The communication is through connecting internal signals of a BB to communication ports of the BB and/or connecting internal signals of the BB to communication ports of other BBs in the HDL Design. Examples of BBs are Entities in the VHDL language and Modules in the Verilog language.
[0123] A "Hard Block" is an electronic system which has a pre-defined functionality and which can be incorporated into another electronic system. Commonly, the form of the Hard Block is such that the functionality of the Hard Block can not be altered. An example of a hard block is an HDL Design which implements a industry standard bus controller.
[0124] A "Design State" is defined as the logical values taken by the storage elements of the design at a particular time, combined with the logical values taken by the inputs of the design taken at the same particular time.
[0125] The "System State" or "State of the System" is a synonym for "Design State."
[0126] "Real-time" means a task, process or response occurs substantially immediately. The term is used to describe a number of different computer features. For example, real-time operating systems are systems that respond to input immediately. Real-time is also used for describing tasks in which the computer must react to a steady flow of new information without interruption. Real-time can also refer to events simulated by a computer at the same speed that they would occur in real life.
[0127] Embodiments of this aspect of the invention are discussed below with reference to FIGS. 1A-45-3. However, those skilled in the art will readily appreciate that the detailed description given herein with respect to these figures is for explanatory purposes as the invention extends beyond these limited embodiments.
[0128] FIG. 1A is a block diagram of a hardware debugging system 100
according to one embodiment of the invention. The hardware debugging system 100 operates to debug a hardware product referred to herein as a Device Under Test (DUT) 102. The DUT 102 is typically part of a larger hardware product referred to as an electronic system 104. The DUT 102 can pertain to a single integrated circuit chip, multiple integrated circuit chips, a system on a chip, or a system on a printed circuit board.
[0129] According to the invention, the DUT 102 includes Design Instrumentation Circuitry (DIC) 106. The DIC 106 is provided within the DUT 102 in order to facilitate debugging of the DUT 102. The DIC 106 can be provided within the DUT 106 in either a centralized or distributed manner.
[0130] The hardware debugging system 100 operates to determine the DIC 106
that is provided within the DUT 102. In this regard, an original HDL description 108 of the electronic system 104 is received at an instrumentor 110. The instrumentor 110 modifies or alters the original HDL description 108 to produce an instrumented HDL description 112. The instrumented HDL description 112 represents not only the electronic system 104 with the DUT 102 provided therein, but also the DIC 106 that is provided within the DUT 102. The instrumentor 110 also stores DIC information to a design instrumentation database 114. By storing the DIC information in the design instrumentation database 114, the hardware-based debugging of the DUT 102 is facilitated.
[0131] The hardware debugging system 100 also includes synthesis and place&route systems 116. The synthesis and place&route systems 116
receives the instrumented HDL description 112 and performs conventional synthesis as well as place&route operations in order to produce an instrumented design 118. Although not shown in FIG. 1A, other additional tools can be utilized to produce or enhance the instrumented design 118. Examples of additional tools include a Design-For-Test (DFT) tool or a Design Rule Check (DRC) tool. The instrumented design 118 represents a description (e.g., design files) of the electronic system 104 that would be thereafter fabricated. Hence, once the instrumented design 118 is available, fabrication 120 can be performed. The fabrication 120 produces the electronic system 104 having the DUT 102 with the DIC 106 provided therein. Fabrication is the process of transforming a synthesized and technology mapped design (e.g., the instrumented design 118) into one or more devices of the target technology. For example, if the target technology is Application Specific Integrated Circuits (ASICs) then the fabrication involves manufacturing, and if the target technology is Field Programmable Gate Arrays (FPGAs) or Programmable Logic Devices (PLDs) the fabrication involves device configuration.
[0132] At this point, the electronic system 104 is a hardware product that has been produced. This hardware product can then be debugged using a HDL-based hardware debugger 122. More particularly, the HDL-based hardware debugger 122 couples to the DIC 106 so that it is able to communicate with the DIC 106 when debugging the DUT 102. The HDL-based hardware debugger 122 also couples to the design instrumentation database 114 so that access to the DIC information is available. As a result, the HDL-based hardware debugger 122 enables a user to debug the DUT 102
and/or hardware and/or software interacting with the DUT 102 in close relation to the original HDL description 108. Further, in one embodiment, debugging can be performed while the electronic system 104 and the DUT 102 operate in the target environment, at target speed.
[0133] FIG. 1B is a block diagram of a hardware debugging system 150
according to another embodiment of the invention. The hardware debugging system 150 is similar to the hardware debugging system 100 and includes many of the same components. Hence, the hardware debugging system 150
enables a user of the HDL-based hardware debugger 122 to debug the DUT 102 of the electronic system 104 and/or hardware and/or software interacting with the DUT 102, as noted above. However, the hardware debugging system 150 includes a synthesis and place&route system 152 that includes an instrumentor 154. Hence, the original HDL description 108 is supplied to the synthesis and place&route system 152. The synthesis and place&route system 152 can then produce the instrumented design 118 while using not only synthesis and place&route tools but also the instrumentor 154. In this embodiment, the instrumentor 154 is able to be embedded within synthesis and place&route system 152. Here, the instrumentor 154
assists with producing the instrumented design 118 which represents the electronic system 104 having the DIC 106 provided within the DUT 102. However, with the hardware debugging system 150, the original HDL description 108 need not be modified to produce an instrumented HDL description.
[0134] FIG. 2 is a flow diagram of basic instrumentation processing 200
according to one embodiment of the invention. The basic instrumentation processing 200 is, for example, performed by the instrumentor 110
illustrated in FIG. 1A or the instrumentor 154 illustrated in FIG. 1B.
[0135] The basic instrumentation processing 200 initially receives 202 a HDL description for an electronic system. The HDL description is then analyzed 203 to understand the characteristics of the electronic system. Next, parts (or portions) of the electronic system that are to be examined and/or modified are determined 204. Typically, the parts of the electronic system to be examined and/or modified (e.g., instrumented) are within a DUT such as the DUT 102 illustrated in FIGS. 1A and 1B. Hence, the parts of the electronic system to be examined and/or modified represent various signals and/or components within the DUT. After the parts of the electronic system to be examined and/or modified have been determined 204, design instrumentation circuitry (DIC) is generated 206. Preferably, the DIC is determined 204 based on the parts of the electronic system to be examined and/or modified. In this regard, the DIC can be at least partially customized to the application such as the amount or degree of testing or debugging desired. Thereafter, the DIC is incorporated 208 into the electronic system. The DIC can be incorporated 208 into the electronic system (namely, the DUT) in various ways. In one embodiment, the DIC can be incorporated by adding HDL to the original HDL for the electronic system. In another embodiment, the DIC can be incorporated by modifying a netlist description for the electronic system. Following the operation 208, the basic instrumentation processing 200 is complete and ends.
[0136] Design instrumentation (DI) is a process by which a HDL description of an electronic system is analyzed, and then a DIC computed. The DIC is thereafter incorporated (e.g., added) into the electronic system to facilitate debugging. The DIC can be added to the electronic system in a variety of ways. In one embodiment, DIC can be added to the electronic system by adding an HDL description of the DIC to the HDL description of the electronic system. In another embodiment, the DIC can be added to the electronic system during synthesis. The DIC provides mechanisms to control the examination and/or modification of a running electronic system. Thus, the DIC allows a system to analyze, diagnose, and/or debug the DUT by giving detailed and accurate information about its current state of operation, as well as the state history.
[0137] FIG. 3 is a block diagram of an instrumentation system 300
according to one embodiment of the invention. The instrumentation system 300 operates to perform design instrumentation operations to produce an appropriate DIC.
[0138] The instrumentation system 300 includes an instrumentor 302. The instrumentor 302 operates to determine the appropriate DIC for the electronic system (namely, the DUT) that is to be eventually hardware debugged. The instrumentor 302 receives an original HDL description 304
as well as instrumentation directives 306. The instrumentation directives 306 are instructions to the instrumentor 302 that inform the instrumentor 302 of the portions, parts or areas of the original HDL description 304
that are to be examined and/or modified. The instrumentation directives 306 can be predetermined or interactively provided by a user through a user interface. Additionally, the instrumentor 302 can further receive design constraints 308, Design For Test (DFT) information 310, instrumented pre-designed blocks 312 and DIC template(s) 314.
[0139] The design constraints 308 are constraints on the particular design associated with the original HDL description 304. More particularly, design constraints are limits placed on parameters for an implementation of an electronic system. Some examples of the parameters that can be limited by design constraints include register-to-register propagation delay, system clock frequency, primitive element count, and power consumption. The constraints on the parameters are used by synthesis and place&route tools to guide the implementation of the electronic design.
[0140] The DFT information 310 is information about features (e.g., structures) of the original HDL description 304 that pertain to testing. The DFT information 310 is used to facilitate manufacturing testing. For example, the DFT information 310 can provide a description of a scan-chain provided within the original HDL description 304. The instrumentor 302 can utilize portions of the DFT information 310 to reduce the circuitry required for the DIC.
[0141] The DIC can make use of previously instrumented pre-designed blocks 312. In case the electronic system contains pre-designed blocks which have been instrumented, the DIC can communicate with the previously instrumented pre-designed blocks 312 to facilitate their debugging. The DIC template(s) 314 provide one or more templates for the instrumentor 302 to utilize when producing the DIC.
[0142] The instrumentor 302 outputs an instrumented description 316. In one embodiment, the instrumented description 316 can be represented as an instrumented HDL description in which the original HDL description 304
has been enhanced to include a HDL description of the DIC (see FIG. 1A). In another embodiment, the instrumented description 316 can represent an instrumented netlist (see FIG. 1B). The instrumentor 302 also produces an optional DIC HDL description 318. The DIC HDL description 318 can be utilized by a functional simulator or synthesis and place&route tools. The instrumentor 302 can also produce an optional DIC simulation model 322 that permits functional simulation of the instrumented description 316. Still further, the instrumentor 302 can output synthesis and place&route constraints 324 and modified DFT information 326. The synthesis and place&route constraints 324 can be utilized by the synthesis and place&route tools. The modified DFT information 326 can also be used by the synthesis and place&route tools, so that the resulting electronic system is able to be tested as originally designed.
[0143] The instrumentation system 300 also includes a design instrumentation database 320 that stores instrumentation information. The instrumentation information includes information on the types of instrumentations that have been done, the DIC and other information as explained in greater detail below. As noted above, an HDL-based hardware debugger (e.g., debugger 122) eventually utilizes the DIC information stored in the design instrumentation database 320 when performing hardware debugging of the electronic system. Additional details on the design instrumentation database 320 are provided in FIG. 6 below.
[0144] FIGS. 4A and 4B are flow diagrams of detailed design instrumentation processing 400 according to one embodiment of the invention. The detailed design instrumentation processing 400 is, for example, performed by the instrumentor 110 illustrated in FIG. 1A, the instrumentor 154 illustrated in FIG. 1B, or the instrumentor 302
illustrated in FIG. 3.
[0145] The detailed design instrumentation processing 400 initially receives 402 a HDL description of an electronic system. The HDL description is then parsed and analyzed 404. The analysis 404 of the HDL description can identify portions that cannot be instrumented or that can only be instrumented in certain ways. The result of the analysis 404 can be used to determine whether particular instrumentation directives are valid, and thus can be followed by the instrumentor.
[0146] Additionally, one or more of design constraints, DFT information, predetermined instrumentation directives, or pre-designed blocks may also optionally be received 406. Then, instrumentation directives are determined 408. Here, instrumentation directives can be predetermined and thus provided or can be determined through user interaction. FIGS. 5A-5D, discussed below, pertain to user interaction to produce instrumentation directives.
[0147] After the instrumentation directives are determined 408, a customized DIC is produced 410 based on the HDL description and the instrumentation directives. Hence, the customized DIC is tailored to the particular HDL description and the particular instrumentation directives. By tailoring the DIC to the particular HDL description and the particular instrumentation directives, the customized DIC makes efficient use of its circuitry. Since the DIC consumes area (e.g., die space) on the hardware product (e.g., semiconductor chip), making the customized DIC efficient and compact is advantageous. In producing the customized DIC, the detailed design instrumentation processing 400 is able to reuse pre-designed blocks that have already been instrumented. In other words, the customized DIC can communicate with existing DICs of pre-designed blocks that represent other portions of the electronic system (or even external systems).
[0148] Additionally, the DIC can be optimized 412 to reduce hardware overhead and/or maximize coverage. Here, the optimization 412 to the DIC enables the hardware overhead associated with the DIC to be reduced which is advantageous in producing or using integrated circuit products. For example, cost analysis can be performed during the optimization to explore the different structures in the context of a given implementation technology and given design constraints. Variations of the DIC can thus be explored in order to minimize the overhead of the DIC on the hardware in terms of area, delay, power consumption, routability, and/or testability. Variations of the DIC can be described via DIC templates. The optimization 412 can also try to increase the effects of the instrumentation with regards to the hardware overhead. For example, if some certain signals can be examined, some other signals may also be able to be examined without any or minimal hardware overhead.
[0149] Next, a decision 414 determines whether design constraints have been provided. Typically, the design constraints are provided in a file which contains specifications for area, delay, power consumption, routability and testability. When the decision 414 determines that design constraints have been provided, then the DIC may be modified 416 in view of the design constraints. Also, modifications to the design constraints may be performed so that the overall design of the electronic system (including the DIC) complies with the intent of the original design constraints. For example, timing constraints may be changed to reflect the insertion of the DIC. In addition, additional design constraints might be generated, which, for example, may be used to guide synthesis and place&route tools in optimizing the DIC.
[0150] Following operation 416, as well as following the decision 414 when design constraints are not provided, a decision 418 determines whether DFT information has been provided. When the decision 418 determines that DFT information has been provided, then the DFT information is complied with or reused 420. When complied with, the detailed design instrumentation processing 400 renders the customized DIC compatible or compliant with the DFT information (e.g., existing DFT structures in the design). For example, scan-chains or boundary-scans can be provided or modified to take into account the DIC. Alternatively, when the DFT information is reused, the customized DIC can make use of portions of the circuitry made available through the DFT information and thereby make use of existing circuitry. The modifications to the DFT information can reflect the ability of the DIC to utilize portions of the circuitry within the electronic system associated with the DFT information as well as with the ability to modify the DFT information to preserve the intent of the designer after the DIC is included within the electronic system.
[0151] Following the operation 420, as well as following the decision 418
when the DFT information is not provided, a decision 422 determines whether instrumented, pre-designed blocks have been provided. When the decision 422 determines that instrumented, pre-determined blocks have been provided, then the DIC of each instrumented, pre-designed block is connected 424 to the current DIC. This facilitates debugging of the electronic system which contains pre-designed blocks.
[0152] Following operation 424, as well as following the decision 422 when instrumented, pre-designed blocks are not provided, DIC information is stored 426 to a design instrumentation database. The DIC information includes a description of the DIC, the instrumentation directives, and DIC connectivity information. The DIC information can also include cross-reference data that relates elements in the design of the electronic system (i.e., hardware implementation) to and from the HDL description. Then, the customized DIC can then be added 428 to the electronic system. The customized DIC can be added 428 to the electronic system in a variety of different ways. For example, with respect to an embodiment such as illustrated in FIG. 1A, the customized DIC can be added 428 to the electronic system by producing the instrumented HDL description which describes the electronic system with the DIC included therein. Alternatively, with respect to an embodiment such as illustrated in FIG. 1B, the customized DIC can be added to the electronic system by modifying a netlist that defines the electronic system.
[0153] Following operation 428 the detailed design instrumentation processing 400 operates to produce and output 430 the instrumented description, an optional DIC simulation model and an optional DIC HDL description. The DIC simulation model can be used by a simulator when functionally simulating the operation of the DUT. The DIC HDL description may for example also be used for simulation. Following the operation 430, the detailed design instrumentation processing 400 is complete and ends.
[0154] As noted above, the instrumentation directives can be predetermined and thus provided or can be determined through user interaction. When the instrumentation directives are predetermined, they can be obtained from a design instrumentation file. In one embodiment, the instrumentation directives specify design visibility, design patching and design control criteria for particular portions of the design for the electronic system. Design Visibility (DV) is monitoring the entire or partial state of the DUT at, and relative to, predetermined events. An important aspect of DV is relating the states of operation back to identifiers in the original HDL description for examination during HDL-based hardware debugging. In one embodiment, DV is done by sampling the values of one or more signals of the DUT for a particular time interval determined by one or more predetermined events. The events are determined by Design Control which is described below. Design Visibility serves to monitor the state of operation of the DUT, but does not alter the DUT's behavior in any way. However, in some situations, it is advantageous to have a method to alter the behavior of the DUT after the hardware has been fabricated. Design Patching (DP) is to alter the behavior of the DUT to a predetermined particular desired state at predetermined events. The events are determined by Design Control which is described below. A particular desired state of a DUT is a particular setting of the values of all or a subset of all storage components in the DUT.
[0155] Design Control (DC) provides the designer with a method to specify the events that control DV and DP. DC can be accomplished by one or more trigger conditions. A trigger condition is a conditional expression comprising HDL identifiers where the conditional expression denotes a combination comprising a particular state and/or state transition, and/or history of states and/or history of state transitions, the DUT, or a portion of it, can be in. Each time a particular trigger condition is met an associated trigger event is produced. One or more trigger events can be combined to issue a particular predetermined trigger action which may control the DV and DP and may control other functions related to HDL-based hardware debugging. A unique combination comprising one or more units of DV and/or DP all controlled by the same trigger action forms a trigger action group.
[0156] A watch-point is a special case of a trigger condition which is explicitly defined using a predetermined conditional expression of HDL identifiers. A watch-point has no direct relationship with the HDL description other than its expression is made up with identifiers of the HDL description.
[0157] A break-point is a special case of a trigger condition, where the trigger condition is implicitly specified by selecting a particular source code location in the HDL description. A source code location is a unique combination comprising a file name, a line number and a column position within a textual HDL description.
[0158] An error trap is a special case of a watch-point where the trigger condition describes an erroneous or undesired state of the hardware. A property check is a special case of an error trap where the trigger condition is explicitly specified by a particular property of a portion of the hardware. In the event such property is not fulfilled the trigger condition is met. Properties to be checked can either be implicitly derived from the functionality of the hardware or explicitly given by the designer of the electronic system.
[0159] FIG. 5A is a flow diagram of selection processing 500 according to one embodiment of the invention. The selection processing 500 pertains to user interaction with the HDL description to produce instrumentation directives. The selection processing 500 is, for example, performed by operation 406 illustrated in FIG. 4A when determining instrumentation directives.
[0160] The selection processing 500 initially displays 502 a HDL description. The HDL description pertains to the electronic system. At this point, a user can interact with a graphical user interface to make a specific instrumentation directive with respect to the HDL description being displayed. Optionally, to guide a user in his selections, the results of an analysis of the original HDL description can be displayed as well (e.g., operation 404, FIG. 4A). Examples of the particular types of instrumentation directives include a selection of a trigger condition, a sampling signal or a patching signal. Hence, a decision 504 determines whether a trigger condition selection has been made. When the decision 504 determines that a trigger condition selection has been made, then trigger condition selection processing 506 is performed. Alternatively, when the decision 504 determines that a trigger condition selection has not been made, then a decision 508 determines whether a sampling signal selection has been made. When the decision 508 determines that a sampling signal selection has been made, then sampling signal selection processing 510 is performed. On the other hand, when the decision 508 determines that a sampling signal selection has not been made, then a decision 512
determines whether a patching signal selection has been made. When the decision 512 determines that a patching signal selection has been made, then patching signal selection processing 514 is performed. Following any of operations 506, 510 and 514, as well as following the decision 512
when a patching signal selection has not been made, instrumentation optimization can be performed 516. The instrumentation optimization operates to consolidate the various selections so that the DIC required to implement the various trigger conditions, sampling signals and patching signals can be efficiently implemented. Following the operation 516, a decision 518 determines whether more selections are to be made by the user. When the decision 518 determines that more selections are to be made, then the selection processing 500 returns to repeat the decision 504 and subsequent operations. Alternatively, once the decision 518
determines that no more selections are to be made, the selection processing 500 is complete and ends.
[0161] The trigger condition selection processing 506 illustrated in FIG. SA can be utilized to select or establish implicit trigger conditions or explicit trigger conditions. An example of an implicit trigger condition is a break-point, and an example of an explicit trigger condition is a watch-point, or an error trap, or a property check.
[0162] FIG. 5B is a flow diagram of break-point processing 520 according to one embodiment of the invention. The break-point processing 520
represents an embodiment of the trigger condition selection processing 506 in the case in which an implicit trigger condition (namely, a break-point) is involved.
[0163] The break-point processing 520 initially identifies 522 feasible break-point conditions and types. Typically, such information is obtained by analyzing the original HDL description (e.g., operation 404, FIG. 4A). Next, the feasible break-point conditions and types are displayed 524. Here, the feasible break-point conditions and types can be displayed to a user by a user interface. At this point, a user is able to select a location within the HDL description of the electronic system where a break-point is to be set. In one embodiment, a user interface assists the user in making such a location selection with respect to the HDL description (i.e., HDL location). A decision 526 determines whether a HDL location has been selected. When the decision 526 determines that a HDL location selection has not yet been made, then the decision 526 causes the break-point processing 520 to await such a selection. Once the decision 526 determines that a HDL location has been selected, then a decision 528 determines whether the selected HDL location is permitted. In other words, the decision 528 determines whether it is valid to instrument the location within the HDL description of the electronic system with a break-point. When the decision 528 determines that the selected HDL location is not permitted, then an error message is displayed 530. On the other hand, when the decision 528 determines that the selected HDL location is permitted, then the status type of the selected break-point is updated 532. Next, break-point information is entered 534 into the trigger condition database for later processing. The break-point information comprises the HDL location of the selected break-point, and the current status type. According to one embodiment, the status type for a selected break-point is "selected".
[0164] FIG. 5C is a flow diagram of explicit trigger condition selection processing 540 according to one embodiment of the invention. As noted previously, one example of an explicit trigger condition is a watch-point. The explicit trigger condition selection processing 540
begins with a decision 542 that determines whether a trigger condition expression has been received. In one embodiment, a user interface assists the user in providing such information. The trigger condition expression defines the explicit trigger condition being set. When the trigger condition expression has not yet been received, the decision 542 causes the explicit trigger condition processing 540 to await receipt of such information (selections). When the decision 542 determines that a trigger condition expression has been received, the status type of the selected trigger condition is updated 544. For example, the status type for the selected (explicit) trigger condition is "selected". Then trigger condition information is entered 546 into the trigger condition database. The trigger condition information includes the trigger condition expression, the HDL identifiers involved in building the trigger condition expression, and a status type.
[0165] Although the break-point processing 520 and the explicit trigger condition processing 540 illustrated in FIGS. 5B and 5C pertain to selection and/or entry of trigger conditions, it should be noted that selections can also be made to de-select previously selected trigger conditions. Such processing is generally similar to the selection processing, with the major exception being that the status type of the selected trigger condition is updated to "non_selected", meaning that no instrumentation shall be performed regarding to that portion of the HDL description.
[0166] FIG. 5D is a flow diagram of sampling signal selection processing 560 according to one embodiment of the invention. The sampling signal selection processing 560 is, for example, one representative implementation of the sampling signal selection processing 510
illustrated in FIG. 5A.
[0167] The sampling signal selection processing 560 begins with a decision 562 that determines whether a signal selection has been received. Here, a user is able to select signals by selection of an HDL identifier within the HDL description of the electronic system. In one embodiment, a user interface assists the user in making such a selection with respect to the HDL description. Hence, the decision 562 determines whether such a signal selection has occurred. When the decision 562 determines that a signal selection has not yet occurred, the sampling signal selection processing 560 awaits such a selection. Once the decision 562 determines that a signal selection has been received, then a decision 564 determines whether the selected signal is to be associated with an existing trigger action group of a prior signal selection or whether it becomes a member of a new trigger action group. When decision 564 determines that the signal selection is to be associated with an existing trigger action group, a decision 566 determines whether the user has selected an existing trigger action group. In one embodiment, a user interface assists the user in making such a selection. When the decision 566
determines that a trigger action group selection has not yet been received, the sampling signal selection processing 560 awaits such a selection. Once the decision 566 determines that a trigger action group has been selected, the selected signal is associated 568 with the selected trigger action group. On the other hand, when the decision 564
determines that the selected signal shall become a member of a new trigger action group, a new trigger action group is created 570 and the selected signal is associated 568 with that new trigger action group. Following operation 568, the status type of the selected signal is updated 572. The status type for a selected signal is updated 572 to "selected", meaning that the selected signal is selected for instrumentation. Following operation 572 the selected signal is entered 570 into a signal database (see FIG. 6). Following the operation 570, the sampling signal selection processing 560 is complete and ends.
[0168] Patching signal selection processing can also be performed in a similar manner as the sampling signal selection processing 560
illustrated in FIG. 5D. In other words, the patching signal selection processing 514 illustrated in FIG. 5A can also be represented by the processing 560 illustrated in FIG. 5D. Besides selection of sampling or patching signals in accordance with the processing illustrated in FIG. 5D, similar processing can also be performed to de-select sampling or patching signals, with the major exception that the status type of the selected signal would be updated to "non_selected", meaning that no instrumentation shall be performed regarding that particular signal.
[0169] Design instrumentation databases can be structured in a variety of ways. FIG. 6 is a diagram of a design instrumentation database 600
according to one embodiment of the invention. The design instrumentation database 600 is, for example, suitable for use as the design instrumentation database 114 illustrated in FIGS. 1A and 1B or the design instrumentation database 320 illustrated in FIG. 3.
[0170] The design instrumentation database 600 includes a break-point database 602 that stores break-points. The design instrumentation database 600 also includes a signal value database 604 that stores signals within the electronic system that are to be sampled or patched. Hence, the break-points and the signal values, respectively stored in the break-point database 602 and the signal value database 604, represent instrumentation directives (e.g., design visibility, design patching and/or design control criteria) that govern the characteristics of the resulting DIC and its capabilities. Additionally, the design instrumentation database 600 includes a DIC database 606, a cross-reference database 612, and a Register-to-Physical (R2P) database 614. A representation of the resulting DIC that is produced by the instrumentor is stored in the DIC database 606. The cross-reference database 612 stores the associations of HDL identifiers (variables) within the HDL description to broaden the design visibility. The R2P database 614 stores translations from registers to physical addresses. The registers are, for example, registers of the DIC used to configure the DIC and hold the status of the DIC and the DUT during hardware debugging. Physical addresses are given for each register to access that register in its implementation inside the DIC. Further, the design instrumentation database 600 includes a text-to-netlist (T2N) database 608 and a netlist-to-text (N2T) database 610. The T2N database 608 and the N2T database 610 provide for each HDL identifier the associations between the HDL location and elements within the netlist (internal representation of the electronic system).
[0171] According to one embodiment, a design instrumentation database (for example, the design instrumentation database 114, 600) can be built using a variety of techniques and, for example, comprise the following elements:
[0172] One or more file objects each holding information referring to a HDL source file, such as a file name, an absolute path name to the (original) HDL source file, an absolute path name to the instrumented version of the HDL source file, a hardware description language the HDL source file is written in, and optional signatures of the HDL source file and/or the instrumented version of the HDL source file. For example, cyclic redundancy checking can be used to compute such signatures.
[0173] One or more source location objects each can hold information regarding a combination of a reference to a file object, a line number position and an optional column position and an optional offset (such as a character offset) within the HDL source file the file object refers to.
[0174] One or more hierarchical instance objects, each referring to a hierarchical building block, can hold information regarding one optional reference to a parent hierarchical instance object (which could be the hierarchical instance which instantiates the instance this hierarchical instance object refers to). Also included could be zero or more references to child hierarchical instance objects (where a child is defined as the hierarchical instance which is instantiated by the instance this hierarchical instance object refers to), an optional name and a reference to a source location object.
[0175] One or more signal objects which can relate to Design Visibility, each signal object can hold information regarding a qualified hierarchical path name to a signal in the HDL design, a reference to a source location object where the declaration of the corresponding signals resides, one or more references to source location objects of HDL statements which relate to the corresponding signal, an optional reference to a hierarchical instance object where the signal resides, and an optional reference to a HDL type declaration.
[0176] Zero or more break-point objects each break-point object referring to a break-point of an HDL design and each break-point object can hold at least information regarding a reference to one source location object denoting the source location of the break-point, and a reference to a hierarchical instance object denoting the hierarchical instance in which the break-point resides.
[0177] Zero or more watch-point objects each referring to one particular watch-point in the HDL design and each watch-point object can hold at least information regarding a reference to a signal object denoting the signal that the watch-point corresponds with.
[0178] In one embodiment of the invention the design instrumentation database can be implemented as a software program using object-oriented software mechanisms. In case the design instrumentation database is implemented as a software program, its elements (for example, the above-described objects) could be implemented as commands of a computer language. Each command can have one or more arguments to denote the information regarding the associated object. Having a design instrumentation database which can be described in terms of a computer software language has the advantage that such a design instrumentation database can easily be migrated and transported in between a wide variety of different computer systems, as long as the computer system supports the underlying computer software language that the design instrumentation database is written in. One example of such a computer software language that could be used for a design instrumentation database is TCL/Tk.
[0179] Storing the contents of the design instrumentation database can then be performed by generating a computer software program written in the underlying computer software language. For example, the instrumentor 110 could be used to generate such a computer program. The HDL-based hardware debugger 122 could then execute the computer program representing the Design Instrumentation database 114 to regenerate the contents of the Design Instrumentation database for further processing.
[0180] FIG. 7A is a block diagram of an instrumentation system 700
according to one embodiment of the invention. The instrumentation system 700 represents a more detailed block diagram of an instrumentor together with a design instrumentation database. For example, the instrumentation system 700 can be a more detailed embodiment of the instrumentation system 300 illustrated in FIG. 3.
[0181] The instrumentation system 700 receives a HDL description 702 of an electronic system. A Design Instrumentation (DI) graphical user interface 704 can display the HDL description on a display device. A user can interact with the graphical user interface 704 to make or enter instrumentation directives. A front-end module 706 receives the HDL description 702 and parses the HDL description 702 to form a parse-tree structure. The resulting parse-tree structure is stored in a parse-tree database 708. A code generation module 710 reads the parse-tree structure from the parse-tree database 708 and produces a hierarchical design representation associated with the electronic system. The hierarchical design representation provides a description of the designs behavior and structure, such as a hierarchical netlist. The hierarchical design representation is stored in a hierarchical design database 712. A DI optimization module 714 interacts with the information stored in the hierarchical design database 712. The information stored in the hierarchical design database 712 is also supplied to an analysis module 716. The analysis module 716 interacts with the parse-tree database 708
as well as the hierarchical design database 712 to analyze the HDL description of the electronic system design. The analysis includes control flow analysis which determines the feasible break-points which are stored in a trigger condition database 718. Control flow analysis is further described in "High-Level Synthesis" by Daniel D. Gajski et al., Kluwer Academic Publishers, 1992, which is hereby incorporated by reference. For each location in the HDL description which correlates to a control flow branch condition node a unique combination of the HDL location and the trigger condition given by the control flow condition can be added as a feasible break-point into the trigger condition database 718. The purpose of control flow analysis is to reflect that break-points can be set at very particular locations in the HDL description which pertain to HDL control flow statements.
[0182] The instrumentation system 700 also includes a location module 724
that interacts with the parse-tree database 708 and the hierarchical design database 712 to produce source code location information represented as T2N information for a T2N database 726 and N2T information for a N2T database 728. The T2N information provides a method to obtain all elements in the parse-tree database 708 or the hierarchical design database 712 which refer to an identifier at a given location in the HDL description. The N2T information provides a method to relate a given element of the parse-tree database 708 or the hierarchical design database 712 to the originating location in the HDL description. A location query manager 730 interacts with the T2N database 726 and the N2T database 728 to allow a DI manager 732 to relate a location within the HDL description 702 to an element within a netlist (i.e., the parse-tree and/or the hierarchical design representation) and vice versa. The DI manager 732 receives the instrumentation directives, processes them and adds them to the appropriate database (i.e., the trigger condition database 718 or the signal database 722). Instrumentation directives can be given using file-based DI criteria 734, interactively by the graphical user interface 704, or via pragmas in the HDL description. The use of instrumentation directives is explained in greater detail below. The DI manager 732 then interacts with the trigger condition database 718, the signal database 722, the location query manager 730, and the DI optimization module 714 to check each instrumentation directive for its validity. The information regarding the validity is available in the trigger condition database 718 and the signal database 722.
[0183] The DI optimization module 714 receives trigger conditions from the trigger condition database 718 and also receives a DIC template from a DIC template database 720. Still further, the DI optimization module 714
interacts with a signal database 722 to receive signals that are to be examined and/or modified. The DI optimization module 714 performs various optimizations regarding the instrumentation directives to reduce the hardware overhead and/or broaden the instrumentation coverage. Additional details on DI optimization are provided below.
[0184] For the above-mentioned location determinations with respect to selections, the DI manager 732 queries the location query manager 730 to refer to identifiers in the HDL description 702, elements in the parse-tree database 708, and elements in the hierarchical design database 712.
[0185] Selection status types are used to hold the selection information (i.e., the instrumentation directives) and exchange the selection information between the DI user interface 704, the DI manager 732 and the DI optimization module 714. The selection status types used for the selection of implicit trigger conditions, explicit trigger conditions, sampling selections and patching selections can comprise: feasible, selected, implied, and not_selected.
[0186] The instrumentation directives can be provided in at least three ways, namely, user-based (interactive), file-based, and via pragmas in the HDL description. The user-based approach has been described above. In general, a user (e.g., an electronic system designer) makes design visibility, design patching, and design control selections. More particularly, the designer can select in the HDL description which break-points, watch-points, error-traps, and property checks will be available for activation during HDL-based hardware debugging. These selections are stored in the trigger condition database 718. The designer also selects in the HDL description which signals shall be available for examination during HDL-based hardware debugging. These selections are stored in the signal database 722. The designer selects in the HDL description which signals shall be available for patching during HDL-based hardware debugging. These selections are stored in the signal database 722.
[0187] When instrumentation directives are provided in a file, the file-based DI criteria 734 is a human and/or computer readable rule set which describes which signals shall be made visible, which signals shall be made patchable, which break-points are enabled, and which trigger conditions shall be made detectable. The directives in the file-based DI criteria 734 may be expressed in any of the HDL languages that the system accepts as input or may be expressed in a specifically designed language. The directive to select an explicit trigger condition can, for example, comprise a keyword to denote that the selection is a trigger condition, and a conditional expression of HDL identifiers which must be met to issue a trigger event. Implicit trigger conditions, such as break-points, can, for example, be specified by a source code location in the HDL description. The directive to select a signal for sampling can, for example, comprise a keyword to denote that the selection is for a to-be-sampled signal, the unique HDL identifier of the selected signal, and an associated trigger action group. The directive to select a signal for patching can, for example, comprise a keyword to denote that the selection is for a to-be-patched signal, the unique HDL identifier of the selected signal, and an associated trigger action group. The file-based DI criteria 734 can be directly read by the DI manager 732 which stores selections of trigger conditions into the trigger condition database 718
and stores selections of signal values to be made visible and/or patchable into the signal database 722.
[0188] As noted above, the instrumentation directives can be provided via pragmas in the HDL description of an electronic system. Pragmas are HDL code fragments which are inserted into the HDL description to define design visibility, design patching and design control. These pragmas are added to the HDL description such that the behavior of the design of the electronic system is not altered. One implementation adds pragmas to a HDL description as specially-marked HDL comments. By placing the pragmas in comments, other tools which read the HDL description containing the pragmas will be unaffected. However, the front-end module 706 can recognize and interpret these pragmas inside the comments. More particularly, providing instrumentation directives via pragmas can be accomplished by the front-end module 706 recognizing the pragmas enclosed within comments and placing the appropriate information into the parse-tree database 708. This information is read by the DI manager 732
which stores the necessary information in the trigger condition database 718 and the signal database 722.
[0189] Several examples of pragmas are provided below. These pragmas are written in the form of a HDL comment with an indicator (e.g., "B2SI") to differentiate them from other comments. In the following examples, following the identifier "B2SI", the remainder of the pragma describes either a design control, or a design visibility, or a design patching directive. The exact form of the pragmas depend on the HDL language being used. The following are examples of pragmas written in Verilog HDL.
[0190] The following example shows a comment including a pragma for design control.
1
always @( a or b or c or d or e or f ) begin if( cond == 4'b1111 ) begin // B2SI trigger("trigger_name ", (a == 2'b10) && (d * e < f + 5'b1100)); end end
[0191] This pragma produces a trigger condition that is active if the expression
(a==2'b10) && (d*e<f+5'b1100)
[0192] evaluates to true. The expression has the same meaning and variable scoping as it would were it a regular HDL expression. This trigger can also be placed in the control flow of the design so the trigger will not be active unless the control flow is active. In this example, (cond==4'b111) must also be met to issue a trigger event. The trigger condition has a name ("trigger_name") so that other pragmas may refer to this trigger condition.
[0193] The following example shows a comment including a pragma for signal visibility.
2
module mod1( in1, in2, in3, out ); input in1, in2; input in3; // B2SI visible output out; ...
[0194] Here, the visibility pragma is being used to mark "in3" as visible.
[0195] The following example shows a comment including a pragma for signal patching.
3
module mod2( in1, in2, in3, out ); input in1, in2; input in3; output out; reg [1:0] aa; // B2SI patchable
[0196] Here, the patching pragma is being used to mark "aa" as patchable. The trigger condition for the sampling and/or patching can be specified by associating it with a trigger action group (by referring to a trigger name, for example "trigger_name"), or during HDL-based hardware debugging.
[0197] The optimization of the design instrumentation can enhance its effects and can reduce hardware costs of the DIC. One example of an optimization for enhancing the effects of the instrumentation is implication analysis. One example for an optimization which aims to reduce the hardware costs of the DIC is resource sharing.
[0198] The selections of various trigger conditions and signals for sampling and/or patching may potentially imply other signal selections based on their controlability and observability dependencies. Controlability and observability are, for example, commonly used concepts in Automatic Test Pattern generation of combinational and sequential logic. See D. Bhattacharya and J. P. Hayes, "Hierarchical Modeling for VLSI Circuit Testing," Boston: Kluwer, 1990, p. 159, which is hereby incorporated by reference. Implication analysis works as follows. Initially, the hierarchical design database 712 and the DI optimimization module 714 are consulted to determine whether a trigger condition with the status type" "selected" implies certain other trigger conditions. If so, the implied trigger conditions can also be detected during HDL-based hardware debugging, have their status type set to "implied", and be stored into the trigger condition database 718. Secondly, the hierarchical design database 712 and the DI optimization module 714 can be consulted to determine whether certain other signal values are implied by the selected signals. In particular, the implied signals can be derived from the selected signals plus some calculations during HDL-based hardware debugging. Each implied signal is then stored with its status type set to "implied" into the signal database 722.
[0199] Resource sharing is a widely used optimization which is, for example, used in synthesis. Although resource sharing can be performed using many different approaches, in one approach to resource sharing, the DI optimization module 714 operates to share resources in the DIC as follows. First, by consulting the DIC template database 720, the DI optimization module 714 knows about the structure and the cost model of the DIC and can determine whether trigger conditions and signals to be sampled have commonalities which can be utilized for resource sharing. Second, the hierarchical design database 712 and the DIC template database 720 can be consulted by the DI optimization module 714 when determining whether other signals should instead be sampled, since such signals imply all the selected signals, but their sampling requires less hardware overhead or leads to additional signal visibility. Third, by consulting the DIC template database 720, the DI optimization module 714
knows about the structure and the cost model of the DIC and can determine whether trigger conditions and signals to be sampled have commonalities which can be utilized for resource sharing. Fourth, by consulting the DIC template database 720, the DI optimization module 714 knows about the structure and the cost model of the DIC and can determine whether signals to be patched have commonalities which can be utilized for resource sharing.
[0200] Once the trigger conditions and the signals to be sampled and/or patched are determined, other portions of the HDL design can be integrated even if such portions are not described by a synthesizable HDL description but are available as synthesized and physically realized hard blocks, such as previously designed hard blocks. If the hard blocks are synthesized from instrumented HDL and include DIC, regardless whether the DIC is a complete or a partial, the previously inserted DIC can be re-used for debugging the hard blocks. The distinction between partial versus complete DIC is described in greater detail below.
[0201] In order for a hard block to be re-used, it should have associated DI data stored in an associated design instrumentation database. FIG. 7B is a diagram of a hard block resolution system 750 according to one embodiment of the invention. The data needed are a hard block's DIC database 752, a hard block's trigger condition database 754, a hard block's signal database 756, and optionally HDL description 758. Often, vendors of hard blocks do not want to expose the internal workings of their design by showing its HDL description (e.g., source code). To accommodate this need, the HDL description is not required to describe the entire hard block's functionality. Some minimal HDL description providing just enough text to examine signals, to set watch-point expressions for the signals, and to set break-points at HDL locations which refer to implemented trigger detection circuitry is enough to enable HDL-based hardware debugging of the hard blocks. For example, a hard block implementing a simple controller might expose the controller state variable for sampling and for triggering on its value. It might also allow a user to set a break-point when the machine makes certain transitions or receives certain signals from the circuitry to which it is connected. A hierarchy and hard block resolver 760 processes the information from the hard block's DIC database 752, the hard block's trigger condition database 754, the hard block's signal database 756 and the optional HDL description 758, and merges same into the current HDL design's DIC database 736, the trigger condition database 718, the signal database 722, and the original HDL description 702. As a result, the resolved information will be available during HDL-based hardware debugging.
[0202] The instrumentor 700 can also perform cross-reference analysis to gather and store data in the design instrumentation phase such that the HDL-based hardware debugger will be capable of examining signals in the HDL description. Additionally, if the design instrumentation optimization determines that other signals could be derived from the sampled signals, the HDL-based hardware debugger needs the HDL expressions to compute the derived signals "on the fly" from the sampled signals. The expressions are calculated during cross-reference analysis and stored in the cross-reference database 1504.
[0203] FIG. 15 is a block diagram of a portion of an instrumentation system 1500 which includes a cross-reference analysis module 1502 and a cross-reference database 1504 according to one embodiment of the invention. The cross-reference analysis module 1502 can be provided within the instrumentation system 700, and the cross-reference database 1504 can be provided within the design instrumentation database 612 and utilized by the instrumentation system 700. The cross-reference analysis module 1502 can couple to the location query manager 730, the hierarchical design database 712 and the signal database 722. The cross-reference analysis module 1502 reads signal information from the signal database 722. Each entry in the signal database 722 corresponds to one signal that is either selected or implied to be made visible. Each entry in the signal database 722 also comprises information on whether the signal is to be sampled and/or patched in the DIC or whether the signal is derived from other to-be-sampled signals. In one embodiment, for each signal that is derived from other to-be-sampled signals, the following operations are performed. First, the cross-reference analysis module 1502 queries the HDL location information of the signal from the location query manager 730. The cross-reference analysis module 1502
looks up the signal in the hierarchical design database 712 and determines the proper HDL expression to compute the derived signal from the set of sampled signals. The cross-reference analysis module 1502 then writes the HDL expression into the cross-reference database 1504.
[0204] The instrumentor 700 can also perform Design-for-Test (DFT) analysis. If the electronic system contains additional circuitry for testability such as scan-chains, boundary s