.. _file_formats_fabric_bitstream: Fabric-dependent Bitstream -------------------------- .. _file_formats_fabric_bitstream_plain_text: Plain text (.bit) ~~~~~~~~~~~~~~~~~ This file format is designed to be directly loaded to an FPGA fabric. It does not include any comments but only bitstream. The information depends on the type of configuration procotol. .. option:: vanilla A line consisting of ``0`` | ``1`` .. option:: scan_chain Multiple lines consisting of ``0`` | ``1`` For example, a bitstream for 1 configuration regions: .. code-block:: xml 0 1 0 0 For example, a bitstream for 4 configuration regions: .. code-block:: xml 0000 1010 0110 0120 .. note:: When there are multiple configuration regions, each line may consist of multiple bits. For example, ``0110`` represents the bits for 4 configuration regions, where the 4 digits correspond to the bits from region ``0, 1, 2, 3`` respectively. .. option:: memory_bank Multiple lines will be included, each of which is organized as . The size of address line and data input bits are shown as a comment in the bitstream file, which eases the development of bitstream downloader. For example .. code-block:: verilog // Bitstream width (LSB -> MSB): The first part represents the Bit-Line address. The second part represents the Word-Line address. The third part represents the configuration bit. For example .. code-block:: xml ... .. note:: When there are multiple configuration regions, each ```` may consist of multiple bits. For example, ``0110`` represents the bits for 4 configuration regions, where the 4 digits correspond to the bits from region ``0, 1, 2, 3`` respectively. .. option:: frame_based Multiple lines will be included, each of which is organized as ``
``. The size of address line and data input bits are shown as a comment in the bitstream file, which eases the development of bitstream downloader. For example .. code-block:: verilog // Bitstream width (LSB -> MSB):
Note that the address may include don't care bit which is denoted as ``x``. .. note:: OpenFPGA automatically convert don't care bit to logic ``0`` when generating testbenches. For example .. code-block:: xml ... .. note:: When there are multiple configuration regions, each ```` may consist of multiple bits. For example, ``0110`` represents the bits for 4 configuration regions, where the 4 digits correspond to the bits from region ``0, 1, 2, 3`` respectively. .. _file_formats_fabric_bitstream_xml: XML (.xml) ~~~~~~~~~~ This file format is designed to generate testbenches using external tools, e.g., CocoTB. In principle, the file consist a number of XML node ````, each region has a unique id, and contains a number of XML nodes ````. - ``id``: The unique id of a configuration region in the fabric bitstream. A quick example: .. code-block:: xml Each XML node ```` contains the following attributes: - ``id``: The unique id of the configuration bit in the fabric bitstream. - ``value``: The configuration bit value. - ``path`` represents the location of this block in FPGA fabric, i.e., the full path in the hierarchy of FPGA fabric. A quick example: .. code-block:: xml Other information may depend on the type of configuration procotol. .. option:: memory_bank - ``bl``: Bit line address information - ``wl``: Word line address information A quick example: .. code-block:: xml .. option:: frame_based - ``frame``: frame address information .. note:: Frame address may include don't care bit which is denoted as ``x``. A quick example: .. code-block:: xml