.. _firmware-example-designs: Example designs =============== Example designs for several development boards are available in the git repository, under the ``boards`` directory. Ethernet-based designs: * Enclustra AX3 module (using the RGMII PHY on the PM3 baseboard) * Xilinx KC705 eval board * Xilinx KCU105 eval board (using SFP0) * Xilinx VCU118 eval board * Xilinx ZCU102 eval board * PC053a PCIe-based designs: * HiTech Global K800 * Xilinx VCU118 eval board Each of the Ethernet-based designs instantiates an Ethernet core, the ``ipbus_ctrl`` entity - which contains the IPbus transactor itself - and a small illustrative set of IPbus slaves (a couple of registers, a standard RAM slave, and a ported RAM slave). Each of the PCIe-based designs instantiates the Xilinx XDMA IP core, the ``ipbus_transport_axi_if`` entity, the IPbus transactor, and the same small illustrative set of IPbus slaves as the Ethernet-based designs. The address table file for the slaves in the example designs is: :github-fw-tag-file:`components/ipbus_util/addr_table/ipbus_example.xml` Build instructions ------------------ .. note:: The IP and MAC address for each Ethernet-based example design is set by signals in the top-level VDHL file (e.g. ``boards/kcu105/basex/synth/firmware/hdl/top_kcu105_basex.vhd`` for the KCU105 design). For most designs, the IP address is 192.168.200.16+n and the MAC address is ``0x020ddba1151n``, where the value of ``n`` is set by the board's dip switches. Depending on the network setup in your lab, you may want/need to change these addresses before building the example designs. The example designs can be built using IPBB (the IPBus firmware Build tool), which requires Python (version **2.7 or later**) and can be set up as follows: 1. Prerequisites: ``pip`` and ``virtualenv``. Install if not already present, e.g. via YUM: ``sudo yum install python-pip python-virtualenv`` 2. Install IPBB - there are two options: a. System-wide installation .. code:: sh sudo pip install https://github.com/ipbus/ipbb/archive/v0.5.2.tar.gz b. Local (VirtualEnv) installation .. code:: sh curl -L https://github.com/ipbus/ipbb/archive/v0.5.2.tar.gz | tar xvz source ipbb-0.5.2/env.sh **N.B.** With this VirtualEnv installation, if you start a new shell before building the firmware, then the 2nd of these commands must be run again in order to add the path for the ``ipbb`` command to ``$PATH``. The top-level IPBB ``.dep`` files for the example designs can be found under ``projects/example/firmware/cfg``. After setting up IPBB, each of these designs can be built with the following commands (where ```` should be replaced by that particular design's name, e.g. ``kc705_basex``): .. code:: sh ipbb init myFwArea cd myFwArea ipbb add git https://github.com/ipbus/ipbus-firmware -b v1.14 ipbb proj create vivado -t top_.dep ipbus-firmware:projects/example cd proj/ ipbb vivado make-project ipbb vivado synth -j4 impl -j 4 ipbb vivado package The bitfile can then be found under the ``package`` directory (``package/src/top.bit``), along with a tarball that contains both the bitfile and the address table (``package/___