System and method for using TAP controllers

Information

  • Patent Grant
  • 7526691
  • Patent Number
    7,526,691
  • Date Filed
    Wednesday, October 15, 2003
    20 years ago
  • Date Issued
    Tuesday, April 28, 2009
    15 years ago
Abstract
A system and method for dynamically writing to and reading from an internal register space of a chip using a TAP controller without interfering with the normal operation of the chip is provided. Data that is to be written is loaded into a data register in the TAP controller before being written in the internal register space and the write instructions are loaded into an instruction register of the TAP controller. The address of the internal register space from where data is to be read is also loaded to the data register. Data is read and/or written from the internal register space after the TAP controller gets access to the internal register space via arbitration.
Description
BACKGROUND OF THE INVENTION

1. Field of the Invention


The present invention relates to integrated circuits, and more particularly, to using TAP controllers.


2. Background


Conventional computer systems typically include several functional components. These components may include a central processing unit (CPU), main memory, input/output (“I/O”) devices, and storage devices (for example, tape drives, disk drives etc.) (referred to herein as “storage device”)


In conventional systems, the main memory is coupled to the CPU via a system bus or a local memory bus. The main memory is used to provide the CPU access to data and/or program information that is stored in main memory at execution time. Typically, the main memory is composed of random access memory (RAM) circuits. A computer system with the CPU and main memory is often referred to as a host system.


The storage device is coupled to the host system via a storage device controller that handles complex details of interfacing the storage device(s) to the host system. Communications between the host system and the controller is usually provided using one of a variety of standard input/output (“I/O”) bus interfaces.


Storage controllers are coupled using various standards, for example, the fibre channel standard incorporated herein by reference in its entirety.


As bandwidth increases, host systems and storage devices must transfer data efficiently. Because of high demand, it is desirable that the internal register files of integrated circuits (also referred to as “chips”) used in (or as) storage controllers be accessed real-time without disrupting normal chip operation for de-bugging or any other purpose.


A standard, IEEE 11491.1 and 11491A was developed (referred to as the JTAG standard) for testing of integrated circuits after assembly onto a printed circuit board, incorporated herein by reference in its entirety. The JTAG standard provides for testing numerous integrated circuits on a board as well as the interconnection of those circuits to the printed conductors of the board. Testing is performed using pins associated with a test access port (“TAP”).


TAP controllers are used to access chip information at a tap controller clock (tclk). In traditional systems, all chip operations stop when a chip is debugged using the JTAG standard. This is commercially undesirable because engineers may want to access the internal registers of a chip while it is operational.


Therefore, there is a need for a method and system that allows dynamic access to a chip via a TAP port during normal chip operation.


SUMMARY OF THE INVENTION

In one aspect of the present invention, a method for dynamically writing to an internal register space of a chip using a test access port (“TAP”) controller without interfering with the normal operation of the chip is provided. The method includes, loading write instructions and address of the internal register where data is to be written; and gaining access through arbitration to the internal register space.


Data that is to be written is loaded into a data register in the TAP controller before being written in the internal register space and the write instructions are loaded into an instruction register of the TAP controller.


In another aspect of the present invention, a method for dynamically reading from an internal register space of a chip without interfering with the normal operation of the chip is provided. The method includes, loading an address of the internal register space from where data is to be read, to the data register; gaining access to the internal register; and transferring information to a register in the TAP controller.


In yet another aspect of the present invention, a system for accessing an internal register space of a chip without interfering with the normal operation of the chip is provided. The system includes, an instruction register in the TAP controller to which read and/or write instructions are written; and an arbitration module that receives an input from the TAP controller when the TAP controller needs to access the internal register space.


In yet another aspect of the present invention, a TAP controller for dynamically accessing an internal register space in a chip without interfering the normal operation of the chip is provided. The TAP controller includes, an instruction register in the TAP controller to which read and/or write instructions are written; and a data register where data is stored after the TAP controller reads it from the internal register space, and/or data that is to be written into the internal register is first written to the data register.


In one aspect of the present invention, debugging can be performed dynamically because the internal registers of a chip can be accessed without interrupting the normal operation of the entire chip. This provides flexibility in debugging chips while using the JTAG standard.


This brief summary has been provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention can be obtained by reference to the following detailed description of the preferred embodiments thereof in connection with the attached drawings.





BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing features and other features of the present invention will now be described with reference to the drawings of a preferred embodiment. In the drawings, the same components have the same reference numerals. The illustrated embodiment is intended to illustrate, but not to limit the invention. The drawings include the following Figures:



FIGS. 1A and 1B are block diagrams of a controller, used according to one aspect of the present invention;



FIG. 2 is a block diagram of a TAP controller, according to one aspect of the present invention;



FIG. 3 shows a flow diagram of process steps for reading internal register space of a controller using a TAP controller, according to one aspect of the present invention; and



FIG. 4 shows a flow diagram of process steps for writing to internal register space of a controller using a TAP controller, according to one aspect of the present invention.





DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

To facilitate an understanding of the preferred embodiment, the general architecture and operation of a controller will initially be described. The specific architecture and operation of the preferred embodiment will then be described with reference to the general architecture.


System 100A of FIG. 1A is an example of a storage system controller, included (or coupled to) in a computer system. The host computer (not shown) and a storage device 115 communicate via port 113. In an alternate embodiment (not shown), the storage device 115 is an external storage device, which is connected to the host computer via a data bus. Those skilled in the art will appreciate that various communication buses known in the art can be used to transfer data between the drive and the host system.


As shown in FIG. 1A, the system includes controller 101, which is coupled to fibre channel ports 102 and 103, buffer memory 114 and microprocessor 100. Interface 116 serves to couple microprocessor bus 107 to microprocessor 100. A read only memory (“ROM”) omitted from the drawing is used to store firmware code executed by microprocessor 100.


Controller 101 can be an integrated circuit (IC) that comprises of various functional modules, which provide for the writing and reading of data stored on storage device 115 or to other devices through fibre channel ports 102 and 103.


Microprocessor 100 is coupled to controller 101 via interface 116 to facilitate transfer of data, address, timing and control information. Buffer memory 114 is coupled to controller 101 via ports to facilitate transfer of data, timing and address information.


Data flow controller 117 is connected to microprocessor bus 107 and to buffer controller 118.


Disk formatter 110 formats data that is flowing through system 100A, either from storage device 115 or from fibre channel ports 102/103.


Fibre channel controllers 104 and 108 include programmable registers and state machine sequencers that interface with ports 102 and 103. The fibre channel controllers 104 and 108 provide fibre channel control for ports 102 and 103.


Microcontrollers 105 and 106 allow customization of fibre channel sequences and control Fibre channel controllers 104 and 108 through a microcontroller interface module 123 (FIG. 1B).


ECC engine 111 provides error correction for system 100A.


TAP controller 119, described in more detail below, is used to dynamically access the internal registers (for read and/or write) of system 100A, without interfering with the normal operation of system 100A. This enhances the overall debugging capabilities of system 100A. Information from TAP controller 119 is sent to TAP controller port 120 and can be accessed outside system 100A.



FIG. 1B shows a simplified block diagram of system 100A. System 100A includes internal register space 121 that can accessed by various components, including TAP controller 119 (may also be referred to as TAP controller interface 119).


An arbitration module (“arbiter”) 122 receives requests from various modules including microprocessor interface 116 and microcontroller interface 123 to access internal registers 121. Other components, for example, buffer controller 118 may also access the register space via arbiter 122.



FIG. 2 shows a detailed diagram of TAP controller 119, according to one aspect of the present invention. TAP controller 119 includes a TAP controller state machine (“TAP FSM) 207 that receives plural inputs, including a clock input (tck) 206; a reset input (trst) 205 that can reset TAP controller 119; and a mode select input (tms) 204; and input tdi 203 that allows loading of TAP controller 119 register bits. TAP controller 119 provides output (tdo) 202 that uses tclk 206 and is enabled using tdo_enable bit 201.


TAP controller 119 also includes a Multiplexer 215 whose output 209 is sent to TAP FSM 207.


In one aspect of the present invention, TAP controller 119 uses plural registers; including an instruction register 208 and data register 210 to dynamically access internal register space 121 while system 100A is functional.


Instruction register 208 and data register 210 are used to access internal register space 121. Internal registers 121 can be accessed from outside system 100A using microprocessor interface 116 or Microcontroller interface 123.


If system 100A is not fully functional or goes to an unknown state, and if it is not able to recover, microprocessor interface 116 or microcontroller interface 123 are not be able to access registers 121. In such a case, TAP controller 119, which runs on tck clock 206 and has its own I/O pins can be used to access internal register space 121. This solution uses very little of the total logic and functions of system 100A.


Instruction from data register 210 can be loaded using TAP controller 119. The other registers of TAP controller 119 can also be loaded this way. The bits in data register 210 are used to define a cycle type (read command). One bit determines if it is a Read (1) or Write (0) cycle, and the other bit determines if it is a Byte (1) access or Word (0) access. The address of the register to be accessed is loaded into data register 210 and the data to be written (during a Write operation) is also stored in data register 210.


