File: progalgxc3s.h

package info (click to toggle)
xc3sprog 0%2Bsvn795%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,756 kB
  • sloc: cpp: 15,983; ansic: 849; vhdl: 410; makefile: 2
file content (70 lines) | stat: -rw-r--r-- 1,871 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* Spartan3 JTAG programming algorithms

Copyright (C) 2004 Andrew Rogers

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Changes:
Dmitry Teytelman [dimtey@gmail.com] 14 Jun 2006 [applied 13 Aug 2006]:
    Code cleanup for clean -Wall compile.
*/



#ifndef PROGALGXC3S_H
#define PROGALGXC3S_H

#include "bitfile.h"
#include "jtag.h"

#define FAMILY_XC2S     0x03
#define FAMILY_XC2SE    0x05
#define FAMILY_XC2V     0x08
#define FAMILY_XC3S     0x0a
#define FAMILY_XC4VLX   0x0b
#define FAMILY_XC3SE    0x0e
#define FAMILY_XC4VFX   0x0f
#define FAMILY_XC4VSX   0x10
#define FAMILY_XC3SA    0x11
#define FAMILY_XC3SAN   0x13
#define FAMILY_XC5VLX   0x14
#define FAMILY_XC5VLXT  0x15
#define FAMILY_XC5VSXT  0x17
#define FAMILY_XC5VFXT  0x19
#define FAMILY_XC7      0x1b
#define FAMILY_XC3SD    0x1c
#define FAMILY_XC6S     0x20
#define FAMILY_XC5VTXT  0x22

class ProgAlgXC3S
{
 private:
  Jtag *jtag;
  int family;
  int tck_len;
  int array_transfer_len;
  void flow_enable();
  void flow_disable();
  void flow_program_xc2s(BitFile &file);
  void flow_array_program(BitFile &file);
  void flow_program_legacy(BitFile &file);
 public:
  ProgAlgXC3S(Jtag &j, int family);
  void array_program(BitFile &file);
  void reconfig();
};


#endif