decoding compressed vhdl files

the xilinx EDK comes with a large library of components that you can use in your designs. when you look at the files to see how these components work, you will find they are not human readable.

the format of these files is as follows:

XlxVmagic start word
37version number
E or DEncrypted or Decrypted
M or BMimebase64 or Binary encoded

even though somefiles have the 'E' for encrypted, they are not encrypted, just compressed, using zlib.

this little perl script will decompress xilinx files.

use like this, as a pipe, reading from stdin, output to stdout
   perl <encoded.vhd
or like this, specifying a src and output file
   perl encoded.vhd decoded.vhd

the spartan3e starter board


ic01741g125( 5 pin chip, near J3 )
ic02max3232rs232 driver
ic03xc2c256undoc: coolrunner-II cpld ( vq100 package )
ic04cy7c68013Aundoc: usb controller ( 100 pin tqfp package )
ic054l08undoc: serial eeprom
ic06lan83c185ethernet physlayer
ic07tps75003triple output power regulator
ic08ltc3412sdram voltage regulator
ic09ltc1844es5voltage regulator
ic10xc3s500espartan3e fpga ( fg320 package )
ic11xcf04splatform flash
ic12ds2432SHA1 eeprom
ic13xcf04s(bottom side) not installed ... r100 jumpers over jtag chain
ic1425p16v6gserial flash
ic15m25p16not installed
ic17sg8002jf50mhz clock
ic18xc2c64acoolrunner cpld ( vq44 package )
ic19ltc1407cmse-1a/d convertor
ic21ltc2624d/a convertor


j03-io expansion
j05-d/a analog out
j06-softtouch expansion
j07-a/d analog in
j08-next to USB - jtag for xc2c256, layout as j28
j09-rs232 female db9
j10-rs232 male db9
j11-spi jumper select
j12-spi port
j14-ps2 keybd connector
j15-vga port
j16-1200e/1600e expansion header
j17-external clock source
j18-usb/program interface
j21x- one pin Vcc
j23x- one pin, 2.5 V
j24x- one pin, 1.2 V
j25x- one pin, 1.25 V - ddr
j26x- one pin, 2.5 V - ddr
j27x- one pin, 1.8 V - near usb
j30-fpga mode select jumpers
j31-jumper storage
jp01[storage] near power switch
jp02[storage] near J3
jp03[storage] above 'smsc' text
jp04x/ near display - connects ic4.pe1 to ground
jp05x/ near usb - jumpers over r35, in i2c data line
jp06current sense
jp07current sense
jp08-prog_b - when programming via xspi
jp09-io power select
jp10-xc-wdt_en select

jtag chain:

j28.tdi --[100ohm]--->[xc3s500e]>--->[xcf04s]>--+->[xcf04s]>-+-->[xc2c64a]>----[IC1]--+- j28.tdo
                                                |            |                   |    |
                                                +---[R100]---+              j3.jtsel j3.tdo

R30 --- TCK
R29 --- TMS
jtag from ic03 is connected to io-pins of ic04 main jtag chain is connected to io-pins of ic03