| In the development process of embedded system,the debugging of system hardware and software is an important link,a powerful and efficient debug system can greatly shorten the development cycle of the system,and enhance the product competitiveness.In the embedded system,how to use the controllable debugging means to realize the internal testing and running status monitoring of the chip is a difficult problem for the debugging technology of the processor.At present,the on-chip debugging technology of Standard 1149.1-TEST Access Port and IEEE(JTAG Boundary-Scan Architecture)is the most effective debugging method for the embedded system.Debugging technique based on JTAG standard is that designing with JTAG protocol standard of embedded debugging structure and module in the CPU chip,to achieve the target CPU debug control,including debug interrupt,set breakpoints,single step debugging operation,it's convenient for the user of embedded system development online debugging.In this paper,it presents a design of structure based on JTAG debugging module combined with the design of a 32-bit MIPS processor,adding a debugging interfaces in a processor.The structure of the debug interface consists of two parts which is the debug registers and the debug scan chain.The debugging control registers can store MIPS processor's instruction PC value,the operation result of the instruction and processor running state related to debugging information under the control of the debugging control signal.Debugging scan chain is the only structure that interacts with the external functional module tool for processor.Through the reading and writing of the debug control registers,the debugger can output the information in the registers and control the processor.The design of the JTAG module is also realized in this thesis.The TAP controller of JTAG module can realize the control of the debug interface and debug the processor,and realize the design of the MIPS processor debugger based on JTAG finally.In addition,in order to implement the debug and control,this paper combines the exception handling process of the MIPS processor,and completes the debug exception design of the 32 bit MIPS processor.After the realization of each function module,this paper realized three debugging functions respectively interruption debugging,debugging with breakpoints and single step debugging according to the requirements of the processor debugging.Through the simulation,the verification of the 3 debugging functions is realized,and the design object of the project is accomplished. |