WikiPatents - Community Patent Review
Create Free Account  |  License or Sell Your Patent  |  WikiPatents Marketplace  |  WikiPatents Blog
Username:  Password:  
    
Advanced Search
Enhanced embedded logic analyzer    
United States Patent6286114   
Link to this pagehttp://www.wikipatents.com/6286114.html
Inventor(s)Veenstra; Kerry (San Jose, CA); Rangasayee; Krishna (Sunnyvale, CA); Herrmann; Alan L. (Sunnyvale, CA)
AbstractEmbedding a logic analyzer in a programmable logic device allows signals to be captured both before and after a trigger condition (breakpoint). A logic analyzer embedded within a PLD captures and stores logic signals. It unloads these signals for viewing on a computer. Using an electronic design automation (EDA) software tool running on a computer system, an engineer specifies signals of the PLD to be monitored, a breakpoint, total number of samples to be stored, number of samples to be captured after the breakpoint occurs, and a system clock signal. The EDA tool automatically inserts the logic analyzer into the electronic design of the PLD which is compiled and downloaded to configure the PLD. Using an interface connected between the PLD and the computer, the EDA tool commands the embedded logic analyzer to run. Signals are stored continuously while running in a ring buffer RAM memory. Once the breakpoint occurs, more samples are captured if desired, in addition to those signals captured before breakpoint. The EDA tool directs the logic analyzer to unload the data from its capture buffer for display on a computer. The breakpoint and sample number can be changed without recompiling. A JTAG port controls the logic analyzer. Inputs and outputs of the logic analyzer are routed to unbonded JTAG-enabled I/O cells. Alternatively, a user-implemented test data register provides a JTAG-like chain of logic elements through which control and output information is shifted. Stimulus cells provide control information to the logic analyzer, and sense cells retrieve data from the logic analyzer.



 Title Information Submit all comments and votes
 
Patent Text Patent PDF Print Page Summary File History
Plain text PDF images Print Summary File History
Drawing from US Patent 6286114
Enhanced embedded logic analyzer - US Patent 6286114 Drawing
Enhanced embedded logic analyzer
Inventor     Veenstra; Kerry (San Jose, CA); Rangasayee; Krishna (Sunnyvale, CA); Herrmann; Alan L. (Sunnyvale, CA)
Owner/Assignee     Altera Corporation (San Jose, CA)
Patent assignment
All assignments
Publication Date     September 4, 2001
Application Number     09/186,607
PAIR File History     Application Data   Transaction History
Image File Wrapper   Patent Term   Fees
Litigation
Filing Date     November 6, 1998
US Classification     714/39 703/16 714/725 714/734
Int'l Classification     G06F 011/25
Examiner     Beausoleil; Robert
Assistant Examiner     Baderman; Scott T.
Attorney/Law Firm     Beyer Weaver & Thomas, LLP
Address
Parent Case     This application claims priority of U.S. provisional patent application No. 60/065,602, filed Nov. 18, 1997, entitled "Enhanced Embedded Logic Analyzer" which is incorporated by reference. This application is a continuation-in-part of U.S. patent application No. 08/958,435, filed Oct. 27, 1997, now U.S. Pat. No. 6,182,247 entitled "Embedded Logic Analyzer For A Programmable Logic Device" which is incorporated by reference. This application is related to U.S. patent application No. 09/186,608 filed on the same date herewith, entitled "Enhanced Embedded Logic Analyzer," which is hereby incorporated by reference.
Priority Data    
USPTO Field of Search     714/39 714/34 714/30 714/725 714/733 714/734 703/16 703/15 703/17 703/28
Patent Tags     enhanced embedded logic analyzer
   
Enter a comma (,) or semicolon (;) between multiple tag words/phrases.
Describe this patent:
 Amusing   
 Clever   
 Complex   
 Efficient   
 Historic   
 Important   
 Innovative   
 Interesting   
 Practical   
 Simple   
[no votes]
Patent WIKI

