WO2005022390A1 - マイクロコンピュータ及びシステムプログラムの開発方法 - Google Patents

マイクロコンピュータ及びシステムプログラムの開発方法 Download PDF

Info

Publication number
WO2005022390A1
WO2005022390A1 PCT/JP2004/012350 JP2004012350W WO2005022390A1 WO 2005022390 A1 WO2005022390 A1 WO 2005022390A1 JP 2004012350 W JP2004012350 W JP 2004012350W WO 2005022390 A1 WO2005022390 A1 WO 2005022390A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface circuit
buffer
program
debug
microcomputer
Prior art date
Application number
PCT/JP2004/012350
Other languages
English (en)
French (fr)
Inventor
Kazuo Usui
Original Assignee
Renesas Technology Corp.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Technology Corp. filed Critical Renesas Technology Corp.
Priority to US10/569,799 priority Critical patent/US7401257B2/en
Priority to JP2005513467A priority patent/JP3955876B2/ja
Publication of WO2005022390A1 publication Critical patent/WO2005022390A1/ja

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/267Reconfiguring circuits for testing, e.g. LSSD, partitioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/261Functional testing by simulating additional hardware, e.g. fault simulation

Definitions

  • the present invention relates to a microcomputer, particularly to a microcomputer having a debug support function, and further relates to a method of developing a system program for operating a microcomputer.
  • a microcomputer having a debug support function has a debugging interface for communicating with an emulator or a host computer during debugging.
  • a debugging interface for example, a serial input / output interface conforming to the JTAG (Joint Test Action Group, IEEE Std 1149.1, IEEE Standard Test Access Port and Boundary-Scan Architecture) protocol is used.
  • JTAG Joint Test Action Group
  • Patent Document 1 JP-A-2002-202900 (paragraph 0017)
  • the present inventor performs a system debug of a microcomputer having a debug support function (also referred to as an on-chip debug function) (a microcomputer to be debugged is referred to as a target microcomputer), the target program is transferred to a host computer.
  • a target microcomputer f has a target microcomputer f and a TAG-compliant debugging serial interface circuit.
  • the emulator is connected to a personal computer (PC) having a USB (Unversal Serial Bus) interface circuit with a USB cable, and the emulator is connected to a target system (also called a user system) with a dedicated user interface cable. Connect to the serial interface for microcomputer debugging.
  • PC personal computer
  • USB Universal Serial Bus
  • the target microcomputer has an on-chip debug function.
  • the target microcomputer with on-chip debug function is In addition to the user mode, there is a debug mode that supports the development of the target program. In the user mode, a user program developed by the user for the target system is used.
  • a program for supporting program debugging (also referred to as a debugging support program) is mainly executed.
  • the debug support program is transferred from the emulator software on the host computer, written into the debugging address space inside the target microcomputer, and linked with the emulator software on the host computer.
  • the user program supplied from the host computer is written in a predetermined memory space on the target system by the target microcomputer executing the debug support program in the user mode.
  • a serial interface circuit for debugging that complies with the previous TAG is used.
  • the transfer speed is proportional to the clock frequency and is lower than that of the USB interface circuit.
  • the transfer processing capability is 1200 kilobytes (KB) / sec at full speed even with the USB standard 1.1, but the JTAG-compliant interface requires a target microcomputer power supply for each maximum data transfer such as 4 bytes.
  • the data transfer procedure is required to obtain the status indicating the access permission of the data transfer and set the next transfer data. Due to the overhead, even if the synchronous clock frequency is increased, the transfer speed limit such as 230 KB / s will be reached. Occurs.
  • An object of the present invention is to speed up data transfer when a system program to be debugged is downloaded from a host computer to a target system when system debugging is performed on a target microcomputer.
  • Another object of the present invention is to download a system program to be debugged from a host computer to a target system when developing a system program using an emulator. In terms of speeding up data transfer when downloading data, it contributes to shortening the development period of system programs.
  • the microcomputer includes a central processing unit, a high-speed serial communication interface circuit (3) usable for a debugging interface, and an external bus interface circuit (5) connectable to an external memory. ).
  • the high-speed serial communication interface circuit has a plurality of input buffers (EP1, EP2) therein, and can output data from another input buffer in parallel with the input operation to one input buffer.
  • the high-speed serial communication interface circuit can receive a system program, and can output the received system program together with a memory access control signal from the external bus interface circuit.
  • the high-speed serial communication interface circuit is, for example, a universal serial bus interface circuit.
  • the high-speed serial communication interface circuit is further provided with a two-sided buffer capable of switching input / output operations alternately and operating in parallel, thereby realizing further higher data transfer speed. In terms of speeding up data transfer when downloading the target program from the host computer to the target system, it contributes to shortening the development period of the target program.
  • a direct memory access controller capable of controlling transfer of a received system program to a memory connected to an external bus interface circuit. This is advantageous in reducing the load on the central processing unit and further increasing the speed of data transfer.
  • the transfer source of the system program by the direct memory access controller is, for example, the input buffer of the high-speed serial communication interface circuit.
  • the high-speed serial communication When a random access memory (7) capable of temporarily storing the system program received in the input buffer of the communication interface circuit is provided, the source of the system program by the direct memory access controller is the random access memory. Good.
  • the input buffer (EP1, EP2) of the high-speed serial communication interface circuit and the random access memory (7) constitute a multi-stage buffer to receive the system program, the reception processing by the high-speed serial communication interface circuit and the transfer processing for the received data are performed. There is more room for the speed difference.
  • a low-speed serial communication interface circuit dedicated for debugging and the low-speed serial communication interface circuit dedicated for debugging controls the high-speed serial communication interface circuit in a debug mode. It can be used to input control data.
  • the debug-dedicated low-speed serial communication interface circuit is, for example, a serial interface circuit conforming to JTAG, and can perform an interface operation without requiring control of a central processing unit.
  • the debug-dedicated low-speed serial communication interface circuit can be used for receiving a system program instead of the high-speed serial communication interface circuit in, for example, a debug mode.
  • a trace control circuit may be incorporated.
  • the trace control circuit sequentially stores the internal state when the central processing unit executes the system program as trace information, and the stored trace information is output to the outside after the execution of the system program is stopped.
  • the high-speed serial communication interface circuit can be used for external output of the trace information.
  • a method of developing a system program according to the present invention is to develop a system program to be executed by a target device using a host computer (25), an emulator (35), and a target device (33).
  • Target program can be created by using two-sided buffer. In terms of speeding up data transfer when downloading from the host computer to the target system, the development period of the target program can be shortened.
  • a system program output from the buffer is transmitted to a target device via a FIFO buffer having a storage capacity of the one buffer or more by low-speed serial communication.
  • the transmission from the FIFO buffer to the target device is performed in response to the transmission permission from the target device, and the transfer to the buffer buffer FIFO buffer is performed in response to the full state of the FIFO buffer. Suppress.
  • the microcomputer (1) has a user mode and a debug mode, and has a central processing unit (2), a universal serial bus interface circuit (3), and a first debug control. It has a ROM (71) holding a program, a RAM (7), and an external bus interface circuit (5).
  • the universal serial bus interface circuit has a predetermined end point buffer circuit (20) made available in the debug mode.
  • the predetermined end point buffer circuit includes a pair of buffers (EP1, E P2), wherein one of the pair of buffers is enabled for input operation while the other is enabled for output operation in parallel.
  • the target microcomputer is a target microphone computer, and it is assumed that the microcomputer is directly connected to a host computer for debugging support via a universal serial bus interface circuit.
  • the central processing unit executes the first debug control program to initialize the universal serial bus interface circuit to be operable, Receiving the second debug control program in the universal serial bus interface circuit, storing the received second debug control program in the RAM, and shifting to execution of the second debug control program stored in the RAM. .
  • the second debug control program transferred from the emulator software on the host computer.
  • the program can be downloaded at high speed, and the startup of the debug controllable state linked to the emulator software on the host computer can be accelerated.
  • the central processing unit further includes a buffer RAM and a direct memory access controller, and the central processing unit receives the download request received by the universal serial bus interface circuit according to the second debug control program.
  • the direct memory access controller transfers the user program received by the universal serial bus interface circuit to the buffer RAM. It is possible to speed up the download of the user program in a state where debug control is possible.
  • the central processing unit responds to the transfer request command received by the universal serial bus interface circuit according to the second debug control program, and Then, the program transferred to the buffer RAM is transferred to the external program memory via the external bus interface circuit.
  • the central processing unit transitions to the user mode in response to a mode control command after the execution state of the second debugging control program is executed.
  • the central processing unit transmits the external bus interface.
  • An instruction is fetched from the program memory or the like via a single circuit to execute a user program.
  • the user program is debugged by tracing the execution state of the user program and analyzing it.
  • a microcomputer (40) includes a central processing unit (44), a universal serial bus interface circuit (48), and a ROM having a first debug control program. (45), a buffer RAM (47), and an external interface circuit (41), wherein the universal serial bus interface circuit has a predetermined end point buffer circuit (20), and the predetermined end point buffer circuit Has a pair of buffers (EP1 and EP2) that can operate in parallel, and one of the pair of buffers is enabled to input while the other is enabled to output in parallel.
  • the central processing unit executes the first debug control program at a power-on reset, initializes the universal serial bus interface circuit to be operable, and transfers the second debug control program to the universal serial bus.
  • a second debug control program is stored in the buffer RAM, and the second debug control program stored in the buffer RAM is output via the external interface circuit.
  • the target microcomputer is a control microphone computer of the emulator (33) disposed between the target microcomputer and the host computer for debugging support.
  • the microcomputer further includes a direct memory access controller (46), and the direct memory access controller is configured to control the buffer RAM according to a transfer control condition by the central processing unit. To transfer the second debug control program to the outside via the external interface circuit.
  • FIG. 1 is a block diagram illustrating a microcomputer according to the present invention.
  • FIG. 2 is an explanatory diagram showing a connection form between a target system equipped with a microcomputer with a built-in USBIF and a host computer.
  • FIG. 3 is an explanatory diagram showing a connection form between a target system equipped with a macro computer without a USBIF and a host computer.
  • FIG. 4 is a block diagram showing an example of a microcomputer and an emulator of FIG. 3.
  • FIG. 6 A logic circuit diagram showing the details of the JTAG interface logic composed of FPGA.
  • FIG. 6 is a timing chart showing an operation according to the configuration of FIG.
  • FIG. 7 is a flowchart showing a control procedure for transferring data to FIFOTDO by switching between two buffers BUF1 and BUF2 of RAM.
  • FIG. 8 is a timing chart showing a difference between program download operation timings in each of FIGS. 5 and 9;
  • FIG. 9 is a block diagram illustrating an emulator according to the comparative example of FIG. 5.
  • FIG. 10 is a diagram exemplifying download performance when downloading a user program file from a host computer in each of the example of FIG. 5 and the comparative example of FIG.
  • FIG. 11 is a block diagram showing a more specific example of a microcomputer according to the present invention.
  • FIG. 12 is a timing chart illustrating the operation timing of on-chip debugging by a microcomputer.
  • FIG. 13 is an explanatory diagram of a USB communication format.
  • FIG. 14 is a flowchart illustrating a basic form of communication handshake control between a host computer and a USB interface circuit.
  • FIG. 15 is a flowchart showing an example of handshake control between a host computer and a USB interface circuit when a forced break is performed during execution of a user program.
  • FIG. 16 is a flowchart showing an example of control of software download from a host computer to a USB interface circuit.
  • FIG. 17 is a block diagram showing a modification of the microcomputer of FIG. 1.
  • FIG. 18 is a block diagram showing a modification of the microcomputer of FIG.
  • FIG. 1 illustrates a microcomputer 1 according to the present invention.
  • the microcomputer 1 is formed on a single semiconductor substrate (semiconductor chip) such as single crystal silicon by a complementary MOS integrated circuit manufacturing technique or the like.
  • the microcomputer 1 has a central processing unit (CPU) 2, a USB interface circuit (USBIF) 3 as a high-speed serial communication interface circuit that can be used for a debugging interface, and an external bus interface circuit that can be connected to an external memory (EXMRY) 4.
  • CPU central processing unit
  • USBIF USB interface circuit
  • EXMRY external memory
  • EXIF Direct memory access controller
  • DMAC Direct memory access controller
  • RAM Random access memory
  • JTAG interface circuit JTAGIF 8 as debug-specific low-speed serial communication interface
  • Trace control circuit TRCNT
  • Trace information AUD Advanced 'User.Debug
  • AUDIF External output control
  • EMMRY emulation RAM
  • IBUS internal bus
  • the internal bus 12 may be connected to other circuits such as a timer counter.
  • the RAM7 is used as a buffer RAM for temporarily storing transfer data.
  • the USBIF 3 complies with, for example, the USB 2.0 standard, and includes a USB buffer unit (BEP) 20 and a USB interface control unit (UCNT) 21.
  • the USB buffer section 20 has a double buffer structure of USB buffers EP1 and EP2 each of 512 bytes.
  • the USB buffers EP1 and EP2 are constituted by, for example, FIFOs.
  • UCNT21 performs so-called USB device control and data transfer control.
  • UCNT21 is connected as a USB host to a USB host mounted on, for example, the host computer (personal computer) shown in Fig. 1 via a USB cable 23, and as a USB device control, responds to a command from the USB host by a predetermined protocol. Performs serial data transmission / reception control.
  • Data received from the USB host is sent to the buffer unit 20, and data sent to the USB host is supplied from the buffer unit 20.
  • the UCNT 21 performs read / write control for the buffer unit 20 and data transfer control for the DMAC 6 as data transfer control.
  • data transfer control for the DMAC 6 as data transfer control.
  • the read / write control for the buffer unit 20 in parallel with the input operation to one USB buffer (input operation of received data from the USB host), data output operation from another USB buffer (internal for DMA transfer) Output operation to the bus 12).
  • the DMAC 7 sets data transfer control conditions such as a transfer source address and a transfer destination address by the CPU 2 and controls data transfer from the transfer source to the transfer operation in response to a DMA transfer request from the USBIF 3 or the like. . It supports both dual addressing mode and single addressing mode as data transfer mode. For example, it controls data transfer with a single address between USB buffers EP1, EP2 and EMMRY11, data transfer with a single address between USB buffers EP1, EP2 and RAM7, and data transfer with dual addresses between RAM7 and EXMRY4. can do.
  • JTAGIF8 is an input register TDI for inputting received data, an output register TD # for outputting transmission data, a data register SDDR for connecting the register TDI to the internal bus 12, a command register not shown, and a JTAG control circuit CTCNT. ) 24.
  • JCNT24 Controls serial output from register TDO and serial input to register TDI in synchronization with lock signal TCK.
  • TAP test 'access' port
  • control is performed by a 1-bit mode select signal (not shown) serially input in synchronization with the clock signal TCK.
  • External data input to JTAGIF8 is enabled each time the access enable bit is output from register TD # to the outside.
  • JTAGIF8 outputs an access permission bit to the outside every time 4 bytes are received.
  • the serial communication speed of JTAGIF8 is slow.
  • the TCK frequency is several tens of megahertz
  • the transfer processing capacity is 480 MB / sec at high speed, but it is slow.
  • the CPU 2 includes an instruction control unit and a calculation unit (not shown).
  • the instruction control unit controls the instruction fetch and decodes the fetched instruction.
  • the operation unit executes data operation and address operation by using the decoded signal of the instruction and the operand specified by the instruction, and executes the instruction.
  • the microcomputer 1 has a debugging mode for supporting development of a target program, in addition to a user mode as a normal mode.
  • the debug mode can be specified from the mode terminal at the time of reset, or can be specified by a break interrupt in the user mode.
  • a system program also called a user program stored in EXMRY4 is executed.
  • a program for mainly supporting program debugging (a debugging support program) is executed.
  • the debug support program is transferred by the emulator software of the host computer 25 every time the microcomputer 1 is turned on, and written into the debug address space of the EMMRY11.
  • the boot program is provided in a mask ROM (not shown) or an electrically rewritable flash memory built in the microcomputer 1.
  • the user program is written to EXMRY4 on the target system by the microcomputer 1 executing the debug support program in the debug mode.
  • the user program is supplied from the host computer 25.
  • USBIF 3 is made available for communication between the microcomputer 1 of the target system and the host computer 25. It is possible to use JTAGIF8, However, USBIF3 is superior in terms of communication speed, so it is a good idea to use USBIF3.
  • the USBIF3 has two-sided buffers EP1 and EP2 that can alternately switch input / output operations and operate in parallel, thereby achieving higher data transfer speed. In terms of speeding up data transfer when downloading the user program from the host computer 25 to the target system, the development period of the user program can be shortened.
  • DMAC6 can be used to transfer the system program received by USBIF3 to EXMRY4 connected to EXIF5.
  • the transfer source of the system program by the DMAC 6 is, for example, the input buffers EP1 and EP2 of the USBIF3.
  • the DMAC 6 When temporarily storing the system program received in the input buffers EP1 and EP2 of the USBIF3 in the RAM 7, the DMAC 6 first transfers the system programs from the buffers EP1 and EP2 to the RAM 7 and, at an appropriate timing, checks the RAM7 output. You can transfer the system program to EXMRY4.
  • the front neck SJTAGIF8 can be used for input of control data for controlling the USBIF3 in the debug mode.
  • JTAGIF8 can be used for receiving a system program instead of the USBIF3, for example, in the debug mode.
  • the necessity is, for example, when the use of the USBIF3 is reserved in the user mode and the environment cannot be used for downloading the program.
  • the USBIF3 may be configured to include a plurality of transfer channels. If one of them is dedicated to on-chip debugging, it is not necessary to download the program by alternative communication using JTAGIF8 at all, so that high-speed data transfer can be guaranteed.
  • the TRCNT 9 is a circuit for sequentially storing the internal state of the CPU 2 via the trace bus: L 3 when the CPU 2 is executing a user program.
  • the storage location is a FIFO buffer (F BUF) 26, and the address control for the FIFO buffer 26 is performed by an address counter (ACOUNT) 27.
  • the trace information stored in the FIFO buffer 26 can be transferred to the host computer 25 by the USBIF3 or fTAGIF8 in the debug mode. However, since the capacity of the FIFO buffer 26 is small, it is not suitable for tracing large amounts of data. It is. When collecting a large amount of data as trace information, use the AUDIF10.
  • the address information and data information of the internal bus 12 may be stored in the trace buffer (TRBUF) 28 for each bus access cycle, and the data of the TRBUF 28 may be output to the outside in synchronization with the clock signal AUDCLK.
  • AUDATA is the output data
  • AUDSYNC is the data output synchronization signal.
  • FIG. 2 shows a connection form between a target system 30 equipped with the microcomputer 1 and a host computer 25.
  • the target system 30 is provided with a USB connector 31 for connecting to the USBIF3 of the microcomputer 1, and the USB connector 31 can be directly connected to the USB connector of the host computer 25 with the USB cable 23.
  • the microcomputer 1 has a debugging function, it is possible to download the system program as a target program and the debugging support program without interposing an emulator between the host computer 25 and the microcomputer 1, and thereafter, In the user mode, trace information is collected while executing the system program. When the execution of the system program is broken and the mode is changed to the debug mode, the evaluation of the target system and the modification of the system program are performed by referring to the trace information.
  • FIG. 3 shows, as another example, a connection form between a host system 25 and a target system 34 equipped with a macrocomputer 33 without the USBIF3.
  • An emulator 35 is provided between the target system 34 and the host computer 25.
  • the emulator 35 and the host computer 25 are connected by the USB cable 23.
  • the target system 34 is connected to the emulator 35f and the TAG interface face cable 36.
  • FIG. 4 shows an example of the microcomputer 33 and the emulator 35.
  • Microcomputer 33 differs from microcomputer 1 in FIG. 1 in that it does not include USBIF3. Circuit elements having the same function are denoted by the same reference numerals, and detailed description thereof will be omitted.
  • the emulator 35 includes a microcomputer 40, a field 'programmable' gate 'array (FPGA) 41, a synchronous static random access memory (SSRAM) 42 Consisting of
  • the microcomputer 40 has a CPU 44, an R ⁇ M 45, a DMAC 46, a RAM 47, and a USBIF 48, and is formed on one semiconductor substrate.
  • the USBIF 48 is composed of a USB buffer unit 20 having USB buffers EP1 and EP2 on two sides and a UCNT 21, and conforms to the USB 2.0 standard.
  • the RAM 47 forms a two-stage RAM buffer at the subsequent stage for the storage information of the USB buffers EP1 and EP2, and a first RAM buffer area BUF1 and a second RAM buffer area BUF2 are allocated.
  • the dual port has separate access ports for the first RAM buffer area BUF1 and the second RAM buffer area BUF2.
  • the data output from the other USB buffer EP2 is stored in the first RAM buffer area BUF1 of the RAM 47, and in parallel with this.
  • the data stored in the second buffer area BUF2 can be externally output from a predetermined port.
  • the data output from the USB buffer EP1 is stored in the second RAM buffer area B UF2 of the RAM 47, and in parallel with this, the first RAM
  • the data stored in the buffer area BUF1 can be output externally from the specified port. It is desirable to use the DMAC 46 for data transfer from the USBIF 48 to the RAM 47.
  • the FPGA 41 is a circuit having a large number of nonvolatile storage elements such as flash memory cells, and capable of setting a logic function as desired according to the program state of the nonvolatile storage elements.
  • the FPGA 41 constitutes a JTAG interface logic 41A for transmitting and receiving data to and from the JTAGIF8 of the microcomputer 33, and an address generation logic 41B for controlling access to the SSRAM.
  • the JTAG interface logic 41A has an output FIFO buffer FIFOTDO, an input buffer TDI, and an interface control circuit FCNT) 50.
  • the CPU 44 that executes the USB interface control program manages the writable state (TDOST) and empty state (TDOF) of the output FIFO buffer FIFOTDO, and manages the output FIFO.
  • TDOST writable state
  • TDOF empty state
  • the access permission bit f and CNT50 from JTAGIF8 of microcomputer 33 are Monitor. When the access permission bit is enabled, the output FIFO buffer FIFOTD O 4 bytes of information is transmitted.
  • the information transmitted from the output FIFO buffer FIFOTDO is received by JTAGIF8 of the microcomputer 33 and stored in the data register SDDR.
  • DMAC6 is started and the information is written to EXMRY14 by DMA transfer.
  • the SSRAM 42 is used for storing trace information output from the AUDIF 10 of the microcomputer 33.
  • the address generation logic for controlling the access of the SSRAM 42 realized by the FPGA 41 selects whether to perform the control with an address counter (ACOUNT) 52 and a selector (ASEL) 5 counter 52. Which is to be selected is determined according to the instruction of the CPU 44.
  • a two-sided buffer composed of buffers BUF1 and BUF2 enabling parallel input and output of received data
  • An output FIFO buffer FIFOTDO that can store the received data output from one of the buffers in FIFO format is provided, so the host computer 25 and the microcomputer 33 are not directly connected by the UISB interface, but to some extent Data transfer efficiency can be increased.
  • the built-in RAM 47 has a double buffer structure of several kilobytes, and the host computer
  • the processing is parallelized so that the data held in the other buffer is written to the output FIFO buffer FIFOTDO, so the data in the buffers EP1 and EP2 Even when the size and the data size of the buffer FIFOTDO are different, since the operations of the buffers EP1 and EP2 and the operation of the buffer FIF ⁇ TD ⁇ are independent, it is necessary to restrict the DMAC transfer from being interrupted. Even in such a case, it is possible to respond.
  • FIG. 5 shows details of the JTAG interface logic 41 A configured by the FPGA 41.
  • FIG. 6 shows the operation timing of FIG.
  • the buffer FIFOTDO has a multi-stage configuration of 4 bytes ⁇ 61 stages (244 bytes).
  • An interface 55 is connected to the microphone computer 40.
  • Buffer FIFOTDO is FIF056 And a shift register 57.
  • the control block 58 and the buffer control block 59 constitute JCNT50.
  • 59A and 59B are predetermined logics.
  • CPUDAT A (REGDATA. D) is output data from RAM47
  • CPUWR—N (TDOWR—N) is a write request to FIF056, TDOREG.
  • Q is read data from FIF056, READQ is a read request to FIF ⁇ 56, SHIFTREG.
  • Output data of shift register 57 (TD 57 output).
  • SBUF_LOAD is a data load signal of the shift register 57
  • S_P is a shift signal of the shift register 57
  • TDOem is the empty signal of FIF # 56
  • TDOfl is the full signal of FIF # 56.
  • TDOST indicates whether writing to the buffer FIFOTDO is possible or not. 1 means writing is possible and 0 means writing is not possible.
  • TDOF is 1 to indicate that all data in the buffer FI F ⁇ TD ⁇ has been shifted out, and 0 to indicate that all data in the buffer FIFITDO has shifted out of the buffer, and that (initial value).
  • TDOINT is a signal for outputting an interrupt request signal IRQ when all data in the buffer FIFITDO has shifted out. 1 enables interrupt requests, and 0 suppresses interrupt requests (initial value).
  • REGDATA.D is written from the RAM 47 of the microcomputer 40 to the FIF056 in synchronization with the CPU clock CPUCLK in response to the write enable (TDOWR-N).
  • TDOWR-N write enable
  • SBUF—LOAD data transfer start load pulse
  • TDOWR—N write enable
  • DONE transfer end pulse
  • DONE-P is generated based on the access permission bit from the target microcomputer 33.
  • the access permission bit is input via the register TDI.
  • the buffer control block 59 checks TDOfl indicating the data write enable state of FIF056 every time the data transfer of the shift register 57 is completed. TDOfl generates the TDOST bit indicating the buffer FIFITDO write enable state, generates the TDOF bit indicating the empty state of the buffer FIFO TDO using TDOem and DONE_P, and reflects it in the JTAG register of the control block 58.
  • TDOF is used for an interrupt request to microcomputer 40, the interrupt is enabled by TDOF and the TDOINT bit indicating that interrupts are enabled. Generates only request signal IRQ.
  • the CPU 44 When the CPU 44 receives this interrupt request, it switches to the next RAM buffer (S7), for example, in the execution of the TDO data set process in FIG.
  • FIG. 7 shows a control procedure for transferring data to the buffer FIFO TDO by switching the two-side RAM buffers BUF1 and BUF2 of the RAM 47.
  • the maximum number of kilobytes of the RAM 47 is transferred with reference to the writable state (TDOST bit) of the buffer of the buffer FIFOTDO.
  • TDOF empty state
  • switch to the next buffer BUF2 or BUF1 and repeat the process until the specified amount of data has been transferred.
  • TDOF empty state
  • the TDOST and TDOF bits are managed and transfer data is set continuously.
  • the access permission bit sent from the microcomputer 33 to the buffer TDI is monitored by the hard logic 58. As a result, as shown in Fig.
  • writing to the microcomputer means writing data transfer to the buffer FIFO TDO of the RAM 47.
  • the JTAG output means the transfer data output to the target microcomputer 33 also in the buffer FIFOTDO.
  • SP is from target microcomputer 33 Means the status polling processing of the access permission bit.
  • FIG. 9 illustrates an emulator according to a comparative example.
  • USB is used for interface with the host computer.
  • a USB driver 61 and a USB controller microcomputer chip 62 are provided.
  • the program of the USB controller microcomputer chip 62 is stored in the ROM 63, and the SDRAM 64 is used as a work memory.
  • the received USB data is temporarily stored in the SDRAM64, stored in the SDRAM64 through USB packet analysis and the like, and then transmitted from the data output register of the JTAG controller 65 to the target microcomputer.
  • the software download data transfer method ends transmission data in the status acquisition mode in which the access permission bit can be received from the target CPU.
  • the maximum amount of data transfer is 4 bytes at a time.
  • the emulator acquires the access permission bit indicating the end of the status acquisition mode from the target microcomputer 33 each time the transfer is performed.
  • the access permission bit must be acquired while polling, and the transfer data must be set to the data output register (TDO).
  • TDO data output register
  • an overhead T1 occurs from the detection of the access permission bit to the transfer data set.
  • (B) of FIG. 8 sets data to the data output register (TDO) every 4 bytes
  • (A) of FIG. 8 sets data to the data output register (TDO) in advance.
  • the hardware logic 58 outputs data in 4-byte units every time the access permission bit is acquired.
  • T CK 20MHz
  • the download performance is approximately doubled to 400KB / sec.
  • FIG. 11 shows a more specific example of the microcomputer 1.
  • the USB interface circuit 3 shows a plurality of USB buffer units (BEP0 and BEP6) 20 and The Further, a ROM 71 holding a boot program is illustrated.
  • the emulation memory 11 is composed of an SRAM, whereas the ROM 71 is composed of a mask ROM or an electrically rewritable nonvolatile memory such as an EEPROM or a flash memory.
  • a break circuit 72 is provided. The break circuit 72 sets a break condition via the CPU 2 in the debug mode, detects occurrence of a state matching the break condition in the user mode, and requests a break exception to the CPU 2.
  • Each of BEP0 to BEP6 in the USB buffer unit 20 means a FIFO (First-In First-Out) buffer called an endpoint in the USB standard.
  • the FIFO buffer has a double buffer structure provided separately for input (in) and output (out), and is configured like EP1 and EP2 shown in FIG. BEP0 was understood as endpoint 0, and BEP6 as endpoint 6. Endpoint numbers are examples. The maximum number of endpoints that a single USB device can have is specified by the USB standard. Endpoint 0 (BEP0) is used for control transfer and is required for USB devices.
  • the USB interface circuit 3 can be used in both the user mode and the debug mode.
  • BEP1 and BEP2 are dedicated to use by the user program, and BEP3 to BEP6 are Dedicated to debugging support.
  • BEP0 is shared by both parties.
  • BEP0 is used for control transfer of descriptor information dedicated to on-chip debugging.
  • BEP3 is used for USB data balta-out transfer.
  • BEP4 is used for USB data bulk-in transfer.
  • BEP5 is used for inputting command commands.
  • BEP6 is used to output status information.
  • BEP1 and BEP2 are used for data input / output according to user settings in user mode.
  • the USB interface circuit 3 operates synchronously with a clock signal CLK having a frequency such as 48 MHz to which an external force is applied. CLK may be generated inside the microcomputer 1 via a PLL circuit or the like.
  • the boot program held by the ROM 71 is not particularly limited, but is a USB initialization control program and a transfer control program for initializing the USB interface circuit 3.
  • the transfer control program stores the debug support program (also referred to as ASE firmware software) received via the USB interface circuit 3 in the emulation memory 11. It is a program to do.
  • the system controller (SYSC74) is connected to the debug mode terminal ASEMD and the reset terminal RES as external terminals typically shown, and a power-on reset signal output from the power-on reset circuit (PO RES) 73. Are supplied to control the operation mode and the like of the microphone computer 1 according to the input.
  • SYSC74 when the user mode is specified by the debug mode terminal A SEMD and the power-on reset instruction from the power-on reset circuit 73 or the reset instruction from the reset terminal RES is issued, the CPU is initialized by the control signal ⁇ 1.
  • CPU2 executes the USB initialization control program stored in ROM 71 to enable operation of endpoints BE0, BEP1, and BEP2, and finally, CPU2 is enabled to start executing instructions from the first address of the program storage area.
  • the debug mode is specified by the debug mode terminal ASEMD, and when a power-on reset instruction is issued from the power-on reset circuit 73, the CPU 2 is initialized by the control signal ⁇ 2, and the CPU 2 The initialization control program is executed to enable the operation of the endpoints BE0 to BEP6. Thereafter, the CPU 2 executes the transfer control program stored in the ROM 71, and executes the debug support program (ASE) received through the USB interface circuit 3.
  • the CPU2 When downloading the user program from the host computer using the ASE firmware software, the CPU2 responds to the download request command received by the USBIF3 according to the ASE firmware software and receives the USBIF3 from the DMAC6.
  • the transferred user program is transferred to the buffer RAM 7.
  • the CPU2 responds to the transfer request command received by the USBIF3 according to the ASE firmware software, and externally transfers the program transferred to the buffer RAM7 to the DMAC6.
  • the transfer is controlled to the external memory 4 via the external bus interface circuit 5.
  • the CPU 2 shifts to the user mode in response to the mode control command in the execution state of the ASE firmware software. In the user mode, the CPU 2 can fetch and execute the external memory 4 instructions.
  • FIG. 12 shows an example of operation timing of on-chip debugging by the microcomputer.
  • ASEMD is set to low level to indicate the debug mode
  • power is turned on at time tl
  • power-on reset is instructed by the power-on reset circuit 73 (time t2)
  • the control signal ⁇ 2 is activated.
  • CPU2 is initialized, CPU2 executes the USB initialization control program stored in ROM71 and performs USB boot processing to enable the operation of endpoint BE0 BEP6, and thereafter, CPU2 is stored in ROM71. And executing the transfer control program.
  • the debug support program also referred to as ASE firmware software
  • the CPU 2 is enabled to execute the ASE firmware software on the EMMRY11 when the USB interface circuit 3 receives the host computer power break command.
  • the processing branches to the address of the user program specified by the user program execution command, and the CPU 2 shifts to a user mode for executing the user program. Is performed.
  • this user program execution state for example, when the USB interface circuit receives a break command, a break exception request BERQ is issued to CPU2, execution of the user program by CPU2 is stopped, and CPU2 executes the ASE firmware software again. Transition to mode.
  • FIG. 13 illustrates a USB communication format.
  • the beginning of one frame is S ⁇ F (Start of frame).
  • DATA 0 / DATA1 is a data packet for on-chip debugging in a frame of the USB communication format in the USB standard.
  • DATA0ZDATA1 read Z write is performed in each BEP.
  • USB packet data for on-chip debugging consists of header and data.
  • the header contains the ID, data size, status, and command. Contains information.
  • the data information includes information such as download data.
  • FIG. 14 exemplifies a basic form of communication control between the host computer 25 (PC side) and the USB interface circuit 3.
  • the USB data packet transmitted from the host computer 25 is received by EP3.
  • the CPU 2 reads and analyzes the USB data packet received by the EP 3 according to the ASE firmware program, performs control in accordance with the analysis result, and transmits the control result from the EP 4 to the host computer 25.
  • FIG. 15 illustrates the contents of handshake control between the host computer 25 and the USB interface circuit 3 when a forced break is performed during execution of a user program.
  • E P5 as an instruction command reception-only buffer.
  • the instruction command packet received by EP5 is analyzed, and in response to this, the USB control circuit 21 requests break exception processing to CPU2, and the vector address of the ASE firmware is given.
  • CPU2 jumps to the address of the break in the ASE firmware program, such as the execution status of the user program.
  • the USB interface control circuit 21 receives the break acknowledgment BACK from the CPU 2, sets status information (BACK) in EP6, and transmits it to the host computer 25.
  • the host computer 25 checks whether the status is a break state.
  • FIG. 16 exemplifies control contents for downloading software (user program) from the host computer 25 to the USB interface circuit 3.
  • the transfer size and load destination address are transmitted to BEP3 along with the software download transmission request from the host computer.
  • the transmission permission is transferred from the CPU 2 to the host computer 25 via the BEP 4, and upon completion of the transmission, the host computer 25 transmits the specified amount of download data to the USB interface circuit 3 by the designated size.
  • DMA transfer is performed by a USB interrupt and the data is directly written to the external memory 4.
  • transmission completion is transmitted from EP4 to the host computer.
  • FIG. 17 shows still another example of the microcomputer 1.
  • JT AGIF8 and AUDIF10 have been deleted, and USBIF3 has been dedicated to debug mode.
  • USBIF3 does not have BEP1 and BEP2.
  • USBIF3 cannot be used as a user resource.
  • USBIF3 is enabled only during on-chip debugging.
  • AUDIF10 is a user resource on-chip RAM for storing large amounts of trace data This is because if it is possible to use 7 or EXMRY4, it is not necessary.
  • FIG. 18 shows still another example of the microcomputer 1.
  • USBIF3A is provided as a user-specific resource.
  • the USBIF3A includes a buffer 20 constituting BEPO, BEP1, and BEP2 and a USB interface control circuit 21A.
  • An entirely dedicated US BIF is available for both on-chip debugging and user mode.
  • USBF3 can be used for both on-chip debugging and user mode, when debugging USBIF3 as a user resource, JTAGIF8 may be used as a debugging interface.
  • a cache memory may be arranged between the CPU 2 and the internal bus 12.
  • an address translation buffer is placed between CPU 2 and internal bus 12.
  • the logics 41A and 41B are not limited to being constituted by the FPGA.
  • the USBIF 48 described in FIG. 11 can be applied to the USBIF 48 held by the microcomputer 40 described in FIG. In this case, no user-specific BEP is required. Industrial applicability
  • the present invention can be widely applied to a microcomputer, particularly a microcomputer having a debug support function, and further to a method of developing a system program for operating the microcomputer.

