Difference between revisions of "Papilio"
From Tech
Jump to navigationJump to search(17 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | * Papilio [http://papilio.cc/index.php?n=Papilio.Reference Reference page] |
+ | * Papilio [http://papilio.cc/index.php?n=Papilio.Reference Reference page], more info [http://gadgetforge.gadgetfactory.net/gf/project/butterfly_one/ gadgetforce] |
* Xilinx [http://gadgetforge.gadgetfactory.net/gf/download/frsrelease/134/412/BPC3003_2.03%2B.ucf constraints.ucf] file. |
* Xilinx [http://gadgetforge.gadgetfactory.net/gf/download/frsrelease/134/412/BPC3003_2.03%2B.ucf constraints.ucf] file. |
||
* Papilio [http://papilio.cc/index.php?n=Playground.PapilioPinouts Pinouts] |
* Papilio [http://papilio.cc/index.php?n=Playground.PapilioPinouts Pinouts] |
||
+ | * [http://www.xilinx.com/support/documentation/data_sheets/ds312.pdf XC3S500E datasheet] |
||
− | Hello World VHDL |
+ | =Hello World VHDL= |
+ | A Blinking LED: |
||
<nowiki>entity LEDtest is |
<nowiki>entity LEDtest is |
||
port ( |
port ( |
||
Line 45: | Line 47: | ||
sudo ./xc3sprog -c papilio -I../bscan_spi/bscan_spi_xc3s500e_papilio.bit ~/VHDL/LEDTest/LEDtest.bit -v -R</nowiki> |
sudo ./xc3sprog -c papilio -I../bscan_spi/bscan_spi_xc3s500e_papilio.bit ~/VHDL/LEDTest/LEDtest.bit -v -R</nowiki> |
||
+ | Or, via my raspberry pi: |
||
⚫ | |||
+ | f=LEDtest.bit ; scp $f pi:/tmp; ssh pi "sudo /home/joostje/debian/papilio/Papilio-Loader/xc3sprog/trunk/build/xc3sprog -c papilio /tmp/$f -v" |
||
+ | # |
||
+ | f=LEDtest.bit ; scp $f pi:/tmp; ssh pi "sudo /home/joostje/debian/papilio/Papilio-Loader/xc3sprog/trunk/build/xc3sprog -c papilio -I../bscan_spi/bscan_spi_xc3s500e_papilio.bit /tmp/$f -v -R" |
||
+ | |||
⚫ | |||
+ | (This is the GadgetFactory fork of Xc3sprog, for the official version, see [[Xc3sprog]]) |
||
+ | Tested on Ubuntu 13.04 (beta) and raspberry Pi (raspbian) |
||
<nowiki> |
<nowiki> |
||
− | sudo aptitude install libftdi-dev libusb-1.0-0-dev |
+ | sudo aptitude install libftdi-dev libusb-1.0-0-dev cmake |
git clone git://github.com/GadgetFactory/Papilio-Loader.git |
git clone git://github.com/GadgetFactory/Papilio-Loader.git |
||
cd Papilio-Loader/xc3sprog/trunk |
cd Papilio-Loader/xc3sprog/trunk |
||
Line 82: | Line 91: | ||
[48531.478467] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB1 |
[48531.478467] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB1 |
||
</nowiki> |
</nowiki> |
||
+ | |||
+ | =About the clocks= |
||
+ | * [http://www.xilinx.com/support/documentation/data_sheets/ds312.pdf#page=51 drawings with CLKFB] |
||
+ | * [http://duteela.et.tudelft.nl/~elca/XilinxTutor/documents/xapp462.pdf#page=6 DCM Primitive] |
||
+ | |||
+ | =Errors when programming using low-powerd devices= |
||
+ | When using my Raspberry Pi to program papilio, these errors appear when the papilio board needs to give too much power to other devices, for instance the [[DX TM1638 Display]]: |
||
+ | <nowiki>$ xc3sprog -c papilio /tmp/$f -v |
||
+ | design_top.bit 100% 277KB 277.2KB/s 00:00 |
||
+ | XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 691 $ OS: Linux |
||
+ | Free software: If you contribute nothing, expect nothing! |
||
+ | Feedback on success/failure/enhancement requests: |
||
+ | http://sourceforge.net/mail/?group_id=170565 |
||
+ | Check Sourceforge for updates: |
||
+ | http://sourceforge.net/projects/xc3sprog/develop |
||
+ | |||
+ | Using built-in device list |
||
+ | Using built-in cable list |
||
+ | Cable papilio type ftdi VID 0x0403 PID 0x6010 dbus data 00 enable 0b cbus data 00 data 00 |
||
+ | Could not open FTDI device (using libftdi): device not found |
||
+ | Unable to access FTDI device with either libftdi or FTD2XX</nowiki> |
||
+ | Apparently the FTDI232 disconnects when the power goes too low. |
||
+ | |||
=Components= |
=Components= |
||
* FPGA markings: Xilinx \n Spartan \n XC3S500E ^TM \n VQ0100DGQ1213 \n D3236398A \n 4C |
* FPGA markings: Xilinx \n Spartan \n XC3S500E ^TM \n VQ0100DGQ1213 \n D3236398A \n 4C |
||
* 32MHz clock markings: CETECJ \n 32.000 \n @ <T> 116 |
* 32MHz clock markings: CETECJ \n 32.000 \n @ <T> 116 |
||
− | * USB<->RS232 converter markings: FTDI \n FT2232D \n 207 -1 |
+ | * USB<->RS232 converter markings: FTDI \n [http://www.ftdichip.com/Products/ICs/FT2232D.htm FT2232D] \n 207 -1, [http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT2232D.pdf Datasheet] |
* FTDI crystal markings: <T> 6.0000 |
* FTDI crystal markings: <T> 6.0000 |
||
* Power Converter: AMS 1117 \n 1.2 HT1206 |
* Power Converter: AMS 1117 \n 1.2 HT1206 |
||
Line 91: | Line 123: | ||
* Power Converter: AMS 1117 \n 3.3 HT 226E |
* Power Converter: AMS 1117 \n 3.3 HT 226E |
||
* Power Converter: AMS 1117 \n 5.0 HT ???? |
* Power Converter: AMS 1117 \n 5.0 HT ???? |
||
− | * 6-pin IC close to FTDI: 1TET |
+ | * 6-pin IC close to FTDI: 1TET, in schematic: 93LC46B |
+ | * 8-pin flash IC: ?, in schematic: FLASH-SPI-25XXSMD1 (FLASH-SPI-25XX), maybe [http://www.amictechnology.com/pdf/A25L512.pdf this one], Xilinx info on the chip: [http://www.xilinx.com/support/documentation/application_notes/xapp951.pdf Configuring Xilinx FPGAs with SPI Serial Flash] |
||
− | * 8-pin flash IC: ? |
||
+ | |||
+ | =See Also= |
||
+ | * [[FPGA]] |
||
+ | * [[FPGA Test Board]] |
||
+ | * [[DX TM1638 Display]] |
Latest revision as of 22:41, 11 December 2013
- Papilio Reference page, more info gadgetforce
- Xilinx constraints.ucf file.
- Papilio Pinouts
- XC3S500E datasheet
Hello World VHDL
A Blinking LED:
entity LEDtest is port ( clk: in bit; LED1: out bit; LED2: out bit ); end LEDtest; architecture BEHAVIOUR of LEDtest is signal count: integer range 0 to 16777215; signal tmp:bit:='0'; begin IN_process: process (clk) begin if clk'event and clk = '1' then count<=count+1; if count=16777215 then count<=0; tmp<=not tmp; LED1<=tmp; LED2<=not tmp; end if; end if; end process; end BEHAVIOUR;
With the following constraints file:
# Crystal Clock - use 32MHz onboard oscillator NET "clk" LOC = "P89" | IOSTANDARD = LVCMOS25 | PERIOD = 31.25ns ; # Wing1 Column A NET "LED1" LOC = "P91"; NET "LED2" LOC = "P92";
Use xc3prog to send to FPGA:
#just once (erased on reboot): sudo ./xc3sprog -c papilio ~/VHDL/LEDTest/LEDtest.bit -v #or use FTDI & FLASH to make non-volatile: sudo ./xc3sprog -c papilio -I../bscan_spi/bscan_spi_xc3s500e_papilio.bit ~/VHDL/LEDTest/LEDtest.bit -v -R
Or, via my raspberry pi:
f=LEDtest.bit ; scp $f pi:/tmp; ssh pi "sudo /home/joostje/debian/papilio/Papilio-Loader/xc3sprog/trunk/build/xc3sprog -c papilio /tmp/$f -v" # f=LEDtest.bit ; scp $f pi:/tmp; ssh pi "sudo /home/joostje/debian/papilio/Papilio-Loader/xc3sprog/trunk/build/xc3sprog -c papilio -I../bscan_spi/bscan_spi_xc3s500e_papilio.bit /tmp/$f -v -R"
Compiling xc3prog
(This is the GadgetFactory fork of Xc3sprog, for the official version, see Xc3sprog) Tested on Ubuntu 13.04 (beta) and raspberry Pi (raspbian)
sudo aptitude install libftdi-dev libusb-1.0-0-dev cmake git clone git://github.com/GadgetFactory/Papilio-Loader.git cd Papilio-Loader/xc3sprog/trunk mkdir build cd build cmake .. make sudo ./xc3sprog -c papilio ~/VHDL/AWGprovo/mem2.bit -v
dmesg on inserting:
[48531.284590] usb 1-1.4: new full-speed USB device number 4 using ehci-pci [48531.379349] usb 1-1.4: New USB device found, idVendor=0403, idProduct=6010 [48531.379359] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [48531.379365] usb 1-1.4: Product: Dual RS232 [48531.379369] usb 1-1.4: Manufacturer: FTDI [48531.450715] usbcore: registered new interface driver usbserial [48531.450731] usbcore: registered new interface driver usbserial_generic [48531.450741] usbserial: USB Serial support registered for generic [48531.475289] usbcore: registered new interface driver ftdi_sio [48531.475397] usbserial: USB Serial support registered for FTDI USB Serial Device [48531.475516] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected [48531.475578] usb 1-1.4: Detected FT2232C [48531.475581] usb 1-1.4: Number of endpoints 2 [48531.475583] usb 1-1.4: Endpoint 1 MaxPacketSize 64 [48531.475585] usb 1-1.4: Endpoint 2 MaxPacketSize 64 [48531.475587] usb 1-1.4: Setting MaxPacketSize 64 [48531.477586] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0 [48531.477611] ftdi_sio 1-1.4:1.1: FTDI USB Serial Device converter detected [48531.477670] usb 1-1.4: Detected FT2232C [48531.477672] usb 1-1.4: Number of endpoints 2 [48531.477675] usb 1-1.4: Endpoint 1 MaxPacketSize 64 [48531.477677] usb 1-1.4: Endpoint 2 MaxPacketSize 64 [48531.477679] usb 1-1.4: Setting MaxPacketSize 64 [48531.478467] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB1
About the clocks
Errors when programming using low-powerd devices
When using my Raspberry Pi to program papilio, these errors appear when the papilio board needs to give too much power to other devices, for instance the DX TM1638 Display:
$ xc3sprog -c papilio /tmp/$f -v design_top.bit 100% 277KB 277.2KB/s 00:00 XC3SPROG (c) 2004-2011 xc3sprog project $Rev: 691 $ OS: Linux Free software: If you contribute nothing, expect nothing! Feedback on success/failure/enhancement requests: http://sourceforge.net/mail/?group_id=170565 Check Sourceforge for updates: http://sourceforge.net/projects/xc3sprog/develop Using built-in device list Using built-in cable list Cable papilio type ftdi VID 0x0403 PID 0x6010 dbus data 00 enable 0b cbus data 00 data 00 Could not open FTDI device (using libftdi): device not found Unable to access FTDI device with either libftdi or FTD2XX
Apparently the FTDI232 disconnects when the power goes too low.
Components
- FPGA markings: Xilinx \n Spartan \n XC3S500E ^TM \n VQ0100DGQ1213 \n D3236398A \n 4C
- 32MHz clock markings: CETECJ \n 32.000 \n @ <T> 116
- USB<->RS232 converter markings: FTDI \n FT2232D \n 207 -1, Datasheet
- FTDI crystal markings: <T> 6.0000
- Power Converter: AMS 1117 \n 1.2 HT1206
- Power Converter: AMS 1117 \n 2.5 HT 1218
- Power Converter: AMS 1117 \n 3.3 HT 226E
- Power Converter: AMS 1117 \n 5.0 HT ????
- 6-pin IC close to FTDI: 1TET, in schematic: 93LC46B
- 8-pin flash IC: ?, in schematic: FLASH-SPI-25XXSMD1 (FLASH-SPI-25XX), maybe this one, Xilinx info on the chip: Configuring Xilinx FPGAs with SPI Serial Flash