| 1 | /****************************************************************************/
|
|---|
| 2 | /* */
|
|---|
| 3 | /* Module: jbijtag.h */
|
|---|
| 4 | /* */
|
|---|
| 5 | /* Copyright (C) Altera Corporation 1998-2001 */
|
|---|
| 6 | /* */
|
|---|
| 7 | /* Description: Definitions of JTAG constants, types, and functions */
|
|---|
| 8 | /* */
|
|---|
| 9 | /****************************************************************************/
|
|---|
| 10 |
|
|---|
| 11 | #ifndef INC_JBIJTAG_H
|
|---|
| 12 | #define INC_JBIJTAG_H
|
|---|
| 13 |
|
|---|
| 14 | /****************************************************************************/
|
|---|
| 15 | /* */
|
|---|
| 16 | /* Function Prototypes */
|
|---|
| 17 | /* */
|
|---|
| 18 | /****************************************************************************/
|
|---|
| 19 | typedef enum
|
|---|
| 20 | {
|
|---|
| 21 | JBI_ILLEGAL_JTAG_STATE = -1,
|
|---|
| 22 | RESET = 0,
|
|---|
| 23 | IDLE = 1,
|
|---|
| 24 | DRSELECT = 2,
|
|---|
| 25 | DRCAPTURE = 3,
|
|---|
| 26 | DRSHIFT = 4,
|
|---|
| 27 | DREXIT1 = 5,
|
|---|
| 28 | DRPAUSE = 6,
|
|---|
| 29 | DREXIT2 = 7,
|
|---|
| 30 | DRUPDATE = 8,
|
|---|
| 31 | IRSELECT = 9,
|
|---|
| 32 | IRCAPTURE = 10,
|
|---|
| 33 | IRSHIFT = 11,
|
|---|
| 34 | IREXIT1 = 12,
|
|---|
| 35 | IRPAUSE = 13,
|
|---|
| 36 | IREXIT2 = 14,
|
|---|
| 37 | IRUPDATE = 15
|
|---|
| 38 |
|
|---|
| 39 | } JBIE_JTAG_STATE;
|
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 | JBI_RETURN_TYPE jbi_init_jtag
|
|---|
| 43 | (
|
|---|
| 44 | void
|
|---|
| 45 | );
|
|---|
| 46 |
|
|---|
| 47 | JBI_RETURN_TYPE jbi_set_drstop_state
|
|---|
| 48 | (
|
|---|
| 49 | JBIE_JTAG_STATE state
|
|---|
| 50 | );
|
|---|
| 51 |
|
|---|
| 52 | JBI_RETURN_TYPE jbi_set_irstop_state
|
|---|
| 53 | (
|
|---|
| 54 | JBIE_JTAG_STATE state
|
|---|
| 55 | );
|
|---|
| 56 |
|
|---|
| 57 | JBI_RETURN_TYPE jbi_set_dr_preamble
|
|---|
| 58 | (
|
|---|
| 59 | unsigned int count,
|
|---|
| 60 | unsigned int start_index,
|
|---|
| 61 | unsigned char *preamble_data
|
|---|
| 62 | );
|
|---|
| 63 |
|
|---|
| 64 | JBI_RETURN_TYPE jbi_set_ir_preamble
|
|---|
| 65 | (
|
|---|
| 66 | unsigned int count,
|
|---|
| 67 | unsigned int start_index,
|
|---|
| 68 | unsigned char *preamble_data
|
|---|
| 69 | );
|
|---|
| 70 |
|
|---|
| 71 | JBI_RETURN_TYPE jbi_set_dr_postamble
|
|---|
| 72 | (
|
|---|
| 73 | unsigned int count,
|
|---|
| 74 | unsigned int start_index,
|
|---|
| 75 | unsigned char *postamble_data
|
|---|
| 76 | );
|
|---|
| 77 |
|
|---|
| 78 | JBI_RETURN_TYPE jbi_set_ir_postamble
|
|---|
| 79 | (
|
|---|
| 80 | unsigned int count,
|
|---|
| 81 | unsigned int start_index,
|
|---|
| 82 | unsigned char *postamble_data
|
|---|
| 83 | );
|
|---|
| 84 |
|
|---|
| 85 | JBI_RETURN_TYPE jbi_goto_jtag_state
|
|---|
| 86 | (
|
|---|
| 87 | JBIE_JTAG_STATE state
|
|---|
| 88 | );
|
|---|
| 89 |
|
|---|
| 90 | JBI_RETURN_TYPE jbi_do_wait_cycles
|
|---|
| 91 | (
|
|---|
| 92 | long cycles,
|
|---|
| 93 | JBIE_JTAG_STATE wait_state
|
|---|
| 94 | );
|
|---|
| 95 |
|
|---|
| 96 | JBI_RETURN_TYPE jbi_do_wait_microseconds
|
|---|
| 97 | (
|
|---|
| 98 | long microseconds,
|
|---|
| 99 | JBIE_JTAG_STATE wait_state
|
|---|
| 100 | );
|
|---|
| 101 |
|
|---|
| 102 | JBI_RETURN_TYPE jbi_do_irscan
|
|---|
| 103 | (
|
|---|
| 104 | unsigned int count,
|
|---|
| 105 | unsigned char *tdi_data,
|
|---|
| 106 | unsigned int start_index
|
|---|
| 107 | );
|
|---|
| 108 |
|
|---|
| 109 | JBI_RETURN_TYPE jbi_swap_ir
|
|---|
| 110 | (
|
|---|
| 111 | unsigned int count,
|
|---|
| 112 | unsigned char *in_data,
|
|---|
| 113 | unsigned int in_index,
|
|---|
| 114 | unsigned char *out_data,
|
|---|
| 115 | unsigned int out_index
|
|---|
| 116 | );
|
|---|
| 117 |
|
|---|
| 118 | JBI_RETURN_TYPE jbi_do_drscan
|
|---|
| 119 | (
|
|---|
| 120 | unsigned int count,
|
|---|
| 121 | unsigned char *tdi_data,
|
|---|
| 122 | unsigned long start_index
|
|---|
| 123 | );
|
|---|
| 124 |
|
|---|
| 125 | JBI_RETURN_TYPE jbi_swap_dr
|
|---|
| 126 | (
|
|---|
| 127 | unsigned int count,
|
|---|
| 128 | unsigned char *in_data,
|
|---|
| 129 | unsigned long in_index,
|
|---|
| 130 | unsigned char *out_data,
|
|---|
| 131 | unsigned int out_index
|
|---|
| 132 | );
|
|---|
| 133 |
|
|---|
| 134 | void jbi_free_jtag_padding_buffers
|
|---|
| 135 | (
|
|---|
| 136 | int reset_jtag
|
|---|
| 137 | );
|
|---|
| 138 |
|
|---|
| 139 | JBI_RETURN_TYPE jbi_do_drscan_multi_page
|
|---|
| 140 | (
|
|---|
| 141 | unsigned int variable_id,
|
|---|
| 142 | unsigned long long_count,
|
|---|
| 143 | unsigned long long_index,
|
|---|
| 144 | int version
|
|---|
| 145 | );
|
|---|
| 146 |
|
|---|
| 147 | #endif /* INC_JBIJTAG_H */
|
|---|