Bitstream Analysis - muneeb-mbytes/FPGABoard_edgeSpartan6 GitHub Wiki

A bitstream is a sequence of bits, or binary digits.

In the context of field-programmable gate arrays (FPGAs), a bitstream is a binary file that contains configuration data for the FPGA. The bitstream is generated by a hardware description language (HDL) compiler or synthesis tool, and it specifies how the FPGA should be configured in order to implement a desired digital circuit design. The bitstream is loaded into the FPGA's configuration memory, which sets the logic cells, interconnects, and other resources of the FPGA to their desired states.


In the case of our FPGA board, the Edge Spartan 6, in order to analyze the bitstream file we must:

  1. Clone https://github.com/lastweek/fpga_decode_bitstream.git
  2. Open a terminal in the local folder created, i.e, fpga_decode_bitstream, and run command 'make' which generates object files from the C files 'parse_ascii.c' and 'parse_bin.c'. Since our bitstreams are in .bit format, we use parse_bin.o.
  3. Add the bitstream files to be analyzed to the folder.
  1. Open the folder in terminal and run command:

./parse_bin.o 'bitstream.bit' < number of words to parse > < number of words to skip >

For example: ./parse_bin.o add.bit 100 100

The following command will parse the bitstream for a 100 words and skip a 100 words.

Bitstream Analysis