Project

General

Profile

Download (5.07 KB) Statistics
| Branch: | Tag: | Revision:
1

    
2
/**************************************************************
3
* 
4
* Revision History of opcode.h
5
* 
6
* 
7
* 09/11/07 NN Updated to support version 1.3
8
* This version supported new POLING STATUS LOOP opcodes  
9
* for Flash programming of the Lattice FPGA devices
10
* #define LOOP    = 0x58
11
* #define ENDLOOP = 0x59
12
***************************************************************/
13

    
14

    
15
/*************************************************************
16
*                                                            *
17
* LATTICE CABLE DEFINTIONS.                                  *
18
*                                                            *
19
* Define these only if the lattice cable is being used.      *
20
*                                                            *
21
*************************************************************/
22

    
23
#define    pinTDI       1
24
#define    pinTCK       2
25
#define    pinTMS       4
26
#define    pinENABLE    8
27
#define    pinTRST      16
28
#define    pinCE        32
29
#define    pinTDO       64
30

    
31
/*************************************************************
32
*                                                            *
33
* ERROR DEFINITIONS                                          *
34
*                                                            *
35
*************************************************************/
36

    
37
#define ERR_VERIFY_FAIL				-1
38
#define ERR_FIND_ALGO_FILE			-2
39
#define ERR_FIND_DATA_FILE			-3
40
#define ERR_WRONG_VERSION			-4
41
#define ERR_ALGO_FILE_ERROR			-5
42
#define ERR_DATA_FILE_ERROR			-6
43
#define ERR_OUT_OF_MEMORY			-7
44

    
45
/*************************************************************
46
*                                                            *
47
* DATA TYPE REGISTER BIT DEFINITIONS                         *
48
*                                                            *
49
*************************************************************/
50

    
51
#define SIR_DATA		0x0001	/*** Current command is SIR ***/
52
#define SDR_DATA		0x0002	/*** Current command is SDR ***/
53
#define TDI_DATA		0x0004	/*** Command contains TDI ***/
54
#define TDO_DATA		0x0008	/*** Command contains TDO ***/
55
#define MASK_DATA		0x0010	/*** Command contains MASK ***/
56
#define DTDI_DATA		0x0020	/*** Verification flow ***/
57
#define DTDO_DATA		0x0040	/*** Verification flow ***/
58
#define COMPRESS		0x0080	/*** Compressed data file ***/
59
#define COMPRESS_FRAME	0x0100	/*** Compressed data frame ***/
60

    
61
/*************************************************************
62
*                                                            *
63
* USED JTAG STATE                                            *
64
*                                                            *
65
*************************************************************/
66

    
67
#define RESET      0x00
68
#define IDLE       0x01
69
#define IRPAUSE    0x02
70
#define DRPAUSE    0x03
71
#define SHIFTIR    0x04
72
#define SHIFTDR    0x05
73
#define DRCAPTURE  0x06
74

    
75
/*************************************************************
76
*                                                            *
77
* VME OPCODE DEFINITIONS                                     *
78
*                                                            *
79
* These are the opcodes found in the VME file.  Although     *
80
* most of them are similar to SVF commands, a few opcodes    *
81
* are available only in VME format.                          *
82
*                                                            *
83
*************************************************************/
84

    
85
#define STATE			0x10
86
#define SIR				0x11
87
#define SDR				0x12
88
#define TCK				0x1B
89
#define WAIT			0x1A
90
#define ENDDR			0x02
91
#define ENDIR			0x03
92
#define HIR				0x06
93
#define TIR				0x07
94
#define HDR				0x08
95
#define TDR		        0x09
96
#define TDI				0x13
97
#define CONTINUE		0x70
98
#define TDO				0x14
99
#define MASK			0x15
100
#define LOOP			0x58
101
#define ENDLOOP			0x59
102
#define LCOUNT			0x66    
103
#define LDELAY			0x67		
104
#define LSDR			0x68		
105
#define ENDSTATE		0x69
106
#define ENDVME			0x7F
107

    
108
/*************************************************************
109
*                                                            *
110
* Begin future opcodes at 0xA0 to avoid conflict with Full   *
111
* VME opcodes.                                               *
112
*                                                            *
113
*************************************************************/
114

    
115
#define BEGIN_REPEAT	0xA0
116
#define END_REPEAT		0xA1
117
#define END_FRAME		0xA2
118
#define DATA			0xA3
119
#define PROGRAM			0xA4
120
#define VERIFY			0xA5
121
#define DTDI			0xA6
122
#define DTDO			0xA7
123

    
124
/*************************************************************
125
*                                                            *
126
* Opcode for discrete pins toggling							 *
127
*                                                            *
128
*************************************************************/
129
#define signalENABLE  0x1C    /*assert the ispEN pin*/
130
#define signalTMS     0x1D    /*assert the MODE or TMS pin*/
131
#define signalTCK     0x1E    /*assert the SCLK or TCK pin*/
132
#define signalTDI     0x1F    /*assert the SDI or TDI pin*/
133
#define signalTRST    0x20    /*assert the RESET or TRST pin*/   
134
#define signalTDO     0x21    /*assert the RESET or TDO pin*/   
135
#define signalCableEN    0x22    /*assert the RESET or CableEN pin*/  
(7-7/11)
Add picture from clipboard (Maximum size: 48.8 MB)