Tutorial - Adding Custom Instrumentation to an FPGA Design
The CUSTOM_INSTRUMENT component is a fully-customizable instrument with which to monitor and control signals within an FPGA design.
As part of the instrument's configuration you are able to create your own GUI – the interface that is seen once the design is programmed into the target device and the instrument is accessed. A palette of standard components and instrument controls enable you to quickly construct the instrument panel, while various properties associated with a control allow you to make fine-tuning adjustments.
Defined IO signals, wired to the instrument on the schematic, can be hooked up directly to the various controls in your custom GUI, or you can write your own DelphiScript code to process IO as required. Scripts are fired whenever the instrument polls, and in relation to specified events.
In this tutorial, we will look at a simple design that incorporates a Custom Instrument component and which will be programmed into an FPGA resident on a daughter board plugged into the Desktop NanoBoard NB2DSK01. The design will utilize several resources found on the Desktop NanoBoard, namely:
- 8-way DIP-Switch
- User LEDs
'DAUGHTER BD TEST/RESET'
button.
To demonstrate functionality we will configure the instrument to:
- Reflect the current state of the DIP-Switch using a variety of monitoring-based controls – all directly hooked up to the incoming signal.
- Reflect the current state of the
'DAUGHTER BD TEST/RESET'
button using a monitoring-based control – directly hooked up to the incoming signal.
- Use scripting to control the output to the User LEDs. When running normally, the output to the LEDs will be determined by the value set using a control on the instrument's panel. This value can be overriden in two ways:
- If the
'DAUGHTER BD TEST/RESET'
button is pressed. A message should appear stating that override has been engaged and all LEDs turned OFF. - If a dedicated button on the instrument's panel is pressed. A similar message should appear stating that override has been engaged and again, all LEDs turned OFF.
- If the
The example design featured in this tutorial (Figure 1) can be found in the \Examples\NanoBoard Common\FPGA Hardware\Custom Instrument Design
folder of your Altium Designer installation. Refer to this example at any time to get further insight or to skip some of the steps.
Follow each of the linked pages below, in sequence, to complete the tutorial and implement the design:
This tutorial assumes a working knowledge of the basics of FPGA design within Altium Designer. Although not a pre-requisite for this tutorial, should you wish to familialize yourself with the basics, including project creation, component placement, wiring, configuration and design processing, see Tutorial - Getting Started with FPGA Design.