For a Read operation the returned data is stored in data register 210, which is then shifted out through tdo output port 202. To ensure the validity of the data, a Data ready signal (which indicates that the read Data is ready), is also stored and shifted out.



FIG. 3 shows a flow diagram of process steps for reading internal register space 121 using TAP controller 119 while system 100A is operational, according to one aspect of the present invention.


Turning in detail to FIG. 3, in step S300, the address is loaded into data register 210 and the access width (for example, 8 bit or 16 bit) is loaded into instruction register 208.


In step S301, a read command is loaded into instruction register 208.


In step S302, a request is sent to arbiter 122 to gain access to internal register space 121, as specified by the address.


In step S303, after the request is granted, data is moved to data register 210 and then shifted out in step S304, via tdo output 202.



FIG. 4 shows a flow diagram of process steps for dynamically writing to internal register space 121 using TAP controller 119 while system 100A is operational, according to one aspect of the present invention.


Turning in detail to step S400, the write address and data that needs to be written into internal register space 121 is loaded into data register 210.


In step S401, a write command is loaded into instruction register 208.


In step S402, a request to gain access to internal register space 121 is sent to arbiter 122. Thereafter, in step S403, data is sent to internal register space 121.


In one aspect of the present invention, debugging can be performed dynamically because the internal registers of a chip can be accessed without interrupting the normal operation of the entire chip. This provides flexibility in debugging chips while using the JTAG standard.


It is noteworthy that although the foregoing aspects have been described with respect to the JTAG standard, the adaptive aspects of the present invention are not limited to the JTAG standard. The foregoing process/system may be used to test any chip or integrated circuit, using any other standard.


Although the present invention has been described with reference to specific embodiments, these embodiments are illustrative only and not limiting. Many other applications and embodiments of the present invention will be apparent in light of this disclosure.

Claims
  • 1. A method for accessing internal memory of a disk controller, comprising: storing disk controller control data in a first memory that is located in the disk controller;requesting the control data from the first memory; andtransferring the control data from the first memory to a second memory, wherein the second memory is located on a test access port controller and the test access port controller is located on the disk controller.
  • 2. The method of claim 1 further comprising transferring the control data from the second memory to a device that is external to the disk controller.
  • 3. The method of claim 1 further comprising loading at least one of a write instruction, a read instruction, and a memory address that corresponds to the first memory into the second memory.
  • 4. The method of claim 1 further comprising providing access to the first memory with an arbitration module.
  • 5. The method of claim 1 wherein at least one of the first memory and the second memory is a register.
  • 6. The method of claim 1 further comprising: writing data to the first memory; andsubsequently writing the data to the second memory.
  • 7. The method of claim 1 further comprising: loading a read command in the second memory;loading an address of the first memory in the second memory;transferring the control data from the first memory to the second memory according to the read command and the address.
  • 8. The method of claim 1, further comprising acquiring access to the second memory using an arbitration module.
  • 9. A disk controller comprising: a first memory that stores disk controller control data;a test access port controller that communicates with the first memory; anda second memory that is located in the test access port controller,wherein the test access port controller receives a request for the control data from a device that is external to the disk controller and transfers the control data from the first memory to the second memory.
  • 10. The disk controller of claim 9 wherein the test access port controller transfers the control data from the second memory to the device.
  • 11. The disk controller of claim 9 wherein the test access port controller loads at least one of a write instruction, a read instruction, and a memory address that corresponds to the first memory into the second memory.
  • 12. The disk controller of claim 9 further comprising an arbitration module that receives a request from the test access port controller to access the first memory.
  • 13. The disk controller of claim 9 wherein at least one of the first memory and the second memory is a register.
  • 14. The disk controller of claim 9 wherein the test access port controller writes data to the first memory and subsequently writes the data to the second memory.
  • 15. The disk controller of claim 9 wherein the test access port controller loads a read command in the second memory, loads an address of the first memory in the second memory, and transfers the control data from the first memory to the second memory according to the read command and the address.
  • 16. A disk controller comprising: first memory means for storing disk controller control data;test access port controller means for communicating with the first memory means; andsecond memory means that is located in the test access port controller means,wherein the test access port controller means receives a request for the control data from a device that is external to the disk controller and transfers the control data from the first memory means to the second memory means.
  • 17. The disk controller of claim 16 wherein the test access port controller means transfers the control data from the second memory means to the device.
  • 18. The disk controller of claim 16 wherein the test access port controller means loads at least one of a write instruction, a read instruction, and a memory address that corresponds to the first memory means into the second memory means.
  • 19. The disk controller of claim 16 further comprising arbitration means for receiving a request from the test access port controller means to access the first memory means.
  • 20. The disk controller of claim 16 wherein at least one of the first memory means and the second memory means is a register.
  • 21. The disk controller of claim 16 wherein the test access port controller means writes data to the first memory means and subsequently writes the data to the second memory means.
  • 22. The disk controller of claim 16 wherein the test access port controller means loads a read command in the second memory means, loads an address of the first memory means in the second memory means, and transfers the control data from the first memory means to the second memory means according to the read command and the address.