Share information and news about this patent, including information and news about the technology, inventors, company, ligation and licensing.

 References Submit all comments and votes
 
*references marked with an asterisk below are user-added references
 U.S. References
 
Add a new US reference:  
ReferenceRelevancyCommentsReferenceRelevancyComments
6182247
Herrmann
714/39
Jan,2001

[0 after 0 votes]
6157210
Zaveri

Dec,2000

[0 after 0 votes]
6020758
Patel
326/40
Feb,2000

[0 after 0 votes]
6016563
Fleisher
714/725
Jan,2000

[0 after 0 votes]
6014334
Patel

Jan,2000

[0 after 0 votes]
5960191
Sample
703/28
Sep,1999

[0 after 0 votes]
5870410
Norman
714/725
Feb,1999

[0 after 0 votes]
5821771
Patel
326/38
Oct,1998

[0 after 0 votes]
5764079
Patel
326/40
Jun,1998

[0 after 0 votes]
5717699
Haag
714/725
Feb,1998

[0 after 0 votes]
5640542
Whitsel

Jun,1997

[0 after 0 votes]
5572712
Jamal
716/18
Nov,1996

[0 after 0 votes]
5568437
Jamal
365/201
Oct,1996

[0 after 0 votes]
5058114
Kuboki
714/38
Oct,1991

[0 after 0 votes]
4835736
Easterday
711/218
May,1989

[0 after 0 votes]
 Foreign References
 Other References
 Market Review Submit all comments and votes
   
Market Size
Estimate the gross annual revenues of the relevant market sector:
> $10B
$5B - $10B
$2B - $5B
$500M - $2B
$100M - $500M
$10M - $100M
$1M - $10M
$500K - $1M
$100K - $500K
< $100K
[No votes]
$0
 
$0   $2.5B   $5B   $7.5B   $10B
Market Share
Estimate the percentage of the relevant market sector this invention will capture:
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Reasonable Royalty
What percentage of gross sales should the inventor or assignee be paid?
75% - 100%
50% - 74.99%
25% - 49.99%
10 - 24.99%
5 - 9.99%
2 - 4.99%
1 - 1.99%
< 1%
[No votes]
0.0%
 
0%   25%   50%   75%   100%
Public's "Guesstimation" of Royalty Value
Market SizeN/A[No votes]
xMarket ShareN/A[No votes]
xReasonable RoyaltyN/A[No votes]

N/A

License Availablity
If you are NOT the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
License Availablity
If you ARE the owner or assignee, answer here:
Yes, license is available for purchase

No, license is not currently available



[No votes]
Competitive Advantage
Does this invention have a significant competitive advantage over similar technologies?
Yes

No



[No votes]
Most helpful competitive advantage comment
[No comments]

Commercial Alternatives
Are there viable commercial alternatives for this invention?
Yes

No



[No votes]
Most helpful commercial alternative comment
[No comments]

 Technical Review Submit all comments and votes
 Claims Submit all comments and votes
 


We claim:

1. A computer-readable medium comprising computer code for receiving sample data from a logic analyzer embedded within a programmable logic device (PLD), said computer code of said computer-readable medium effecting the following:

automatically embedding a logic analyzer within a programmable logic device (PLD);

specifying a breakpoint indicative of the state of at least one signal within said PLD;

indicating to said logic analyzer to continuously store internal signals of said PLD in a memory of said logic analyzer such that said internal signals are stored before the occurrence of said breakpoint;

receiving said stored internal signals from said logic analyzer, said stored signals representing at least signals stored before said breakpoint, whereby said stored internal signals may be viewed on a user computer.

2. A computer-readable medium as recited in claim 1 further comprising computer code for effecting the following:

determining total number of samples to be captured and number of samples to be captured after said breakpoint; and

communicating said total number of samples to be captured and said number of samples to be captured after said breakpoint to said logic analyzer, whereby once said breakpoint occurs said logic analyzer continues to capture samples equal to said number of samples to be captured after said breakpoint.

