1. Field of the Invention
The present invention generally relates to the testing of semiconductor circuits and systems, and, more specifically, to a processor interface for a test access port and to a method that provides access to test functions controlled by a standard test access port.
2. Description of Related Art
The test access port specified by the IEEE1149.1 standard is often used to provide access to all test functions of an integrated circuit. The test access port has a serial input (TDI), a serial output (TDO), a clock (TCK), a test mode select (TMS) and an optional reset (TRST). The standard test access port includes an instruction register and controls test data registers which implement various test functions. Test data registers can be simple scan chains, or can be part of complex embedded test or self-test controllers to provide setup or diagnostic functions. The test access port includes a state machine shown in
The aforementioned inputs and output, which form the standard test access port interface, are usually connected directly to the integrated circuit pins as prescribed by the standard. However, the circuit pins are sometimes not available in the electronic system hosting the integrated circuit. The pins might not be connected to the package so that direct access to the test access port is only available during wafer sort. In some instances, the pins are connected to the package but are accessible only during board manufacturing using a tester. In still other instances, the circuit pins are in use to implement a system function and cannot be used to access test functions. Whatever the reason might be, there is a need for a way of accessing test functions when the standard test access port interface is not directly accessible.
Processors are used routinely in electronic systems and are likely candidates to interface to a standard test access port to access test functions. Processors can be embedded on the same integrated circuit as the standard test access port or located elsewhere in the system. Unfortunately, processor inputs and outputs are not directly compatible with those of a standard test access port. A first significant difference is that some processors use parallel data communication to transfer data rather than serial communication required by the standard test access port, while processors that use serial data communication employ a different protocol from that of the standard test access port.
Various attempts have been made to overcome the above described problems. Hergott U.S. Pat. No. 6,567,325 issued on May 20, 2003 for “Apparatus and Method for System Access to Tap Controlled BIST of Random Access Memory ” discloses a method of interfacing a test controller with a processor where the test controller is also controllable from a test access port. However, the interface is specific to the type of test controller disclosed and only allows operation of self-test controllers in their GO/NOGO mode of operation. Test controllers often require more diagnostic modes of operation that require scanning registers that are internal to the test controller and which is better accomplished by accessing the test controller through the test access port.
Cromer et al. U.S. Pat. No. 6,263,373 issued on Jul. 17, 2001 for “Data Processing System and Method for Remotely Controlling Execution of a Processor Utilizing a Test Access Port” discloses a special purpose processor which determines one of a plurality of test access port commands associated with one of a plurality of debug commands and causes a processor to execute one of a plurality of processor actions. A server computer system remotely debugs the execution of the processor utilizing a built-in test access port. Cromer et al. overcomes the drawback concerning the type-specific interface of Hergott because the test controller is accessed through the test access port instead of bypassing it, potentially providing access to the full functionality of the test controller(s) connected it. However, Cromer et al. neither explain how the test access port is connected to accept commands (or test data in general) from both the circuit pins and the special purpose processor, nor how the test data is translated from a format compatible for network transmission and understandable by the special purpose processor to a format that is compatible with the test access port and vice-versa.
Josephson et al. U.S. Pat. No. 6,484,275 issued on Nov. 19, 2002 for “System and Method for Interfacing Data with a Test Access Port of a Processor” do disclose a method by which a test access port can be connected to interface circuit pins and a processor. Josephson et al. provides a processor which includes a special memory that stores test data and test access port control data. The processor includes a test application that transmits the test data and the test access port control data from the memory to the test access port of the processor. The test access port then utilizes the test data and the control data to capture state data that defines a state of the processor while the processor is executing. The test access port is interfaced with a multiplexer which is also interfaced with the memory and an input interface capable of receiving external signals. Based on a control signal, the multiplexer selects signals defined by the test and control data transmitted from the memory or selects external signals transmitted from an input interface. The multiplexer then transmits the selected signals to the test access port, which captures state data based on the selected signals.
Josephson et al. suffers from a number of drawbacks. First, the control signal that selects between circuits pins and the processor is not itself connected to a circuit pin which makes it impossible to guarantee compliance with the IEEE1149.1 standard. Second, Josephson et al. do not explain how to synchronize the transfer of multiple test data packets with the state machine of the test access port. Third, Josephson et al. require explicitly providing a memory for storing the test mode select signal (TMS) which might be expensive.
It will be seen that there is a need for an interface that will convert data and control signals from a processor to signals that can be connected to a standard test access port. The interface should be able to accommodate as many types of processors as possible by using commonly available signals, a variable data bus width and a simple protocol. It should be possible to select between a processor interface and a direct interface through circuit pins in a manner that is compliant with the IEEE1149.1 standard. It should be easy to convert test data, formatted to be applied through the direct interface, so that it can be applied through the processor interface.
The present invention seeks to provide an interface for use between a process and a test access port and a method that overcome the above described drawbacks of the prior art.
One aspect of the present invention is generally defined as a test access port interface for transferring test data between a selected test register connected to a test access port having a state machine responsive to test access port control input signals and a processor. The interface comprises a write buffer for storing data output by the processor, the write buffer having a command field, a data field, and a serial output connected to a serial input of the test access port; a read buffer for storing data output by the test access port for access by the processor, the read buffer having a data field, and a serial input connected to a serial output of the test access port; and a control circuit responsive to a command stored in the command field for generating test access port control signals for transferring test data from the write buffer to the test register and from the test register to the read buffer via test access port serial input and serial output.
Another aspect of the present invention is generally defined as a method for transferring test data between a test register connected to a test access port having a state machine responsive to test access port control input signals and a processor. The method comprises (a) loading processor output data into a write buffer having a command field and a data field, the processor output data including data loaded into the data field and command data loaded into the command field and identifying a final state in which to position the test access port state machine upon completion of data communication with the test register; (b) generating and applying test access port control signals to test access port control inputs to serially transfer write buffer data field contents to the test register via the test access port serial input and concurrently serially transfer test register serial output data into a data field of a read buffer via the test access port serial output; (c) waiting for the transfer to complete; and (d) reading the read buffer to retrieve test data transferred from the test register.
These and other features of the invention will become more apparent from the following description in which reference is made to the appended drawings in which:
In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these specific details. In other instances, well known methods, procedures, components and circuits have not been described in detail so as not to obscure aspects of the present invention.
In general, the present invention provides a dual test access port interface that provides access to test data registers which implement test functions under control of a standard test access port. A direct interface connects the inputs and output of the standard test access port to circuit pins. A processor interface can be selected to drive the inputs and receive the output of the standard test access port. By default, the control signal selecting between the processor interface and the direct interface selects the processor interface. During manufacturing, this default value of the control signal can be overridden to select the direct interface to make the circuit compliant to the IEEE1149.1 standard.
The processor interface has a write buffer, a read buffer and a control circuit in the form of a finite state machine (FSM). The write buffer contains a command field and a data field. The read buffer contains a status field and a data field. The processor interface has a write mode and a read mode. In write mode, the write buffer is loaded by a processor and causes the FSM to control the serial transfer of the write data to the test access port's instruction register or to a test data register. Preferably, commands in the write buffer indicate the final state of the of the standard test access port. A command can also cause the test access port to be reset. During the serial transfer of the write buffer data, read data output by a selected test register is loaded into and stored in the read buffer. The status field indicates the availability of read data in the read buffer. In read mode, the contents of the read buffer is read by the processor.
Test registers (instruction register or test data register) are accessed by configuring the processor interface in write and read mode for a number of times equal to the width of the currently selected test register divided by the width of the write and read buffer data field. Appropriate padding of data is performed when the width of the test register is not an integer multiple of the write and read buffer data field width. Test data available for the direct interface is easily translated for the processor interface.
Selectors 20 are provided to configure the circuit in a “direct interface” mode or in a “processor interface” mode. The direct interface mode connects the inputs, both control and serial, and the serial output of the standard test access port to circuit pins 22. The processor interface connects the test access port inputs and output to the processor interface. Selectors 20 are controlled by a control signal, Compliance_Enable, applied to a circuit pin, to select between the processor interface mode (Logic 0) and the direct interface mode (Logic 1). The processor interface is selected by default. This default selection facilitates access of test functions in the system. During manufacturing, the default value of the control signal can be overridden to select the direct interface and make the circuit compliant to the IEEE1149.1 standard which requires such direct interface.
The processor interface is connected to processor 14. The processor can be embedded in circuit 10 or located in another circuit in the system. The processor generates various input signals Select, Strobe, Clock and DataIn which are applied to the processor interface. The processor interface generates and applies a data output, DataOut, signal to the processor. All signals are readily available from processor bus 24 which can access a large number of registers, each having a respective address. The processor interface is mapped to one such address. When the address corresponding to the processor interface is decoded (decoding logic not shown), the Select signal is asserted to indicate that the processor will perform a write or a read operation at this address. The Strobe signal is asserted when a write operation is performed. The data to be written into the processor interface is applied at DataIn. When the Strobe signal is not asserted, indicating a read operation, the processor interface outputs data at DataOut. In many systems with a processor, the DataIn and DataOut signals are combined in a bidirectional bus.
The clock used for the processor interface is also used for the test access port. This clock can be synchronous or asynchronous to the processor clock. An optional reset signal (Reset) can be applied to the processor interface to reset it and the test access port. Another optional signal (Ready) can be generated to indicate that a command has been completed and that the processor interface is ready to accept other commands. This signal can be used to interrupt the processor.
As explained in more detail below, the present invention provides a method for transferring test data between a test register connected to a test access port having a state machine responsive to test access port control input signals and a processor. The method comprises (a) loading processor output data into a write buffer having a command field and a data field, the processor output data including data loaded into the data field and command data loaded into the command field and identifying a final state in which to position the test access port state machine upon completion of data communication with the test register; (b) generating and applying test access port control signals to test access port control inputs to serially transfer write buffer data field contents to the test register via the test access port serial input and concurrently serially transfer test register serial output data into a data field of a read buffer via the test access port serial output; (c) waiting for the transfer to complete; and (d) reading the read buffer to retrieve test data transferred from the test register.
The processor interface is shown in more detail in
The processor interface has a write mode and a read mode (Select is active and Strobe is inactive). In write mode, the write buffer is loaded with input data at DataIn coming from the processor. FSM 44 decodes the command field and takes appropriate action. For example, some commands will cause the serial transfer of the write data to the test access port instruction register or to a test data register. For these commands, the final state of the standard test access port can be specified. A command can also cause the test access port to be reset. In this case, the write data is ignored. An example of a command set is given below for a command field of two bits. Other commands could be added if desired.
Read data is stored in the read buffer during the serial transfer of write buffer data (first three commands above). The status field indicates the availability of read data in the read buffer. In read mode, the contents of the read buffer is read by the processor. The status field can contain information equivalent to the Ready signal described above. The processor can poll the read buffer, i.e., read data from the read data from the read buffer, until the status field indicates that the data is valid and ready to be read. This method of accessing the read buffer to determine if the processor interface is ready can be used as an alternative to interrupting the processor.
The width of test registers may vary from one another and from the width of the write and read buffers. Accordingly, test registers (instruction register or test data register) are accessed by configuring the processor interface in write and read mode for a number of times equal to the width of the destination test register currently selected divided by the width of the write and read data fields. Appropriate padding of data when the width of the test register is not an integer multiple of the write and read data fields. This is illustrated in the example below.
The Serial Vector Format (SVF) is a language that describes the serial operations performed on a test access port which conforms to the IEEE1149.1 standard. For example, the following statement:
By way of example, suppose that the processor bus data width is 16 bits. This means that the write and read data field buffer width is:
N=width of processor bus−width of command field=16−2=14 since two bits of each buffer are used as command and status bits. Two write operations, each followed by a read operation, are needed to shift in an instruction and shift out the result of the capture operation of the test access port instruction register. The operations are as follows:
The first operation to the write buffer involves configuring the processor interface into write mode and applying 3A00 at the DataIn input. The two most significant bits are the command field, “00” in this case. This command indicates that N (14) bits of test data will be transferred in and out the test access port and that state of the test access port, after execution of this command, should be Pause_IR. The remaining 14 bits constitute the write data field. Since the total number of test data bits transferred must be a multiple of 14, some padding needs to be done. For TDI, the padding is implemented by adding least significant bits (LSBs) to the original test data. In this case, the write data field is loaded with the five LSBs of the original test data (“11101”) padded with nine additional bits with a value of 0. The value of the padding bits is arbitrary.
The second operation involves configuring the processor interface into read mode which will output a value of BFFD on DataOut. The two most significant bits are the status field, “10” in this case. The “1” indicates that the data read is valid. The “0” bit has no significance in this case. The width of the status field was arbitrarily chosen to match the width of the command field to simplify implementation and potentially allow sharing the same hardware to implement the write buffer and the read buffer. The remaining 14 bits constitute the read data field. Here, no padding is necessary and the data is simply the 14 LSBs of the TDO signal.
The third operation involves configuring the processor interface into its write mode again. The command field bits are set to “10” this time which indicates that the state of the test access port after execution of this command should be Run_Test_Idle. The data put in the write data field simply corresponds to the 14 MSBs of the TDI signal.
The fourth operation involves configuring the processor interface into its read mode again. The two MSBs are again “10”. The read data field requires padding by adding MSBs to the original test data specified for TDO and MASK. Nine additional bits with a value of 0 have been added in this case. As mentioned before, the value used for the padding bits is arbitrary. However, the value used for the corresponding MASK bits must be “0” in order to suppress the comparison of these padding bits.
The present invention allows the transfer of test data between the processor and the test access port in an asynchronous fashion. That is, the clocks used for the processor interface arid the processor can be asynchronous and free-running. When transferring test data asynchronously, there are necessarily wait periods. In the embodiment shown, the stable states of the standard state machine are used to wait between the write operations of the processor that will initiate a serial transfer of test data to the test access port. Another solution is to gate the clock applied to the test access port between transfers. In the particular case where the clock of the processor interface and that of the processor are synchronous, it is possible for the processor to count the number of clock cycles needed for the transfer and predict when the next operation (write or read) can take place without having to continuously read the status field of the read buffer or to wait for an interrupt of the Ready signal.
The present invention is applicable to all standards requiring the implementation of a test access port using a state machine designed according to the IEEE1149.1 standard. Such standards include, but are not limited to, IEEE1149.4, IEEE1149.6, IEEE1532. Other standards based on serial communication of test data can also be handled by the present invention.
Although the present invention has been described in detail with regard to preferred embodiments and drawings of the invention, it will be apparent to those skilled in the art that various adaptions, modifications and alterations may be accomplished without departing from the spirit and scope of the present invention. Accordingly, it is to be understood that the accompanying drawings as set forth hereinabove are not intended to limit the breadth of the present invention, which should be inferred only from the following claims and their appropriately construed legal equivalents.
This application claims the benefit of U.S. Provisional Patent Application Ser. No. 60/491,558 filed Aug. 4, 2003.
Number | Date | Country | |
---|---|---|---|
60491558 | Aug 2003 | US |