papilio-prog reconfig bug & workaround

Recommended Posts

I've noticed that when I try to use "papilio-prog" to reconfigure the FPGA, it gets stuck.  The command completes and returns to the prompt, but the Papilio just sits there instead of coming back up in the design which is loaded onto the SPI flash.  The four LEDs on the Arcade MegaWing are faintly lit as they are during programming.


What I did in particular was: "papilio-prog -vr".


I've got a workaround.  I follow the command by: "papilio-prog -vc" (display current status).  That seems to wake it up.


Other system info:
I've seen this with two different builds of papilio-prog, both built from the GitHub branch "master".  One from September 2014, and one from now (version 2.8).  I'm running xubuntu Linux in VMware on top of Mac OS X, with a Papilio Pro and Arcade MegaWing.


Share this post

Link to post
Share on other sites

Thank you for the info, for whatever reason the -r command has not worked for years and I have never been able to figure out why. It used to work and then it just stopped working, I always just do the -vc trick instead.



Share this post

Link to post
Share on other sites

I think the current papilio-prog code works for Spartan3 but not Spartan6.


This is what the papilio-prog reconfigure code looks like (in progalgxc3s.cpp):

void ProgAlgXC3S::Reconfigure(){    jtag->shiftIR(&JPROGRAM);    jtag->shiftIR(&BYPASS);}

And this is the modified code that I have been using (and works for Spartan6) based on the current xc3sprog code:

void ProgAlgXC3S::Reconfigure(){//    jtag->shiftIR(&JPROGRAM);//    jtag->shiftIR(&BYPASS);  switch(family)    {      case 0x0e: /* XC3SE*/      case 0x11: /* XC3SA*/      case 0x13: /* XC3SAN*/      case 0x20: /* XC6S*/      break;    default:      fprintf(stderr, "Device does not support reconfiguration.\n");      return;    }    /* Sequence is from AR #31913       FFFF Dummy Word       9955 SYNC       850c Type 1 Write to CMD       7000 REBOOT command       0004 NOOP       0004 NOOP    */    byte xc3sbuf[12]= {0xff, 0xff, 0x55, 0x99, 0x0c,                       0x85, 0x00, 0x70, 0x04, 0x00, 0x04, 0x00};    /* xtp038.pdf       FFFF Dummy Word       AA99 Sync Word       5566 Sync Word       30A1 Type 1 Write 1 Word to CMD       000E IPROG Command       2000 Type 1 NO OP    */    byte xc6sbuf[12]= {0xff, 0xff, 0x55, 0x99, 0xaa, 0x66, 0x0c,                       0x85, 0x00, 0x70, 0x04, 0x00};  jtag->shiftIR(&JSHUTDOWN);  io->cycleTCK(16);  jtag->shiftIR(&CFG_IN);  if(io->getVerbose())      fprintf(stderr, "Trying reconfigure\n");  if(family == 0x20) /*XC6S*/     jtag->shiftDR(xc6sbuf, NULL, 12*8 );  else     jtag->shiftDR(xc3sbuf, NULL, 12*8 );  jtag->shiftIR(&JSTART);  io->cycleTCK(32);  jtag->shiftIR(&BYPASS);  io->cycleTCK(1);//  jtag->setTapState(Jtag::TEST_LOGIC_RESET);}


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now