3. A computer-readable medium as recited in claim 1 wherein communication to and from said logic analyzer occurs through a JTAG port of said PLD.

4. A computer-readable medium comprising computer code for retrieving data stored in a logic analyzer embedded in a programmable logic device (PLD), said computer code of said computer-readable medium effecting the following:

compiling an electronic design and automatically inserting a logic analyzer to produce a complete design file;

programming a PLD with said complete design file, said logic analyzer being embedded in said PLD;

instructing said logic analyzer in said PLD to run such that said logic analyzer begins to continuously monitor internal nodes of said PLD and to continuously store internal signals from said internal nodes in a memory of said logic analyzer at least up to a breakpoint;

issuing a dump data request to said logic analyzer in said PLD; and

receiving said stored internal signals from said memory of said logic analyzer, said stored signals representing at least signals monitored before said breakpoint, whereby said stored internal signals may be viewed on a user computer.

5. A computer-readable medium as recited in claim 4 further comprising computer code for effecting the following:

determining total number of samples to be captured and number of samples to be captured after said breakpoint; and

communicating said total number of samples to be captured and said number of samples to be captured after said breakpoint to said logic analyzer, whereby once said breakpoint occurs said logic analyzer continues to capture samples equal to said number of samples to be captured after said breakpoint.

6. A computer-readable medium as recited in claim 4 wherein communication to and from said logic analyzer occurs through a JTAG port of said PLD.

7. A method for receiving sample data from a logic analyzer embedded within a programmable logic device (PLD), said method comprising:

automatically embedding a logic analyzer within a programmable logic device (PLD);

specifying a breakpoint indicative of the state of at least one signal within said PLD;

indicating to said logic analyzer to continuously store internal signals of said PLD in a memory of said logic analyzer such that said internal signals are stored before the occurrence of said breakpoint;

receiving said stored internal signals from said logic analyzer, said stored signals representing at least signals stored before said breakpoint, whereby said stored internal signals may be viewed on a user computer.

8. A method as recited in claim 7 further comprising:

determining total number of samples to be captured and number of samples to be captured after said breakpoint; and

communicating said total number of samples to be captured and said number of samples to be captured after said breakpoint to said logic analyzer, whereby once said breakpoint occurs said logic analyzer continues to capture samples equal to said number of samples to be captured after said breakpoint.

9. A method as recited in claim 7 wherein said steps of specifying, indicating and receiving make use a JTAG port of said PLD.

10. A method for retrieving data stored in a logic analyzer embedded in a programmable logic device (PLD), said method comprising:

compiling an electronic design and automatically inserting a logic analyzer to produce a complete design file;

programming a PLD with said complete design file, said logic analyzer being embedded in said PLD;

instructing said logic analyzer in said PLD to run such that said logic analyzer begins to continuously monitor internal nodes of said PLD and to continuously store internal signals from said internal nodes in a memory of said logic analyzer at least up to a breakpoint;

issuing a dump data request to said logic analyzer in said PLD; and

receiving said stored internal signals from said memory of said logic analyzer, said stored signals representing at least signals monitored before said breakpoint, whereby said stored internal signals may be viewed on a user computer.

11. A method as recited in claim 10 further comprising:

determining total number of samples to be captured and number of samples to be captured after said breakpoint; and

communicating said total number of samples to be captured and said number of samples to be captured after said breakpoint to said logic analyzer, whereby once said breakpoint occurs said logic analyzer continues to capture samples equal to said number of samples to be captured after said breakpoint.

12. A method as recited in claim 10 where in said steps of instructing , issuing, receiving and communicating make use a JTAG port of said PLD.

13. A method for capturing sample data by a logic analyzer embedded within a programmable logic device (PLD), said method comprising:

receiving a breakpoint indicative of a state of at least one signal within said PLD; receiving PLD signal information indicating specified signals to monitor within said PLD;