Abstract

 中央処理装置(2)、デバッグ用インタフェースに利用可能な高速シリアル通信インタフェース回路例えばUSBインタフェース回路(3)、及び外部メモリに接続可能な外部バスインタフェース回路(5)を有する。USBインタフェース回路はその内部に複数の入力バッファ(EP1,EP2)を有し、相互に一の入力バッファに対する入力動作に並行して他の入力バッファからデータを出力可能とされる。デバッグモードにおいて、前記USBインタフェース回路はシステムプログラムを受信し、受信されたシステムプログラムをメモリアクセス制御信号と共に前記外部バスインタフェース回路から出力可能である。ターゲットプログラムをホストコンピュータからターゲットシステムにダウンロードするときのデータ転送を高速化することができる。

Description

明 細 書
マイクロコンピュータ及びシステムプログラムの開発方法
技術分野
[0001] 本発明は、マイクロコンピュータ、特にデバッグサポート機能を有するマイクロコンビ ユータに関し、更にはマイクロコンピュータを動作させるシステムプログラムの開発方 法に関する。
景技術
[0002] デバッグサポート機能を有するマイクロコンピュータはデバッグに際してエミュレータ もしくはホストコンピュータと通信を行なうデバッグ用インタフェースを有する。このデ バッグ用インタフェースには、例えば JTAG (Joint Test Action Group, IEEE Std 1149.1, IEEE Standard Test Access Port and Boundary-Scan Architecture)プロトコ ルに準拠したシリアル入出力インタフェースが用いられてレ、る。特許文献 1にもそのよ うなデバッグ用インタフェースを備えたマイクロコンピュータの記載がある。
[0003] 特許文献 1 :特開 2002-202900号公報(段落 0017)
発明の開示
発明が解決しょうとする課題
[0004] 本発明者はデバッグサポート機能 (オンチップデバッグ機能とも称する)を有するマ イク口コンピュータをシステムデバッグするとき(デバッグ対象マイクロコンピュータをタ 一ゲットマイクロコンピュータと称する)、そのターゲットプログラムをホストコンピュータ 力 ターゲットシステムのプログラムメモリにダウンロードする機能におけるデータ転送 の高速化について検討した。例えば、ターゲットマイクロコンピュータ fお TAG準拠の デバッグ用シリアルインタフェース回路を有する。 USB(Unversal Seial Bus)インタフエ ース回路を持つパーソナルコンピュータ(PC)に USBケーブルでエミュレータを接続 し、エミュレータは専用のユーザーインターフェースケーブルでターゲットシステム(ュ 一ザ一システムとも称する)に搭載されたターゲットマイクロコンピュータのデバッグ用 シリアルインタフェースに接続する。ターゲットマイクロコンピュータはオンチップデバ ック機能を有する。オンチップデバッグ機能を有するターゲットマイクロコンピュータは 、ユーザモードの他に、ターゲットプログラムの開発を支援するデバッグモードを有す る。前記ユーザモードではターゲットシステムのためにユーザが開発するユーザプロ
'一ゲットプログラムとも称する)を実行する。前記 -ドでは、ユーザプログラムの実行が停止されているとき、主にプログラム デバッグ支援用のプログラム(デバッグ支援プログラムとも称する)を実行する。デバッ グ支援プログラムは、ターゲットマイクロコンピュータの電源投入毎にホストコンビユー タ上のエミュレータソフトより転送され、ターゲットマイクロコンピュータ内部のデバッグ 用アドレス空間上に書き込みされ、ホストコンピュータ上のエミュレータソフトウェアとリ ンクされる。ホストコンピュータから供給されるユーザプログラムは、ターゲットマイクロ コンピュータがユーザモードでデバッグ支援プログラムを実行することによって、ター ゲットシステム上の所定メモリ空間に書き込まれる。エミュレータとターゲットマイクロコ ンピュータとの間の通信には前 TAG準拠のデバッグ用シリアルインタフェース回 路が用いられる。このデバッグ用シリアルインタフェース回路は、所定バイト単位でク ロック同期のシリアル転送を行なうため、転送スピードは前記クロック周波数に比例し 、 USBインタフェース回路に比べて低速である。例えば、 USB規格 1. 1でも転送処 理能力はフルスピードで 1200キロバイト(KB) /秒であるが、 JTAG準拠のインタフ エースでは 4バイトのような 1回の最大データ転送毎にターゲットマイクロコンピュータ 力 のアクセス許可を示すステータスを取得して次の転送データをセットするといぅデ ータ転送手順を必要とし、それによるオーバヘッド故に、同期クロック周波数を上げて も 230KB/秒のような転送速度限界を生ずる。このような転送速度の相違によって、 比較的容量の大きなターゲットプログラムのロード転送に長い時間を必要とし、システ ムデバッグ効率を低下させ、更にはターゲットプログラムの開発期間短縮を阻む要因 の一つになっていることが本発明者によって明らかにされた。
[0005] 本発明の目的は、ターゲットマイクロコンピュータをシステムデバッグするとき、デバ ッグ対象のシステムプログラムをホストコンピュータからターゲットシステムにダウン口 ードするときのデータ転送を高速化することにある。
[0006] 本発明の別の目的は、エミュレータを利用してシステムプログラムを開発するとき、 デバッグ対象のシステムプログラムをホストコンピュータからターゲットシステムにダウ ンロードするときのデータ転送の高速化という点において、システムプログラムの開発 期間の短縮に寄与することにある。
[0007] 本発明の前記並びにその他の目的と新規な特徴は本明細書の記述及び添付図面 力 明らかになるであろう。
課題を解決するための手段
[0008] 本願において開示される発明のうち代表的なものの概要を簡単に説明すれば下記 の通りである。
[0009] 〔1〕本発明に係るマイクロコンピュータは、中央処理装置、デバッグ用インタフエ一 スに利用可能な高速シリアル通信インタフェース回路(3)、及び外部メモリに接続可 能な外部バスインタフェース回路(5)を有する。前記高速シリアル通信インタフェース 回路はその内部に複数の入力バッファ(EP1, EP2)を有し、相互に一の入力バッフ ァに対する入力動作に並行して他の入力バッファからデータを出力可能とされる。前 記デバッグモードにぉレ、て、前記高速シリアル通信インタフェース回路はシステムプ ログラムを受信し、受信されたシステムプログラムをメモリアクセス制御信号と共に前 記外部バスインタフェース回路から出力可能である。前記高速シリアル通信インタフ エース回路は、例えばユニバーサルシリアルバスインタフェース回路である。システム デバッグに際して前記高速シリアル通信インタフェース回路にホストコンピュータを直 結することにより、ターゲットプログラムをホストコンピュータ力、らターゲットシステムにダ ゥンロードするときのデータ転送を高速化することができる。特に前記高速シリアル通 信インタフェース回路は交互に入出力動作を切換えて並列動作可能な 2面バッファ を備えるという点でデータ転送の更なる高速化が実現される。ターゲットプログラムを ホストコンピュータからターゲットシステムにダウンロードするときのデータ転送の高速 化という点において、ターゲットプログラムの開発期間の短縮に寄与する。
[0010] 本発明の望ましい形態では、受信されたシステムプログラムを外部バスインタフエ一 ス回路に接続されたメモリに転送制御可能なダイレクトメモリアクセスコントローラを有 する。中央処理装置の負担軽減とデータ転送の更なる高速化に好都合である。前記 ダイレクトメモリアクセスコントローラによるシステムプログラムの転送元は、例えば前 記高速シリアル通信インタフェース回路の入力バッファである。前記高速シリアル通 信インタフェース回路の入力バッファに受信されたシステムプログラムを一時的に蓄 積可能なランダムアクセスメモリ(7)を備える場合には、前記ダイレクトメモリアクセスコ ントローラによるシステムプログラムの転送元は前記ランダムアクセスメモリとしてよい 。前記高速シリアル通信インタフェース回路の入力バッファ(EP1 , EP2)とランダムァ クセスメモリ(7)で多段バッファを構成してシステムプログラムを受けるから、高速シリ アル通信インタフェース回路による受信処理と受信データに対する転送処理との速 度差に対して更に余裕ができる。
[0011] 本発明の望ましい形態では、デバッグ専用低速シリアル通信インタフェース回路(8 )を有し、前記デバッグ専用低速シリアル通信インタフェース回路は、デバッグモード におレ、て、前記高速シリアル通信インタフェース回路を制御する制御データの入力 に利用可能である。デバッグ専用低速シリアル通信インタフェース回路は例えば JTA G準拠のシリアルインタフェース回路であり、中央処理装置の制御を必要とせずにィ ンタフエース動作を行なうことができるようになっている。前記デバッグ専用低速シリア ル通信インタフェース回路は、例えばデバッグモードにおいて、前記高速シリアル通 信インタフェース回路に代えてシステムプログラムの受信に利用可能である。
[0012] デバッグサポート機能の充実という観点より、トレース制御回路を内蔵してよい。前 記トレース制御回路は前記中央処理装置が前記システムプログラムを実行したときの 内部状態をトレース情報として逐次蓄え、蓄えたトレース情報は前記システムプロダラ ムの実行停止後に外部に出力される。前記トレース情報の外部出力に前記高速シリ アル通信インタフェース回路を利用可能である。
[0013] 〔2〕本発明に係るシステムプログラムの開発方法は、ホストコンピュータ(25)と、エミ ユレータ(35)と、ターゲットデバイス(33)とを用いて、ターゲットデバイスが実行する システムプログラムを開発する方法であって、前記エミュレータによる処理として、ホス トコンピュータが高速シリアル通信で出力するシステムプログラムを 2面バッファの一 方のバッファに蓄積する第 1処理と、 2面バッファの他方のバッファに蓄積されたシス テムプログラムを前記第 1処理に並行してターゲットデバイスに低速シリアル通信で 送信する第 2処理と、ターゲットデバイスとの間の前記低速シリアル通信のハンドシェ ーク制御を行なう第 3処理を含む。 2面バッファの利用により、ターゲットプログラムを ホストコンピュータからターゲットシステムにダウンロードするときのデータ転送を高速 化することができるという点において、ターゲットプログラムの開発期間を短縮すること ができる。
[0014] 本発明の具体的な形態として、前記第 2処理では、前記バッファから出力するシス テムプログラムを前記一つのバッファの記憶容量以上の FIFOバッファを経由してタ 一ゲットデバイスに低速シリアル通信で送信し、前記第 3処理では、ターゲットデバイ スからの送信許可に応答して FIFOバッファからターゲットデバイスへの送信を行ない 、 FIFOバッファのフル状態に応答して前記バッファ力 FIFOバッファへの転送を抑 制する。低速シリアル通信に FIFOバッファを用いることにより、第 1処理から第 2処理 に渡されるデータの滞留による第 1処理の中断を減らすことができ、この点において も、上記データ転送を高速化することができる。
[0015] 〔3〕本発明に係るマイクロコンピュータ(1)は、ユーザモードとデバッグモードを有し 、中央処理装置(2)と、ユニバーサルシリアルバスインタフェース回路(3)と、第 1の デバッグ用制御プログラムを保有する ROM (71)と、 RAM (7)と、外部バスインタフ エース回路(5)とを備える。前記ユニバーサルシリアルバスインタフェース回路は、前 記デバッグモードで利用可能にされる所定のエンドポイントバッファ回路(20)を有し 、前記所定のエンドポイントバッファ回路は並列動作可能な一対のバッファ (EP1, E P2)を有し、前記一対のバッファは相互に一方が入力動作可能にされるのに並行し て他方が出力動作可能とされる。ここで対象とするマイクロコンピュータはターゲットマ イク口コンピュータであり、ユニバーサルシリアルバスインタフェース回路を介して直接 デバッグ支援用のホストコンピュータに接続する場合を想定する。
[0016] 前記中央処理装置は、パワーオンリセット時に前記デバッグモードが指定されてい るとき、前記第 1のデバッグ用制御プログラムを実行して、前記ユニバーサルシリアル バスインタフェース回路を動作可能に初期化し、第 2のデバッグ用制御プログラムを 前記ユニバーサルシリアルバスインタフェース回路で受信し、受信した第 2のデバッ グ用制御プログラムを前記 RAMに格納し、 RAMに格納した第 2のデバッグ用制御 プログラムの実行に移行する。これにより、マイクロコンピュータの電源投入毎に例え ばホストコンピュータ上のエミュレータソフトより転送される第 2のデバッグ用制御プロ グラムを高速にダウンロードすることができ、ホストコンピュータ上のエミュレータソフト ウェアとリンクしたデバッグ制御可能な状態の立ち上げを高速化することができる。
[0017] 本発明の具体的な形態として、バッファ RAMとダイレクトメモリアクセスコントローラ と更に有し、中央処理装置は、前記第 2のデバッグ用制御プログラムにしたがって、 ユニバーサルシリアルバスインタフェース回路が受信したダウンロード要求コマンドに 応答して、前記ダイレクトメモリアクセスコントローラに、ユニバーサルシリアルバスイン タフエース回路が受信したユーザプログラムを前記バッファ RAMに転送させる。デバ ッグ制御可能な状態においてユーザプログラムのダウンロードを高速化することがで きる。更に、本発明の望ましい形態として、前記中央処理装置は、前記第 2のデバッ グ用制御プログラムにしたがって、ユニバーサルシリアルバスインタフェース回路が受 信した転送要求コマンドに応答して、前記ダイレクトメモリアクセスコントローラに、前 記バッファ RAMに転送されたプログラムを外部バスインタフェース回路を介して外部 のプログラムメモリに転送制御させる。この後、前記中央処理装置は、前記第 2のデ バッグ用制御プログラムの実行状態にぉレ、て、モード制御コマンドに応答してユーザ モードに移行し、前記ユーザモードにおいて中央処理装置は外部バスインタフエ一 ス回路を介して前記プログラムメモリなどから命令をフェッチして、ユーザプログラムを 実行する。ユーザプログラムの実行状態をトレースし、それを解析したりすることによ つてユーザプログラムに対するデバッグが行われる。
[0018] 〔4〕別の観点による本発明のマイクロコンピュータ(40)は、中央処理装置 (44)と、 ユニバーサルシリアルバスインタフェース回路 (48)と、第 1のデバッグ用制御プログ ラムを保有する ROM (45)と、バッファ RAM (47)と、外部インタフェース回路(41)と を備え、前記ユニバーサルシリアルバスインタフェース回路は、所定のエンドポイント バッファ回路(20)を有し、前記所定のエンドポイントバッファ回路は並列動作可能な 一対のバッファ(EP1, EP2)を有し、前記一対のバッファは相互に一方が入力動作 可能にされるのに並行して他方が出力動作可能とされる。前記中央処理装置は、パ ヮーオンリセット時に前記第 1のデバッグ用制御プログラムを実行して、前記ュニバー サルシリアルバスインタフェース回路を動作可能に初期化し、第 2のデバッグ用制御 プログラムを前記ユニバーサルシリアルバスインタフェース回路で受信し、受信した 第 2のデバッグ用制御プログラムを前記バッファ RAMに格納し、バッファ RAMに格 納した第 2のデバッグ用制御プログラムを前記外部インタフェース回路を介して出力 させる。ここで対象とするマイクロコンピュータはターゲットマイクロコンピュータとデバ ッグ支援用のホストコンピュータとの間に配置されるエミュレータ(33)の制御用マイク 口コンピュータとされる。
[0019] 本発明の具体的な形態として、マイクロコンピュータはダイレクトメモリアクセスコント ローラ(46)を更に有し、前記ダイレクトメモリアクセスコントローラは、前記中央処理装 置による転送制御条件にしたがって、前記バッファ RAMから第 2のデバッグ用制御 プログラムを前記外部インタフェース回路を介して外部に転送する。 発明の効果
[0020] 本願において開示される発明のうち代表的なものによって得られる効果を簡単に説 明すれば下記の通りである。
[0021] すなわち、ターゲットマイクロコンピュータをシステムデバッグするとき、システムプロ グラムをホストコンピュータからターゲットシステムにダウンロードするときのデータ転 送を高速化することができる。要するに、システムデバッグにおいて、システムプログ ラムダウンロード機能の性能を向上させることができる。
[0022] エミュレータを利用してシステムプログラムを開発するとき、システムプログラムをホ ストコンピュータからターゲットシステムにダウンロードするときのデータ転送の高速化 という点において、システムプログラムの開発期間の短縮に寄与することができる。 図面の簡単な説明
[0023] [図 1]本発明に係るマイクロコンピュータを例示するブロック図である。
[図 2]USBIF内蔵のマイクロコンピュータを搭載したターゲットシステムとホストコンビ ユータとの接続形態を示す説明図である。
[図 3]USBIFを備えていないマクロコンピュータを搭載したターゲットシステムとホスト コンピュータとの接続形態を示す説明図である。
[図 4]図 3のマイクロコンピュータとエミュレータの一例を示すブロック図である。
[図 5]FPGAで構成される JTAGインタフェースロジックの詳細を示す論理回路図で める。 [図 6]図 5の構成による動作を示すタイミングチャートである。
[図 7]RAMの 2面バッファ BUF1 , BUF2を切り換えてデータを FIFOTDOに転送す る制御手順を示すフローチヤ一である。
[図 8]図 5と図 9の夫々の場合におけるプログラムダウンロードの動作タイミングの相違 を示すタイミングチャートである。
[図 9]図 5の比較例に係るエミュレータを例示するブロック図である。
[図 10]図 5の例と図 9の比較例のそれぞれにおいてホストコンピュータからユーザー プログラムファイルをダウンロードするときのダウンロード性能を例示する説明である。
[図 11]本発明に係るマイクロコンピュータの更に具体的な例を示すブロック図である。
[図 12]マイクロコンピュータによるオンチップデバッグの動作タイミングを例示するタイ ミングチャートである。
[図 13]USBの通信フォーマットの説明図である。
[図 14]ホストコンピュータと USBインタフェース回路との通信ハンドシエック制御の基 本形を例示するフローチャートである。
[図 15]ユーザープログラムの実行中に強制ブレークさせる場合のホストコンピュータと USBインタフェース回路との間でハンドシェーク制御内容を例示するフローチャート である。
[図 16]ホストコンピュータから USBインタフェース回路へのソフトウェアのダウンロード の制御内容を例示するフローチャートである。
[図 17]図 1のマイクロコンピュータの変形例を示すブロック図である。
[図 18]図 17のマイクロコンピュータの変形例を示すブロック図である。
符号の説明
1 マイクロコンピュータ
2 CPU
3 USBインタフェース回路
4 外部メモリ
5 外部バスインタフェース回路
6 DMAC 7 RAM
8 JTAG回路
9 トレース回路
11 エミユレーシヨン RAM
EP1 , EP2 2面バッファ
20 バッファ部
25 ホストコンピュータ
30 ターゲットシステム
33 マイクロコンピュータ
34 ターゲットシステム
35 エミュレータ
47 RAM
BUF1 , BUF2 2面バッファ
FIFOTDO
48 USBインタフェース回路
71 ROM
73 パワーオンリセット回路
74 システムコントローラ
発明を実施するための最良の形態
図 1には本発明に係るマイクロコンピュータ 1が例示される。マイクロコンピュータ 1は 、単結晶シリコンのような 1個の半導体基板(半導体チップ)に相補型 MOS集積回路 製造技術等によって形成される。マイクロコンピュータ 1は、中央処理装置(CPU) 2、 デバッグ用インタフェースに利用可能な高速シリアル通信インタフェース回路としての USBインタフェース回路(USBIF) 3、外部メモリ(EXMRY) 4に接続可能な外部バ スインタフェース回路(EXIF) 5、ダイレクトメモリアクセスコントローラ(DMAC) 6、ラ ンダムアクセスメモリ(RAM) 7、デバッグ専用低速シリアル通信インタフェースとして の JTAGインタフェース回路 (JTAGIF) 8、トレース制御回路(TRCNT) 9、トレース 情報の外部出力制御用の AUD (アドバンスト 'ユーザ.デバッグ)インタフェース回路 (AUDIF) 10、及びエミユレーシヨン RAM (EMMRY) 11を有し、特に制限されなレヽ 力、それらは内部バス(IBUS) 12を共有する。尚、内部バス 12にはタイマカウンタな どその他の回路が接続されていてよい。前期 RAM7は転送データなどを一時的に保 持するバッファ RAMなどとして利用される。
[0026] 前記 USBIF3は、例えば USB2. 0規格に準拠し、 USBバッファ部(BEP) 20と US Bインタフェース制御部(UCNT) 21を有する。 USBバッファ部 20は夫々 512バイト の USBバッファ EP1、 EP2によるダブルバッファ構造を持つ。 USBバッファ EP1 , E P2は例えば FIFOによって構成される。 UCNT21は所謂 USBデバイスコントロール とデータ転送制御を行なう。 UCNT21は USBホストとして例えば図 1のホストコンピュ ータ(パーソナルコンピュータ)に搭載される USBホストに USBケーブル 23で接続さ れ、 USBデバイスコントロールとして、 USBホストからのコマンドに応答して所定のプ ロトコルでデータのシリアル送受信制御を行なう。 USBホストからの受信データはバッ ファ部 20に送られ、 USBホストへの送信データはバッファ部 20から供給される。 UC NT21はデータ転送制御としてバッファ部 20に対するリード'ライト制御と、 DMAC6 に対する転送要求の制御を行なう。特にバッファ部 20に対するリード'ライト制御では 、相互に一の USBバッファに対する入力動作 (USBホストからの受信データ入力動 作)に並行して他の USBバッファからデータ出力動作(DMA転送のための内部バス 12への出力動作)を可能とする。
[0027] DMAC7は CPU2により、転送元アドレス、転送先アドレスなどのデータ転送制御 条件が設定され、 USBIF3等からの DMA転送要求に応答して、転送元から転送動 作へのデータ転送を制御する。データ転送モードとしてデュアルアドレシングモード 及びシングルアドレシングモードの双方をサポートする。例えば、 USBバッファ EP1, EP2と EMMRY11との間のシングルアドレスによるデータ転送、 USBバッファ EP1, EP2と RAM7との間のシングルアドレスによるデータ転送、 RAM7と EXMRY4との 間のデュアルアドレスによるデータ転送を制御することができる。
[0028] JTAGIF8は受信データを入力する入力レジスタ TDI、送信データを出力する出力 レジスタ TD〇、前記レジスタ TDIと内部バス 12を接続するデータレジスタ SDDR、図 示を省略するコマンドレジスタ、 JTAG制御回路 CTCNT) 24を有する。 JCNT24はク ロック信号 TCKに同期してレジスタ TDOからのシリアル出力とレジスタ TDIへのシリ アル入力を制御する。その制御には所謂 TAP (テスト 'アクセス'ポート)コントロール を用い、クロック信号 TCKに同期してシリアル入力される図示を省略する 1ビットのモ ードセレクト信号のパターンによって制御を行なう。外部から JTAGIF8へのデータ入 力はレジスタ TD〇から外部にアクセス許可ビットが出力される毎に可能にされる。例 えば JTAGIF8は 4バイト受信毎に外部にアクセス許可ビットを出力する。この意味に おいて、 JTAGIF8によるシリアル通信速度は遅レ、。規格では TCK周波数は数十 M Hzであり、 USB2. 0規格では転送処理能力がハイスピード時 480MB/秒であるの に対して低速である。
[0029] 前記 CPU2は図示を省略する命令制御部と演算部を備える。命令制御部は命令フ エッチを制御すると共にフェッチした命令のデコードを行なう。演算部は命令のデコ ード信号及び命令で指定されるオペランドを用いてデータ演算やアドレス演算を行な つて命令を実行する。マイクロコンピュータ 1は通常モードとしてのユーザモードの他 に、ターゲットプログラムの開発を支援するデバッグモードを有する。前記デバッグモ ードの指定は、リセット時にモード端子から指定し、或いはユーザモードにおいてブレ ーク割り込みで指定することができる。前記ユーザモードでは EXMRY4に格納され ているシステムプログラム(ユーザプログラムとも称する)を実行する。前記デバッグモ ードでは、ユーザプログラムの実行が停止されているとき、主にプログラムデバッグ支 援用のプログラム(デバッグ支援プログラム)を実行する。デバッグ支援プログラムは、 マイクロコンピュータ 1の電源投入毎にホストコンピュータ 25のエミュレータソフトにより 転送され、 EMMRY11のデバッグ用アドレス空間上に書き込みされる。ブートプログ ラムはマイクロコンピュータ 1に内蔵される図示を省略するマスク ROM又は電気的に 書換え可能なフラッシュメモリが保有する。デバッグ時に、ユーザプログラムはデバッ グモードでマイクロコンピュータ 1が前記デバッグ支援プログラムを実行することによつ て、ターゲットシステム上の EXMRY4に書き込まれる。ユーザプログラムはホストコン ピュータ 25から供給される。
[0030] 図 1では、ターゲットシステムのマイクロコンピュータ 1とホストコンピュータ 25との間 の通信には USBIF3が利用可能にされる。 JTAGIF8を利用することも可能であるが 、通信速度の点で USBIF3の方が優れているので、 USBIF3を利用するのが得策 である。特に USBIF3は交互に入出力動作を切換えて並列動作可能な 2面バッファ EP1 , EP2を備えるという点でデータ転送の更なる高速化が実現される。ユーザプロ グラムをホストコンピュータ 25からターゲットシステムにダウンロードするときのデータ 転送の高速化という点において、ユーザプログラムの開発期間を短縮可能になる。
[0031] USBIF3で受信されたシステムプログラムを EXIF5に接続された EXMRY4に転 送するには、 DMAC6を用いればよレ、。前記 DMAC6によるシステムプログラムの転 送元は、例えば前記 USBIF3の入力バッファ EP1 , EP2である。前記 USBIF3の入 力バッファ EP1 , EP2に受信されたシステムプログラムを RAM7に一時的に蓄積す る場合には、前記 DMAC6により先ずバッファ EP1 , EP2から RAM7に転送し、タイ ミングを見計らって、 RAM7力、ら EXMRY4にシステムプログラムを転送すればよレ、。 前記 USBIF3の入力バッファ EP1, EP2と RAM7で多段バッファを構成してシステ ムプログラムを受けることにより、 USBIF3による受信処理と受信データに対する外部 への転送処理との速度差に対して更に余裕ができる。
[0032] 前首 SJTAGIF8は、デバッグモードにおいて、前記 USBIF3を制御する制御データ の入力に利用可能である。 JTAGIF8は、例えばデバッグモードにおいて、前記 US BIF3に代えてシステムプログラムの受信に利用可能である。その必要性は、ユーザ モードにおいて前記 USBIF3の使用が予約されていて、プログラムダウンロードに利 用することができない環境にある場合などである。前記 USBIF3は複数転送チヤネ ルを備える構成であってもよレ、。その一つをオンチップデバック専用にすれば、プロ グラムダウンロードを JTAGIF8による代替通信で行なうことを一切要しないから、その データ転送の高速化を保証することができる。
[0033] 前記 TRCNT9は CPU2がユーザプログラムを実行しているとき、 CPU2の内部状 態をトレースバス :L 3を介して順次格納する回路である。格納場所は FIFOバッファ(F BUF) 26とされ、 FIFOバッファ 26に対するアドレス制御はアドレスカウンタ(ACOU NT) 27力 S行なう。 FIFOバッファ 26に蓄えられたトレース情報は、デバッグモードに おいて前記 USBIF3又 f TAGIF8によってホストコンピュータ 25に転送可能である 。但し FIFOバッファ 26の容量は小さいので、大量のデータをトレースするには不向 きである。大量のデータをトレース情報として収集する場合には前記 AUDIF10を用 レ、る。内部バス 12のアドレス情報及びデータ情報等をバスアクセスサイクル毎にトレ ースバッファ(TRBUF) 28に蓄え、 TRBUF28のデータをクロック信号 AUDCLKに 同期して外部に出力すればよい。 AUDATAは出力データ、 AUDSYNCはデータ 出力同期信号である。
[0034] または、 FIFOバッファ 26に蓄えられたトレース情報を RAM7や EXMRY4へ一時 的に格納し、 USBIF3を用いて一括で出力することも可能である。
[0035] 図 2にはマイクロコンピュータ 1を搭載したターゲットシステム 30とホストコンピュータ 25との接続形態を示す。ターゲットシステム 30にはマイクロコンピュータ 1の USBIF3 に接続する USBコネクタ 31が設けられ、この USBコネクタ 31とホストコンピュータ 25 の USBコネクタを USBケーブル 23で直結すればよレ、。マイクロコンピュータ 1はデバ ッグ機能を有するから、ホストコンピュータ 25とマイクロコンピュータ 1の間にエミユレ一 タを介在させることなぐターゲットプログラムとしてのシステムプログラムとデバッグ支 援プログラムのダウンロードを行なうことができ、その後のユーザモードでは、システム プログラムを実行しながらトレース情報を収集する。システムプログラムの実行がブレ ークされてデバッグモードに遷移されたとき、トレース情報を参照したりしてターゲット システムに対する評価及びシステムプログラムの修正等が行なわれる。
[0036] 図 3には別の例として前記 USBIF3を備えていないマクロコンピュータ 33を搭載し たターゲットシステム 34とホストコンピュータ 25との接続形態を示す。ターゲットシステ ム 34とホストコンピュータ 25との間にはエミュレータ 35が配置される。エミュレータ 35 とホストコンピュータ 25は USBケーブル 23で接続される。ターゲットシステム 34とエミ ユレータ 35fお TAGインタフェースフェースケーブル 36で接続される。
[0037] 図 4には前記マイクロコンピュータ 33とエミュレータ 35の一例が示される。マイクロコ ンピュータ 33は図 1のマイクロコンピュータ 1に対して USBIF3を備えていない点が相 異される。同一機能を有する回路要素には同一符号を付してその詳細な説明は省 略する。
[0038] エミュレータ 35は、マイクロコンピュータ 40、フィールド 'プログラマブノレ 'ゲート'ァレ ィ(FPGA) 41、シンクロナス ·スタティック 'ランダム ·アクセス ·メモリ(SSRAM) 42力 ら成る。
[0039] マイクロコンピュータ 40は CPU44、 R〇M45、 DMAC46、 RAM47及び USBIF4 8を有し、 1個の半導体基板に形成されている。 USBIF48は前記 USBIF3と同様に 、 2面で USBバッファ EP1 , EP2を有する USBバッファ部 20と UCNT21によって構 成され、 USB2. 0規格に準拠する。 RAM47は USBバッファ EP1 , EP2の記憶情報 に対する後段の 2面 RAMバッファを構成し、第 1RAMバッファ領域 BUF1と第 2RA Mバッファ領域 BUF2が割当てられる。望ましくは、第 1RAMバッファ領域 BUF1と 第 2RAMバッファ領域 BUF2に対して夫々個別のアクセスポートを持つデュアルポ ートであるのがよレ、。即ち、一方の USBバッファ EP1がホストコンピュータ 25から受信 したデータを格納しているとき、他方の USBバッファ EP2から出力されるデータを RA M47の第 1RAMバッファ領域 BUF1に格納し、これに並行して第 2バッファ領域 BU F2に格納されているデータを所定のポートから外部に出力することができる。また、 他方の USBバッファ EP2がホストコンピュータ 25から受信したデータを格納している とき、 USBバッファ EP1から出力されるデータを RAM47の第 2RAMバッファ領域 B UF2に格納し、これに並行して第 1RAMバッファ領域 BUF1に格納されているデー タを所定のポートから外部に出力することができる。 USBIF48から RAM47へのデ ータ転送には DMAC46を用いることが望ましい。
[0040] FPGA41はフラッシュメモリセルのような不揮発性記憶素子を多数有し、それら不 揮発性記憶素子のプログラム状態に応じて論理機能を所望に設定することができる 回路である。ここでは FPGA41は、マイクロコンピュータ 33の JTAGIF8とデータ送受 信を行なうための JTAGインタフェースロジック 41Aと、 SSRAM42のアクセス制御を 行なうアドレス生成ロジック 41Bを構成する。
[0041] JTAGインタフェースロジック 41Aは、出力 FIFOバッファ FIFOTDO、入力バッファ TDI、インタフェース制御回路 FCNT) 50を有する。 RAM47から出力 FIFOバッフ ァ FIFOTDOへのデータライトの際、 USBインタフェース制御プログラムを実行する C PU44は出力 FIFOバッファ FIFOTDOへの書き込み可能状態(TDOST)と空き状 態(TDOF)等を管理し、出力 FIFOバッファ FIFOTDOへ連続して転送データをセ ットする。マイクロコンピュータ 33の JTAGIF8からのアクセス許可ビット fお CNT50が 監視する。アクセス許可ビットがイネ一ブルになったとき出力 FIFOバッファ FIFOTD O力 4バイトの情報送信が行なわれる。出力 FIFOバッファ FIFOTDOから送信され た情報はマイクロコンピュータ 33の JTAGIF8で受信され、データレジスタ SDDRに 格納される。データレジスタ SDDRに格納されると、 DMAC6が起動され、その情報 は DMA転送にて EXMRY14に書き込まれる。
[0042] 前記 SSRAM42はマイクロコンピュータ 33の AUDIF10から出力されるトレース情 報の格納に利用される。前記 FPGA41で実現される SSRAM42のアクセス制御を 行なうアドレス生成ロジックはアドレスカウンタ(ACOUNT) 52と、セレクタ(ASEL) 5 カウンタ 52で行なうかを選択する。どちらを選択するかは CPU44の指示に従って決 定される。
[0043] このように、ホストコンピュータ 25に接続する USBIF48と、ターゲットコンピュータ 3 3の JTAGIF8の間には、受信データの入力と出力を並列可能にするバッファ BUF1 , BUF2による 2面バッファと、 2面バッファの一方のバッファから出力される受信デー タを FIFO形式で蓄えることができる出力 FIFOバッファ FIFOTDOが設けられている から、ホストコンピュータ 25とマイクロコンピュータ 33が UISBインタフェースで直結さ れていないが、ある程度データ転送効率を上げることができる。
[0044] 特に、内蔵 RAM47を数キロバイトのダブルバッファ構造として、ホストコンピュータ
25からのダウンロードデータをバッファ BFU1または BFU2の一方に受信中に、他方 のバッファが保持しているデータを出力 FIFOバッファ FIFOTDOにライトするように、 処理を並列化したから、バッファ EP1、 EP2のデータサイズとバッファ FIFOTDOの データサイズが異なる場合であっても、また、バッファ EP1, EP2の動作とバッファ FI F〇TD〇の動作が独立しているため DMAC転送を途中で中断させないという制約 が必要になる場合であっても、対応することが可能になる。
[0045] 図 5には FPGA41で構成される JTAGインタフェースロジック 41Aの詳細が示され る。図 6には図 5の動作タイミングが示される。
[0046] バッファ FIFOTDOは 4バイト X 61段(244バイト)の多段構成とされる。 55はマイク 口コンピュータ 40に接続されるインタフェースである。バッファ FIFOTDOは FIF056 とシフトレジスタ 57によって構成される。コントロールブロック 58とバッファコントロール ブロック 59は JCNT50を構成する。 59A, 59Bは所定のロジックである。 CPUDAT A (REGDATA. D)は RAM47からの出力データ、 CPUWR— N (TDOWR— N) は FIF056に対するライトリクエスト、 TDOREG. Qは FIF056からのリードデータ、 READQは FIF〇56に対するリードリクエスト、 SHIFTREG. はシフトレジスタ 57の 出力データ(TD〇出力)である。 SBUF_LOADはシフトレジスタ 57のデータロード 信号、 S_Pはシフトレジスタ 57のシフト信号である。 TDOemは FIF〇56のェンプテ ィ信号、 TDOflは FIF〇56のフル信号である。 TDOSTはバッファ FIFOTDOにライ ト可能か否かを示し、 1でライト可、 0でライト不可を意味する。 TDOFは 1でバッファ FI F〇TD〇のデータがすべてシフトアウトしたこと、 0でバッファ FIFITDOのデータがす ベてシフトアウトしてレ、なレ、(初期値)ことを示す。 TDOINTはバッファ FIFITDOのデ ータが全てシフトアウトした時に割込要求信号 IRQを出力させるための信号であり、 1 で割込要求を可能とし、 0で割込要求を抑止する(初期値)。
マイクロコンピュータ 40の RAM47より、ライトイネーブル(TDOWR— N)に応答し て CPUクロック CPUCLK同期でデータ(REGDATA. D)が FIF056に書き込まれ る。 FIF056がフル状態のときは、 CPUクロック CPUCLKに同期して TDOflが出力 される。 FIF056がェンプティ状態の時は、クロック TCKに同期して TDOemが出力 される。シフトレジスタ 57へのデータ転送開始ロードパルス(SBUF— LOAD)は、 FI F〇56が空の時はライトイネーブル (TDOWR— N)に同期して生成され、空でない 時は転送終了パルス(DONE— P)に同期して生成される。この作用はロジック 59A , 59Bにより実現される。 DONE— Pは、ターゲットマイクロコンピュータ 33からのァク セス許可ビットに基づいて生成される。アクセス許可ビットは、レジスタ TDIを介して入 力される。バッファコントロールブロック 59ではシフトレジスタ 57のデータ転送終了毎 に FIF056のデータ書き込み可能状態を示す TDOflをチェックする。 TDOflがバッ ファ FIFITDOの書き込み可能状態を示す TDOSTビットを生成し、 TDOemと DON E_Pによりバッファ FIFOTDOの空き状態を示す TDOFビットを生成し、コントロー ルブロック 58の JTAGレジスタに反映する。 TDOFをマイクロコンピュータ 40への割 込み要求に使用する場合、割込み許可を示す TDOINTビットと TDOFによって割込 み要求信号 IRQを生成する。 CPU44がこの割込み要求を受付けると、例えば図 7の TDOデータセット処理実行における、次の RAMバッファへの切り換え(S7)を行う。
[0048] 図 7には RAM47の 2面 RAMバッファ BUF1, BUF2を切り換えてデータをバッフ ァ FIFOTDOに転送する制御手順が示される。先ず、この制御手順を可能にする T DOINTが 1にされ(S1)、TD〇ST= 1かによつてバッファ FIFOTDOの空きがチェ ックされ(S2)、空きがあればバッファ FIFOTDOにデータが転送される(S3)。転送 されたデータバイト数がチェックされる。即ち、バッファ BUF1 , BUF2の夫々に割当 てられる領域の最大容量数か否かがチェックされる(S4)。その転送バイト数に到達 すると、丁0〇?= 1かの判定にょって 0丁0〇の空きチヱックを行なぃ(35)、全て シフトアウトしたことが判定されると、 CPU44に IRQにて割り込みを要求し、 TDOFを 0にクリアする(S6)。その後、転送元 RAMバッファ領域が次のバッファ BUF1又は B UF2に切り換えられる(S7)。上記処理を送信完了まで繰返す(S8)。完了後、 TDI NTを 0にクリアして(S9)、制御を終了する。
[0049] このように、バッファ BUF1力 らバッファ FIFOTDOへのデータライト転送は、バッフ ァ FIFOTDOのバッファの書き込み可能状態(TDOSTビット)を参照して、 RAM47 の最大容量数キロバイト数を転送し、次にバッファ FIFOTDOの空き状態 (TDOF) を確認した後、次のバッファ BUF2又は BUF1へ切り替え、指定したデータ量を転送 完了する迄その処理を繰り返す。これにより、 RAM47からバッファ FIFITDOへのデ 一タライトの際、 TDOSTビットと TDOFビットを管理し連続して転送データをセットす る。マイクロコンピュータ 33からバッファ TDIに送られるアクセス許可ビットはハード口 ジック 58が監視する。それらの結果、図 8の(A)に示すように、アクセス許可ビットを 検出してから転送データを転送するまでのオーバーヘッドを無くし、最大数百バイト の連続転送が可能になり、ユーザプログラムなどのダウンロード転送の高速化を実現 すること力 Sできる。ターゲットマイクロコンピュータが USBIF3を持たなレ、場合にもプロ グラムダウンロード転送速度をある程度高速化することが可能である。尚、図 8の (A) におレ、て、マイコン書き込みとは RAM47力、らバッファ FIFOTDOへのデータ転送書 込みを意味する。 JTAG出力とはバッファ FIFOTDO力もターゲットマイクロコンピュ ータ 33への転送データ出力を意味する。 SPはターゲットマイクロコンピュータ 33から のアクセス許可ビットのステータスポーリング処理を意味する。
[0050] 図 9には比較例に係るエミュレータが例示される。ホストコンピュータとのインタフエ 一スには USBを用いる。 USBドライバ 61及び USBコントローラマイコンチップ 62が 設けられる。 USBコントローラマイコンチップ 62のプログラムは ROM63に格納され、 SDRAM64がワークメモリとして利用される。受信した USBデータは SDRAM64に 一旦格納され、 USBパケット解析等を経て SDRAM64に格納してから JTAGコント口 ーラ 65のデータ出力レジスタからターゲットマイクロコンピュータにデータを送信する 。 JTAG準拠のインタフェースではソフトダウンロードデータ転送方式は、送信データ の終了をターゲット CPUからアクセス許可ビットを受け取ることができるステータス取 得モードで行っている。また 1回のデータ転送量は最大で 4バイトである。エミュレータ は転送の都度ターゲットマイクロコンピュータ 33からステータス取得モード終了を示 すアクセス許可ビットを取得する。要するに、アクセス許可ビットをポーリングしながら 取得して、データ出力レジスタ (TDO)へ転送データをセットしなければならなレ、。こ の場合には図 8の(B)に示されるように、アクセス許可ビットの検出から転送データセ ットまでにオーバーヘッド T1が発生する。要するに、図 8の(B)は 4バイト転送毎にデ ータ出力レジスタ(TDO)へのデータセットを行い、図 8の(A)はデータ出力レジスタ( TDO)へのデータセットを予め行い、ハードロジック 58でアクセス許可ビット取得毎に 4バイト単位でデータ出力を行う。
[0051] 図 10には図 5の例と図 9の比較例に関しホストコンピュータ PCよりターゲットマイクロ コンピュータの外付メモリに 1メガバイトのユーザープログラムファイルをダウンロード するときのダウンロード性能が示される。傾向線 aは図 5に対応され、傾向線 bは図 9に 対応される。これによればホストコンピュータからターゲットマイクロコンピュータへデ ータ転送する際、図 9の比較例におけるプログラムダウンロード性能は、 TCK= 10M Hz以上にしても 230KB/秒より変化はな力、つた。
[0052] 図 5の例では、 TCK=10MH以上でもダウンロード性能がリニアに上がる。また、 T CK=20MHzである場合、ダウンロード性能が約 2倍の 400KB/秒となる。
[0053] 図 11にはマイクロコンピュータ 1の更に具体的な例が示される。図 1との相違点は、 USBインタフェース回路 3に複数の USBバッファ部(BEP0 BEP6) 20を示してレヽ る。更に、ブートプログラムを保有する ROM71を図示している。前記エミユレーシヨン メモリ 11は SRAMで構成されるのに対し、 ROM71はマスク ROM又は EEPROMや フラッシュメモリなどの電気的に書き換え可能な不揮発性メモリによって構成される。 その他にブレーク回路 72が設けられる。ブレーク回路 72は、デバッグモードにおい て CPU2を介してブレーク条件が設定され、ユーザモードにおいてブレーク条件に 一致する状態の発生を検出して、 CPU2にブレーク例外を要求する。
[0054] 前記 USBバッファ部 20の BEP0— BEP6の夫々は USB規格におけるエンドポイン トと称される FIFO (First-In First-Out)バッファを意味する。 FIFOバッファは入力用 (イン)、出力用 (アウト)夫々別々に備えたダブルバッファ構造とされ、図 1に示される E Pl、 EP2のように構成される。 BEP0はエンドポイント 0、 BEP6はエンドポイント 6と理 解されたレ、。エンドポイントの番号は例である。一つの USBデバイスが持つことがで きるエンドポイントの最大数は USB規格で規定されている。エンドポイント 0 (BEP0) はコントロール転送に使用され、 USBデバイスにとって必須とされる。ここでは USBィ ンタフェース回路 3はユーザモードとデバッグモードの双方で利用可能とされ、 USB バッファ部(BEP0— BEP6) 20のうち、 BEP1, BEP2はユーザプログラムによる使用 に専用化され、 BEP3— BEP6はデバッグ支援に専用化される。 BEP0は双方で共 用される。 BEP0はオンチップデバック専用のディスクリプタ情報をコントロール転送 するのに使用される。 BEP3は USBデータのバルタアウト転送に利用される BEP4は USBデータのバルクイン転送用に利用される。 BEP5は命令コマンドの入力に利用 される。 BEP6はステータス情報の出力に利用される。 BEP1 , BEP2はユーザモード においてユーザの設定に従ってデータ入出力などに利用される。 USBインタフエ一 ス回路 3は外部力も与えられる 48MHzのような周波数のクロック信号 CLKに同期動 作される。 CLKはマイクロコンピュータ 1の内部で PLL回路などを介して生成されても よい。
[0055] 前記 ROM71が保有するブートプログラムは、特に制限されないが、 USBインタフ エース回路 3を初期化するための USB初期化制御プログラム及び転送制御プロダラ ムとされる。転送制御プログラムは、 USBインタフェース回路 3を介して受信したデバ ッグ支援プログラム(ASEファームソフトとも称する)をエミユレーシヨンメモリ 11に格納 するためのプログラムとされる。
[0056] システムコントローラ(SYSC74)は代表的に示された外部端子としてデバッグモー ド端子 ASEMD及びリセット端子 RESに接続され、また、パワーオンリセット回路(PO RES) 73から出力されるパワーオンリセット信号が供給され、それら入力に従ってマ イク口コンピュータ 1の動作モード等を制御する。 SYSC74は、デバッグモード端子 A SEMDによってユーザモードが指定され、パワーオンリセット回路 73からのパワーォ ンリセット指示又はリセット端子 RESからのリセット指示があると、制御信号 φ 1によつ て CPUが初期化され、 CPU2は ROM71が保有する前記 USB初期化制御プロダラ ムを実行してエンドポイント BE0、 BEP1、 BEP2の動作を可能とし、最後に CPU2は プログラム格納領域の先頭番地から命令を実行開始可能にされる。一方、 SYSC74 は、デバッグモード端子 ASEMDによってデバッグモードが指定され、パワーオンリ セット回路 73からのパワーオンリセット指示があると、制御信号 φ 2によって CPU2が 初期化され、 CPU2は ROM71が保有する前記 USB初期化制御プログラムを実行し てエンドポイント BE0— BEP6の動作を可能とし、その後 CPU2は ROM71が保有す る前記転送制御プログラムを実行して、 USBインタフェース回路 3を介して受信した デバッグ支援プログラム (ASEファームソフトとも称する)をエミユレーシヨンメモリ 11に 格納し、最後に CPU2は転送した ASEファームソフトの実行が可能にされる。尚、デ バッグモードにおいてユーザモードに分岐したユーザプログラムの実行状態では、 R ESによるリセット指示があってもデバッグモードそれ自体のリセット指示はマスクされ る。デバッグモードからユーザモードに分岐してユーザープログラムを実行してレ、ると き、リセット入力でリセットベクタへジャンプするかを検証し足りするのを可能にするた めである。
[0057] ASEファームソフトによってユーザプログラムをホストコンピュータ 25力、らダウンロー ドする場合、 CPU2は、 ASEファームソフトにしたがって、 USBIF3が受信したダウン ロード要求コマンドに応答して、前記 DMAC6に、 USBIF3が受信したユーザプログ ラムを前記バッファ RAM7に転送させる。例えば、 USBIF3との通信が完了した後、 CPU2は、前記 ASEファームソフトにしたがって、 USBIF3が受信した転送要求コマ ンドに応答して、前記 DMAC6に、前記バッファ RAM7に転送されたプログラムを外 部バスインタフェース回路 5を介して外部メモリ 4に転送制御させる。 CPU2は、前記 ASEファームソフトの実行状態において、モード制御コマンドに応答してユーザモー ドに移行し、前記ユーザモードにおいて CPU2は外部メモリ 4力 命令をフェッチして 実行すること力 Sできる。
[0058] 図 12にはマイクロコンピュータによるオンチップデバッグの動作タイミングが例示さ れる。時刻 tOに ASEMDがローレベルにされてデバッグモードが指示され、時刻 tl に電源が投入されて、パワーオンリセット回路 73によりパワーオンリセットが指示され ると (時刻 t2)、制御信号 φ 2が活性化され、 CPU2が初期化され、 CPU2は ROM71 が保有する前記 USB初期化制御プログラムを実行して USBブート処理を行なって エンドポイント BE0 BEP6の動作を可能とし、その後 CPU2は、 ROM71が保有す る前記転送制御プログラムを実行する。すなわち、 USBインタフェース回路が書き込 みコマンドを受信すると、これに応答して、 USBインタフェース回路 3を介して受信し たデバッグ支援プログラム(ASEファームソフトとも称する)をエミユレーシヨンメモリ 11 に格納する(ASEファーム書き込み処理)。 ASEファーム書き込み処理が終わった 後、 USBインタフェース回路 3がホストコンピュータ力 ブレークコマンドを受信するこ とにより、 CPU2は EMMRY11上の ASEファームソフトを実行可能にされる。この後 、 USBインタフェース回路 3がホストコンピュータからユーザプログラム実行コマンドを 受信すると、当該ユーザプログラム実行コマンドで指定されるユーザプログラムのアド レスに処理が分岐し、 CPU2はユーザプログラムを実行するユーザモードに移行され る。このユーザプログラムの実行状態において、例えば USBインタフェース回路がブ レークコマンドを受信すると、 CPU2にブレーク例外要求 BERQが発行され、 CPU2 によるユーザプログラムの実行が停止され、 CPU2は再び ASEファームソフトを実行 するデバッグモードに遷移される。
[0059] 図 13には USBの通信フォーマットが例示される。 1フレームの先頭は S〇F (Start of frame)とされる。 USB規格における USB通信フォーマットのフレーム内では DATA 0/DATA1がオンチップデバック用データパケットとされる。 DATA0ZDATA1の リード Zライトは各 BEPで行う。オンチップデバック用 USBパケットデータはヘッダー とデータから成る。ヘッダーは、識別 ID、データサイズ、ステータス、命令コマンドの 情報を含む。データ情報にダウンロードデータ等の情報を含む。
[0060] 図 14にはホストコンピュータ 25 (PC側)と USBインタフェース回路 3との通信ハ: シエック制御の基本形が例示される。ホストコンピュータ 25から送信されてくる USBデ ータパケットを EP3に受信する。次に CPU2が ASEファームプログラムに従って EP3 に受信した USBデータパケットを読込み、解析して、解析結果に応ずる制御を行い、 その制御結果を EP4よりホストコンピュータ 25に送信する。
[0061] 図 15にはユーザープログラムの実行中に強制ブレークさせる場合のホストコンピュ ータ 25と USBインタフェース回路 3との間でハンドシェーク制御内容が例示される。 E P5を命令コマンド受信専用バッファとして使用する。 EP5で受信した命令コマンドパ ケットを解析し、これに応じて USB制御回路 21から CPU2へブレーク例外処理を要 求し、 ASEファームのベクタアドレスが与えられる。 CPU2はユーザプログラムの実行 状態力、ら ASEファームプログラムのブレークのアドレスへジャンプする。 USBインタフ エース制御回路 21は CPU2よりブレークァクナリッジ BACKを受信し、 EP6にステー タス情報 (BACK)をセットしホストコンピュータ 25に送信する。ホストコンピュータ 25は ステータスがブレーク状態か否かを確認する。
[0062] 図 16にはホストコンピュータ 25から USBインタフェース回路 3へのソフトウェア(ュ 一ザプログラム)のダウンロードの制御内容が例示される。ホストコンピュータよりソフト ダウンロード送信要求と共に転送サイズ、ロード先アドレスが BEP3へ送信する。これ に対し、 CPU2から BEP4を介して送信許可がホストコンピュータ 25に転送され、そ れが完了次第、ホストコンピュータ 25より指定サイズ分だけダウンロードデータが US Bインタフェース回路 3に向けて送信される。このとき、 USBインタフェース回路の BE P3に受信した場合、 USB割り込みにより、 DMA転送し、直接外部メモリ 4に書き込 む。指定サイズ分送信終えたら EP4より送信完了をホストコンピュータに送信する。
[0063] 図 17にはマイクロコンピュータ 1の更に別の例が示される。図 11との相違点は、 JT AGIF8及び AUDIF10を削除し、更に、 USBIF3をデバッグモードに専用化した点 である。 USBIF3は BEP1 , BEP2を備えていなレ、。ユーザー資源として USBIF3を 利用することはできなレ、。 USBIF3はオンチップデバックのときだけ使用可能にされ る。 AUDIF10は大容量のトレースデータの格納にユーザー資源のオンチップ RAM 7や EXMRY4を使用することが可能な場合は必要ないためである。
[0064] 図 18にはマイクロコンピュータ 1の更に別の例が示される。図 17との相違点は、ュ 一ザ専用資源として USBIF3Aを設けた点である。ユーザ専用資源として USBIF3 Aは BEPO, BEP1 , BEP2を構成するバッファ 20と USBインタフェース制御回路 21 Aを備える。オンチップデバッグとユーザモードの夫々において全く専用化された US BIFを利用可能である。
[0065] 特に図示はしないが図 11において AUDIF10だけを廃止することも可能である。 U SBIF3はオンチップデバックとユーザモードで兼用に使用あれるから、ユーザー資 源として USBIF3をデバックする場合は、デバッグ用インタフェースとして JTAGIF8 を利用すればよい。
[0066] 以上本発明者によってなされた発明を実施形態に基づいて具体的に説明したが、 本発明はそれに限定されるものではなぐその要旨を逸脱しない範囲において種々 変更可能であることは言うまでもない。
[0067] 例えば、 CPU2と内部バス 12の間にはキャッシュメモリが配置されてもよレ、。仮想ァ ドレスをサポートする場合には CPU2と内部バス 12の間にアドレス変換バッファが配 置されていてよレ、。ロジック 41A, 41Bは FPGAで構成することに限定されない。
[0068] 図 4で説明したマイクロコンピュータ 40が保有する USBIF48についても図 11で説 明した USBIF3を適用可能である。この場合、ユーザ専用の BEPは必要ない。 産業上の利用可能性
[0069] 本発明はマイクロコンピュータ、特にデバッグサポート機能を有するマイクロコンピュ ータ、更にはマイクロコンピュータを動作させるシステムプログラムの開発方法などに 広く適用することができる。

