Description of the Related Art Cross-Reference to Related Applications
This application relates to copending applications, application Ser. No. 08/733,132, filed on Oct. 18, 1996, entitled "ADAPTABLE SCAN CHAINS FOR DEBUGGING AND MANUFACTURING TEST PURPOSES", by Baeg, application Ser. No. 08/733,908, filed on Oct. 18, 1996, entitled "CLOCK GENERATION FOR TESTING OF INTEGRATED CIRCUITS", by Baeg and Yu, and application Ser. No. 08/733,817, filed on Oct. 18, 1996, entitled "STRUCTURE AND METHOD FOR SDRAM DYNAMIC SELF REFRESH ENTRY AND EXIT USING JTAG", by Qureshi and Baeg, which are commonly owned and which are incorporated herein by reference.
Background of the Invention
Integrated circuits have increasingly incorporated the JTAG (Joint Test Action Group) test port to facilitate testing and debug of integrated circuit chips mounted on a board. The JTAG standard has been adopted by the Institute of Electrical and Electronics Engineers and is now defined as IEEE Standard 1149.1, IEEE Standard Test Access Port and Boundary-Scan Architecture, which is incorporated herein by reference. See also C. M. Maunder, R. E. Tullos, "The Test Access Port and Boundary-Scan Architecture," (IEEE Computer Society Press, 1990), which is also incorporated herein by reference.
The JTAG test port (Test Access Port or TAP) has been utilized as a means for emulating and debugging VLSI designs. That is possible because JTAG provides control and observability to the core logic portions of the integrated circuit through scan access. However, some prior art emulation approaches using JTAG have utilized a complex interface between core logic and the JTAG port. That is in part because the JTAG port typically operates at a test clock frequency which can be an order of magnitude slower than the system clocks provided to the functional logic within the integrated circuit. For example, U.S. Pat. No. 5,535,331 describes one such relatively complex interface scheme between the JTAG controller and functional logic contained within the integrated circuit. Additionally, in many JTAG applications, it is necessary to stop the system clocks in order to obtain status information about the functional blocks. It would be desirable to have an expandable and flexible interface between the JTAG port and the core logic blocks on VLSI chips that is simple, does not require extensive redesign for each new application and provides access to status of the core logic blocks without having to stop the system clocks each time.
Summary of the Invention
Accordingly, this invention provides a simple and expandable approach to providing emulation of VLSI chips using a test interface such as JTAG. In one embodiment of the invention a method is provided for operating an integrated circuit which includes at least one functional logic block operating with a system clock at a first clock speed and a test port operating with a test clock at a second clock speed, the second clock speed being lower than the first clock speed, the test port being controlled by a test controller external to the integrated circuit. The method selects as a scan address a first control register, via the test port, with a first test instruction. Updated control values are shifted into the first control register at the second clock speed, and the output of the first control register which is being provided to the functional logic block, does not change during the shifting. Updated control values are then loaded from a first portion into a second portion of the control register to provide the updated control values to the functional logic block.
Additionally, the updated control values may include a stop clock request flag bit, indicating to the functional logic that the test controller wishes to stop the system clocks, the shifting and loading step which asserts the stop clock request flag bit taking place while the system clocks are active. The functional logic responds to the stop clock request flag by going into an idle state by completing pending instructions in an instruction stack and providing an idle signal to a second control register indicating that the functional logic has gone to the idle state. The method may also include the steps of monitoring the state of the second control register through the test port to determine when the idle signal is asserted by the functional logic and once the idle signal has been detected by the test controller, shifting and loading updated control values, the control values including a stop clock control bit asserted to indicate to a clock control logic block, to stop the system clocks.
Brief Description of the Drawings
The present invention may be better understood, and its numerous objects, features, and advantages made apparent to those skilled in the art by referencing the accompanying drawings, wherein the use of the same reference symbols in different drawings indicates similar or identical items.
FIG. 1 is an overview of the test environment.
FIG. 2 is a more detailed look at the test architecture of an integrated circuit according to the invention.
FIG. 3 is a boundary scan register cell.
FIG. 4 shows several boundary scan register cells coupled together to form a special interface register according to the invention.
FIG. 5 is an overview of mode transition in JTAG.
FIG. 6 shows the system and test clock circuit.
FIG. 7 shows the MSP hardware test environment.
FIG. 8 shows the IDC block test scheme.
FIG. 9 shows the register file test scheme.
Description of the Preferred Embodiment
FIG. 1 illustrates a simplified overview of the test environment of one embodiment of the invention. Integrated circuit (IC) 110 includes TAP 111 to facilitate testing and debugging the integrated circuit and applications intended to run on the integrated circuit IC 110, may be, e.g., Multimedia Signal Processor (MSP.TM.) developed at Samsung Semiconductor, Inc. of San Jose, Calif. That processor, which includes a 32 bit RISC microcontroller (ARM7) and a vector processor engine for digital signal processing, is described in U.S. patent application Ser. No. 08/699,303 filed Aug. 19, 1996 by C. Reader et al. and entitled "Methods and Apparatus for Processing Video Data", which is incorporated herein by reference. The MSP testing circuitry is described in more detail in Appendix A attached hereto. IC 110 is also coupled to external devices, e.g., SDRAM 112. A TAP controller 113 controls debug and emulation of IC 110 through TAP 111 over JTAG bus 114. Note that the embodiment described herein assumes a JTAG implementation. However, the invention is equally applicable to other serial test interfaces on VLSI chips.
The JTAG port 111 can function as a control circuit for boundary scan testing in accordance with the JTAG standard. In addition to boundary scan testing defined by JTAG, TAP 111 is suitable for internal testing as defined below.
Referring now to FIG. 2, the test architecture of IC 110 is shown in more detail. The JTAG port 111 includes 5 pins defined by the JTAG standard that constitute bus 114. The JTAG standard requires four signals (a fifth being optional) interfacing the Test Access Port (TAP) on the integrated circuit. The TAP input signals include a test clock (TCK), a test mode select (TMS) which acts as a control signal, a test data in (TDI) to receive serial data and commands, and an optional test reset (TRSTN). A test data output (TDO) provides serial output from TAP 111 to TAP controller 113. The clock input on pin TCK is used not only during the JTAG boundary scan testing, but also for internal testing. In particular, the pin TCK provides scan clock signals for scanning data in and out of internal scan chains as well as providing clocks for pseudo-system clocks, wherein the system clocks operate at TCK frequency.
Emulation of a DSP chip can be implemented using a scan test interface such as JTAG to control internal functional blocks such as clock generation block 205 and internal functional blocks 203 and 201. Emulation (e.g., testing and debug of the chip and applications which are being developed for it) of a digital signal processor (DSP), which is one of the functional blocks contained on the MSP, requires such capabilities as single stepping through instructions, setting break points, reading, and writing (i.e. controlling) the important registers for a system operation such as the program counter, status register(s), and the cache RAMs. In today's emulators, an emulation block is usually designed to achieve such emulation tasks while allowing free running system clocks, which requires extra design time as well as silicon area and extra I/O pads for emulation purposes.
By controlling the system clocks using JTAG, the functions required for chip emulation can be implemented relatively easy with a minimum cost of design time and silicon penalty. The control necessary includes bypassing (i.e. stopping) free running system clocks, clocking for single or multiple cycles, and enabling free running clocks to go back to normal operation. The communication between JTAG controller and other functional blocks can be made using two special registers, which resolve the asynchronous relationship and speed gap between TCK and system clocks. In the embodiment described herein, the TCK operates at 10 MHz and while the fastest system clocks operate at 80 MHz.
Referring again to FIG. 2, the communication between the clock control block 205 and the JTAG controller is made using the two special registers, Mode Control Register (MCR) (207) and Observation Control Register (OCR) 209. The registers are part of the JTAG controller in that they are clocked by the JTAG clock, TCK. Note that TCK and the other system clocks are totally asynchronous. Synchronization problems between JTAG Controller 110 and the non-test circuitry are avoided through the use of the two shift registers, MCR 207 and OCR 209.
The mode control register (MCR) 207 controls the clock control logic 205 and internal function blocks. In one embodiment MCR 207 contains 40 control bits including bits to control clocks and perform handshaking with the functional blocks. See Table 12 in Appendix A showing the contents of the MCR register and in Table 14, the section entitled "JTAG Output Signals from MCR register" for additional details on the MCR register. The observation control register (OCR) 209 receives handshake responses from the clock control logic 205 and the function blocks and can be used to observe internal states of the integrated circuit, as well as off chip memory locations. See Table 13 in Appendix A for additional details of the OCR. The MCR and OCR registers are operated using the JTAG clock, TCK, which is asynchronous with system clocks. Shift registers MCR 207 and OCR 209 are special shift registers consisting of a plurality of boundary register cells where data can be serially shifted through each register cell without destroying the existing contents of that register cell. It is necessary to shift data, i.e., a new control word, into the MCR while maintaining the previous values, so that control bits to the functional logic do not toggle with each serial shift operation, thereby setting the internal logic blocks into unknown states. An example of a boundary cell utilized for the MCR and OCR registers in a preferred embodiment is shown in FIG. 3 and will be discussed further herein.
Generally, to use the JTAG port for debug and emulation purposes, the system clocks are stopped and the JTAG controller can scan data in/out to/from all scan flip-flops and set a program counter, set next break address/data break points, and many other control registers to control the design. If a DSP or other internal processor implements address/data break points, instruction stepping is possible. Otherwise, cycle based stepping is supported. Generating single/multiple clocks are implemented using a counter in the clock control logic 205 which uses the count value contained in bits 1-10 of the MCR.
The debugging steps for use with the MSP can be described as follows. In some debugging scenarios a handshaking sequence is implemented with the functional blocks to ensure the blocks are in a known state before the clocks are stopped. In some debugging scenarios it may be appropriate to simply stop the clocks without the handshaking sequence. When a handshaking sequence is appropriate, the first step in the sequence is to issue a stop clock request signal to the functional blocks. The clock stop request can be issued through JTAG by shifting in a custom JTAG instruction MCR/BIST1 or MCR/BIST2 which will select the MCR for a subsequent shift DR instruction. Then the appropriate control bits are serially shifted into the MCR with the stop clock request bit (jtag.sub.-- clk.sub.-- stop.sub.-- req) asserted. The (jtag.sub.-- clk.sub.-- stop.sub.-- req) bit acts as a handshaking signal telling the functional blocks that JTAG wants to stop the clocks. Because the MCR is accessed serially, while system clocks are running, it is necessary that the MCR control outputs be stable while the new data is input into the MCR. Therefore, the MCR is implemented using a boundary scan latch design discussed previously. At the end of the serial shifting operation, the JTAG includes an update DR state which causes the data to be updated into the shadow latch portion of the MCR, i.e., that portion of the register that is stable during shifting. As the JTAG port goes through the JTAG update state, the new values are loaded into the MCR shadow registers and the flag (jtag.sub.-- clk.sub.-- stop.sub.-- req) is broadcast to all necessary functional blocks.
In response to a request to stop clocks, (jtag.sub.-- clk.sub.-- stop.sub.-- req) in the MCR, a function block may respond as follows. For example, if the vector processor in the MSP is running and receives this handshaking signal, it will complete operation of the instructions in its instruction queue and then return to the idle state. When it returns to the idle state, the vector processor will assert the vp.sub.-- idle signal provided to the OCR.
The next debugging step consists of observing the internal state of the integrated circuit. It is necessary to know when to step into the JTAG controlled modes from the normal mode (i.e., system clocks running normally). In this observation mode, the internal state can be observed through the OCR. The clock stop will not be activated until the JTAG controller observes all the necessary response signals from the functional blocks indicating that they are in a satisfactory state to stop the clocks. While the MSP is executing its operations, the states can be observed through TDO pin utilizing the Monitor instruction. The TAP controller issues the Monitor instruction (see Table 11 in Appendix A) which selects the OCR as the register addressed for the subsequent DR operation. The TAP controller can repeatedly access the OCR within a DR instruction until certain bits in the OCR, e.g., bit 1 (vp.sub.-- idle), are asserted, indicating the VP and/or other functional blocks are ready for their clocks to be stopped. The handshaking scheme allows the vector processor and other internal logic as needed, to reach a known state before an emulation task, such as single cycle or multicycle is begun or a scan out is performed.
Once all necessary states have been observed, all system clocks can be stopped. In order to scan internal registers, it is necessary to stop system clocks going to the registers desired to be scanned. In implementations providing the capability, one can selectively stop the clocks depending on how the values are set up in the MCR. If selective stopping is not supported, all system clocks will be stopped as presently implemented in the MSP. A block with system clocks active can not be scanned. The clock stop signal is being issued while the MSP is running with system clocks. Any of the four instructions, MCR/BIST1, MCR/BIST2, MCR/BIST3, and MCR/BIST4 can be used to issue the clock stop signal. MCR/BIST1 and MCR/BIST2 can issue the signals while boundary scan cells are in transparent mode, i.e., input signals external to the chip are entering the chip. The latter two instructions can issue the clock stop signals while all input signals are blocked. See Tables 4-11 in Appendix A for additional details on JTAG instructions executed by TAP 111.
Subsequently, a new MCR load operation takes place to stop system clocks. Thus, an instruction is sent to the JTAG port selecting the MCR as the data register and data is serially shifted in to the MCR to assert bit 11, sys.sub.-- clk.sub.-- bypass, which will stop the system clocks synchronously as described in greater detail in "CLOCK GENERATION FOR TESTING OF INTEGRATED CIRCUITS", by Baeg and Yu, discussed previously. Then the MCR can be loaded with another instruction to determine, e.g., whether the clocks are to be cycled at system speed or to use pseudo system clocks (system clock at TCK speed). As discussed, a 10 bit cycle count (MCR bits 1-10) can be specified. The cnt.sub.-- start bit in the MCR will cause the clock control logic to generate the number of clocks specified in the clock count bits of the MCR. The MCR can control the clock control logic so that the cycle count is executed with regular system clocks or with a clock derived from TCK.
The MCR can also be used to access on-chip memory (MCR bits 18-32), as well as to initiate memory testing for the on-chip memory. Other flexible debug features can be easily implemented by using the MCR. For instance, where additional control is desirable over the boundary scan chains, the MCR can include bits to specifically control the mode signals provided to the boundary scan chains from the MCR rather than from the TAP, e.g., from decode of boundary scan test instructions. Thus, bit 34 (mode.sub.-- sig.sub.-- control) can be used to indicate that the mode signal, normally provided to the boundary scan chains from TAP 111, is being overridden by the MCR and the mode bits in the MCR (bits 35-39) will control the mode signal provided to the boundary scan strings. See Table 12 in Appendix A for additional details on MCR bits 34-39.
The flexibility inherent in the MCR design approach to control emulation tasks can also be seen in the use of bit 17 (em.sub.-- status). In one MSP implementation, the vector processor is slaved to the general processor ARM7 and returns control to ARM7 after finishing a task. However, by asserting the em.sub.-- status bit in the MCR register, the vector processor will not return control to ARM7 after completion of a task. Thus, adding one bit in the MCR provides a convenient debugging tool for the present design. As newer generations of a design are generated, additional control bits can be easily added to the MCR to control as yet unforeseen debug tasks with a minimum impact in design time and silicon.
Once the TAP controller has issued the MCR instructions to cause the clock control logic to generate the specified number of system clocks. The OCR is monitored using the monitor instruction as described previously, to wait for assertion of a handshaking signal from the clock control logic, req.sub.-- acom, indicating that the request to the clock control logic has been completed. At this point, the TAP controller can then scan any of the available scan strings.
Once clocks are stopped, before or after a cycle instruction, internal scan operations of the functional logic can take place. TCK provides scan clocks for internal scan chains, shown in FIG. 2, by way of example, as scan chains 201 and 203. Each scan chain includes a number of shift register latches whose design is known in the art. Some embodiments of IC 110 include more than 17 scan chains or fewer than 17 scan chains. For one MSP embodiment, the 17 scan chains, and the respective MSP function blocks incorporating these chains, are shown in Appendix A, Table 2 as chains 1-17. (Chain 18 is the MSP boundary scan chain. Chain 19 is the boundary chain of the ARM7 processor embedded in the MSP.) Each internal chain in Table 2 is a JTAG test data register which can be selected by a respective JTAG custom instruction listed in Appendix A, Table 5. Instructions 9-10 (see Appendix A, Table 4) are used to scan the boundary of ARM7 blocks. The instructions 12 through 28 can be used to scan the functional blocks. Instructions 35 and 36 can be used to generate the pseudo system clocks, which are coming from TCK. Before the clocks are restarted, it is necessary to setup in MSP appropriately. For instance, breakpoints and/or control registers need to be set up for the particular task to be performed.
Finally, system clocks can be restarted by setting the values in the MCR. Instructions 30-33 can be used to access the MCR to start the clocks. The clocks are started by deasserting bit 11 of the OCR (sys.sub.-- clk.sub.-- bypass).
One of the great advantages of the present method can be found when this scheme is extended to be used for silicon debugging during the prototype developing. Since it enables emulating the silicon at-speed by implementing the protocol between the JTAG controller and system blocks, timing related design problems can be debugged.
FIG. 3 shows a schematic of a boundary register cell 300 which can be used to build the MCR and OCR. The cell 300 can transmit an input signal dinp with or without storing the value of signal dinp in flip-flop 310. In boundary register cell 300, input signal dinp is input through multiplexer 305 to flip-flop 310 and through inverter 320 and multiplexer 330 as an output signal dout. Multiplexer 305 selects either tdi on or dinp according to the level on the multiplexer control signal, "shift". The use of flip-flop 310 and 325 allows data to be shifted into flip-flop 310 while latch 325 preserves an output signal inst. Multiplexer 330 selects whether output signal dout is from latch 325 or input signal dinp.
If the signal tdi is selected by multiplexer 305, data (tdi) may be shifted through register cell 300 by shifting data into flip-flop 310 while a signal update on lead 385 coupled to latch 325 remains high. Latch 325 retains the previously latched data on terminal Q of latch 325. An output signal tdo from flip-flop 310 is input into an identical adjoining register cell 430 (see FIG. 4) as the signal tdi at a clock edge if the clock signal tck is enabled by AND gate 315 and signal enb. Clock signal tck and the signal enb input to AND gate 315 which is coupled to the clock terminal of flip-flop 310.
To change output signal inst from register cell 300, signal update is asserted low which causes latch 325 to latch the output signal from flip-flop 310 so that new value inst is now provided by register cell 300. Signal inst is the content of register cell 300 which is output to, for example, as MCR signal sys-clk bypass.
FIG. 4 shows how register cell 300 (shown in detail in FIG. 3) may be coupled together with other register cells in one embodiment of a register such as MCR 207 or OCR 209. Four register cells of a register are shown in FIG. 4, and the interconnect scheme can be repeated to produce a register of the desired size. The signals mode, tck, update, shift, enb, and setn are on leads 405, 410, 415, 420, 435, and 440, respectively, and couple to register cells 300, 430, 450, and 470 in parallel. A data input signal dinp may be provided from TAP 211 to register cell 300.
When the registers are configured as the MCR, the signals inst or dout from register cells 300, 430, 450, and 470, are coupled to desired locations in the functional blocks. For example, in one embodiment, a register cell of MCR 207 may provide, on the signal inst, jtag.sub.-- clk.sub.-- stop.sub.-- req. Similarly, the last register cell in OCR 209 is coupled to the JTAG port. The last register cell will be coupled to the TAP so data can be serially shifted out while the first register cells in both the MCR and OCR will typically be coupled to TAP signal TDI. When the registers are configured as the OCR, parallel inputs will come into each cell and be loaded into flip-flop 310. Subsequently, the data can be latched into latch 325 with assertion of a capture signal from the TAP which would be connected to the update line.
The description of the invention set forth herein is illustrative, and is not intended to limit the scope of the invention as set forth in the following claims. Variations and modifications of the embodiments disclosed herein, may be made based on the description set forth herein, without departing from the scope and spirit of the invention as set forth in the following claims.
Appendix A
Test and normal modes in MSP are described in this chapter. All those modes are controlled by a JTAG controller using five JTAG pins only.
1.2 Application and Assumptions
All the test schemes, which are described in the following sections are implemented to aid MSP hardware testing during the processes of both prototype debugging and manufacturing test.
This material assumes that users know IEEE 1149.1 JTAG protocols and LSSD type scan properties. Please refer to following material for more information in LSSD, JTAG, and MSP specification.
Test Compiler Reference Manual Ver. 3.2a (Synopsys, Inc. 1994)
IEEE Standard 1149.1-1990: IEEE Standard Test Access Port and Boundary Scan Architecture, 1990
Preliminary MSP-1EX System Specification, Samsung Semiconductor Inc. 1996.
1.3 Features
LSSD type scan design
Independent scan operation for each functional block
Parallel scan operation for manufacturing test
Two boundary scan chains for MSP and ARM7
All JTAG basic instructions, intest, extest, and sample/preload
Memory access operation
BIST clock generation
1.4 Test Methodology Abstract
MSP testing is aided with various test schemes, which incorporate LSSD (Level Sensitive Scan Design) type scan design, JTAG controller, and mixing techniques of DFT (Design For Testability) and BIST (Built In Self Test) for memory test.
The control blocks in MSP are made to be fully scannable. The data path blocks are partially scanned to reduce hardware penalty. The scan chains are partitioned by functional block to aid debugging.
There are two boundary scan chains for MSP and ARM7, which are controlled using one JTAG controller. The JTAG control logic is able to scan boundary scan chains as well as the internal scan chains.
To debug and test in silicon, hybrid DFT method is used for the cache memory. It is a combined method of DFT, JTAG, and BIST. The automatic comparison scheme has been embedded for cache to reduce test time while MARCH C algorithm is executed. The memories are controlled using memory control register located inside the JTAG controller.
1.5 Conceptual JTAG Requirements
The general requirements that JTAG controller should provide are discussed. They are specified in the points of functional debugging rather than board level testing.
Boundary scan for MSP and ARM7 core: arbitrary functional vectors should be supplied to the scan chain, which implies that a clock pulse in clock pads can be emulated through the scan chain. The tri-state and bi-directional controls should be possible in a group of related signals such as data bus. Arbitrary patterns from the off-chip and internal logic are captured and shifted to TDO pin. It should be able to drive the external chip and internal logic via the boundary scan cell for interconnection test and internal logic testing respectively. At least one of boundary scan operation guarantees that all the internal state machines are frozen until the boundary scan cells are updated by JTAG controller.
Scan in/out test for functional blocks: scan chains are partitioned by the functional block unit. Exceptions can be made if a block has much less scan cells compared to other blocks. Scanning in and out arbitrary values should be possible for every scan cell. During the scan operations for functional blocks, all the internal ff/latches except the selected chain, boundary scan cells, cache, and register should hold the previous values. This is critical for efficient silicon debugging process. In other words, all the data registers, boundary scan, ARM7 boundaries scan should be independently controllable.
Generation of system clock in test mode: the MSP chip is executed as many system clock cycles as users want. This is performed in two ways in terms of clock pulse generation. First, the clock pulses are generated using boundary scan cell assigned to clock ports. This will be extremely slow because it requires scanning all the boundary scan cells three times to create one pulse (0-1-0). In case of the system clock this feature is not supported. The capture only boundary scan cell is used. If the TCK is 20 MHz, about 24 Khz clock can be emulated using the boundary scan chain in MSP. Note that the boundary scan length in MSP is 270 bits long. Secondly, the clock pulse can also be generated using the JTAG clock. One pulse of the JTAG clock, TCK is the same as one system clock pulse. This is very fast compared to the previous one. The second way of clock generation is implemented for the main system clock only. Other clocks are emulated using the boundary scan chain.
Embedded memory access via JTAG: the memories, IDC and register file inside MSP are controlled through JTAG interface in test mode. Read and write operation to an arbitrary location are provided. Any read/write operations to one RAM should not affect the contents in the other RAMs.
Multiple independent scan: the multiple scan chains are configured based on the number of scan cells rather than functional blocks. They are scanned simultaneously. JTAG controller is responsible for providing the circuitry of the scan chain reorganization.
JTAG instructions: all the basic JTAG instructions should be implemented in addition to the instructions to provide the functionalities specified in above items in this section. During JTAG instruction change, all the boundary scan cells are not changing, all ff/latches freeze their state, and memories hold their current contents. This will help predict the current state during the prototype debugging process.
1.6 Classified JTAG Operations
This section discusses the implementation issues of the JTAG requirements discussed in the previous section. JTAG operation in MSP design can be classified into six different categories. Each category can have a little variation depending on its application. You will see the matching instructions for the categories in the section of JTAG design details. The six different categories are normal operation, boundary scan operation, single internal scan operation, memory access operation, multiple internal scan operation, and pseudo system clock operation modes. They are discussed in the following subsections.
1.6.1 Normal Operation
All the functional and memory blocks are operating as they are supposed to. All the shared input and output pins and test logic are properly redirected to provide legal signals in this mode. This mode is entered by enabling JTAG standard signal, TRST.sub.-- N (=0).
1.6.2 Boundary Scan Operation
Two boundary scan chains are implemented. They are for MSP and ARM7 core. All the I/O ports in MSP and ARM7 have their appropriate boundary scan cells except the five JTAG related pins. The specific boundary scan cells for the scan chains can be found in the sections of MSP boundary scan and ARM7 boundary scan. The two boundary scan chains will share one JTAG controller and must be independently scannable. Intest, extest, and sample/preload instructions for both scan chains are implemented.
1.6.3 Single Internal Scan Operation
In this mode, JTAG takes over the hardware control in terms of data transfer inside MSP. All the functional blocks, which have scan chains in them can be independently scanned in or out. "Independently" means that the scan chains which are not selected do not change their states. Only the selected block takes a scan input from TDI port and updates the scan chain.
This scan mode is primarily used for chip debugging. You can set and observe the values in scan chains whenever you want. Since only one scan chain can be accessed at a time, it is as if there were only a single chain in terms of testing time. It is not a good candidate for production test even though it can be used for the purpose.
1.6.4 Memory Access Operation
The vd.sub.-- ram and tag.sub.-- ram in IDC (Instruction Data Cache) are selected and accessed at the same time. The data.sub.-- ram can be independently accessed. Any address in the RAMs can be independently read and written in this mode. The memory operations are executed serially by scan chain and JTAG controller.
When one memory is accessed for read and write operations, the other memories do not change their contents. Below is how you access the memories.
1. Change to single scan mode and select the RAM block. Scan in the necessary data. At this time, you can set the address counter, and the data to be written. Since this is the scan mode, no memory write operation should be performed.
2. Go out of single scan mode and step into memory access operation. In this mode, a memory to be tested can be selected. JTAG controller provides a select signal for each memory. They are data.sub.-- ram.sub.-- test.sub.-- en, vt.sub.-- ram.sub.-- test.sub.-- en, and register.sub.-- file.sub.-- test.sub.-- en. Only one of them can be active at a time.
3. Once one memory is selected, memory and address counter control signals can be controlled using JTAG. The control names are mem.sub.-- we, mem.sub.-- hwd, mem.sub.-- compare, mem.sub.-- add.sub.-- u/d, mem.sub.-- add.sub.-- cnt, mem.sub.-- add.sub.-- reset, and mem.sub.-- add.sub.-- set. Their usages can be found in the section of JTAG interface signals.
1.6.5 Multiple Internal Scan Operation
In addition to the single scan mode, there is multiple scan mode in which 10 different scan chains are accessed simultaneously from MSP I/O ports. They are basically reorganized from the existing scan chains based on the scan ff/latch counts.
Multiple scan chain operation is implemented with production test in mind. 10 scan flip-flops can be accessed in every clock cycle. Furthermore, no JTAG instruction switching is necessary to have a specific function block scanned as in single scan mode.
The ten scan inputs are shared with normal functional bidirectional pins. The names are ad06.sub.-- Si0, ad07.sub.-- si1, ad08.sub.-- si2, ad09.sub.-- si3, ad10.sub.-- si4, ad11.sub.-- si5, ad12.sub.-- si6, ad13.sub.-- si7, ad14.sub.-- si8, ad15.sub.-- si9. The ten test pins are muxed with the normal bidirectional pins, ad16.sub.-- so0, ad17.sub.-- so1, ad18.sub.-- so2, ad19.sub.-- so3, ad20.sub.-- so4, ad21.sub.-- so5, ad22.sub.-- so6, ad23.sub.-- so7, ad24.sub.-- so8, ad25.sub.-- so9.
The two input ports, tca and tcb are used for scan clock stimulus. Since the two ports are dedicated for testing, it does not give any limitation for test generation. Note that they are not coming from the JTAG controller but from a tester.
On the tester during manufacturing, MSP is set to multiple scan mode, in which the boundary scan cells are in transparent mode. So that all the test vectors in normal ports can be applied through boundary scan cells.
The signal which tells the JTAG is in the multiple state can be used to direct the bidirectional I/O cells. It avoids the preprocessing step to direct the bidirectional pins.
1.6.6 Pseudo System Clock Operation
After the scan chains have been loaded, some portion of MSP needs to be executed in single or multiple clocks during prototype debugging. JTAG controller generates two non overlapping clocks, jsca, jscb which will be muxed internally with the two system clocks, clk1, clk2. The main difference from the normal mode is clock source. In this mode, the clocks are coming from the JTAG controller instead of from system clock. It is called pseudo system clock. The clocks from the output of the muxes affect the system operation. Currently, the pseudo system clock is hooked up to the IDC block only. While the clocks are applied, other system clocks are frozen.
In this mode, you can apply JTAG generated clocks for the duration of user specified number of clock cycles. However, clock counting is not implemented inside the JTAG controller. It is provided through a proTEST-PC and AVL (see the section on "hardware test environment").
1.7 Signal Overview in the Test Modes
The overview diagram is shown in FIG. 5. All six different modes can be entered through the JTAG instructions. This means there are no dedicated I/O pins to switch back and forth between the modes. A JTAG instruction should be loaded first before you go to the desired mode.
Table 1 shows the general picture of the important signals in the six different modes. Three kinds of clocks, system clock, scan clock, and pseudo system clock, are used to support the different test modes. The view of the clocks in MSP are shown in FIG. 6. System clock refers to the two non overlapping clocks, clk1 and clk2, which are derived from system clock. One of those will be connected to the normal clock port of scan flipflops and scan latches depending on the application.
Scan clock is two non overlapping clocks for scan operation, which will be connected to scan clock ports for every scan flipflops and scan latches. The scan clocks are generated by either JTAG controller or MSP input pads, tca and tcb. They will be selected appropriately depending on the test modes. In the single scan mode, two scan clocks, jsca, jscb are pulsed to a selected functional block and two clock ports, tca, tcb stay at logic 0. In the multiple scan mode, jsca and jscb stay at logic 0 and tca and tcb are enabled.
Pseudo system clock is also two non overlapping clocks which are generated by JTAG controller. They are the same signals as scan clocks, jsca and jscb. However they are going to a different place at this time, which is the normal clock port instead of scan clock port. Notice that the single scan and pseudo system clock modes are not supposed to happen at the same time. The clock is named as pseudo system clock because they are used for system execution rather than scan operation. The clocks will be denoted as psca, pscb.
Functional block in table 1 refers to any hardware module in MSP design. It could be multiplier, FALU etc. Memory blocks are either IDC or register file. Input pins refer to MSP input or inout pads except JTAG input pins. Output pins refer to MSP output or inout pads except TDO pin.
In the normal mode, the system clocks, clk1, clk2 are pulsed, which basically executes the MSP as stated in the MSP specification. Scan clocks, sca and scb should not be active (sca=0, scb=0). If they are active, the scan flipflops and latches in the MSP go to unknown states. Pseudo system clock is inactive. So that the clocks which are carried to all sequential elements are coming from the system clock pin, mclk, instead of JTAG controller. All the test logic should not affect the normal functionality.
In the boundary scan mode, no clock is active. The boundary scan chains are shifting values via JTAG generated clocks. All functional blocks are freezing their states during scan operation.
In the single scan mode, only one block can be selected and scanned in or out using scan clocks. During this period, only five JTAG pins are accessed. Other I/O pins are not significant. For the same reason in normal mode, the system clock should not be active. All memory write should be disabled during this period.
In the memory test, the pseudo system clock is used for memory read and write operations. Input and outputs are not significant in this mode too since all data to be processed are in scan chain in the memory block. All the memory controls are steered by the memory control register which resides in JTAG control logic.
Multiple scan mode uses the scan clock which are coming from input pads, tca and tcb. The ten scan input ports and ten scan output ports are used to supply scan data instead of the JTAG port, TDI.
Pseudo normal mode uses the clock from JTAG to execute the MSP. In this mode the boundary scan cells at MSP I/O are not transparent but in intest mode. So that the input is steady in this mode.
1.8 Clock Control Scheme via JTAG Controller
Clock control scheme is incorporated to help the prototype debugging. The scheme implements clock stop, clock generation on demand, and clock restart. For the control signals, refer to special control registers in 1.10.4. Please refer to the clock specification for MSP clocks.
Clock stop: when clock stop request is made from JTAG controller to clock generator, the clocks to MSP, system clock, pci clock, and codec clocks stops at the first rising edge of each clock after clock stop request is made.
Clock stop request is made in two different ways. The first simple way is to issue the request regardless of the system state. The second way is to request after MSP is ready to stop clocks. JTAG controller broadcasts the clock shutdown notice to MSP and make stop request to clock generator after it recognizes the idle status from MSP. Currently, only vector core is implemented to issue its idle status to JTAG controller.
Clock generation on demand: Any number of clock cycles up to 1024 may be requested to clock generator through control register in JTAG controller. The number of clocks are for the system clock. Other clocks are generated in ratio with the system clock. The clocks which are generated on demand are the same as the original clocks. The request is made after the clocks are stopped.
Clock restart: when clock restart is requested, all the clocks start after the first rising edge of the clocks.
1.9 Global Reset Operation
System reset can be performed using the scan chains embedded in MSP chip. In this operation, the master reset signal goes low (active low) and remains there for the duration of reset operation.
Since the JTAG clock, TCK is not running in the normal operation, the system clock should be used to shift data into scan chains. Because the TCK is not running at this time, this can not be considered as one of JTAG instructions.
The functionality of this scheme is that when the master reset is low, the logic "0" value is shifted to all scan ff/latches. The conditions to be satisfied in reset operation are listed below.
The system clocks "clk1" and "clk2", and all other clocks which affect the scan ff/latches need to be disabled (clk1=0, clk2=0). This guarantees that only one kind of clock, which is scan clock, is applied to the scan ff/latches. This requires adding control logic to clock ports.
The system clock is used to generate the scan clocks, sca, scb. Since the scan operation need to be very slow, normal free running clock should not be used. The system clock will be divided by 2.
The master reset should be low enough to shift the reset value to scan ff/latches. The failure of not satisfying it will cause improper operation.
This operation has been implemented inside the JTAG controller section. However, it is not decided yet if MSP is going to implement this operation,
1.10 JTAG Design Detail
This section describes MSP JTAG design issues, instructions, and their codes which are available. All the functionalities described in the previous sections can be achieved using the instructions described in this section.
The instruction decoder in JTAG controller was designed for a possible 38 custom instructions. Currently 1 instruction is reserved for a future application. Out of 36, 17 instructions have an associated internal data register.
Serial output of each data register and an instruction register is muxed and connected to the TDO pin. When selected, by an instruction, data from the TDI pin can be serially shifted through the selected data register, or the instruction register, and observed at the TDO pin.
In all JTAG circuits, MSB is the left most bit and the typical signal name looks like this "DATAN:0!". When integrating with other circuits this standard should be followed, for correct signal interconnections.
1.10.1 Requirements
The following items must be satisfied for JTAG controller to properly operate.
Input pins: TDI and TMS input pins must have an onchip pull-up register. If these pins are left unconnected by the user, JTAG controller inputs are still logic high. All JTAG input pins must be connected logic high or low level under all operating conditions, for proper operation of the JTAG controller.
Clock skew: Boundary scan register being about 270 bit long clock drivers should be designed and laid out such that there is minimum skew between bit 0 clock input and bit 270 clock input. JTAG controller is designed to work up to clock frequency of 40 Mhz maximum.
Clock condition: the clocks conditions to be observed during internal scan operation are listed below.
1. The clocks going to the normal clock port in scan latches have to be disabled.
2. The clocks going to the normal clock port in scan flipflops have to be disabled.
1.10.2 Internal Scan Chains in KBP
The internal scan chains for JTAG controller are organized by functional block unit for effective chip debugging purposes. All internal scan chains are listed in table 2. The current scan chain partition does not affect the final testing time during production because the scan chains will be reorganized for production test purposes based on the number of scan cells in a chain. However it does affect the way MSP chip is debugged.
1.10.3 JTAG Instructions
JTAG instructions are described in tables 4 through 10. They are classified based on the JTAG operation classes discussed in the section of classified JTAG operations. "Test name" is the name of each instruction and imposes its application. The instruction code has to be shifted into the instruction register in the JTAG controller before accessing a specific data register. Register selected shows the data register which can be accessed in each instruction.
Table 4 shows the instructions for boundary scan in MSP. Eight of them are for MSP boundary scan chain. They select either MSP boundary scan chain or bypass register depending on their application. When boundary scan chain is selected, vectors can be loaded into the scan chain. Otherwise, MSP boundary scan is not accessible.
Three instructions in table 4 are for the ARM7 boundary scan chain. They select the ARM7 boundary scan chain.
Table 3 shows the control signals for boundary scan cell and system clock bypass signal. There are four mode signals to control two boundary scan chains for MSP and ARM7, which are itemized below. Please refer to the table of JTAG I/O signals in the next section for the explanation of other control signals, MSP.sub.-- bs.sub.-- disable, ARM7.sub.-- bs.sub.-- disable, and sys.sub.-- clk.sub.-- bypass.
MSP Mode.sub.-- I: MSP boundary scan input cell mode signal
MSP Mode.sub.-- O: MSP boundary scan output cell mode signal
MSP Mode.sub.-- C: MSP boundary scan control cell mode signal
ARM7 Mode.sub.-- I: ARM7 boundary scan input cell mode signal
ARM7 Mode.sub.-- O: ARM7 boundary scan output cell mode signal
When a mode signal is low, the boundary scan cell becomes transparent to take inputs from normal input ports. When it is high, the output of boundary scan cells depends on the update latch in the boundary scan cell. (Please refer to the KGL75 data book for the details about boundary scan cells).
Table 5 shows internal scan chains for all functional blocks which can be accessed via JTAG controller. There is only one instruction for multiple scan mode in table 6.
The table 7 shows the memory access instructions. Three memories in IDC block can be controlled by JTAG controller. Data RAM and register file have their own instructions. Vd RAM and Tag RAM are accessed simultaneously. There is one more instruction available for future. It could be for ROM or another embedded RAM. MCR is memory control register which is located in JTAG controller.
Table 8 shows the default instruction when system is powered up. Table 9 shows the instruction for generating pseudo system clock which is actually coming from the JTAG pin TCK rather than the system clock. Thus you can control the number of clock cycles via the JTAG interface. Table 10 shows the available instructions for future application.
1.10.4 Special Control Registers
There are two special registers which are controlled by JTAG controller. There are used to control the internal logic or observe the status of the MSP system, the names are MCR (Mode Control Register) and OCR (Observation Control Register). The control signals for each control register are shown below.
1.10.5 Test Scenarios Using JTAG Instructions
1.10.5.1 Debugging Steps
A debugging process of MSP will involve taking a couple of steps, which are predefined and will be repeated. The brief steps to follow are described below. This is how to use the JTAG instructions during the procedure.
Step 0: Issue cloak stop request: when you want to stop the clock for any reason while MSP is executing its operations, the clock stop flag needs to be issued first. It is issued through JTAG control logic. Then the flag is broadcast to every necessary functional block. JTAG instructions MCR/BIST1 or NCR/BIST2 can be used to issue the signal.
Step 1: Observing internal state: the next step is to know when to step into the JTAG controlled modes from the normal mode. In this mode, the internal state can be observed through OCR (Observation Control Register). The clock stop will not be activated until JTAG observes all signals from all the functional blocks. While MSP is executing its operations, the states can be observed through the TDO pin. The instruction to be used is monitor.
Step 2: stopping the clocks: since the necessary states have been observed, you can stop all types of clocks when the system is idle. Clock stop is required to be able to scan the appropriate scan registers. You can selectively stop the clocks depending on how you set up the values in MCR. You should not scan the cell for the blocks for which normal clock is running. The clock stop signal is being issued while MSP is running with system clock. Any of the four instructions, MCR/BIST1, MCR/BIST2, MCR/BIST3, and MCR/BIST4 can be used to issue the clock stop signal. MCR/BIST1 and MCR/BIST2 can issue the signals while boundary scan cells are in transparent mode. The others can issue the clock stop signals while all input signals are blocked.
Step 3: Scanning the internal states: now, every clock is bypassed, so that there are no free running clocks. You can scan the appropriate blocks. You can use instructions 9-10 to scan the boundary of ARM7 blocks. The instructions 12 through 28 can be used to scan the functional blocks. Instructions 35 and 36 can be used to generate the fast clocks, which are coming from TCK. Before the clocks are restarted, you want to take the necessary setup in MSP. For instance you need to take care of the state machine of generating the half clocks like ARM clock.
step 4: Restarting the clocks: now the system clock can be restarted by setting the values in MCR. The same instructions as in step 2 can be used in this step. Before starting clocks again, the clock stop flag will be reset to logic "0".
1.10.5.2 Manufacturing Test Operation
The manufacturing test mode can be entered using multiple scan instruction. Once decoded for this mode, the MSP is configured as follows.
10 bidirectional pins are configured as input ports
10 bidirectional pins are configured as output ports
1 bidirectional pin is configured as an input port of clk1
1 bidirectional pin is configured as an input port of clk2
1 bidirectional pin is configured as an input port of scan.sub.-- mode
The other bidirectional pins are controlled as in the normal mode
The ARM7 clock, which is same as I/O clocks is applied as the clk2
PCI clocks use the clk1, clk2
The scan clocks are generated by the two input pins, tca, tcb
All codec clocks are supplied from codec clock ports.
1.10.5.3 ARM7 Execution
ARM7 is executed using the ARM7 intest instruction. The ARM7 boundary scan cells are not transparent. The input and output of ARM7 are applied and observed through the boundary scan chain.
The clock is generated from TCK to speed up the clock application. The three inputs, prog32, data32, and bigend are required to change its signal when mclk is high. To achieve it, the update signal is separate from the update signals of other boundary scan cells.
It should be noted that the mclk is shared with the I/O clock. Once the clock of ARM7 is trigered the state of the other blocks can be changing.
1.10.5.4 Cache and Register File Access
Load the MCR/BIST4 instruction, which selects the MCR as data register and blocks the input and output signals. The bist clock is generated in this mode to speed up the operations. By controlling the MCR, the read and write can be performed.
The clocks which go to cache and register file are muxed with test clock. The memory operation should not disturb the state in other logic blocks.
1.10.5.5 Vector Only Execution
Vector only execution requires considering the output of ARM7 block as the input of VP blocks. Use ARM7 boundary scan access instructions to do it.
1.10.5.6 Intest and Extest
Use intest and extest instructions.
1.10.6 JTAG Interface Signals
All JTAG interface signals are listed in table 11.
1.11 Hardware Test Environment
The hardware test environment is shown in FIG. 7. AVL (ASCII Vector Language) is both a test vector language, designed specifically for boundary scan testing, and a boundary scan test tool. It merges traditional parallel vector oriented Automated Test Equipment (ATE) languages with serial boundary scan testing defined by IEEE Standard 1149.1.
The proTest-PC is a PC-based test controller board capable of generating and receiving IEEE Std 1149.1 signals for testing components, boards and systems. AVL and proTest-PC are the products of AIS (Alpine Image Systems, Inc.).
During test process, all the test vectors for MSP will be formatted serially via AVL language and applied to MSP through proTest-PC board. Test vectors are the vectors which are applied to MSP I/O or scan chains. To ease the test vector application for all functional blocks, which is performed serially, AVL macros need to be developed to access particular location in scan chains. The communication will be made through JTAG 5 pins only. Please refer to following documents for more information.
AVL User's Guide, V1.80, Alpine Image Systems, Inc, 1995
User's Guide for proTEST-PC, V3.01, Alpine Image Systems, Inc, 1995
1.12 Embedded RAM Test Scheme
1.12.1 IDC
FIG. 8 shows the test scheme for IDC block. Test logics are inserted to blocks, CCU and IDC. All dotted lines stand for the signals in normal mode. CCU block provides the mux logics for the addresses in test and normal modes. Address is generated with 9 bit counter with set, reset, up/down, and count enable functions. All counter operation should be synchronous with the system clock, clk1. The four counter control signals, mem.sub.-- add.sub.-- ud, mem.sub.-- add.sub.-- cnt, mem.sub.-- add.sub.-- reset, and mem.sub.-- add.sub.-- set, are provided by JTAG controller. The first two bits in the MSB side need to be connected for the bank selection.
32 bit ben.sub.-- idc signals are set to logic 1 during testing the memory. There are two signals which select between test and normal signals. Vt.sub.-- ram.sub.-- test.sub.-- en is for testing vd.sub.-- ram and tag.sub.-- ram. Data.sub.-- ram.sub.-- test.sub.-- en is for data.sub.-- ram testing. If the signals are logic high, test data is selected.
IDC blocks have comparators embedded for automatic comparison while MARCH C algorithm is being applied. There are 6 memory control signals which are also provided by JTAG controller. Mem.sub.-- compare enables the comparison between input and output registers. If there is any error occurred, the output of comparator will produce logic 0. Otherwise, it is logic 1. All the I/O registers are in scan chain, through which input and output access can be made.
Mem.sub.-- hwd signal enables holding the data in the write register when it is logic 1. Please refer to MSP spec. for other memory control signals, mem.sub.-- we, mem.sub.-- data.sub.-- cs, mem.sub.-- vt.sub.-- cs, and mem.sub.-- vclear. The names are the same as in the normal mode signals except they starts from "mem".
1.12.2 Register File
The test scheme specified for the register file is targeted to easily access the register file in test mode. Since there is no comparator logic embedded as in IDC, it is not practical to apply MARCH type algorithm to this memory.
FIG. 9 (register file test scheme) shows the overall scheme for test environment. The dotted lines represent the normal signals. There are three regions, data path, reg.sub.-- file, and EXE block. All the logic in the left hand side of the bold line belongs to EXE block except the reg.sub.-- file block. The EXE block provides the mux logic to select the address and control signals between test and normal modes. The test mode selection signal, reg.sub.-- file.sub.-- test.sub.-- en and the three memory control signals, mem.sub.-- we1, mem.sub.-- we2, and mem.sub.-- cex are provided by the JTAG control logic. If reg.sub.-- file.sub.-- test.sub.-- en is high, test data is selected.
The addresses are generated by 6 bit counter with set, reset, up and down, and count enable. All count operation are synchronous with system clock, clk1. The input and output registers are located in data path blocks as specified in the FIG. 9. All the I/O registers need to be scanned. 32 bit ben signals are tied to logic 1 in the test mode.
Free running clock is provided to register file. Capture scan register is attached to the output of it.
1.13 MSP Boundary Scan
All the I/O pads in MSP have appropriate boundary scan cells. There are 270 boundary scan cells connected in one scan chain. The sequence and cells are listed in table 13.
1.13.1 Boundary Scan Cell Selection
The current available JTAG cells in KGL75 are listed below. Their matching JTAG standard cells are shown in table 15. The boundary scan chain for MSP uses the LSSD type scan cells. The difference from the KGL75 is using two non overlapping clocks to shift through boundary scan chain. KGL75 boundary scan cells are used for boundary scan of ARM7.
JTBI1: Bi-directional I/O boundary scan cell.
JTCK: Special input, such as clock input, boundary scan cell
JTIN1: Input boundary scan cell
JTINT1: Three-state control internal boundary-scan cell
JTOUT1: Output boundary scan cell
The rules of selecting appropriate boundary scan cells are stated below.
For every input cell including clock inputs except GND, VDD, and VCC pins, use JTIN1.
For every bidirectional cells, use JTBI1.
For every output cells, use JTOUT1.
For t/s(tri-state) pins, add a JTINT1 cell. Use only one tri-state control cell for a group of signals such as AD31:0!.
For the pins with o/d(open drain), Use a JTINT1 cell.
For the pins with s/t/s(ststained tri-state) is same as t/s in terms of boundary scan cell selection.
1.13.2 Boundary Scan Cell Sequence
The boundary scan is chained in the counter-clock direction from TDI input. Please refer to MSP pin layout for more information.
Input cell comes first in case of bidirectional pins.
If there is tri-state pins, the tri-state control boundary scan cell, JTINT1, comes before the cells.
If there are many tri-state pins in a sequence, only one tri-state control cell is inserted before the first tri-state pins in the sequence.
1.13.3 Design Details
All ADxx signals have the same tri-state enable signals. So only one control boundary scan cell is enough to control 32 bit AD signals. However, to properly control the signals in the multiple scan mode, four more control boundary scan cells have been inserted. As a result, a total of five control boundary scan cells is used for AD bus. The five control boundary scan cells take one normal control signal from MSP core and produce five control signals.
1.14 ARM7 Boundary Scan
The boundary scan cell selection has been treated as the way in the MSP boundary scan cell selection. Refer to the previous section for more information. The names and scan order are described in the table 14.