Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

jtag_pp_commander.h

00001 /*--------------------------------------------------------------------
00002  * jtag_pp_commander.hpp -- JTAG Parallel Port Commander Class 
00003  *--------------------------------------------------------------------
00004  * $Id: jtag_pp_commander.h,v 1.1 2003/04/08 08:59:53 cgaudin Exp $
00005  *--------------------------------------------------------------------
00006  * This file is part of JTAG Framework
00007  * (c) 2002 Julien Pilet <julien.pilet@epfl.ch> and
00008  *          Stephane Magnenat <stephane.magnenat@epfl.ch>
00009  *--------------------------------------------------------------------
00010  * JTAG Framework is free software; you can redistribute it
00011  * and/or modify it under the terms of the GNU General Public License 
00012  * as published by the Free Software Foundation; either version 2 of 
00013  * the License, or (at your option) any later version.
00014  *
00015  * JTAG Framework is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with Foobar; if not, write to: 
00022  * Free Software Foundation, Inc., 
00023  * 59 Temple Place, 
00024  * Suite 330, Boston, MA  02111-1307  USA
00025  *--------------------------------------------------------------------
00026  *! \file
00027  *
00028  * \brief JTAG Commander for Parallel Port 
00029  *
00030  * \author Julien Pilet <julien.pilet@epfl.ch>
00031  * \author Stephane Magnenat <stephane.magnenat@epfl.ch>
00032  * \author Cedric Gaudin <cedric.gaudin@epfl.ch> 
00033  */
00034 
00035 #ifndef _JTAG_PP_COMMANDER_
00036 #define _JTAG_PP_COMMANDER_
00037 
00038 #include "jtag.h"
00039 #include "jtag_driver.h"
00040 #include "jtag_commander.h"
00041 
00042 // JTAG States 
00043 #define JS_UNKNOWN        -1
00044 #define JS_RESET          0
00045 #define JS_IDLE           1
00046 #define JS_SELECT_DR_SCAN 2
00047 #define JS_CAPTURE_DR     3
00048 #define JS_SHIFT_DR       4
00049 #define JS_EXIT1_DR       5
00050 #define JS_PAUSE_DR       6
00051 #define JS_EXIT2_DR       7
00052 #define JS_UPDATE_DR      8
00053 #define JS_SELECT_IR_SCAN 9
00054 #define JS_CAPTURE_IR     10
00055 #define JS_SHIFT_IR       11
00056 #define JS_EXIT1_IR       12
00057 #define JS_PAUSE_IR       13
00058 #define JS_EXIT2_IR       14
00059 #define JS_UPDATE_IR      15
00060 
00061 
00062 class JTAG_ParallelPort_Commander : public JTAG_Commander, public JTAGControl
00063 {
00064 public:
00065 
00066   JTAG_ParallelPort_Commander( JTAG_Driver * driver );
00067   ~JTAG_ParallelPort_Commander( );
00068 
00069   bool init( int argc , 
00070              char **argv );
00071 
00072   void ireg( unsigned char *data );
00073   void dreg( unsigned char *data , unsigned char length , bool writeOnly );
00074   void jtagReset( void );
00075   void cpuReset( bool state );
00076   void trst( bool state );
00077   void idle( unsigned int nbTCK );
00078   void flushQueue( void );
00079   const char *getName( void ) const;  
00080   
00081   void jtag_ireg( unsigned long value );
00082   bool jtag_shiftdr( void );
00083   bool jtag_updatedr( void );
00084 
00085   unsigned long jtag_dreg( int bit_count ,
00086                            unsigned long data );
00087 
00088   bool jtag_reset( bool cold );
00089   void jtag_idle( void );
00090   bool cpu_reset( bool state );
00091   void flush();
00092 
00093 private:
00094 
00095   void advance( bool mode_select );
00096 
00098   int state;
00099   
00101   int ir_reg_length;
00102 
00104   JTAG_Driver *driver;
00105 };
00106 
00107 #endif // _JTAG_PP_COMMANDER_

Generated on Fri May 16 13:01:45 2003 for Jelie by doxygen1.2.15