Claims

請求の範囲
[1] 中央処理装置、デバッグ用インタフェースに利用可能な高速シリアル通信インタフエ ース回路、及び外部メモリに接続可能な外部バスインタフェース回路を有し、 前記高速シリアル通信インタフェース回路はその内部に複数の入力バッファを有し 、相互に一の入力バッファに対する入力動作に並行して他の入力バッファからデー タを出力可能とされ、
前記デバッグモードにぉレ、て、前記高速シリアル通信インタフェース回路はシステ ムプログラムを受信し、受信されたシステムプログラムをメモリアクセス制御信号と共に 前記外部バスインタフェース回路から出力可能であることを特徴とするマイクロコンビ ユータ。
[2] 前記高速シリアル通信インタフェース回路は、ユニバーサルシリアルバスインタフエ一 ス回路であることを特徴とする請求項 1記載のマイクロコンピュータ。
[3] 受信されたシステムプログラムを外部バスインタフェースに接続されたメモリに転送制 御が可能なダイレクトメモリアクセスコントローラを有することを特徴とする請求項 2記 載のマイクロコンピュータ。
[4] 前記ダイレクトメモリアクセスコントローラによるシステムプログラムの転送元は前記高 速シリアル通信インタフェースの入力バッファであることを特徴とする請求項 3記載の マイクロコンピュータ。
[5] 前記高速シリアル通信インタフェース回路の入力バッファに受信されたシステムプロ グラムを一時的に蓄積可能なランダムアクセスメモリを有し、
前記ダイレクトメモリアクセスコントローラによるシステムプログラムの転送元は前記ラ ンダムアクセスメモリであることを特徴とする請求項 3記載のマイクロコンピュータ。
[6] デバッグ専用低速シリアル通信インタフェース回路を有し、前記デバッグ専用低速シ リアル通信インタフェース回路は、デバッグモードにおいて、前記高速シリアル通信ィ ンタフェース回路を制御する制御データの入力に利用可能であることを特徴とする請 求項 1記載のマイクロコンピュータ。
[7] 前記デバッグ専用低速シリアル通信インタフェース回路は、デバッグモードにおいて
、前記高速シリアル通信インタフェース回路に代えてシステムプログラムの受信に利 用可能であることを特徴とする請求項 6記載のマイクロコンピュータ。
[8] 前記デバッグ専用低速シリアル通信インタフェース回路は JTAGに準拠しデータレジ スタを有することを特徴とする請求項 6又は 7記載のマイクロコンピュータ。
[9] トレース制御回路を有し、前記トレース制御回路は前記中央処理装置が前記システ ムプログラムを実行したときの内部状態をトレース情報として逐次蓄えることを特徴と する請求項 1又は 6記載のマイクロコンピュータ。
[10] 前記トレース情報の外部出力に前記高速シリアル通信インタフェース回路を利用可 能であることを特徴とする請求項 9記載のマイクロコンピュータ。
[11] ホストコンピュータと、エミュレータと、ターゲットデバイスとを用いて、ターゲットデバイ スが実行するシステムプログラムを開発する方法であって、
前記エミュレータによる処理として、ホストコンピュータが高速シリアル通信で出力す るシステムプログラムを 2面バッファの一方のバッファに蓄積する第 1処理と、前記 2面 バッファの他方のバッファに蓄積されたシステムプログラムを前記第 1処理に並行して ターゲットデバイスに低速シリアル通信で送信する第 2処理と、ターゲットデバイスとの 間の前記低速シリアル通信のハンドシェーク制御を行なう第 3処理を含むことを特徴
[12] 前記第 2処理では、前記バッファから出力するシステムプログラムを前記一つのバッ ファの記憶容量以上の FIFOバッファを経由してターゲットデバイスに低速シリアル通 信で送信し、
前記第 3処理では、ターゲットデバイスからの送信許可に応答して FIFOバッファか らターゲットデバイスへの送信を行なレ、、 FIFOバッファのフル状態に応答して前記バ ッファから FIFOバッファへの転送を抑制することを特徴とする請求項 11記載のシス テムプログラムの開発方法。
[13] ユーザモードとデバッグモードを有するマイクロコンピュータであって、
中央処理装置と、ユニバーサルシリアルバスインタフェース回路と、第 1のデバッグ 用制御プログラムを保有する ROMと、 RAMと、外部バスインタフェース回路とを備え 前記ユニバーサルシリアルバスインタフェース回路は、前記デバッグモードで利用 可能にされる所定のエンドポイントバッファ回路を有し、前記所定のエンドポ ッファ回路は並列動作可能な一対のバッファを有し、前記一対のバッファは相互に一 方が入力動作可能にされるのに並行して他方が出力動作可能とされ、
前記中央処理装置は、パワーオンリセット時に前記デバッグモードが指定されてい るとき、前記第 1のデバッグ用制御プログラムを実行して、前記ユニバーサルシリアル バスインタフェース回路を動作可能に初期化し、第 2のデバッグ用制御プログラムを 前記ユニバーサルシリアルバスインタフェース回路で受信し、受信した第 2のデバッ グ用制御プログラムを前記 RAMに格納し、 RAMに格納した第 2のデバッグ用制御 プログラムの実行に移行するマイクロコンピュータ。
[14] バッファ RAMとダイレクトメモリアクセスコントローラと更に有し、
中央処理装置は、前記第 2のデバッグ用制御プログラムにしたがって、ュニバーサ ルシリアルバスインタフェース回路が受信したダウンロード要求コマンドに応答して、 前記ダイレクトメモリアクセスコントローラに、ユニバーサルシリアルバスインタフェース 回路が受信したプログラムを前記バッファ RAMに転送させる請求項 13記載のマイク 口コンピュータ。
[15] 前記中央処理装置は、前記第 2のデバッグ用制御プログラムにしたがって、ュニバー サルシリアルバスインタフェース回路が受信した転送要求コマンドに応答して、前記 ダイレクトメモリアクセスコントローラに、前記バッファ RAMに転送されたプログラムを 外部バスインタフェース回路を介して外部に転送制御させる請求項 14記載のマイク 口コンピュータ。
[16] 中央処理装置は、前記第 2のデバッグ用制御プログラムの実行状態において、モー ド制御コマンドに応答してユーザモードに移行し、
前記ユーザモードにおいて中央処理装置は外部バスインタフェース回路を介して 命令をフェッチする請求項 13記載のマイクロコンピュータ。
[17] 中央処理装置と、ユニバーサルシリアルバスインタフェース回路と、第 1のデバッグ用 制御プログラムを保有する ROMと、バッファ RAMと、外部インタフェース回路とを備 前記ユニバーサルシリアルバスインタフェース回路は、所定のエンドポイントバッフ ァ回路を有し、前記所定のエンドポイントバッファ回路は並列動作可能な一対のバッ ファを有し、前記一対のバッファは相互に一方が入力動作可能にされるのに並行し て他方が出力動作可能とされ、
前記中央処理装置は、パワーオンリセット時に前記第 1のデバッグ用制御プロダラ ムを実行して、前記ユニバーサルシリアルバスインタフェース回路を動作可能に初期 化し、第 2のデバッグ用制御プログラムを前記ユニバーサルシリアルバスインタフエ一 ス回路で受信し、受信した第 2のデバッグ用制御プログラムを前記バッファ RAMに格 納し、バッファ RAMに格納した第 2のデバッグ用制御プログラムを前記外部インタフ エース回路を介して出力させるマイクロコンピュータ。
[18] ダイレクトメモリアクセスコントローラを更に有し、
前記ダイレクトメモリアクセスコントローラは、前記中央処理装置による転送制御条件 にしたがって、前記バッファ RAMから第 2のデバッグ用制御プログラムを前記外部ィ ンタフエース回路を介して外部に転送する請求項 17記載のマイクロコンピュータ。
PCT/JP2004/012350 2003-08-28 2004-08-27 マイクロコンピュータ及びシステムプログラムの開発方法 WO2005022390A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US10/569,799 US7401257B2 (en) 2003-08-28 2004-08-27 Microcomputer and method for developing system program
JP2005513467A JP3955876B2 (ja) 2003-08-28 2004-08-27 マイクロコンピュータ及びシステムプログラムの開発方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2003-304276 2003-08-28
JP2003304276 2003-08-28

