------------
Introduction
------------

White Rabbit Trigger Distribution (WRTD) is a generic framework for distributing triggers (Events)
over a White Rabbit network.

.. figure:: graphics/wrtd_overview.png
   :name: wrtd-overview
   :align: center
   :alt: alternate text
   :figclass: align-center

   figure are like images but with a caption

As can be seen in :numref:`wrtd-overview`

Installation
============
.. todo::
   Decide on installation and document it

Major WRTD Elements
===================

Internally, WRTD consists of the following elements:

  - An HDL module for FPGAs, built on top of `Mock Turtle <https://ohwr.org/project/mock-turtle>`_
    (MT) and the `White Rabbit PTP Core <https://ohwr.org/project/wr-cores/wikis/Wrpc-core>`_. When
    instantiated in an FPGA, this module handles the generation/reception of triggers, while
    providing the user with MT cores to run their own application(s) (eg. to control an ADC).
  - An embedded library framework for (MT) firmware development. This library can be used when
    developing firmware for the MT cores, in order to connect user applications with the
    generation/reception of triggers.
  - A host library framework that provides a way for configuring the WRTD nodes and scheduling the
    generation/reception of triggers.

However, for most use cases, only the last element (the host library) will be of importance to the
user, since a device will come pre-programmed with the necessary gateware and firmware.

Section :ref:`host_lib` provides all the details on how to use the host library.
