Generic Bitstream ~~~~~~~~~~~~~~~~~ Usage ````` Generic bitstream is a fabric-independent bitstream where configuration bits are organized out-of-order in a database. This can be regarded as a raw bitstream used for - ``debugging``: Hardware engineers can validate if their configuration memories across the FPGA fabric are assigned to expected values - ``an exchangeable file format for bitstream assembler``: Software engineers can use the raw bitstream to build a bitstream assembler which organize the bitstream in the loadable formate to FPGA chips. - ``creation of artificial bitstream``: Test engineers can craft artificial bitstreams to test each element of the FPGA fabric, which is typically not synthesizable by VPR. Use the ``--read_file`` option to load the artifical bitsteam to OpenFPGA (see details in :ref:`openfpga_bitstream_commands`). .. warning:: The fabric-independent bitstream cannot be directly loaded to FPGA fabrics File Format ``````````` OpenFPGA can output the generic bitstream to an XML format, which is easy to debug. As shown in the following XML code, configuration bits are organized block by block, where each block could be a LUT, a routing multiplexer `etc`. Each ``bitstream_block`` includes the following information: - ``name`` represents the instance name which you can find in the fabric netlists - ``hierarchy_level`` represents the depth of this block in the hierarchy of the FPGA fabric. It always starts from 0 as the root. - ``hierarchy`` represents the location of this block in FPGA fabric. The hierachy includes the full hierarchy of this block - ``instance`` denotes the instance name which you can find in the fabric netlists - ``level`` denotes the depth of the block in the hierarchy - ``input_nets`` represents the path ids and net names that are mapped to the inputs of block. Unused inputs will be tagged as ``unmapped`` which is a reserved word of OpenFPGA. Path id corresponds the selected ``path_id`` in the ```` node. - ``output_nets`` represents the path ids and net names that are mapped to the outputs of block. Unused outputs will be tagged as ``unmapped`` which is a reserved word OpenFPGA. - ``bitstream`` represents the configuration bits affiliated to this block. - ``path_id`` denotes the index of inputs which is propagated to the output. Note that smallest valid index starts from zero. Only routing multiplexers have the path index. Unused routing multiplexer will not have a ``path_id`` of ``-1``, which allows bitstream assembler to freely find the best path in terms of Quality of Results (QoR). A used routing multiplexer should have a zero or positive ``path_id``. - ``bit`` denotes a single configuration bit under this block. It contains \ - ``memory_port`` the memory port name which you can find in the fabric netlists by following the hierarchy. - ``value`` a binary value which is the configuration bit assigned to the memory port. .. code-block:: xml