Publications (1)

Publication Number Publication Date
WO2005022390A1 true WO2005022390A1 (ja) 2005-03-10

Family

ID=34269267

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/012350 WO2005022390A1 (ja) 2003-08-28 2004-08-27 マイクロコンピュータ及びシステムプログラムの開発方法

Country Status (3)

Country Link
US (1) US7401257B2 (ja)
JP (1) JP3955876B2 (ja)
WO (1) WO2005022390A1 (ja)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007010650A (ja) * 2005-06-16 2007-01-18 General Electric Co <Ge> 超音波システムをテストするための方法及び装置
JP2007265264A (ja) * 2006-03-29 2007-10-11 Fujitsu Ltd トレース情報処理装置、トレース情報記録方法、およびトレース情報記録プログラム
JP2007328425A (ja) * 2006-06-06 2007-12-20 Sharp Corp 制御装置及び画像形成装置
GB2439579A (en) * 2006-06-30 2008-01-02 Advanced Risc Mach Ltd Target device programmer
CN103620431A (zh) * 2011-06-17 2014-03-05 高通股份有限公司 用于使用高速输入/输出接口进行测试的集成电路
CN113314516A (zh) * 2020-02-27 2021-08-27 精工爱普生株式会社 半导体装置
US11521702B2 (en) 2020-02-27 2022-12-06 Seiko Epson Corporation Semiconductor apparatus

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI5706U1 (fi) * 2002-11-21 2003-02-26 Patria New Technologies Oy JTAG-testilaitteisto ja -testausjärjestelmä
US7437623B2 (en) * 2003-11-05 2008-10-14 Texas Instruments Incorporated Apparatus and method for performing speculative reads from a scan control unit using FIFO buffer units
US20060277435A1 (en) * 2005-06-07 2006-12-07 Pedersen Frode M Mechanism for storing and extracting trace information using internal memory in microcontrollers
JP4908017B2 (ja) * 2006-02-28 2012-04-04 富士通株式会社 Dmaデータ転送装置及びdmaデータ転送方法
FR2901618A1 (fr) * 2006-05-24 2007-11-30 St Microelectronics Sa Controleur de dma, systeme sur puce comprenant un tel controleur de dma, procede d'echange de donnees par l'intermediaire d'un tel controleur de dma
JP2008226083A (ja) * 2007-03-15 2008-09-25 Nec Electronics Corp オンチップ・デバッグ・エミュレータおよびデバッグ方法並びにマイクロコンピュータ
US7725770B2 (en) * 2007-04-01 2010-05-25 International Business Machines Corporation Enhanced failure data collection system apparatus and method
JP4833907B2 (ja) * 2007-04-23 2011-12-07 ルネサスエレクトロニクス株式会社 半導体装置
TWI355582B (en) * 2008-03-05 2012-01-01 Inventec Corp Method for analyzing program with error, and metho
US8150956B2 (en) * 2009-02-09 2012-04-03 Cfph, Llc Mobile gaming alert
US9639347B2 (en) * 2009-12-21 2017-05-02 International Business Machines Corporation Updating a firmware package
TWI413904B (zh) * 2010-03-03 2013-11-01 Pixart Imaging Inc Universal Serial Bus (USB) controller and its execution method
CN102200950B (zh) * 2010-03-24 2014-01-22 原相科技股份有限公司 通用串行总线控制器及其执行方法
US8151017B2 (en) * 2010-08-23 2012-04-03 Smartech World Wide Limited Multiplexing application and debug channels on a single USB connection
JP5547701B2 (ja) * 2011-09-21 2014-07-16 日立オートモティブシステムズ株式会社 自動車用電子制御装置
US9015542B2 (en) 2011-10-01 2015-04-21 Intel Corporation Packetizing JTAG across industry standard interfaces
CN102521005A (zh) * 2011-12-31 2012-06-27 南京航空航天大学 简便的嵌入式系统软件加载和调试方法
US9047257B2 (en) * 2012-10-11 2015-06-02 Synopsys, Inc. Concurrent host operation and device debug operation with single port extensible host interface (xHCI) host controller
CN103268275B (zh) * 2013-05-03 2014-12-31 杭州电子科技大学 手持式串口模拟器
CN103500075A (zh) * 2013-10-11 2014-01-08 张维加 一种基于新材料的外接的计算机加速设备
TWI505078B (zh) * 2014-07-28 2015-10-21 Ibm 系統管理控制器、電腦系統、以及系統管理方法
US20160093377A1 (en) * 2014-09-26 2016-03-31 Intel Corporation Nonvolatile memory module
KR102539939B1 (ko) * 2015-05-21 2023-06-05 클라우드트랙 엘엘씨 식별, 위치결정 및 인증 시스템들 및 방법들
CN105550005B (zh) * 2016-01-27 2022-05-03 南京沁恒微电子股份有限公司 一种通过usb口进行调试升级的方法
CN106066822B (zh) * 2016-05-26 2018-04-13 北京中电华大电子设计有限责任公司 一种支持覆盖率统计功能的仿真器及方法
CN108804160A (zh) * 2018-06-14 2018-11-13 广州华多网络科技有限公司 接口调用方法及装置
US10713207B2 (en) 2018-07-02 2020-07-14 Venturi, Llc USB to synchronous serial interface with external clock signal
CN109344022A (zh) * 2018-07-22 2019-02-15 广州市星翼电子科技有限公司 一种多功能下载调试装置及调试方法
CN109344099B (zh) * 2018-08-03 2020-06-19 清华大学 Fpga应用系统无线调试下载装置
CN110175139B (zh) * 2019-05-08 2021-01-05 厦门亿联网络技术股份有限公司 一种usb设备的通用调试方法及usb设备
TWI802792B (zh) * 2020-04-17 2023-05-21 新唐科技股份有限公司 偵錯裝置及其操作方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1139184A (ja) * 1997-07-18 1999-02-12 Mitsubishi Electric Corp エミュレータ
JPH1139186A (ja) * 1997-07-17 1999-02-12 Matsushita Electric Ind Co Ltd デバッグ支援装置およびダウンロード方法
JP2002268911A (ja) * 2001-03-13 2002-09-20 Computex:Kk 電子計算機用開発支援装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6567932B2 (en) * 1999-10-01 2003-05-20 Stmicroelectronics Limited System and method for communicating with an integrated circuit
GB0025593D0 (en) * 2000-10-18 2000-12-06 Sgs Thomson Microelectronics On-chip emulator communication
JP2002202900A (ja) 2000-12-28 2002-07-19 Seiko Epson Corp デバッグ装置
US7313729B2 (en) * 2004-02-20 2007-12-25 Winbond Electronics Corp. Low-cost debugging system with a ROM or RAM emulator

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1139186A (ja) * 1997-07-17 1999-02-12 Matsushita Electric Ind Co Ltd デバッグ支援装置およびダウンロード方法
JPH1139184A (ja) * 1997-07-18 1999-02-12 Mitsubishi Electric Corp エミュレータ
JP2002268911A (ja) * 2001-03-13 2002-09-20 Computex:Kk 電子計算機用開発支援装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
UGAJIN, T.: "Boundary Scan Test "JTAG" no Kangaekata Tsukaikata", ELECTRONICS, vol. 46, no. 4, 1 April 2001 (2001-04-01), pages 42 - 53, XP002985770 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007010650A (ja) * 2005-06-16 2007-01-18 General Electric Co <Ge> 超音波システムをテストするための方法及び装置
JP2007265264A (ja) * 2006-03-29 2007-10-11 Fujitsu Ltd トレース情報処理装置、トレース情報記録方法、およびトレース情報記録プログラム
JP2007328425A (ja) * 2006-06-06 2007-12-20 Sharp Corp 制御装置及び画像形成装置
GB2439579A (en) * 2006-06-30 2008-01-02 Advanced Risc Mach Ltd Target device programmer
US7788417B2 (en) 2006-06-30 2010-08-31 Arm Limited Target device programmer
CN103620431A (zh) * 2011-06-17 2014-03-05 高通股份有限公司 用于使用高速输入/输出接口进行测试的集成电路
JP2016153787A (ja) * 2011-06-17 2016-08-25 クゥアルコム・インコーポレイテッドQualcomm Incorporated 高速入力/出力インターフェースを使用して試験するための集積回路
CN113314516A (zh) * 2020-02-27 2021-08-27 精工爱普生株式会社 半导体装置
US20210274641A1 (en) * 2020-02-27 2021-09-02 Seiko Epson Corporation Semiconductor apparatus
US11521702B2 (en) 2020-02-27 2022-12-06 Seiko Epson Corporation Semiconductor apparatus
US11683883B2 (en) * 2020-02-27 2023-06-20 Seiko Epson Corporation Semiconductor apparatus
CN113314516B (zh) * 2020-02-27 2023-11-03 精工爱普生株式会社 半导体装置
JP7413832B2 (ja) 2020-02-27 2024-01-16 セイコーエプソン株式会社 半導体装置