continuously storing said specified signals in a memory of said logic analyzer such that said internal signals are stored before the occurrence of said breakpoint;

determining the occurrence of said breakpoint;

wherein when it is determined that said breakpoint has occurred, arranging said memory of said logic analyzer such that a portion of said internal signals stored before said breakpoint are available for later analysis.

14. A method as recited in claim 13 further comprising:

receiving a value indicating the number of samples to be captured after said breakpoint; and

continuing to store said specified signals in said memory of said logic analyzer after the occurrence of said breakpoint, whereby once said breakpoint occurs said logic analyzer continues to capture signals equal to said number of samples to be captured after said breakpoint.

15. A method as recited in claim 13 wherein said steps of continuously storing and continuing to store both store said specified signals in a ring buffer that overwrites earlier stored signals when full, whereby signals stored before said breakpoint are made available for later analysis.

16. A method as recited in claim 13 wherein said step of receiving a breakpoint receives said breakpoint from a user computer through a JTAG port of said PLD.

17. A programmable logic device (PLD) comprising:

PLD circuitry representing one iteration of an electronic design in a design process to create a final PLD;

logic analyzer circuitry integrated within said PLD circuitry such that a portion of said PLD circuitry is connected to said logic analyzer circuitry;

logic means within said logic analyzer circuitry for initiating the capture of signals from said PLD circuitry before a breakpoint occurs; and

sample memory circuitry within said logic analyzer circuitry arranged to capture said signals before said breakpoint occurs, whereby said sample memory circuitry is available to present said captured signals for analysis after said capture.

18. A programmable logic device (PLD) as recited in claim 17 further comprising:

second logic means within said logic analyzer circuitry for continuing the capture of signals from said PLD circuitry after said breakpoint occurs, said sample memory circuitry being further arranged to capture said signals after said breakpoint occurs, whereby said sample memory circuitry is available to present said captured signals for analysis after said capture.

19. A programmable logic device as recited in claim 17 wherein said sample memory circuitry includes a ring buffer that overwrites earlier stored signals when full, whereby signals stored before said breakpoint are made available for later analysis.

20. A programmable logic device as recited in claim 17 further comprising:

a JTAG port in communication with said logic analyzer, said JTAG port used to receive said breakpoint and an indication of said signals from a user computer, said JTAG port further used to present said captured signals for analysis to said user computer.
 Description Submit all comments and votes
 


FIELD OF THE INVENTION

The present invention relates generally to analysis of a hardware device in connection with a computer system. More specifically, the present invention relates to a logic analyzer that is automatically embedded within a hardware device for purposes of debugging.

BACKGROUND OF THE INVENTION

In the field of electronics, various electronic design automation (EDA) tools are useful for automating the process by which integrated circuits, multi-chip modules, boards, etc., are designed and manufactured. In particular, electronic design automation tools are useful in the design of standard integrated circuits, custom integrated circuits (e.g., ASICs), and in the design of custom configurations for programmable integrated circuits. Integrated circuits that may be programmable by a customer to produce a custom design for that customer include programmable logic devices (PLDs). Programmable logic devices refer to any integrated circuit that may be programmed to perform a desired function and include programmable logic arrays (PLAs), programmable array logic (PAL), field programmable gate arrays (FPGA), complex programmable logic devices (CPLDs), and a wide variety of other logic and memory devices that may be programmed. Often, such PLDs are designed and programmed by a design engineer using an electronic design automation tool that takes the form of a software package.

In the course of generating a design for a PLD, programming the PLD and checking its functionality on the circuit board or in the system for which it is intended, it is important to be able to debug the PLD because a design is not always perfect the first time. Before a PLD is actually programmed with an electronic design, a simulation and/or timing analysis may be used to debug the electronic design. However, once the PLD has been programmed and is operating within a working system, it is also important to be able to debug the PLD in this real-world environment.

