Custom Instrument

Frozen Content

Figure 1. Example Custom Instrument.

The Custom Instrument component (CUSTOM_INSTRUMENT) is a fully-customizable 'virtual' 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 can be fired whenever the instrument polls, and in relation to specified events.

One of the key features of this particular virtual instrument is that its configuration can be downloaded with the FPGA design and stored within the target physical device (in Block RAM). This allows for interaction with the design, through use of the Custom Instrument, directly in the field – particularly attractive to Field Service Engineers!

Configuration of the instrument is carried out using the Custom Instrument Configuration dialog (Figure 2).

Figure 2. Customize the look and feel of your Custom Instrument through the various tabs of its associated configuration dialog. The Signals tab allows you to define base
instrument options, including specification of the configuration file and how it is retrieved by Altium Designer. The Design tab provides the canvas with which to create the
customized GUI used to interact with the instrument at run-time. The Code tab offers an area in which to write any underlying script code used, for example, in the processing
of instrument IO.

Figure 3 illustrates an example of the run-time panel for this instrument, accessed by double-clicking on the icon for the instrument, in the Soft Devices chain of the Devices view.

Figure 3. Example instrument panel for the Custom Instrument.

Features at-a-glance

  • Fully customizable with configuration information stored in a separate .Instrument file
  • Supports any number of input and output signals
    • Customizable naming of signals
    • Each signal can be configured to any number of bits
    • Ability to set initial value for each output signal
    • Defined signals can be reordered, graphically, as required
  • Customizable title for the instrument's panel
  • Ability to use customized bitmap to represent instrument in the Devices view
  • Configuration information can be retrieved from one of two locations:
    • From Project: Configuration information retrieved from .Instrument file. FPGA project must be open
    • From FPGA: Configuration information is downloaded with the design to the physical device, and stored in Block RAM. It is retrieved directly from here and the project need not be open
  • Design form for creating instrument GUI with three dedicated panels:
    • Palette panel: offering a range of standard scripting components and instrument-specific controls
    • Properties panel: for fine-tuning the presentation and/or functionality of form objects
    • Events panel: for hooking-up script procedures or functions to form objects
  • Supports use of scripting (DelphiScript), for example to manipulate signal IO to a greater degree. Script can be written:
    • Within a dedicated coding tab as part of the instrument's configuration dialog
    • Within a code-aware editor inside Altium Designer
  • Ability to hook signal IO to required instrument controls either directly or through use of scripting
  • OnReadWrite event for instrument panel form hard coded to 'fire' each time the instrument polls, allowing the synchronous calling of code which can process signal values at each poll point
  • Provision of special global function SignalManager, which provides access to signals within a given Custom Instrument. This function allows you to easily get and set values for signals as part of your script functions.
  • Can be accessed 'in the field' using the Viewer Edition of Altium Designer


The CUSTOM_INSTRUMENT component can be found in the FPGA Instruments integrated library (FPGA Instruments.IntLib), located in the \Library\Fpga folder of the installation.

Designing with the CUSTOM_INSTRUMENT

Use the following links to explore use of the Custom Instrument in more detail:

See Also

You are reporting an issue with the following selected text and/or image within the active document: