Operating the Digital IO Module

Frozen Content

Once the Digital I/O Module has been configured and the design processed and downloaded into the physical FPGA device, the instrument can be used. Displays and controls for the instrument can be found on the device's associated instrument panel. This panel enables you to effectively use the instrument in your design.

The following sections detail how the instrument panel is accessed, and subsequent use of the panel to monitor and generate digital signals.

Accessing the Digital I/O Module's Instrument Panel

The host computer is connected to the target Digital I/O Module using the IEEE 1149.1 (JTAG) standard interface. This is the physical interface, providing connection to physical pins of the FPGA device in which the instrument has been embedded.

The Nexus 5001 standard is used as the protocol for communications between the host and all devices that are debug-enabled with respect to this protocol. This includes the digital I/O modules, as well as other Nexus-compliant devices such as debug-enabled processors, frequency generators, logic analyzers, counters and cross-point switches.

All such devices are connected in a chain – the Soft Devices chain – which is determined when the design has been implemented within the target FPGA device and presents within the Devices view (Figure 1). It is not a physical chain, in the sense that you can see no external wiring – the connections required between the Nexus-enabled devices are made internal to the FPGA itself.


Figure 1. Nexus-enabled devices appearing in the Soft Devices chain.

For instruments such as the DIGITAL_IO device, the Nexus protocol enables you to access the registers used for controlling the device. These registers are not exposed as such, rather input to them is provided through an instrument panel, which allows you to view digital inputs and set digital outputs.

The controls for a DIGITAL_IO instrument used in a design can be accessed from the Devices view. Simply double-click on the icon representing the DIGITAL_IO device whose controls you wish to access, in the Soft Devices region of the view. The Instrument Rack - Soft Devices panel will appear, with the chosen instrument added to the rack (Figure 2).


Figure 2. Accessing the Digital I/O module instrument panel.


Each DIGITAL_IO device that you have included in the design will appear, when double-clicked, as an instrument in the rack (along with any other Nexus-enabled devices).

Monitoring Digital Signals - Inputs

The INPUTS region of the instrument panel allows you to monitor the digital signals that have been wired to the input channels of the Digital I/O Module.

For each input signal defined for the instrument, the incoming digital value will be presented in hexadecimal format, as well as being displayed using the graphical display style defined for that input when configuring the device.

Any changes to input signals will be reflected on the panel in real-time, in accordance with defined polling (see Polling).

Generating Digital Signals - Outputs

The OUTPUTS region of the instrument panel allows you to generate digital signals for output to other areas of the design.

For each output signal defined for the instrument, the digital value to be generated will be presented in hexadecimal format, as well as being displayed using the graphical display style defined for that output when configuring the device.

To specify a new signal value, either enter the full hexadecimal value directly, or use the graphical representation. As you make a change to one output representation (e.g. graphical), the second representation (e.g. hexadecimal) will update accordingly to match the value specified.

How the value is changed when using the graphical representation, depends on the representation used. For example, if using the LEDs style, simply click on a LED to toggle its state and change the output of the corresponding bit to '0' or '1'. If using the Slider style, simply move the slider bar to the position required – an example of where this style of representation is appropriate could be in the control of image brightness/contrast.

Any change made will be output in real-time, in accordance with defined polling (see Polling). Consider, for example, a DIGITAL_IO device with an 8-bit output signal hooked up to the User LEDs on the Desktop NanoBoard NB2DSK01. We will assume the graphical representation used is Numeric, with a Radix of Binary, and that the value on the panel for this output is initially 00h. Changing a bit in the output value simply requires clicking on a bit in the representation. Changing bit 0 from '0' to '1' would instantly light the corresponding LED on the board (LED0).

To extend this example a little further, you could also feed the output signal back as an input signal to the instrument, as shown in Figure 3.


Figure 3. Generating and monitoring the same digital signal.

In this case, changing the output signal Ctrl will reflect not only in the LEDs on the NanoBoard, but also in the display for the input signal Ctrl_Verify – on the device's instrument panel. In Figure 4, setting bits 0, 2, 4 and 6 of the Ctrl output signal results in bits 0, 2, 4 and 6 of the input signal Ctrl_Verify also becoming set. You can see that the hexadecimal value for each signal is the same. On the NanoBoard, LED0, LED2, LED4 and LED6 would also be lit.


Figure 4. Direct feedback of output signal Ctrl to input signal Ctrl_Verify.


When processing a design for the first time, and downloading to the FPGA, the initial value specified for an output signal will appear displayed in the instrument panel, the first time it is accessed. Any changes to the output in the instrument panel will override this initial value immediately.

The value specified for an output signal in the instrument panel is persistent during the same session of Altium Designer. Should you reload the FPGA with the design, the initial value setting will be immediately replaced with the value current for the output in the panel. This happens if the panel is open. If it is closed, the initial value will be used for the output until subsequent access of the instrument panel, whereby the output will be set to whatever value is present for it in the panel.

Polling

Click on the button, at the bottom left of the panel, to access the Digital I/O Module - Options dialog (Figure 5).


Figure 5. Accessing instrument options.

Input values to, and output values from, the Digital I/O Module, are automatically refreshed (updated) in accordance with the value specified in the Update Display From Core Every field of this dialog. In other words, this is the defined polling interval for the instrument. By default, the values will be refreshed every 250ms.

You can, if desired, manually refresh the IO values to/from the instrument – manual polling if you will. Such polling can be engaged at the global level, affecting all input and outputs simultaneously, or at the individual input/output level:

  • Global IO update – simply click the button, at the bottom-center of the panel.
  • Individual input/output update – click on the button associated with the input/output signal you wish to update.


Use of the or buttons is only logical if the Update value in the Digital I/O Module - Options dialog is set to either 0ms, or some longer time interval (e.g. 2000ms or more). If the IO values are left to be automatically refreshed at the default 250ms interval, this will be too quick to make use of these manual polling-related buttons!

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