This FPGA is not open source by design, but this project seems fairly complete:
http://www.clifford.at/icestorm/
"Project IceStorm aims at documenting the bitstream format of Lattice iCE40 FPGAs and providing simple tools for analyzing and creating bitstream files."