Line 32... |
Line 32... |
#define JTAG_SC__H
|
#define JTAG_SC__H
|
|
|
#include "systemc"
|
#include "systemc"
|
#include "TapAction.h"
|
#include "TapAction.h"
|
|
|
|
|
//! Default size of the FIFO queuing TAP actions
|
//! Default size of the FIFO queuing TAP actions
|
#define DEFAULT_TAP_FIFO_SIZE 256
|
#define DEFAULT_TAP_FIFO_SIZE 256
|
|
|
//! The main JTAG interface module
|
//! The main JTAG interface module
|
|
|
Line 66... |
Line 65... |
//! from the FIFO and processes them, issuing the requisite sequence of
|
//! from the FIFO and processes them, issuing the requisite sequence of
|
//! changes of the JTAG pins until the action is complete. It then notifies
|
//! changes of the JTAG pins until the action is complete. It then notifies
|
//! the action owner of completion, through an sc_event, which is part of the
|
//! the action owner of completion, through an sc_event, which is part of the
|
//! ::TapAction class.
|
//! ::TapAction class.
|
//!
|
//!
|
class JtagSC
|
class JtagSC:public sc_core::sc_module {
|
: public sc_core::sc_module
|
|
{
|
|
public:
|
public:
|
|
|
// The ports. Note that the naming of the low level JTAG ports is reversed,
|
// The ports. Note that the naming of the low level JTAG ports is reversed,
|
// because we are driving the inputs! */
|
// because we are driving the inputs! */
|
sc_core::sc_in<bool> sysReset; //!< The system reset (active high)
|
sc_core::sc_in<bool> sysReset; //!< The system reset (active high)
|
Line 82... |
Line 79... |
sc_core::sc_in<bool> tdo; //!< JTAG TDO pin
|
sc_core::sc_in<bool> tdo; //!< JTAG TDO pin
|
sc_core::sc_out<bool> tms; //!< JTAG TMS pin
|
sc_core::sc_out<bool> tms; //!< JTAG TMS pin
|
sc_core::sc_out<bool> trst; //!< JTAG TRST pin
|
sc_core::sc_out<bool> trst; //!< JTAG TRST pin
|
|
|
//! JTAG action queue
|
//! JTAG action queue
|
sc_core::sc_fifo<TapAction *> *tapActionQueue;
|
sc_core::sc_fifo < TapAction * >*tapActionQueue;
|
|
|
// Constructor and destructor
|
// Constructor and destructor
|
JtagSC (sc_core::sc_module_name name,
|
JtagSC (sc_core::sc_module_name name,
|
int fifo_size = DEFAULT_TAP_FIFO_SIZE);
|
int fifo_size = DEFAULT_TAP_FIFO_SIZE);
|
~JtagSC ();
|
~JtagSC ();
|
|
|
|
|
protected:
|
protected:
|
|
|
// Method to process the actions
|
// Method to process the actions
|
void processActions();
|
void processActions();
|
|
|
|
|
private:
|
private:
|
|
|
//! The TAP state machine
|
//! The TAP state machine
|
TapStateMachine *stateMachine;
|
TapStateMachine *stateMachine;
|
|
|