And although a simulation may be used to debug many aspects of a PLD, it is nearly impossible to generate a simulation that will accurately exercise all of the features of the PLD on an actual circuit board operating in a complex system. For example, a simulation may not be able to provide timing characteristics that are similar to those that will actually be experienced by the PLD in a running system; e.g., simulation timing signals may be closer or farther apart than what a PLD will actually experience in a real system.

In addition to the difficulties in generating a comprehensive simulation, other circuit board variables such as temperature changes, capacitance, noise, and other factors may cause intermittent failures in a PLD that are only evident when the PLD is operating within a working system. Still further, it can be difficult to generate sufficiently varied test vectors to stress the PLD design to the point where most bugs are likely to be observed. For example, a PLD malfunction can result when the PLD is presented with stimuli that the designer did not expect, and therefore did not take into account during the design and simulation of the PLD. Such malfunctions are difficult to anticipate and must be debugged in the context of the complete system. Thus, simulation of an electronic design is useful, but usually cannot debug a PLD completely.

One approach to debugging a hardware device within a working system is to use a separate piece of hardware equipment called a logic analyzer to analyze signals present on the pins of a hardware device. (For example, the HP1670A Series Logic Analyzer from Hewlett-Packard Company.) Typically, a number of probe wires are connected manually from the logic analyzer to pins of interest on the hardware device in order to monitor signals on those pins. The logic analyzer captures and stores these signals. However, the use of an external logic analyzer to monitor pins of a hardware device has certain limitations when it comes to debugging such a device. For example, such an external logic analyzer can only connect to and monitor the external pins of the hardware device. Thus, there is no way to connect to and monitor signals that are internal to the hardware device. Unfortunately, when programming a hardware device such as a PLD, it would be useful to be able to monitor some of these internal signals in order to debug the PLD.

Although some custom hardware devices may come ready made with some internal debugging hardware, this debugging hardware is typically hardwired to route specific internal signals and cannot be readily changed by an engineer who wishes to look at other signals. Also, with such built-in debugging it is not possible to choose any signal to monitor that the engineer desires, nor can triggering signals and triggering conditions be changed by the engineer. Because a PLD by its very nature is a programmable device that an engineer is attempting to program to perform a particular function, it is important to the engineer to be able to customize monitored signals, trigger signals, and trigger conditions in order to efficiently debug any particular device. Further, creating an electronic design for a PLD is an iterative process that requires creative debugging by an engineer who may wish to view almost any internal signal, and who may change his mind fairly frequently in the course of debugging a PLD within a system. Known external and internal logic analyzers do not provide this flexibility.

A further drawback to using an external logic analyzer or hardwired predetermined debugging hardware inside of a custom chip is that often the number of internal signals that an engineer desires to monitor are greater than the number of available pins on the device. For example, if there are sixteen internal signals that an engineer wishes to monitor on a device, he is unable to do this using an external logic analyzer if the device has only four pins available for debugging.

In some cases, it is possible for an engineer to employ a conventional logic analyzer to study an internal signal of a PLD. This may be accomplished by, for example, an engineer modifying his design so that a normally internal signal is routed temporarily to an output pin of the PLD. The design is then recompiled. The engineer then attaches a probe to this output pin in order to monitor the "internal" signal. Unfortunately, the engineer must recompile his design and reprogram the PLD in order to view this internal signal. Also, when debugging is complete, the engineer must again rewrite the design to remove the internal signal from the output pin, recompile the design and finally reprogram the PLD again. This can be a tedious process.

Even if an engineer is successful in routing an internal signal to an output pin of a PLD, with certain integrated circuit packages it may be extremely difficult to attach an external logic analyzer. For an integrated circuit in a dual in-line package it may be relatively straightforward to attach the probes of a logic analyzer to the top of the package as long as the package is in an easily accessible location on a circuit board. However, if the package is in a difficult to reach location because of device crowding, it may be difficult to physically attach logic analyzer probes to particular output pins of interest. Even more troublesome are integrated circuits with rows of miniature contacts located on the top of the package (e.g., "flip chips"). It is difficult to attach logic analyzer probes to particular outputs of interest with this type of package. Some integrated circuit are encased in a ball grid array package with the contacts located on the bottom of the package up against the circuit board; for these packages, it may be nearly impossible to attach logic analyzer probes to these small contacts located on the underside of the package. Thus, use of an external logic analyzer has shortcomings even if an internal signal can be routed to a pin of a device.

