This invention relates generally to very large scale integration (VLSI) testing, and more particulary to a system and method for on-chip debug support and performance monitoring for microprocessors and microprocessor systems.
It has become very difficult to diagnose failures in and to measure the performance of state-of-the-art very large scale integration (VLSI) chips. This is because modern VLSI chips often not only run at very high clock speeds, but many of them also execute instructions in parallel, out of program order and speculatively. Moreover, visibility of the VLSI chip's inner state has become increasingly limited due to the complexity of the VLSI chips and to practical constraints on the number of external pads that can be provided on the chip package.
In the past, the traditional failure diagnosis and performance measurement tools have been external logic analyzers and in-circuit emulators. Logic analyzers are capable of monitoring signals on the chip pads and other externally-accessible system signals, capturing the state of these signals and generating triggers based on their states. Unfortunately, logic analyzers must rely solely on externally-accessible signals to accomplish this, not on signals that are internal to the chip itself. In-circuit emulators, on the other hand, are used to mimic the functional characteristics of a new VLSI chip in a system environment and to add visibility to certain data values within the VLSI chip. But such devices only emulate the functionality of the VLSI chip. By their very nature, they cannot give an accurate representation of the performance characteristics of an actual silicon device. Therefore, they are primarily useful only for developing and debugging system software.
Thus, as an alternative or supplement to system emulation, confirmation of operation of an integrated circuit, such as a microprocessor, application specific integrated circuit (ASIC) or similar device, is accomplished using the actual, fabricated device, i.e., the device as produced in “silicon.” By applying test signals to the actual device and monitoring its operation, a developer or manufacturer can confirm both logic and electrical functions. Likewise, any problems identified must be debugged and remedied. Visibility inside a chip therefore becomes of paramount importance to address, debug, and correct functional, logical and/or electrical problems.
A certain level of visibility within the chip is provided by external interfaces of the chip. External interfaces can come in several different types. Debug information can be fed out of the chip on the bus interface on unused cycles, or in unused fields on a given cycle. Additionally, prior solutions have provided dedicated pins on the chip to act as a debug port to give visibility into the chip. The pin can be directly attached to a point within the chip for a reading or the pin can provide the ability to mux out important internal information on the dedicated pin. When internal chip information is accessed from either the bus interface or dedicated pin, a logic analyzer or other monitoring device is required to access the information. The use of a logic analyzer or other monitoring device brings with it several disadvantages. First, extra pins dedicated to debug functionality are required in the chip package. These extra pins increase overall costs, and the use of these pins for debug functionality compete with chip functionality resulting in less functionality included within the chip. Secondly, designing and verifying the software to be used with the logic analyzer or other monitoring device to read and interpret the information obtained from the chip is very costly. Finally, attaching the logic analyzer or other monitoring device to the chip to acquire the information competes directly with the proper placement of the chip within the computer system. These difficulties result in longer chip debug schedules.
The number of pins dedicated to debug operations may be reduced by allowing the logic analyzer or other monitoring device to inform the chip as to what debug information is of interest. This can be accomplished by providing elaborate trigger mechanisms to reside within the chip which collapse down to a single trigger out signal to the external logic analyzer. In addition to reducing the number of dedicated pins to debug operations this solution may also provide an earlier insight into the chip logic by allowing the logic analyzer to inform the chip of the area of interest. While this solution does reduce the number of pins dedicated to debug operations, several debug port pins are still required in the design and verification of the logic analyzer software is still costly. Additionally, the trigger solution limits the internal trigger to a specific set of internal source nodes of those that have been predefined and implemented.
Another method of providing information for debugging operations consists of the use of shadow registers. Shadow registers allow an internal trigger or an external trigger fed into the chip to permit the capture of a limited set of information into the shadow registers. The information contained within the shadow registers then can be accessed through the IEEE 1149.1 port (or other scanport or software port) without impacting the normal operations of the chip. Shadow registers are implemented within the chip with the addition of shadow flops. The location of the shadow flops must be predetermined during the chip design phase. Area constraints limit the number of shadow flops that can be placed in the design and the shadow flops tend to be expensive. So debug operations through the use of shadow registers is limited by the number of shadow flops that can be included in the design and by the difficulty in selecting the most likely places for the shadow flops to be required to provide visibility into the functionality of the chip. This problem is further exasperated if multiple cycles of information are required for a node or a bus in order to perform debug operations. The storing of data from multiple registers would require additional flops to be included in the circuit design. However, if a problem were repeatable, multiple cycles of information could be obtained from the chip by successive iterations in which debug information for sequential cycles is obtained. Data obtained in this manner can be interpreted as a virtual logic analyzer trace of the shadow flop locations. While all shadow flops within the chip can be viewed in this manner, if the problem being debugged is not repeatable this process cannot be used.
Alternatively, a trigger can be used to halt the clock of the chip and thereby “freeze” all of the information within the chip components. Now all the flops on the normal internal scan chain can be scanned out and the debug information acquired in this manner. Typically a large number of scanable flops are included in the chip design and this inclusion results in only a small increase in the area required. However, in order to perform debug operations in this manner, the clock must be repeatedly halted which interrupts normal operation of the chip during the debug operation. Additionally, repeatability of the system is still required to debug problems which involve multiple cycles of information.
Prior methods and devices have attempted to address testing of very large scale integrated (VLSI) circuits by incorporating testing circuitry into the chip. For example, the IEEE 1149.1 standard specifies a four or five wire serial test bus requiring one pin each for test data in, test data out, test mode select, a test pulse or clock signal and an optional test reset. Because it is serial, this interface is typically limited to providing one bit of test data out for every clock cycle of the unit under test. Thus, capture of test information is limited.
Another system is described in U.S. Pat. No. 5,867,644, issued Feb. 2, 1999, to Ranson, et al., incorporated herein in its entirety by reference, and discloses a user-configurable diagnostic hardware contained on-chip with a microprocessor for debugging and monitoring the performance of the microprocessor. A programmable state machine is coupled to on-chip and off-chip input sources. The state machine may be programmed to took for signal patterns presented by the input sources, and to respond to the occurrence of a defined pattern (or sequence of defined patterns) by driving certain control information onto a state machine output bus. On-chip devices coupled to the output bus take user-definable actions as dictated by the bus. The input sources include user-configurable comparators located within the functional blocks of the microprocessor. The comparators are coupled to storage elements within the microprocessor, and are configured to monitor nodes to determine whether the state of the nodes matches the data contained in the storage elements. By changing data in the storage elements, the programmer may change the information against which the state of the nodes is compared and also the method by which the comparison is made. The output devices include counters having outputs that may be used as state machine inputs, so one event may be defined as a function of a different event having occurred a certain number of times. The output devices also include circuitry for generating internal and external triggers. User-configurable multiplexer circuitry may be used to route user-selectable signals from within the microprocessor to the chip's output pads, and to select various internal signals to be used as state machine inputs.
Another solution to chip testing is presented in U.S. Pat. No. 6,003,107, issued Dec. 14, 1999, to Ranson, et al and incorporated herein in its entirety by reference. This patent describes circuitry for providing external access to signals that are internal to an integrated circuit chip package. The circuitry includes a N:1 multiplexers distributed throughout the integrated circuit die. Each of the multiplexers has its N inputs coupled to a nearby set of N nodes within the integrated circuit, and each of the multiplexers is coupled to a source of select information operable to select one node from the set of N nodes for external access. The multiplexers outputs are coupled to an externally-accessible chip pad. The integrated circuit is typically a microprocessor, and the source of select information may include a storage element of the microprocessor. If so, additional circuitry may be provided for writing data from a register of the microprocessor to the storage element using one or more microprocessor instructions. Each multiplexer may be coupled to a different source of select information, or all multiplexers may be coupled to the same select information. A fixed set of interconnect traces may be provided to couple a fixed set of nodes to an additional set of externally-accessible chip pads. One or more M:1 multiplexers may also be provided, having their M inputs coupled to M different outputs of the N:1 multiplexers. Each of the M:1 multiplexers may be coupled to a second source of select information. Preferably, the outputs of the M:1 multiplexers will be coupled to a circuitry for facilitating debug and performance monitoring of the integrated circuit.
However, these systems require some compromise between on-chip storage capabilities, pins available for providing signal and data samples, and multiplexing required to provide plural outputs on each available pin. For example, a large on-chip storage capability means additional chip area dedicated to functions that may not be used or even made available after debugging and circuit operation is verified. Even when chip area can be spared, the stored test results must be accessed by providing some combination of pins and clock cycles to multiplex the results out onto the pins. As the number of pins available is often substantially less than the number of parameters, signals, and data bits to be provided, the onboard test memory must act as a buffer. However, as the circuit under test continues to operate and test results are generated more quickly than the pin count will permit providing thereof, the memory will rapidly continue to fill until, eventually, an overflow condition will be reached, data lost, and circuit operation compromised.
Accordingly, a need exists for a way to collect test and debug data from an integrated circuit without requiring an inordinate number of test output pins or on-chip test memory size.
According to an aspect of the invention, external access is provided to signals that are internal to an integrated circuit chip package. Test circuitry includes a distributed data sampling network having multiplexers physically distributed throughout the integrated circuit die. Each of the multiplexers has some or all of its inputs coupled to nearby sets of nodes within the integrated circuit. An event trigger generator receives a first N bits of sampled data from the network and, using a programmable mask, selectively performs one or more boolean operations on the sampled data to provide an event trigger. The event trigger may further include a switch for selectively providing, as the event trigger, (i) a result of the boolean operation on the sampled data, (ii) a performance counter event signal, or (iii) an externally applied trigger signal.
The test circuitry may further include a counter providing an intermediate trigger in response to a predetermined number of the event triggers. A trigger delay may provide a sample command a predetermined number of cycles following the intermediate trigger. The cycles may be operating, clock, processor, or other cycles of or used by the integrated circuit under test of the test circuit itself.
The test circuitry may further include a programmable register storing a value corresponding to the predetermined number of cycles. The programmable register selectively increments the value corresponding to the predetermined number of cycles by a predetermined number of the cycles. This feature allows for capturing successive sequences of test data over multiple test runs.
The test circuitry may further include a trigger delay providing a sample command a predetermined number of cycles following the event trigger. A memory, such as a FIFO, may be used to receive and store the data wherein new data is stored in favor of automatically discarded oldest data. Output circuitry may be used to provide portions of the samples, combining the samples to form composite sample groups spanning multiple sampling periods. A counter or clock output may form part of each group to indicate relative or clock time at which the sample was obtained.
According to a feature of the invention, a trigger event counter is configured to provide an intermediate trigger in response to a programmable number of a first type of the event triggers. A similarly configured store event counter initiates a storage of data samples over a programable number of sequential cycles in response to a second type of the event triggers. A post trigger counter may initiate processing of the data samples in response to storage of a programmable number of the data samples. A FIFO type memory may be used to store the data samples. A pretrigger store event responds to an armed command for initiating a storage of the data samples during a period beginning prior to, and ending in response to, the first type of trigger.
According to another aspect of the invention, a test device includes a state machine responsive to (i) an arm command for transitioning from a standby state to an armed state, (ii) a final trigger event for transitioning from the armed state to a triggered state, and (iii) a post trigger count event for transitioning from the triggered state to the standby state. A controller provides the arm command and issues appropriate configuration controls to collect signal samples. In particular, a network responds to these commands from the controller to selectively provide signal samples from a device under test. An event trigger generator responds to logic or other characteristics of the signal samples to provide an event trigger. These event triggers are counted by an event trigger counter in the armed state of the state machine to identify the final trigger event corresponding to an occurrence of a programmable number of the event triggers. A store trigger generator also responds to a programmed characteristic or combination(s) of the signal samples to provide a store trigger. Either or both of the trigger generators may use a mask to provide these triggers. A post trigger sample counter operable in the triggered state to provide the post trigger count event in response to a programmable number of signal samples being captured. A memory operates in the triggered state to store the samples being captured. The memory may be additionally operable in the armed state to store samples occurring prior to the targeted samples so as to provide test data from cycles prior to the targeted events.
According to another aspect of the invention, a method provides external access to signals that are internal to an integrated circuit chip package. The method includes a step of receiving a plurality of N bit wide signals at locations distributed throughout the integrated circuit die. One of the signals is selected and masked to provide event triggers. An intermediate trigger is generated once a predetermined (programmable) number of the triggers are detected. This intermediate trigger may be delayed a number of cycles prior to initiation of test data capture.
According to another aspect of the invention, a method includes defining a plurality of states including (i) standby, (ii) armed, and (iii) triggered. Transition steps define state changes including:
Signal samples are selectively provided (e.g., collected from multiple points and multiplexed down) from a device under test. The signal samples are subject to programmable boolean operations to provide the event triggers and the store triggers. In the armed state, a programmable number of the event triggers may be counted to provide the final trigger event thereby causing the state machine to transition to the triggered state. A programmed number of the signal samples are stored in response to each store event. Store events may be generated during both the armed and the trigger states to provide for the collection of data immediately prior to the trigger state. Using a FIFO memory, excessive amounts of data stored prior to the final event trigger are lost in preference to storage of later data. A pseudo clock value may be inserted into a portion of the FIFO memory to provide a relative time stamp for the associated data stored in the FIFO. A step of counting a programmable number of signal samples in the triggered state results in provision of the post trigger count event, terminating data sampling and possibly initiating output or other processing of the collected data samples.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims.
For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawing, in which:
A preferred embodiment of the invention includes three main components: (1) a debug bus circuit on-chip; (2) flexible trigger/store network; and (3) an on-chip (or off-chip) storage array/FIFO. Each of these components is useful and functional independent of the others but provide additional advantages when combined as here in detail.
Referring to
According to this arrangement, the output from multiplexer 104 can be provided either as the lower 80 bits [79:0] or upper 80 bits [159:80] of the 160 bit wide sample provided to the data bus.
It should be noted that, although multiplexers 102-110, as shown, each have three selectable inputs for clarity of illustration, a practical implementation of the invention might include hundreds of multiplexers located about a chip for sampling hundreds or thousands of data points and signals. Further, each of the multiplexers may have fewer or greater numbers of inputs and of various data widths so as to provide appropriate data control and other logic signal samples.
This distributed multiplexing scheme has the advantage that thousands of source points can be selected while providing for a reasonable distribution of routing congestion about a chip. Additional stages and levels of multiplexers may be chained together with appropriate register pipe stages (data latches) to accommodate timing requirements. While the addition of pipe stages may result in delay of a final debug bus output, this disadvantage is relatively minor to the extent that all sources travel through equal number of pipe stages and thereby reflect the relative timing of the chip. Thus, it may be necessary to add delays in the form of data latches to ensure that data samples taken during a given cycle are available for output during a common subsequent cycle.
A schematic layout of a distributed multiplexing scheme is depicted in
An overall block diagram of an embodiment of the invention is shown in
Debug block 100 includes the debug bus circuit with distributed multiplexing capabilities as previously described for selectively collecting and combining signal and data samples from various locations on a common chip die. A 160 wide output from the debug block 100 is provided to trigger and store compare/mask and statement machine 400 to trigger data collection and to store array FIFO 500 representing the sampled data. Thus, debug block 100 provides both data to initiate data sampling and collection and the sampled data itself.
State machine 300, trigger compare/mask 400, and store compare/mask 401 provide required logic circuitry under configuration control of control system 310 to initiate data collection by sending an appropriate store command to storage array FIFO 500 upon detection of appropriate trigger and store conditions. Control system 310 also provides configuration control to storage array FIFO 500 to select, buffer and output the contents of the storage array FIFO 500 as will be described more fully below. In addition to providing the sampled signals to state machine 300, trigger compare/mask 400 and store compare/mask 401 and storage array FIFO 500, debug block 100 also provides a continuous output to an external logic analyzer via, for example, dedicated output pins.
Two embodiments of the invention are described herein. In a first embodiment, the invention is embodied and described in terms of a state machine having two logic networks for detecting data, control signals or other events and conditions of a device being tested or monitored to provide respective triggers. A first one of the events, termed a “trigger” event is used to define and initiate a period during which targeted data is to be collected. The targeted data is further defined by a “store” event which looks for and initiates collection of data defined by the second network. The store event results in collecting one or more pieces of data. According to the present embodiment, data continues to be stored until a desired amount of data has been collected. Upon reaching this pre-determined amount of stored data, the collection process is halted and the data is made available for output. This embodiment further provides for pre-triggered data collection to the extent that the desired amount of post trigger data leaves room in the memory to store the extra, pre-trigger samples. Thus, according to at least one feature of this embodiment, a sample memory may be continuously loaded with targeted samples up until a predetermined number of samples past a user definable trigger event have been stored. This provides for an exceedingly flexible arrangement of amounts and timing of data collected.
Referring to
Upon occurrence of the desired number of triggers, a signal or other demarcation labeled “final_trig_event” causes a transition of the state machine from the ARMED to the TRIGGERED state 340. If not already enabled in the TRIGGERED state, the state machine causes data samples meeting programmed criteria, and predetermined numbers of samples immediately following such data, to be stored in the memory. This is shown by transition 1 in
According to the present embodiment of the invention, sampling continues until a programmable number of samples have been collected during the TRIGGERED state. This number may be implemented by decrementing a counter which has been prestored with a value representing a number of samples to be captured and stored. As shown in transition 2 exiting the TRIGGERED state 340, upon counter value post_trig_count=0, the TRIGGERED state is exited and the state machine enters the OFF state 320. In this OFF state, the collected and stored data may be output from the memory, processed, or subject to any other requirements including providing the data off chip.
An overview of the functioning of the present embodiment of the invention is presented in connection with
After initialization at Step 910, the device waits one cycle at delay 912 and, at decision block 914, enters a wait loop if a debug test has not been initiated. Alternatively, upon detecting test initiation, the device configures its debug block at Step 916 so that appropriate configuration controls and signals are issued to a data collection network to obtain data samples from various locations about a chip. At Step 918, logic is configured including loading and storing of mask values and control of muxes and other logic elements so that trigger and store events may be generated in response to predetermined configurations and combinations of data. At Step 920, the storage array FIFO is configured so as to provide appropriate segments of the sampled data to the memory FIFO for storage. This may include storing data from the full 160 bit wide debug bus or only portions thereof. In addition, the storage array may be configured to include a pseudo clock in the form of a counter value as part of each data sample to be stored as a relative time stamp.
The state machine is armed at Step 922 so that triggering events are counted so as to eventually cause a transition to the TRIGGERED state. Thus, Step 924 represents counting an appropriate number of triggers, and thence, detecting store event hits, each time storing an appropriate number of data samples in the FIFO. At Step 926, the predetermined number of samples to be collected during the TRIGGERED state are obtained such that processing continues at Step 928 to read out the contents of the FIFO. As previously mentioned, other processing may be included as part of or following completion of the data collection as either a feature of the present device or external to a chip when the present invention is incorporated as part of an integrated circuit under test.
Upon receiving the “arm_command”, flow continues out the bottom of block 1014 wherein, at block 1016 the state machine goes to ARMED. Block 1018 represents the bottom of a first inner loop where the state machine is awaiting detection of a predetermined number of triggers to be detected. Until occurrence of the requisite, preprogrammed number of triggering events, flow continues out the left of decision block 1018 to decision block 1020. Here, a decision is made to either store samples meeting a prestore condition if this feature has been enabled, as represented by block 1022. Where capture of data prior to occurrence of a final triggering event is not desired, flow instead continues out the left of decision block 1020 back to the top of the inner loop defined by block 1016 with the state machine continuing in the ARMED state.
Referring back to decision block 1018, when the predetermined number of data samples satisfying the trigger condition have been detected, flow continues downward to block 1024 where the state machine goes to TRIGGERED. In the TRIGGERED state, the state machine will continue to collect and store data until the programmed number of data samples have been collected and stored as indicated by the “post_trig count” equaling 0 at decision block 1030. Thus, at decision block 1026, a second wait loop is entered until an appropriate store event occurs. Upon detection of the store event, flow continues at block 1028 to store the sample into the storage array FIFO. As previously mentioned, the total number of samples stored are examined at block 1030 to determine if the desired number of data samples have been collected, thereby terminating sampling. If not, then flow continues onto decision block 1032 where a determination is made if any additional samples immediately following the sample initiating the current store cycle are to be collected and stored. Thus, the second counter test is performed at decision block 1032 such that a desired number of post store samples result in continued looping back to block 1028. Conversely, upon storage of any and all desired post store event samples, processing loops back to block 1024 where the state machine continues in the TRIGGERED state.
In response to these signals, state machine core 1102 provides pairs of signals to each of the counters including a “trig_count_load_enable” signal to the trigger counter 1104 to provide initial loading of a value from control block 310, in this case, a 32 bit value “trig_count_val.” Similarly, a control signal from state machine 1102 labeled “trig_count_decrement_enable” causes trigger counter 1104 to decrement the current values stored in it, the resultant value being output over a 32 bit line to “Comparator With Zero” 1110. Thus, upon decrementing the value “trig_count_val”, stored by block 310 into trigger counter 1104, to 0, “Comparator With Zero” 1110 provides a “hit” output “trig_count_equals_zero” back to state machine core 1102. As previously explained, when the trigger count goes to 0, this indicates that the requested number of data samples satisfying trigger criteria have been detected so as to cause a transition of state machine core 1102 into the TRIGGERED state.
Post trigger counter 1106 is similarly configured to load respective initial data “post_trig_count_val” and decrement that value to 0 as detected by “Comparator With Zero” 1112. As previously described, a 0 result provides “post_trig_count_equals_zero” indicating that the number of data samples requested have been collected and stored.
Finally, store counter 1108 loads under control of state machine core 1102 with values “store_count_val” setting the number of data points in addition to and immediately following the data sampling initiating the store event to also be stored. Thus, any value greater than 0 stored into counter 1108 represents the number of additional data samples immediately following the data sample initiating the store to be included in the group of data to be stored.
A timing diagram according to the present embodiment of the invention is given in
During cycle 1, “arm_command” is received resulting in the state machine being armed at cycle 2 and loading the appropriate count values including “trig_count” with the “trig_count_val” value of 1; “post_trig_count” with the “post_trig_count_val” value of 7 and the “store_count” with the “store_count_val” value of 3.
During cycle 3, a first “final_store_event” is received indicating that data is present. Although the prerequisite number of trigger events have not been received, because the “pre_store_enable” signal is high, “Store_to_FIFO” goes high at cycle 4. At the same time, the value in “store_count” starts to be decremented so that the next four data samples are captured and stored as indicated by “Store_to_FIFO” maintaining a high level for four cycles, i.e., cycles 4 through 7 before going low at cycle 8.
At cycle 4, the first “final_trig_event” is received. Because “trig_count_val” equals 1, this first trigger event will be ignored, instead resulting only in the decrementing of the value in “trig_count” at cycle 5. Thus, with this value now at 0, the next “final_trig_event” will result in the state machine being triggered. Thus, at cycle 8, when the second “final_trig_event” is received, the state goes to TRIGGERED the following cycle, i.e., cycle 9. It should be noted that, once triggered, both the occurrence of further “final_trig_event” events and the values stored in “trig_count” are both irrelevant as shown in the timing diagram.
At cycle 10, the first “final_store_event” occurring during the TRIGGERED state is detected resulting in the storage of the next four data samples during cycles 11-14 at which time the “Store_to_FIFO” signal is high in response to “store_count” being decremented from 3 down to 0. At the same time, the value stored in “post_trig_count” is decremented during clock cycles 11-14 from 7 to 3 representing the four data samples stored while in the TRIGGERED state. Similarly, at cycle 15, a second “final_store_event” is generated, again resulting in the storage of four data samples into the FIFO during cycles 16-19. At the same time, the values stored in “post_trig_count” and “store_count” are decremented. However, the storage of these four additional data samples results in “post_trig_count” going to 0 therefore completing the data acquisition and causing the state to go to OFF at cycle 19.
The flexible trigger/store circuitry 400/401 is shown in further detail in
Referring to
Similarly, comparator 402 provides a 20 bit chunk of the sampled data to OR mask 450 which logically combines the 20 bits of sampled data with the pre-stored mask to provide a 20 bit output to reduction-OR circuit 460. A single bit wide output from reduction-OR circuit 460 is provided as FINAL_COMPARE 470 to a final OR mask 480. An output from final OR mask 480 is provided to final reduction-OR circuitry 492.
Respective outputs from final reduction-AND circuitry 490 and final reduction-OR circuitry 492 are selected at multiplexer 494 in response to select signal “mode_select_and_or” to provide an output “final_and_or_event”. This latter signal is provided in the alternative with a “perf_cntr_event” performance counter event signal by multiplexer 496 in response to a control signal “mode_select_perf” to enable the performance counter module to cause a trigger or store event. The resultant output is provided to multiplexer 498 which selectively provides either the output of multiplexer 496 or a “external_event” signal (from an input pin for external control) as a “final_event” for each of circuits 400 (i.e. trigger) and 401 (i.e. store) respectfully. An example of the functioning of flexible trigger/store circuitry 400/401 assumes a requirement to trigger on a particular address on the debug bus, then capture all data on the bus on cycles when a state machine is NOT in “idle_state”. Initially, the debug port will be configured to feed both the address and state machine bits to the debug bus [159:0] using the flexible distributed multiplexer/pipe-stage device. Next, the trigger event mask will be configured to pick off the appropriate bits and a trigger compare value would be programmed to perform a match on the requested address.
Next, the 20-bit chunks of store compare/mask would be programmed to identify the “idle_state” state by setting a compare of “idle_state” and masking out all other bits. The logic circuitry then automatically generates reduction-AND and reduction-OR versions of the result. In the present case, the reduction-AND is required because all the state bits associated with the state machine in question must match to identify the desired condition. The FINAL_STORE_COMPARE and “final_store_mask” bits are then set to identify the reduction-AND bit in question not going high out of the right reduction-AND bits generated by each of the 20-bit chunks from the original debug bus. By checking for the reduction-AND bit not going high, this has an equivalent effect to obtaining a trigger based on the state machine NOT being in the “idle_state” state. The last mode bits also are set to feed the signal out to the final store event.
As previously described, the final element of the trigger/store circuit 400 is an on-chip capture state machine 300 as described in connection with
Structural details of the “AND” and “OR” logic is shown in
The final component is storage array FIFO 500 which provides on (or off-chip) storage and is detailed in
Another advantage of the FIFO is inclusion of a pseudo-clock that may be inserted into the upper portion of the debug bus going into the FIFO. This pseudo-clock is a free running counter to provide a relative tag on the information stored in the FIFO. This is desirable since the store event circuitry may capture data over the course of many non-contiguous machine cycles. Without the pseudo-clock, it would be difficult to determine when data was loaded into the FIFO, which is often necessary to debug a problem.
Referring to
As described herein, the debug bus, trigger/store circuit and storage array provide for sampling multiple cycles of debug information on the chip without allocating pins for use with a logic analyzer. Because this debug solution is entirely accessible through software or scan, it is easier to use in all system configurations independent of the test apparatus, thereby enabling faster debug of the chip.
Although the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims. Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the disclosure of the present invention, processes, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein maybe utilized according to the present invention. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.
Number | Name | Date | Kind |
---|---|---|---|
4567590 | Bederman | Jan 1986 | A |
5067130 | Jackson | Nov 1991 | A |
5450349 | Brown, III et al. | Sep 1995 | A |
5657253 | Dreyer et al. | Aug 1997 | A |
5751735 | Tobin et al. | May 1998 | A |
5771240 | Tobin et al. | Jun 1998 | A |
5867644 | Ranson et al. | Feb 1999 | A |
5951696 | Naaseh et al. | Sep 1999 | A |
6003107 | Ranson et al. | Dec 1999 | A |
6334198 | Adusumilli et al. | Dec 2001 | B1 |
Number | Date | Country | |
---|---|---|---|
20040153838 A1 | Aug 2004 | US |