Also Published As

Publication number Publication date
JP3955876B2 (ja) 2007-08-08
JPWO2005022390A1 (ja) 2006-10-26
US7401257B2 (en) 2008-07-15
US20070006035A1 (en) 2007-01-04

Similar Documents

Publication Publication Date Title
WO2005022390A1 (ja) マイクロコンピュータ及びシステムプログラムの開発方法
JP3929573B2 (ja) 集積回路装置及びその通信方法
JP3929574B2 (ja) 集積回路装置及びその通信方法
US8719517B2 (en) Method and apparatus for executing a program by an SPI interface memory
US6449709B1 (en) Fast stack save and restore system and method
JP4335999B2 (ja) プロセッサ内蔵半導体集積回路装置
JP3684832B2 (ja) マイクロコンピュータ、電子機器及びデバッグシステム
KR102170644B1 (ko) 낮은 레벨 프로그래밍 가능한 시퀀서와 조합한 범용 프로그래밍 가능한 프로세서를 사용한 비휘발성 메모리 채널 제어
US7010638B2 (en) High speed bridge controller adaptable to non-standard device configuration
US6279103B1 (en) Method and device for providing an instruction trace from an on-chip CPU using control signals from the CPU
US6145020A (en) Microcontroller incorporating an enhanced peripheral controller for automatic updating the configuration date of multiple peripherals by using a ferroelectric memory array
US5566303A (en) Microcomputer with multiple CPU&#39;S on a single chip with provision for testing and emulation of sub CPU&#39;s
US6073253A (en) Enhanced reset and built-in self-test mechanisms for single function and multifunction input/output devices
JPH09319727A (ja) データプロセッサ及びデータ処理システム
EP0974093A1 (en) Debug interface including a compact trace record storage
JP2004503855A (ja) 無線携帯マルチメディア装置をサポートする統合型プロセッサプラットフォーム
US20060248391A1 (en) State machine-based command line debugger
US6978322B2 (en) Embedded controller for real-time backup of operation states of peripheral devices
JP4504466B2 (ja) コンピュータシステム内の通信を実行する方法
JP3929572B2 (ja) 集積回路装置及びその通信方法
US7428661B2 (en) Test and debug processor and method
JP5382736B2 (ja) トークンプロトコル
JPH10116187A (ja) マイクロコンピュータ
JP5179834B2 (ja) 半導体装置及びデータ処理システム
US20040122984A1 (en) Data processor and data table update method

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

DPEN Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed from 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2005513467

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2007006035

Country of ref document: US

Ref document number: 10569799

Country of ref document: US

122 Ep: pct application non-entry in european phase
WWP Wipo information: published in national office

Ref document number: 10569799

Country of ref document: US