Skip to content

Commit

Permalink
Add support for programming Virtex 7 devices. Tested on XC7VX690T.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.code.sf.net/p/xc3sprog/code/trunk@747 5e3be8be-922f-45f9-ad52-57b51d30232e
  • Loading branch information
jvrantwijk committed Aug 1, 2013
1 parent f898090 commit aa18456
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions progalgxc3s.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ ProgAlgXC3S::ProgAlgXC3S(Jtag &j, int fam)
case FAMILY_XC5VSXT:
case FAMILY_XC5VFXT:
case FAMILY_XC5VTXT:
case FAMILY_XC7:
tck_len = 12;
array_transfer_len = 32;
break;
Expand Down Expand Up @@ -97,14 +98,14 @@ void ProgAlgXC3S::flow_array_program(BitFile &file)
{
Timer timer;
unsigned int i;
for(i=0; i<file.getLength(); i= i+ array_transfer_len)
for(i=0; i<file.getLength(); i += array_transfer_len)
{
jtag->shiftIR(ISC_PROGRAM);
jtag->shiftDR(&(file.getData())[i/8],0,array_transfer_len);
jtag->cycleTCK(1);
if((i % (10000*array_transfer_len)) == 0)
{
fprintf(stdout,".");
fprintf(stderr,".");
fflush(stderr);
}
}
Expand Down Expand Up @@ -236,11 +237,16 @@ void ProgAlgXC3S::array_program(BitFile &file)
}
}

/* use leagcy, as large USB transfers are faster then chunks */
/* use legacy, as large USB transfers are faster then chunks */
flow_program_legacy(file);
/*flow_array_program(file);*/
flow_disable();

/* NOTE: Virtex7 devices do not support flow_program_legacy according
to the Xilinx IEEE 1532 files. However, my tests with flow_array_program
failed, while flow_program_legacy appears to work just fine on XC7VX690T.
(jorisvr) */

/* Wait until device comes up */
while ((( buf[0] & 0x23) != 0x21) && (i <50))
{
Expand Down
1 change: 1 addition & 0 deletions progalgxc3s.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Dmitry Teytelman [[email protected]] 14 Jun 2006 [applied 13 Aug 2006]:
#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
Expand Down
3 changes: 2 additions & 1 deletion xc3sprog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,8 @@ int main(int argc, char **args)
(family == FAMILY_XC5VLXT) ||
(family == FAMILY_XC5VSXT) ||
(family == FAMILY_XC5VFXT) ||
(family == FAMILY_XC5VTXT)
(family == FAMILY_XC5VTXT) ||
(family == FAMILY_XC7)
)
return programXC3S(jtag, argc, args, verbose,
reconfigure, family);
Expand Down

0 comments on commit aa18456

Please sign in to comment.