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 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.
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
- From Project: Configuration information retrieved from
- 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
Availability
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: