No part of this manual may be reproduced in
any form or by any means (including electronic storage and retrieval or translation
into a foreign language) without prior agreement and written consent from Keysight
Technologies as governed by United States
and international copyright laws.
Trademarks
UNIX is a registered trademark of UNIX System Laboratories in the U.S.A. and other
countries. Target is copyrighted by Thru-Put
Systems, Inc.
Manual Part Number
M3xxx-90004
Edition
1.2, February 2021
Available in electronic format only
Published by
Keysight Technologies, Inc.
1900 Garden of the Gods Road
Colorado Springs, CO 80907 USA
Technology Licenses
The hardware and/or software described in
this document are furnished under a license
and may be used or copied only in accordance with the terms of such license.
Declaration of Conformity
Declarations of Conformity for this product
and for other Keysight products may be
downloaded from the Web. Go to
http://www.keysight.com/go/conformity
and click on “Declarations of Conformity.”
You can then search by product number to
find the latest Declaration of Conformity.
U.S. Government Rights
The Software is "commercial computer software," as defined by Federal Acquisition
Regulation ("FAR") 2.101. Pursuant to FAR
12.212 and 27.405-3 and Department of
Defense FAR Supplement ("DFARS")
227.7202, the U.S. government acquires
commercial computer software under the
same terms by which the software is customarily provided to the public. Accordingly,
Keysight provides the Software to U.S. government customers under its standard commercial license, which is embodied in its
End User License Agreement (EULA), a copy
of which can be found at http://www.key-
sight.com/find/sweula. The license set forth
in the EULA represents the exclusive authority by which the U.S. government may use,
modify, distribute, or disclose the Software.
The EULA and the license set forth therein,
does not require or permit, among other
things, that Keysight: (1) Furnish technical
information related to commercial computer
software or commercial computer software
documentation that is not customarily provided to the public; or (2) Relinquish to, or
otherwise provide, the government rights in
excess of these rights customarily provided
to the public to use, modify, reproduce,
release, perform, display, or disclose commercial computer software or commercial
computer software documentation. No additional government requirements beyond
those set forth in the EULA shall apply,
except to the extent that those terms, rights,
or licenses are explicitly required from all
providers of commercial computer software
pursuant to the FAR and the DFARS and are
set forth specifically in writing elsewhere in
the EULA. Keysight shall be under no obligation to update, revise or otherwise modify
the Software. With respect to any technical
data as defined by FAR 2.101, pursuant to
FAR 12.211 and 27.404.2 and DFARS
227.7102, the U.S. government acquires no
greater than Limited Rights as defined in
FAR 27.401 or DFAR 227.7103-5 (c), as
applicable in any technical data.
Warranty
THE MATERIAL CONTAINED IN THIS DOCUMENT IS PROVIDED "AS IS," AND IS SUBJECT TO BEING CHANGED, WITHOUT
NOTICE, IN FUTURE EDITIONS. FURTHER,
TO THE MAXIMUM EXTENT PERMITTED BY
APPLICABLE LAW, KEYSIGHT DISCLAIMS
ALL WARRANTIES, EITHER EXPRESS OR
IMPLIED WITH REGARD TO THIS MANUAL
AND ANY INFORMATION CONTAINED
HEREIN, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANT-
ABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. KEYSIGHT SHALL NOT BE LIABLE
FOR ERRORS OR FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION
WITH THE FURNISHING, USE, OR PERFORMANCE OF THIS DOCUMENT OR ANY
INFORMATION CONTAINED HEREIN.
SHOULD KEYSIGHT AND THE USER HAVE A
SEPARATE WRITTEN AGREEMENT WITH
WARRANTY TERMS COVERING THE MATERIAL IN THIS DOCUMENT THAT CONFLICT
WITH THESE TERMS, THE WARRANTY
TERMS IN THE SEPARATE AGREEMENT WILL
CONTROL.
Safety Information
A CAUTION notice denotes a hazard. It
calls attention to an operating procedure, practice, or the like that, if not
correctly performed or adhered to,
could result in damage to the product
or loss of important data. Do not proceed beyond a CAUTION notice until
the indicated conditions are fully
understood and met.
A WARNING notice denotes a hazard.
It calls attention to an operating procedure, practice, or the like that, if not
correctly performed or adhered to,
could result in personal injury or
death. Do not proceed beyond a
WARNING notice until the indicated
conditions are fully understood and
met.
Contents
1 Understanding PXIe Digitizers Theory of Operation
2 Using the KS2201A PathWave Test Sync Executive Software
Implementing SD1 API functions — Sample Programs / 183
Sample program for the overall Digitizer work flow using Python / 183
Sample program for Auto-triggering input waveform using Python / 184
Sample program for DAQ multiple triggering using Python / 188
Sample program for PXI triggering on DAQs using Python / 191
7 Understanding Error Codes in SD1 API
Description of Error & Warning IDs / 196
Description of SD1 Error IDs / 196
Description of SD1 Warning IDs / 198
8 Documentation References
Accessing Online Help for SD1 3.x software / 200
Links to other documents / 201
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide7
Index
8SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
SD1 3.x Software for M310xA / M330xA Digitizers
User’s Guide
1.Understanding PXIe Digitizers
Theory of Operation
Understanding Digitizer’s operation 11
Working with I/O Triggers 19
Working with Clock System 20
1Understanding PXIe Digitizers Theory of Operation
Keysight M31/M33XX digitizers are part of the new M3XXXA family of FPGA-programmable AWGs
and Digitizers. These high-performance digitizers with high channel density have an advanced data
acquisition system (DAQ), includes easy-to-use programming libraries and provides optional
real-time sequencing and decision making capability using the Hard Virtual Instrumentation (HVI)
technology with precise timing and multi-module synchronization. Graphical FPGA programing
allows for FPGA customization without HDL programming expertise and performance penalty. This is
a new family of FPGA-Programmable Digitizers with precise multi-module synchronization and real
time sequencing technology (HVI).
10SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Understanding PXIe Digitizers Theory of Operation1
Section 1.1: Understanding Digitizer’s operation
The M31/M33XXA Digitizers has a flexible and powerful input structure to acquire signals (Figure 1).
Tabl e 1 shows Keysight standards for the output labeling (channel enumeration starts with CH1).
Compatibility mode, which can be changed by open(), is available to support legacy modules and
allows the channel numbering (channel enumeration) to start with either CH0 or CH1.
Modules are opened by default with the enumeration mode of its front panel. However, it is possible
to open them in compatibility mode, forcing enumeration to the selected option. This option might
be needed when different modules coexist.
Table 1Compatibility mode options
OptionDescriptionNameValue
LegacyChannel enumeration starts with CH0COMPATIBILITY_LEGACY0
KeysightChannel enumeration starts with CH1COMPATIBILITY_KEYSIGHT1
Legacy modules refer to SD1 modules that were manufactured by Signadyne before they were
acquired by KeysightTechnologies. If the hardware equipment configuration being used only
contains modules from KeysightTechnologies, channel enumeration should start with CH1.
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide11
1Understanding PXIe Digitizers Theory of Operation
1.1.2: Input settings
The M31/M33XXA Digitizers provides a block that allows the user to configure all the input settings
such as input impedance, full scale, coupling, prescaler, and so on.
Figure 2Input settings in the M31/M33XXA Digitizers functional block diagram
Full Scale, Impedance and Coupling
Depending on the product specifications the user can configure the input full scale value, the input
impedance (Tab le 2) and the input coupling (Tab le 3).
Product-dependent Settings: This section describes all the possible input settings, but in reality they
are product-dependent. Check the corresponding Product Data Sheet to see if they are applicable.
Table 2Input Impedance options
OptionDescriptionNameValue
High ImpedanceInput impedance is high (value is product dependent, check the
corresponding Data Sheet)
50ΩInput impedance is 50ΩAIN_IMPEDANCE_501
Table 3Input Coupling options
OptionDescriptionNameValue
DCDC couplingAIN_COUPLING_DC0
ACAC couplingAIN_COUPLING_AC1
AIN_IMPEDANCE_HZ0
12SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Understanding PXIe Digitizers Theory of Operation1
NOTE
The full scale parameter adjusts automatically the input gain to maximize the input dynamic range.
Tabl e 4 shows the accepted range of voltage values for full scale, as a function of impedance.
Table 4Full Scale Voltage range as a function of Impedance
Impedance OptionVoltage range for DIG500Voltage range for DIG100
HiZ0.1V to 8V0.1V to 10V
50Ω0.0625V to 4V0.2V to 3V
Prescaler
The prescaler is used to reduce the effective input sampling rate, capturing 1 out of n samples and
discarding the rest. The resulting sampling rate is as follows:
Figure 3Resulting sampling rate when prescaler is applied
where, f
fs = f
is final effective sampling frequency
s
f
CLKsys
/ (5 * prescaler)
CLKsys
is the Clock System
prescaler is an integer value (4 bits)
Prescaler vs. Downsampling/Decimation:The prescaler cannot be
considered as a full decimation or down-sampling block as it does not
contain any filters and therefore, it generates aliasing. For applications
where full downsampling is required, you must choose an IF Keysight
Digitizer or Transceiver, which provides DDC (Digital Down Conversion).
Table 5Programming functions related to the input prescaler
Function NameDescriptionAPI function
channelPrescalerConfigConfigures the input prescalerchannelPrescalerConfig()
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide13
1Understanding PXIe Digitizers Theory of Operation
1.1.3: Analog Trigger
The analog trigger block processes the input data and generates a digital trigger that can be used by
any Data Acquisition Block (“Data Acquisition (DAQs)” on page 15).
Figure 4Analog trigger processor in the M31/M33XXA Digitizers functional block diagram
You can select the threshold and the trigger mode. The available trigger modes are shown in Table 6 .
Table 6Analog Trigger Mode options
OptionDescriptionNameValue
Positive EdgeTrigger is generated when the input signal is rising and crosses the
threshold
Negative EdgeTrigger is generated when the input signal is falling and crosses the
threshold
Both EdgesTrigger is generated when the input signal crosses the threshold, no
matter if it is rising or falling
Table 7Programming functions related to analog triggers
Function NameDescriptionAPI function
channelTriggerConfigConfigures the analog trigger for each channelchannelTriggerConfig()
AIN_RISING_EDGE1
AIN_FALLING_EDGE2
AIN_BOTH_EDGES3
14SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
1.1.4: Data Acquisition (DAQs)
The Data Acquisition (DAQ) is a powerful and flexible block which acquires incoming words and
sends them to the user PC using dedicated DMA channels (Figure 5).
Understanding PXIe Digitizers Theory of Operation1
Figure 5DAQ units in the M31/M33XXA Digitizers functional block diagram
Operation
The words acquisition requires two easy steps:
1 Configuration: A call to the function “DAQconfig()” allows the user to configure, among others,
the trigger method (Table 8 ), the number of DAQ cycles to perform (number of triggers), the
number of acquired words per cycle (DAQpointsPerCycle), and the number of words that must be
acquired before interrupting the PC (DAQpoints). Figure 6 illustrates the flexibility of the DAQ
block operation.
2 Data read:
a Using “DAQread()”: a blocking/non-blocking function that returns the array of acquired words
(DAQdata).
b Using a callback function: a user function that is automatically called when the configured
amount of data (set with DAQpoints) is available.
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide15
1Understanding PXIe Digitizers Theory of Operation
Figure 6M31/M33XXA Digitizers words acquisition operation
Pausing and Resuming the DAQ: The function “DAQpause()” pauses the DAQ operation (triggers are
discarded). The acquisition can be resumed calling “DAQresume()”. A “DAQstop()” is performed
automatically when the DAQ block reaches the specified number of acquisition cycles.
Figure 7Examples of the DAQ operation
Onboard memory and DAQpoints selection: The acquired words are first stored in a DAQ buffer
located in the module onboard RAM and then sent to the PC RAM via the ultra-fast PXI Express bus
(Figure 6) using dedicated DMA channels. This DAQ buffer, and therefore the minimum amount of
onboard RAM needed for an application, is directly the size of the data array, which you want to
16SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Understanding PXIe Digitizers Theory of Operation1
NOTE
receive in each “DAQread()” or callback function call. This data array, called (DAQdata), contains
(DAQpoints) words. Therefore, its size is calculated as DAQpoints x 2 bytes/word (in the case of the
M31/M33XXA Digitizers). The size of this DAQ buffer must be chosen according to two criteria:
• High speed transients: the DAQ onboard buffer can store bursts of words at higher rates than the
PXIe and the computer can handle. Larger buffers allow handling longer high speed bursts.
• PC load: The DAQ buffer must be chosen to allow the PC enough time to process each DAQ buffer
(DAQdata) and to handle interrupts and process-context switching tasks. For example, if a
computer requires 500 ms to process DAQdata, the buffer size must be such that it can store more
than 500 ms of input words without interrupting the computer. The DAQ block facilitates the task
of adjusting the PC processing rate with the introduction of the DAQ cycles (Figure 6).
The amount of required PC RAM is double the amount of required onboard
RAM.
Prescaler: The DAQ block has an input prescaler which can be configured to discard words, reducing
the effective acquisition data rate “DAQconfig()”.
DAQ counter: The DAQ block has a dedicated counter to store the number of acquired words since the
last call to “DAQconfig()” or “DAQflush()”. This counter can be read with “DAQcounterRead()”.
DAQ Trigger
As previously explained, you can configure the trigger for the acquisition. The available trigger modes
for the DAQ are shown in Tab le 8 . Note that not all trigger methods are available in all modules.
Table 8DAQ Trigger Mode options
OptionDescriptionNameValue
Auto (Immediate)The acquisition starts automatically after a call to function DAQstartAUTOTRIG0
Software / HVISoftware trigger. The acquisition is triggered by the function DAQtrigger,
Hardware Digital
Tri gger
Hardware Analog
Tri gger
DAQtrigger provided that the DAQ is running. DAQtrigger can be
executed from the user application (VI) or from an HVI.
Hardware trigger. The DAQ waits for an external digital trigger (see
Table 9 External Hardware Digital Trigger Source for the DAQ).
Hardware trigger. The DAQ waits for an external analog trigger (only
products with analog inputs).
As shown in Tab le 8, you have the following options for hardware triggers:
• Hardware Digital Trigger: If the DAQ is set to use a digital hardware trigger, you must configure it
using the function “DAQdigitalTriggerConfig()”. The available digital hardware trigger options are
shown in Tab le 9 and Table 1 0. If external I/O trigger is selected in “DAQdigitalTriggerConfig()”,
you must configure additional settings of this particular I/O line, such as input/output direction,
sampling/synchronization options, etc. (“Working with I/O Triggers” on page 19).
• Hardware Analog Trigger: (Only products with analog inputs) If the DAQ is set to use an analog
hardware trigger, you must configure it using the function “DAQanalogTriggerConfig()”. The
Analog Trigger Block of the corresponding analog input channel must also be configured.
SWHVITRIG1
HWDIGTRIG2
HWANATRIG3
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide17
1Understanding PXIe Digitizers Theory of Operation
Table 9External Hardware Digital Trigger Source for the DAQ
OptionDescriptionNameValue
External I/O
Tri gger
PXI TriggerPXI form factor only. The DAQ trigger is a PXI trigger line and it is
Table 10Trigger behavior for the DAQ
OptionDescriptionNameValue
NoneNo trigger has been activatedTRIGGER_NONE0
Active HighTrigger is active when it is at level highTRIGGER_HIGH1
Active LowTrigger is active when it is at level LowTRIGGER_LOW2
Rising EdgeTrigger is active on the rising edgeTRIGGER_RISE3
Falling EdgeTrigger is active on the falling edgeTRIGGER_FALL4
The DAQ trigger is a TRG connector/line of the product (I/O Triggers).
PXI form factor only: this trigger can be synchronized to CLK10.
synchronized to CLK10.
TRIG_EXTERNAL0
TRIG_PXI1
18SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Understanding PXIe Digitizers Theory of Operation1
Section 1.2: Working with I/O Triggers
The M3100A/M3102A PXIe Digitizers have general purpose input/output triggers (TRG
connectors/lines). A trigger can be used as a general purpose digital IO or as a trigger input, and can
be sampled using the options shown below in Trigger Synchronization/Sampling Options.
Table 11I/O Trigger types and corresponding functions
Typ eDescriptionNameValue
Trigger Output (readable)TRG operates as a general purpose digital output signal, that can be written
by the user software.
Trigger InputTRG operates as a trigger input, or as general purpose digital input signal,
that can be read by the user software.
Table 12Trigger Synchronization options
Typ eDescriptionNameValue
Non-synchronized modeThe trigger is sampled with an internal 100 MHz clock.SYNC_NONE0
Synchronized mode(PXI form factor only) The trigger is sampled using CLK10.SYNC_CLK101
AIN_TRG_OUT0
AIN_TRG_IN 1
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide19
1Understanding PXIe Digitizers Theory of Operation
Section 1.3: Working with Clock System
The M3100A/M3102A PXIe Digitizer uses an internally generated high-quality clock (CLKref) which is
phase-locked to the chassis clock. Therefore, this clock is an extremely jitter-cleaned copy of the
chassis clock. This implementation achieves a jitter and phase noise above 100 Hz which is
independent of the chassis clock, depending on it only for the absolute frequency precision and long
term stability. A copy of CLKref is available at the CLK connector.
CLKref is used as a reference to generate CLKsys, the high-frequency clock used to sample data.
Chassis Clock Replacement for High-Precision Applications
For applications where clock stability and precision is crucial (for example: GPS, experimental
physics, etc.), you can replace the chassis clock with an external reference.
In the case of PXI/PXIe, this is possible via a chassis clock input connector or with a PXI/PXIe timing
module. These options are not available in all chassis; see the corresponding chassis specifications.
1.3.1: CLK Output Options
Table 13Clock Output options
OptionsDescriptionNameValue
Disable The CLK connector is disabled.N/A0 (default)
CLKref OutputA copy of the reference clock is available at the CLK connector.N/A1
The sampling frequency of the M3100A/M3102A PXIe Digitizers (CLKsys frequency) can be changed
using the advanced clocking system.
Figure 8Block Diagram depicting the Advanced Flex Clock System in PXIe DIGs
FlexCLK System, where:
• CLKref is the internal reference clock, and is phase-locked to the chassis clock.
• CLKsys is the system clock used to sample data.
20SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Understanding PXIe Digitizers Theory of Operation1
• CLKsync is an internal clock used for the synchronization features of the M3100A/M3102A PXIe
Digitizers.
• PXI CLK10 is the 10 MHz clock of the PXI/PXIe backplane.
The CLKsys frequency can be changed within the range indicated in the Data Sheet of the
corresponding product [clockSetFrequency()]. The CLKsync frequency changes with the CLKsys
frequency as per the following equation:
f
= GreatestCommonDivisor (f
CLKsync
PXI_CLK10
, f
CLKsys
/ 5)
The CLKsync frequency is returned by clockSetFrequency().
Table 14CLKsync frequency mode options
OptionsDescriptionNameValue
Low Jitter ModeThe clock system is set to achieve the lowest jitter, sacrificing tuning speed.CLK_LOW_JITTER0
Fast Tuning ModeThe clock system is set to achieve the lowest tuning time, sacrificing jitter
performance.
CLK_FAST_TUNE1
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide21
1Understanding PXIe Digitizers Theory of Operation
22SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
SD1 3.x Software for M310xA / M330xA Digitizers
User’s Guide
2.Using the KS2201A PathWave
Test Sync Executive Software
Licensing for KS2201A PathWave Test Sync Executive software 24
Comparing ProcessFlow GUI with KS2201A HVI API 25
Working with KS2201A PathWave Test Sync Executive software 26
Understanding the HVI elements used in SD1 API 27
Implementing HVI in SD1 API - Sample Programs 29
This chapter provides an introduction to the KS2201A PathWave Test Sync Executive Software and
describes its implementation in the SD1 3.x API. For detailed information about the KS2201A
PathWave Test Sync Executive Software and its API, refer to the KS2201A PathWave Test Sync Executive Software User Guide.
2Using the KS2201A PathWave Test Sync Executive Software
Section 2.1: Licensing for KS2201A PathWave Test Sync Executive
software
Hardware license option (-HV1) on the M3xxxA modules
All M3xxxA modules support HVI technology. However, the hardware license option -HV1 must be
available on each module that is required to be programmed using the KS2201A PathWave Test
Sync Executive software and for usability with SD1 3.x software. The newer M3xxxA cards are
shipped with the newest versions of firmware and SD1 software, which support the PathWave Test
Sync Executive software. During procurement, you may choose to procure the -HV1 hardware
option.
To use an older module with the KS2201A PathWave Test Sync Executive software, the firmware and
SD1 software must be upgraded. KS2201A PathWave Test Sync Executive software requires that
Keysight SD1 SFP software version 3.x be installed on the same machine. Also, the PXIe M3xxxA
modules products must have Firmware versions greater than or equal to 4.0 (for M320xA AWGs /
M330xA Combos) and greater than or equal to 2.0 (for M310xA Digitizers). For more information
regarding the supported firmware and software versions, refer to the SD1 3.x Software Startup Guide.
Software license option for the KS2201A software
Refer to the KS2201A PathWave Test Sync Executive User Guide to know about the licenses that you
must procure for the KS2201A PathWave Test Sync Executive software.
24SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Using the KS2201A PathWave Test Sync Executive Software2
NOTE
Section 2.2: Comparing ProcessFlow GUI with KS2201A HVI API
Beginning with SD1 3.x software release, the M3601A Hard Virtual
Instrument (HVI) Design Environment (ProcessFlow) is replaced by the
KS2201A PathWave Test Sync Executive Software for HVI integration. Both
the GUI elements and the API functions from the former HVI design
environment are not supported in the SD1 3.x software.
Tabl e 15 summarizes the main operations necessary in an HVI design as performed from the point of
view of the M3601A HVI GUI use model and the KS2201A HVI API use model. You may use this table
of equivalence to transition from ProcessFlow to the KS2201A PathWave Test Sync Executive
software.
Table 15Differences in operations of ProcessFlow and KS2201A HVI API
OperationsProcessFlow Use ModelKS2201A HVI API Use Model
HVI Design FlowFirst, a “.HVIprj” project file must be created using M3601A GUI
HVI SequenceIt is implemented by means of a graphical flowchart. Each HVI
HVI SyncSequenceThe concept of HVI SyncSequences is not available in the
HVI Resources (Chassis,
Triggers, M9031A modules,
and so on)
Program HVI SequencesYou may program HVI sequences by adding flowchart boxes
HVI Compile, Load, RunOnce an “.HVI” file is open from a script, you can assign each
to design the required HVI sequences in form of flow-charts. A
binary “.HVI” file is generated from the “.HVIprj” file once the HVI
sequence design is final. The “.HVI” file must be open from code
to integrate the HVI solution into the application code.
Engine in each instrument has a single or main HVI Sequence
associated. All statements, both local and synchronized, are
added to it graphically.
M3601A flowcharts.
Connected chassis are automatically recognized. M9031A
boards are transparent to the M3601A software. PXI trigger
resources that can be allocated to the HVI solution are chosen
from the “Chassis settings” window.
using the M3601A GUI. Configure settings for statements in the
“Properties” window of each flowchart box.
sequence to an HW engine for it to be compiled, loaded to HW,
and executed. Project “.HVIprj” files can be also tested directly
from the M3601A GUI using the “Compile and Run” function.
Application code must import the “keysight_pathwave_hvi”
library to use the HVI API. HVI sequences can be created using
programs directly into the application code without importing
external files.
KtHviSequence class enables you to create a Local HVI
sequence using programs that run “locally” on a specific HVI
engine in a specific instrument. Local Sequences are accessed
using ‘SyncMultiSequenceBlock’ statement placed in a
SyncSequence (KtHviSyncSequence). The HVI top sequence is a
SyncSequence that contains SyncStatements.
KtHviSyncSequence class enables you to add synchronized
operations (Sync Statements) common to all HVI engines within
the HVI instance. The HVI top sequence is a SyncSequence that
contains SyncStatements. Local instructions are added and
executed within Local Sequences that can be accessed by
adding a ‘SyncMultiSequenceBlock’ in a SyncSequence.
HVI resources can be configured using “KtHviPlatform” class and
all the classes inside it.
You may program both HVI SyncSequences and HVI (Local)
Sequences with the API methods add_XXX(), where ‘XXX’ is the
statement name.
API SW methods can
compile the sequence using (hvi.compile()),
load it to hardware using (hvi.load_to_hw()),
run the sequence using (hvi.run()).
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide25
2Using the KS2201A PathWave Test Sync Executive Software
Section 2.3: Working with KS2201A PathWave Test Sync Executive
software
Beginning with Keysight SD1 3.x release, the KS2201A PathWave Test Sync Executive software has
been introduced to enhance the functionalities of one or more PXIe modules both individually and
interactively. PathWave Test Sync Executive is a new API based environment for developing and
running programs with a new generation of Keysight’s Hard Virtual Instrument (HVI) technology. The
KS2201A software enables programmatic development and execution of synchronous real-time
operations across multiple instruments. It enables you to program multiple instruments together so
they can act together with other instruments, like one instrument.
2.3.1: Overview on HVI technology
Keysight’s Hardware Virtual Instrumentation (HVI) technology provides the capability to create
time-deterministic execution sequences with precise synchronization by deploying FPGA hardware
simultaneously among the constituent instruments. This makes the technology a powerful tool in
MIMO systems, such as massive-scale quantum control networks.
A virtual instrument may be considered to function like any other instrument in the system; its main
objective being to digitally sequence events and instructions in the application while synchronizing
multiple modules. This instrument, (referred to in this document as the HVI instrument),
accomplishes this by running one or more “engines” synchronously by referencing a common digital
clock that all instruments (engines) operate on.
The KS2201A PathWave Test Sync Executive software provides you with the capability of designing
HVI sequences using an Application Programming Interface (API) available in both Python and C#
coding languages. The HVI Application Programming Interface (API) is the set of programming
classes and methods that allows the user to create and program an HVI instance. HVI API currently
supports Python v3.7. The HVI core functionality is extended by the PXIe M3xxxA modules using the
SD1 API. The core HVI features and the SD1 API extensions that are specific to M3xxxA, allow a
heterogeneous array of instruments and resources to coexist on a common framework.
All the PXIe M3xxxA modules support HVI technology. When Keysight SD1 is installed on a PXI
system, it installs the drivers required to interact with the M3xxxA series modules. The SD1 API
classes in the Keysight SD1 Library contain HVI add-on interfaces provided as an extension of the
instrument. These add-on interfaces provide access to instrument specific HVI features such as
triggering a digitizer acquisition, outputting a waveform, queuing a waveform, etc.
The primary HVI elements defined for the SD1 API and the corresponding API functions are described
in the following sections.
26SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Using the KS2201A PathWave Test Sync Executive Software2
Section 2.4: Understanding the HVI elements used in SD1 API
The HVI Core API exposes all HVI functions and defines base interfaces and classes, which are used
to create an HVI, control the hardware execution flow, and operate with data, triggers, events and
actions, but it alone does not include the ability to control operations specific to the M3xxxA product
family. It is the HVI instrument extensions specific to M3xxxA modules that enable instrument
functionalities in an HVI. Such functions are exposed by the module specific add-on HVI definitions.
The SD1 API describes the instrument specific resources and operations that can be executed or
used within HVI sequences.
Figure 9 & Figure 10 display the AWG and Digitizer specific HVI definitions, which are added to the
SD1 library.
Figure 9M310xA specific HVI definitions
Figure 10M320xA specific HVI definitions
SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide27
2Using the KS2201A PathWave Test Sync Executive Software
2.4.1: Description of various HVI elements
HVI Engine
An HVI Engine block controls the functions of the instrument and the timing of operations. For HVI to
control an SD1 module, the latter requires an HVI Engine. The HVI Engine is included directly in the
instrument hardware or it can be programmed using the SD1 API into the Field programmable Gate
Array (FPGA) on each module. The HVI Engine executes sequences, which are made up of
Statements.
To define an HVI Engine in SD1 API, see the API syntax in Module HVI Engine.
HVI Actions
An HVI Action is defined for module-specific operations, such as playing waveform in an AWG or
starting an acquisition in Digitizers.
To define an HVI Action in SD1 API, see the API syntax for various HVI actions in SD_AIN functions
and SD_Module functions (specific to Pathwave FPGA).
HVI Events
An HVI Event is defined to occur when specific conditions are met during module-specific
operations, such as when an AWG queue is flushed or when a DAQ is empty.
To define an HVI Event in SD1 API, see the API syntax for various HVI events in SD_AIN functions and
SD_Module functions (specific to Pathwave FPGA).
HVI Trigger
An HVI Trigger is defined to activate the logic signal triggering source and perform various triggering
operations, which are shared between instruments to initiate module-related operations,
communicate states or other information.
To define an HVI Trigger in SD1 API, see the API syntax in Module HVI Triggers.
HVI Instructions
An HVI Instruction is defined to configure various settings related to the module. There are two types
of HVI instructions:
• Product specific (custom) HVI instructions—can change a module’s setting (such as amplitude,
frequency, etc.) or trigger a functionality in the module (such as output a waveform, trigger a data
acquisition, etc.).
• HVI core instructions (general purpose)—provide global, non-module specific or custom
functions, such as register arithmetic, read/write general purpose I/O triggers, execution actions,
etc.
To define an HVI Trigger in SD1 API, see the API syntax in SD_AIN functions.
FPGA sandbox registers
For the modules that contain an FPGA with a user-configurable sandbox, HVI can, potentially (if the
configuration of the module allows it), access (read/write) the registers that you define in that
sandbox. To accomplish this, you must obtain the “.k7z” file for the FPGA sandbox, generated by the
PathWave FPGA application. This file contains all the necessary information to access the registers
by name.
To define FPGA Action/Event in SD1 API, see the API syntax in User FPGA HVI Actions/Events.
28SD1 3.x Software for M310xA / M330xA Digitizers User’s Guide
Using the KS2201A PathWave Test Sync Executive Software2
Section 2.5: Implementing HVI in SD1 API - Sample Programs
The following section shows a sample program where HVI is implemented in SD1 API to create an
HVI sequence, add HVI main engine, define HVI trigger, assign ‘module hvi instruction set’ functions
followed by compiling the HVI sequence and loading it onto the hardware. Based on your
requirements, you may add ‘module hvi actions’ as well as ‘module hvi events’ functions to the HVI
sequence.
The SD1 API functions related to HVI are covered in Chapter 5, “Using Keysight SD1 API Command
Reference”.
Refer to the KS2201A PathWave Test Sync Executive User Guide to know more about the HVI Python
API.
2.5.1: Sample program using Python for HVI instructions