U.S. patent application No. 08/958,435 entitled "Embedded Logic Analyzer For A Programmable Logic Device" discloses an advantageous apparatus and techniques that allow an embedded logic analyzer to flexibly analyze internal signals of interest in an electronic design, such as within a programmable logic device (PLD). Nevertheless, there is room for improvement in the analysis of internal signals of a PLD for debugging purposes.

For example, some logic analyzers allow a user to specify a trigger condition and a set of trigger signals that must satisfy that trigger condition before the logic analyzer is triggered into the capture of data. Such logic analyzers are useful when it is desirable to capture and analyze signal data that occurs immediately after a particular trigger condition (such as a failure of the device). It is often desirable, however, to capture signals for later analysis that occur before the trigger condition. For the most part, these logic analyzers that begin data capture based upon satisfaction of a trigger condition are unable to provide captured signals before the trigger condition because the logic analyzer is only designed to begin capture upon an error, failure or other trigger condition. Because these errors and/or failures are unanticipated, these type of logic analyzers are unable to anticipate the trigger condition, and hence, are unable to begin capturing data before the trigger condition occurs.

In some debugging situations, it can be extremely advantageous to capture signals that occur before the trigger conditions occurs. For example, when debugging a PCI bus interface, a situation may occur in which the interface enters an illegal state. Traditional logic analyzers would be able to detect that illegal state and immediately begin capturing signal data for later analysis. It would be extremely desirable, however, to begin capturing signal data before the bus interface enters the illegal state in order to determine why the bus has entered this illegal state. In another example, when an interrupt occurs, it can be extremely desirable to know the history of certain registers before the interrupt occurs. In other words, once the interrupt is received, data capture may begin, but the registers may already be in an incorrect state. It would be extremely desirable to be able to capture and analyze signal data before the interrupt occurs in order to determine why certain registers are in an incorrect state when the interrupt occurs. Other situations in which it would be desirable to capture signal data before a specific trigger condition are also possible.

Various prior art efforts present partial solutions, but each have their drawbacks. For example, external logic analyzers available from the Hewlett-Packard Company allow capture of signal data before a trigger condition (or breakpoint) occurs. Unfortunately, these external logic analyzers suffer from many of the disadvantages associated with external logic analyzers discussed above. Actel Corporation of Sunnyvale, Calif. provides two probes within a programmable logic device that are able to monitor two different signals, but these signals must be prespecified by the user and may not be flexibly reassigned to other signals. In addition, the Actel probes provide constant monitoring of particular signals, but do not allow capture of relevant signal data in relation to a specified breakpoint.

Therefore it would be desirable to have an apparatus and technique that would allow a logic analyzer embedded within a programmable logic device to flexibly capture internal signals both before and after a specified breakpoint.

Furthermore, it would be desirable to have an apparatus and technique that would efficiently and flexibly control a logic analyzer embedded within a programmable logic device. As explained below, although various options are available for controlling such an embedded logic analyzer, none of the prior art techniques are optimal. By way of background, a brief explanation of the design and manufacturing phases of a PLD and a circuit board will be provided first.

As described earlier in this section, a design engineer designs a PLD and programs such a device using an electronic design automation tool. In the course of this design phase, the design engineer may perform numerous design-program-debug iterations before the design is complete and the PLD ready for mass manufacturing. The design engineer often uses a simulation and/or a timing analysis to assist in debugging the electronic design of the PLD. It is also conceivable that a design engineer would use an embedded logic analyzer (such as disclosed in U.S. patent application No. 08/958,435) to troubleshoot the design. Once the design of the PLD is complete to the design engineer's satisfaction, the design is handed off to a product engineer for the manufacturing phase.

