.. _Bit Field Diagrams:

Bit Field Diagrams
==================

.. rst-class:: lead

  DVT can render bit field diagrams from record declarations in tooltips and in the :ref:`Inspect View`.

Trigger the tooltip from the Editor, by hovering a record type:

.. list-table::
   :header-rows: 1
   :widths: auto

   * - Tooltip Window
     - Notes
   * - 
       .. figure:: ../../images/common/vhdl_bitfield_1.png

     - The layout of a record type is represented horizontally, with the least significant bit (LSB) being the first declared member.
   * - 
       .. figure:: ../../images/common/vhdl_bitfield_2.png

     - Nested types are represented vertically.
   * - 
       .. figure:: ../../images/common/vhdl_bitfield_3.png
          
     - By default, record types that exceed 32 bits are divided into multiple lanes of 32 bits each. For further details such as the type of a member, refer to the table located below the diagram.


To see the diagram in the Inspect View, simply click on a record type in the Editor:

.. figure:: ../../images/common/vhdl_bitfield_4.png
	:align: center


.. tip:: 

  To save the diagram as an SVG file, right-click on it in the Inspect View.

.. tip:: 

  To copy the table contents to clipboard, right-click on it in the Inspect View.

.. tip:: 

  By clicking on a bit field within the diagram, you can automatically navigate to the corresponding table cell, and vice versa.

.. tip:: 
  
  To disable the division of larger types use the Inspect View button or go to :menuselection:`Window --> Preferences --> DVT --> Diagrams --> Bit Field Diagrams`.

.. note::

	Diagrams are rendered using the `Bit Field <https://github.com/drom/bitfield>`_ library.