US Referenced Citations (172)
Number Name Date Kind
3800281 Devore et al. Mar 1974 A
3988716 Fletcher et al. Oct 1976 A
4001883 Strout et al. Jan 1977 A
4016368 Apple, Jr. Apr 1977 A
4050097 Miu et al. Sep 1977 A
4080649 Calle et al. Mar 1978 A
4156867 Bench et al. May 1979 A
4225960 Masters Sep 1980 A
4275457 Leighou et al. Jun 1981 A
4390969 Hayes Jun 1983 A
4451898 Palermo et al. May 1984 A
4486750 Aoki Dec 1984 A
4500926 Yoshimaru et al. Feb 1985 A
4587609 Boudreau et al. May 1986 A
4603382 Cole Jul 1986 A
4625321 Pechar et al. Nov 1986 A
4667286 Young et al. May 1987 A
4777635 Glover Oct 1988 A
4805046 Kuroki et al. Feb 1989 A
4807116 Katzman et al. Feb 1989 A
4807253 Hagenauer et al. Feb 1989 A
4809091 Miyazawa et al. Feb 1989 A
4811282 Masina Mar 1989 A
4812769 Agoston Mar 1989 A
4860333 Bitzinger et al. Aug 1989 A
4866606 Kopetz Sep 1989 A
4881232 Sako et al. Nov 1989 A
4920535 Watanabe et al. Apr 1990 A
4949342 Shimbo et al. Aug 1990 A
4970418 Masterson Nov 1990 A
4972417 Sako et al. Nov 1990 A
4975915 Sako et al. Dec 1990 A
4989190 Kuroe et al. Jan 1991 A
5014186 Chisholm May 1991 A
5023612 Liu Jun 1991 A
5027357 Yu et al. Jun 1991 A
5050013 Holsinger Sep 1991 A
5051998 Murai et al. Sep 1991 A
5068755 Hamilton et al. Nov 1991 A
5068857 Yoshida Nov 1991 A
5072420 Conley et al. Dec 1991 A
5088093 Storch et al. Feb 1992 A
5109500 Iseki et al. Apr 1992 A
5117442 Hall May 1992 A
5127098 Rosenthal et al. Jun 1992 A
5133062 Joshi et al. Jul 1992 A
5136592 Weng Aug 1992 A
5146585 Smith, III Sep 1992 A
5157669 Yu et al. Oct 1992 A
5162954 Miller et al. Nov 1992 A
5193197 Thacker Mar 1993 A
5204859 Paesler et al. Apr 1993 A
5218564 Haines et al. Jun 1993 A
5220569 Hartness Jun 1993 A
5237593 Fisher et al. Aug 1993 A
5243471 Shinn Sep 1993 A
5249271 Hopkinson Sep 1993 A
5257143 Zangenehpour Oct 1993 A
5261081 White et al. Nov 1993 A
5271018 Chan Dec 1993 A
5274509 Buch Dec 1993 A
5276564 Hessing et al. Jan 1994 A
5276662 Shaver, Jr. et al. Jan 1994 A
5276807 Kodama et al. Jan 1994 A
5280488 Glover et al. Jan 1994 A
5285327 Hetzler Feb 1994 A
5285451 Henson et al. Feb 1994 A
5301333 Lee Apr 1994 A
5307216 Cook et al. Apr 1994 A
5315708 Eidler et al. May 1994 A
5339443 Lockwood Aug 1994 A
5361266 Kodama et al. Nov 1994 A
5361267 Godiwala et al. Nov 1994 A
5408644 Schneider et al. Apr 1995 A
5420984 Good et al. May 1995 A
5428627 Gupta Jun 1995 A
5440751 Santeler et al. Aug 1995 A
5465343 Henson et al. Nov 1995 A
5487170 Bass et al. Jan 1996 A
5488688 Gonzales et al. Jan 1996 A
5491701 Zook Feb 1996 A
5500848 Best et al. Mar 1996 A
5506989 Boldt et al. Apr 1996 A
5507005 Kojima et al. Apr 1996 A
5519837 Tran May 1996 A
5523903 Hetzler et al. Jun 1996 A
5544180 Gupta Aug 1996 A
5544346 Amini Aug 1996 A
5546545 Rich Aug 1996 A
5546548 Chen et al. Aug 1996 A
5563896 Nakaguchi Oct 1996 A
5572148 Lytle et al. Nov 1996 A
5574867 Khaira Nov 1996 A
5581715 Verinsky et al. Dec 1996 A
5583999 Sato et al. Dec 1996 A
5592404 Zook Jan 1997 A
5600662 Zook et al. Feb 1997 A
5602857 Zook et al. Feb 1997 A
5615190 Best et al. Mar 1997 A
5623672 Popat Apr 1997 A
5627695 Prins et al. May 1997 A
5629949 Zook May 1997 A
5640602 Takase Jun 1997 A
5649230 Lentz Jul 1997 A
5664121 Cerauskis Sep 1997 A
5689656 Baden et al. Nov 1997 A
5691994 Acosta et al. Nov 1997 A
5692135 Alvarez, II et al. Nov 1997 A
5692165 Jeddeloh et al. Nov 1997 A
5719516 Sharpe-Geisler Feb 1998 A
5729718 Au Mar 1998 A
5740466 Geldman Apr 1998 A
5745793 Atsatt et al. Apr 1998 A
5754759 Clarke et al. May 1998 A
5758188 Applebaum et al. May 1998 A
5784569 Miller et al. Jul 1998 A
5794073 Ramakrishnan et al. Aug 1998 A
5801998 Choi Sep 1998 A
5818886 Castle Oct 1998 A
5822142 Hicken Oct 1998 A
5831922 Choi Nov 1998 A
5835930 Dobbek Nov 1998 A
5841722 Willenz Nov 1998 A
5844844 Bauer et al. Dec 1998 A
5850422 Chen Dec 1998 A
5854918 Baxter Dec 1998 A
5890207 Sne et al. Mar 1999 A
5890210 Ishii et al. Mar 1999 A
5907717 Ellis May 1999 A
5912906 Wu et al. Jun 1999 A
5925135 Trieu et al. Jul 1999 A
5937435 Dobbek et al. Aug 1999 A
5950223 Chiang et al. Sep 1999 A
5968180 Baco Oct 1999 A
5983293 Murakami Nov 1999 A
5991911 Zook Nov 1999 A
6029226 Ellis et al. Feb 2000 A
6029250 Keeth Feb 2000 A
6041417 Hammond et al. Mar 2000 A
6065053 Nouri et al. May 2000 A
6067206 Hull et al. May 2000 A
6070200 Gates et al. May 2000 A
6078447 Sim Jun 2000 A
6081849 Born et al. Jun 2000 A
6085275 Gallup et al. Jul 2000 A
6092231 Sze Jul 2000 A
6094320 Ahn Jul 2000 A
6124994 Malone, Sr. Sep 2000 A
6134063 Weston-Lewis et al. Oct 2000 A
6145100 Madduri Nov 2000 A
6157984 Fisher Dec 2000 A
6178486 Gill et al. Jan 2001 B1
6192499 Yang Feb 2001 B1
6201655 Watanabe et al. Mar 2001 B1
6223303 Billings et al. Apr 2001 B1
6279089 Schibilla et al. Aug 2001 B1
6297926 Ahn Oct 2001 B1
6330626 Dennin et al. Dec 2001 B1
6381659 Proch et al. Apr 2002 B2
6401149 Dennin et al. Jun 2002 B1
6415393 Satoh Jul 2002 B2
6470461 Pinvidic et al. Oct 2002 B1
6487631 Dickinson et al. Nov 2002 B2
6490635 Holmes Dec 2002 B1
6530000 Krantz et al. Mar 2003 B1
6574676 Megiddo Jun 2003 B1
6662334 Stenfort Dec 2003 B1
6826650 Krantz et al. Nov 2004 B1
20010044873 Wilson et al. Nov 2001 A1
20020062466 Noguchi May 2002 A1
20030037225 Deng et al. Feb 2003 A1
20030110344 Szczepanek et al. Jun 2003 A1
Foreign Referenced Citations (8)
Number Date Country
0528273 Feb 1993 EP
0622726 Nov 1994 EP
0718827 Jun 1996 EP
2285166 Jun 1995 GB
63-292462 Nov 1988 JP
01-315071 Dec 1989 JP
03183067 Aug 1991 JP
9814861 Apr 1998 WO