In the manufacturing phase, a product engineer designs a manufacturing flow for the mass production of an electronic circuit board or other electronic device that incorporates one or more PLDs. During the manufacturing phase, it will be necessary to test the board itself and may also be necessary to retest the PLD. In the beginning of the manufacturing phase, any number and type of hardware components and any number of PLDs are soldered to a board. Once on the board, a PLD is most often programmed (or configured) using a JTAG port located on the PLD. It is also possible that a particular PLD be programmed by itself before placement on a board using a special socket and a programming unit.

A full board test may then be performed to test the traces, solder connections, and other physical interfaces between components on the board. It should be pointed out that a board test may also be performed before any devices on the board are programmed or configured. It is common to use a JTAG port of a PLD or other device to test the traces and solder connections of a board during this board test. Once physical connections are tested, a complete functional test of the board is then formed to test the overall functionality of the board (i.e., to ensure that particular inputs produce the outputs expected). At this point, if a failure is detected it may be necessary to debug a particular PLD while on the board. For failures more difficult to track down, it may even be necessary to remove a PLD from the board to be debugged. In these circumstances, as previously explained, it is desirable to have an embedded logic analyzer within the PLD to facilitate debugging. During any debugging of the PLD using an embedded logic analyzer, it is necessary in some fashion to control the embedded logic analyzer, i.e., to provide it with commands and data and to receive captured data and status from it. Although various options are available, none are currently optimal.

For example, it may be possible to use existing input/output pins of a device to provide a control interface. Unfortunately, a particular design may not have enough extra input/output pins available through which an interface can be provided to control an embedded logic analyzer. It can be undesirable to require that a customer purchasing a PLD not use a certain number of input/output pins simply because the PLD may not have been designed correctly and might have to be debugged at some point.

Intel Corporation of Santa Clara, Calif. uses a JTAG port to control access to specified debug registers for help in debugging a central processing unit (CPU). Because a CPU is a known design, it is known beforehand exactly how many debug registers will be needed and control is simpler. With a PLD, however, each user-implemented design will be custom; it is unknown ahead of time what that design will be and how many debug registers might be needed. Different designs will require different debug registers. Thus the straightforward technique used by Intel with a known design of a CPU would not be appropriate with a PLD.

Therefore, an apparatus and technique are further desirable that would provide simple, efficient and flexible control of an embedded logic analyzer. It would further be desirable for such a control apparatus and technique to allow testing of a PLD on a circuit board in a real-world environment.

SUMMARY OF THE INVENTION

To achieve the foregoing, and in accordance with the purpose of the present invention, a technique for embedding a logic analyzer in a programmable logic device is disclosed that allows capture of specified signal data both before and after a specified breakpoint. Also disclosed are techniques for controlling an embedded logic analyzer using a JTAG port.

The present invention provides both an apparatus and a technique by which a logic analyzer circuit is automatically embedded within a PLD, by which it captures and stores logic signals both before and after a breakpoint, and by which it unloads these signals through an interface to a computer. In a preferred embodiment, analysis of the signals is performed on the computer, with the "on-chip" logic analyzer circuit serving only to acquire the signals. The invention works especially well with a PLD because, by its very nature, a PLD is able to be programmed with a design, the design may be changed, and the PLD programmed again and again. Thus, the logic analyzer circuit may be embedded in test designs or iterations in the process of designing a final PLD. Upon successful debugging of the PLD design, the PLD chip can be reprogrammed without the logic analyzer circuit, or the circuit can be left on the chip.

