.. _Bit Field Diagrams:

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

.. _Bit Field Diagrams for UVM registers:

Bit Field Diagrams for UVM registers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



DVT can render bit field diagrams from UVM register configurations in tooltips and in the :ref:`Inspect View`.

Trigger the tooltip from the Editor, by hovering a register class (a class that extends from **uvm_reg**) or a field of register class type:

.. figure:: ../../images/common/uvm_reg_bitfield.png



To see the diagram in the Inspect View, simply click on a register class in the Editor, :ref:`UVM Browser View` or :ref:`UVM Sequence Tree View`:

.. figure:: ../../images/common/bitfield_sequence_tree.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 system clipboard, right-click on it in the Inspect View.

.. note:: 

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


.. _Bit Field Diagrams for packed data types:

Bit Field Diagrams for packed data types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



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

Trigger the tooltip from the Editor, by hovering a packed struct or union data type:

.. list-table::

   * - Declaration
     - Tooltip Window
     - Notes
   * - .. figure:: ../../images/common/packed_struct_desc.png
     - .. figure:: ../../images/common/packed_struct_bitfield.png
     - The memory layout is represented horizontally from MSB to LSB.
   * - .. figure:: ../../images/common/packed_nested_desc.png
     - .. figure:: ../../images/common/packed_nested_bitfield.png
     - Nested types are represented vertically.
   * - .. figure:: ../../images/common/packed_union_desc.png
     - .. figure:: ../../images/common/packed_union_bitfield.png
     - Union members are separated with a blank line.
   * - .. figure:: ../../images/common/packed_mixed_desc.png
     - .. figure:: ../../images/common/packed_mixed_bitfield.png
     - Additional information, for example the type of a member, can be found in the table below the diagram.


.. note:: 

	To see the diagram in the Inspect View, simply click on a packed struct or union data type in the Editor:

.. figure:: ../../images/common/inspect_view_bitfield.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 system clipboard, right-click on it in the Inspect View.

.. tip:: 

	Inspect View offers zoom and pan functionality for diagrams which exceed 64 bits.

.. note:: 

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