Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
resources:eval:dpg:programming_reference [09 May 2012 16:38] – created Jason Coutermarshresources:eval:dpg:programming_reference [12 Oct 2012 15:10] (current) – JESD204 documentation Jason Coutermarsh
Line 1: Line 1:
-~~UNDERCONSTRUCTION~~ 
 ======Programming Reference====== ======Programming Reference======
  
Line 21: Line 20:
 Once the hardware interface is opened, all the functions listed in the [[#IHardwareInterface]] interface can be used, as well as the functions in [[#IHardwareDevice]] for any devices returned by the interface. Additional functions specific to the current hardware may also be available. Using these functions will limit the application to the current device type. Once the hardware interface is opened, all the functions listed in the [[#IHardwareInterface]] interface can be used, as well as the functions in [[#IHardwareDevice]] for any devices returned by the interface. Additional functions specific to the current hardware may also be available. Using these functions will limit the application to the current device type.
  
-===== Getting Starting with .NET =====+===== Getting Started with .NET =====
 The AnalogDevices.DPG.Interfaces assembly provides the starting point for communicating with a DPG. This assembly exposes a number of interfaces, as well as the AnalogDevices.DPG.PluginFinder namespace. The AnalogDevices.DPG.Interfaces assembly provides the starting point for communicating with a DPG. This assembly exposes a number of interfaces, as well as the AnalogDevices.DPG.PluginFinder namespace.
  
 ==== The AnalogDevices.DPG.PluginFinder Namespace ==== ==== The AnalogDevices.DPG.PluginFinder Namespace ====
-This namespace provides a mechanism for locating the various hardware drivers that might  be present on a users PC. It should generally be used instead of a direct link to the hardware driver, to allow for future expansion.+This namespace provides a mechanism for locating the various hardware drivers that might  be present on a user'PC. It should generally be used instead of a direct link to the hardware driver, to allow for future expansion.
  
 Two methods are exposed, which both search for hardware drivers: Two methods are exposed, which both search for hardware drivers:
Line 113: Line 112:
 <code csharp>HardwareSPIport[] SPIports</code> <code csharp>HardwareSPIport[] SPIports</code>
 Returns an array of HardwareSPIport objects, used to communicate through a SPI port on the DPG. //Read-Only.// Returns an array of HardwareSPIport objects, used to communicate through a SPI port on the DPG. //Read-Only.//
 +
 +<code csharp>JESD204Interface JESD204</code>
 +Returns an object which allows access to JESD204-related functions. Only available on pattern generators which support JESD204, and only when a JESD204 image is loaded into the DPG. //Read-Only.//
  
 ==== Methods ==== ==== Methods ====
Line 149: Line 151:
  
 <code csharp>bool DownloadInterleavedVectorInt2D(int[,] data, int channels, bool ShowProgress)</code> <code csharp>bool DownloadInterleavedVectorInt2D(int[,] data, int channels, bool ShowProgress)</code>
-Downloads an interleaved array of integers (only the fist column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will not return until the download is complete (blocking call).+Downloads an interleaved array of integers (only the first column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will not return until the download is complete (blocking call).
  
 <code csharp>bool DownloadInterleavedVectorDouble1D(double[] data, int channels, bool ShowProgress)</code> <code csharp>bool DownloadInterleavedVectorDouble1D(double[] data, int channels, bool ShowProgress)</code>
Line 155: Line 157:
  
 <code csharp>bool DownloadInterleavedVectorDouble2D(double[,] data, int channels, bool ShowProgress)</code> <code csharp>bool DownloadInterleavedVectorDouble2D(double[,] data, int channels, bool ShowProgress)</code>
-Downloads an interleaved array of doubles (only the fist column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will not return until the download is complete (blocking call).+Downloads an interleaved array of doubles (only the first column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will not return until the download is complete (blocking call).
  
 <code csharp>void DownloadDataVectorAsyncInt2D(int[,] data, bool ShowProgress)</code> <code csharp>void DownloadDataVectorAsyncInt2D(int[,] data, bool ShowProgress)</code>
Line 173: Line 175:
  
 <code csharp>void DownloadInterleavedVectorAsyncInt2D(int[,] data, int channels, bool ShowProgress)</code> <code csharp>void DownloadInterleavedVectorAsyncInt2D(int[,] data, int channels, bool ShowProgress)</code>
-Asynchronously downloads an interleaved array of integers (only the fist column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will return immediately (non-blocking call).+Asynchronously downloads an interleaved array of integers (only the first column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will return immediately (non-blocking call).
  
 <code csharp>void DownloadInterleavedVectorAsyncDouble1D(double[] data, int channels, bool ShowProgress)</code> <code csharp>void DownloadInterleavedVectorAsyncDouble1D(double[] data, int channels, bool ShowProgress)</code>
Line 179: Line 181:
  
 <code csharp>void DownloadInterleavedVectorAsyncDouble2D(double[,] data, int channels, bool ShowProgress)</code> <code csharp>void DownloadInterleavedVectorAsyncDouble2D(double[,] data, int channels, bool ShowProgress)</code>
-Asynchronously downloads an interleaved array of doubles (only the fist column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will return immediately (non-blocking call).+Asynchronously downloads an interleaved array of doubles (only the first column/row of data is considered). Every //channels//-th point will be sent to the first data port on the DPG, every (//channels//+1)-th point will be sent to the second data port, and so on. Setting //ShowProgress// to true will show a pop-up progress bar during the download. This method will return immediately (non-blocking call).
  
 <code csharp>void DownloadDataVectorAsyncCancel(void)</code> <code csharp>void DownloadDataVectorAsyncCancel(void)</code>
Line 230: Line 232:
 <code csharp>void SetPatternInt2D(int[,] pattern)</code> <code csharp>void SetPatternInt2D(int[,] pattern)</code>
 This method is identical to setting the property Pattern. It is provided for use in applications which cannot set array properties. This method is identical to setting the property Pattern. It is provided for use in applications which cannot set array properties.
 +
 +===== JESD204Interface =====
 +Provides access to the JESD204 capabilities of a pattern generator.
 +
 +====Properties====
 +<code csharp>int FramerCount</code>
 +Gets or sets the number of framers in the current DPG setup.
 +
 +<code csharp>JESD204Framer[] Framers</code>
 +Returns an array of JESD204Framer objects, which is the primary interface to the hardware framers inside the DPG.
 +
 +<code csharp>int LaneCount</code>
 +Gets or sets the maximum number of lanes that can be utilized in this setup across all framers.
 +
 +<code csharp>JESD204Lane[] Lanes</code>
 +Returns an array of JESD204Lane objects, which provides access to individual lane features.
 +
 +===== JESD204Framer =====
 +Provides access to one (of one or more) JESD204 framers inside the DPG.
 +====Enumerations====
 +^eJESD204Revision| | |
 +| |PreA|The original revision of the JESD204 specification|
 +| |A|The JESD204A revision|
 +| |B|The JESD204B revision|
 +
 +^eSubclass| | |
 +| |Subclass0|JESD204B Subclass 0 (No deterministic latency)|
 +| |Subclass1|JESD204B Subclass 1 (High-Speed Deterministic Latency)|
 +| |Subclass2|JESD204B Subclass 2 (Low-Speed Deterministic Latency)|
 +
 +====Properties====
 +<code csharp>eJESD204Revision JESD204Revision</code>
 +Gets or sets the revision of the JESD204 specification to use. //Read-Write.//
 +
 +<code csharp>eSubclass Subclass</code>
 +Gets or sets the JESD204B subclass used. //Read-Write.//
 +
 +<code csharp>int L</code>
 +Gets or sets the JESD204 parameter L //Read-Write.//
 +
 +<code csharp>int F</code>
 +Gets or sets the JESD204 parameter F //Read-Write.//
 +
 +<code csharp>int K</code>
 +Gets or sets the JESD204 parameter K //Read-Write.//
 +
 +<code csharp>int N</code>
 +Gets or sets the JESD204 parameter N //Read-Write.//
 +
 +<code csharp>int Np</code>
 +Gets or sets the JESD204 parameter Np //Read-Write.//
 +
 +<code csharp>int M</code>
 +Gets or sets the JESD204 parameter M //Read-Write.//
 +
 +<code csharp>int S</code>
 +Gets or sets the JESD204 parameter S //Read-Write.//
 +
 +<code csharp>bool HD</code>
 +Gets or sets the JESD204 parameter HD //Read-Write.//
 +
 +<code csharp>bool Scrambling</code>
 +Turns on or off JESD204 scrambling //Read-Write.//
 +
 +====Methods====
 +<code csharp>void DownloadDataAsync(UInt16[][] DataVectors, bool ShowProgress)</code>
 +Downloads data asynchronously to the memory in the pattern generator for playback to the framer. The first dimension of DataVectors should be M long. ShowProgress indicates if a status bar should be displayed during the download process.
 +
 +<code csharp>void DownloadData(UInt16[][] DataVectors, bool ShowProgress)</code>
 +Downloads data synchronously to the memory in the pattern generator for playback to the framer. The first dimension of DataVectors should be M long. ShowProgress indicates if a status bar should be displayed during the download process.
 +
 +===== JESD204Lane =====
 +Provides access to one (of one or more) JESD204 physical lanes inside the DPG.
 +
 +====Properties====
 +<code csharp>bool InvertPolarity</code>
 +When true, the polarity of the differential pair is reversed (effectively swapping P and N) //Read-Write.//
 +
 ===== AnalogDevices.DPG.Interfaces.HardwareTypes Namespace ===== ===== AnalogDevices.DPG.Interfaces.HardwareTypes Namespace =====
 ====Enumerations==== ====Enumerations====
Line 282: Line 362:
 | |OneShot6|The second DCI line will be asserted for 6 DCO cycles after playback is started.| | |OneShot6|The second DCI line will be asserted for 6 DCO cycles after playback is started.|
 | |OneShot7|The second DCI line will be asserted for 7 DCO cycles after playback is started.| | |OneShot7|The second DCI line will be asserted for 7 DCO cycles after playback is started.|
 +
 +===== DPG3-Specific Features =====
 +====QBF (Implementation of JESD204Framer)====
 +In addition to the base implementation of JESD204Framer, this class also exposes:
 +===Enumerations===
 +^eSyncSelect| | |
 +| |Internal|Drive Sync from an internal data bit|
 +| |External|Use the Sync line provided from the connected evaluation board|
 +
 +===Properties===
 +<code csharp>bool Reset</code>
 +Holds the framer in reset when true //Read-Write.//
 +
 +<code csharp>eSyncSelect SyncSelect</code>
 +Selects between the external (hardware) Sync line, or an internally generated sync state. //Read-Write.//
resources/eval/dpg/programming_reference.1336574308.txt.gz · Last modified: 09 May 2012 16:38 by Jason Coutermarsh