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.


Link to comment
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);}


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.