In one embodiment of the invention, using an electronic design automation (EDA) software tool running on a computer system, an engineer specifies signals of the PLD to be monitored, specifies the number of samples to be captured, specifies a system clock signal, and specifies not only a breakpoint, but also the number of samples needed prior to the breakpoint. (Alternatively, total samples could be specified and/or samples needed after a breakpoint.) The EDA tool then automatically inserts the logic analyzer circuit into the electronic design of the PLD which is compiled and downloaded to configure the PLD. Using an interface connected between the PLD and the computer, the EDA tool communicates with the embedded logic analyzer in order to instruct the logic analyzer to run and to begin capturing data. Once a breakpoint occurs, the logic analyzer determines if more samples need to be captured after the breakpoint. The EDA tool then directs the logic analyzer to unload the data from sample memory and then displays the data on the computer. The logic analyzer circuit may then run again to capture another sequence of sample values.

In one specific embodiment of the invention, the logic analyzer captures data from specified signal lines continuously in a ring buffer, or similar memory structure that overwrites earlier stored data when full. In this fashion, relevant data is stored continuously before a breakpoint occurs, thus, the stored data may be viewed later by a user who wishes to view signals occurring before the breakpoint. Once the breakpoint occurs, a counter keeps track of how many additional samples of data (if any) need be collected.

Often, a JTAG port is used either to program a PLD or to assist with testing a circuit board on which PLDs are located. Advantageously, it is realized that a JTAG port has traditionally been unused during the design and debugging of a particular PLD. Thus, it is further realized that a JTAG port on a PLD is under utilized and may be used during debugging of a PLD as a means of communicating with and controlling an embedded logic analyzer of the present invention. Advantageously, the standard JTAG port is used to facilitate debugging of a programmable logic device that includes an embedded logic analyzer. Use of a JTAG port avoids adding dedicated debugging control pins. In a first embodiment for controlling an embedded logic analyzer using a JTAG port, inputs and outputs of the logic analyzer are routed to unbonded JTAG-enabled I/O cells. Cells that will provide control signals are tricked into thinking they are in INTEST mode so that signals may be input, yet the rest of the device operates as in a real-world environment. In a second embodiment, a user-implemented test data register provides a JTAG-like chain of logic elements through which control and output information is shifted. Stimulus cells provide control information to the logic analyzer, and sense cells retrieve data from the logic analyzer.

The present invention provides many advantages over the prior art. Use of an embedded logic analyzer in a PLD allows debugging of the device in the system in which it is operating and under the actual conditions that might produce a malfunction of the PLD. The technique of the present invention automatically embeds a logic analyzer circuit into a PLD so that an engineer may debug any logic function within the device. The embedded logic analyzer is able to capture any internal signals specified by the engineer; the breakpoint can also include any specified internal signals. Through the use of memory within the embedded logic analyzer and an interface to the computer, any number and depth of signals can be monitored within the device and then transmitted to the computer at a later time for analysis. In one embodiment of the invention, a JTAG port is used to program the embedded logic analyzer and to transmit captured signal information to the computer.

Advantageously, while debugging a PLD design in a system, an engineer may use the EDA tool to specify new signals to monitor and/or new breakpoints. The engineer can then reprogram the device while it is within its intended system with a modified logic analyzer circuit very rapidly in order to debug a different portion of the device or to change the triggering conditions. This ability to reprogram an embedded logic analyzer on the fly has many advantages over built-in debugging hardware on custom chips that may not be dynamically reprogrammed. This ability to reprogram also has advantages over external logic analyzers that can only monitor the external pins of a hardware device. Furthermore, once an engineer has finished debugging the device with the embedded logic analyzer, the EDA tool may be used to generate a final configuration output file without the logic analyzer that represents the engineer's final working design. Thus, the logic analyzer need not be part of the final design and take up space on the PLD.

The present invention is applicable to a wide range of hardware devices, and especially to PLDs. A PLD in particular may be implemented using a wide variety of technologies, including SRAM technology and EEPROM technology. PLDs based upon SRAM technology are especially advantageous in that they may have additional embedded memory that can be used by the embedded logic analyzer to capture a large number of, and a greater depth of signals. Furthermore, an embedded logic analyzer that is designed and inserted automati