|
ngscopeclient v0.2
|
A MultiLANE BERT accessed via scopehal-mlbert-bridge. More...
#include <MultiLaneBERT.h>


Public Member Functions | |
| MultiLaneBERT (SCPITransport *transport) | |
| Initialize the driver. | |
| virtual void | PostCtorInit () override |
| Do initialization after the constructor finishes. | |
| virtual bool | AcquireData () override |
| Pull data from the instrument. | |
| virtual uint32_t | GetInstrumentTypesForChannel (size_t i) const override |
| Returns a bitfield describing the set of instrument types that a given channel supports. | |
| virtual Pattern | GetTxPattern (size_t i) override |
| Gets the currently selected transmit pattern for a channel. | |
| virtual void | SetTxPattern (size_t i, Pattern pattern) override |
| Sets the transmit pattern for the selected channel. | |
| virtual std::vector< Pattern > | GetAvailableTxPatterns (size_t i) override |
| Gets the list of available transmit patterns for a channel. | |
| virtual bool | IsCustomPatternPerChannel () override |
| Determines whether custom patterns are settable per channel, or shared by the whole device. | |
| virtual size_t | GetCustomPatternLength () override |
| Returns the number of bits in a custom pattern (may change with line rate) | |
| virtual void | SetGlobalCustomPattern (uint64_t pattern) override |
| Sets the global custom pattern (only valid if IsCustomPatternPerChannel returns false) | |
| virtual uint64_t | GetGlobalCustomPattern () override |
| Gets the global custom pattern (only valid if IsCustomPatternPerChannel returns false) | |
| virtual bool | GetTxInvert (size_t i) override |
| Gets the transmit invert flag for a channel. | |
| virtual void | SetTxInvert (size_t i, bool invert) override |
| Sets the transmit invert flag for a channel. | |
| virtual std::vector< float > | GetAvailableTxDriveStrengths (size_t i) override |
| Gets the list of available drive strengths (in volts) for a channel. | |
| virtual float | GetTxDriveStrength (size_t i) override |
| Get the drive strength for a channel. | |
| virtual void | SetTxDriveStrength (size_t i, float drive) override |
| Set the drive strength for a channel. | |
| virtual void | SetTxEnable (size_t i, bool enable) override |
| Sets the transmit enable flag for a channel. | |
| virtual bool | GetTxEnable (size_t i) override |
| Gets the transmit enable flag for a channel. | |
| virtual float | GetTxPreCursor (size_t i) override |
| Get the pre-cursor equalizer tap for a channel. | |
| virtual void | SetTxPreCursor (size_t i, float precursor) override |
| Set the pre-cursor equalizer tap for a channel. | |
| virtual float | GetTxPostCursor (size_t i) override |
| Get the post-cursor equalizer tap for a channel. | |
| virtual void | SetTxPostCursor (size_t i, float postcursor) override |
| Set the post-cursor equalizer tap for a channel. | |
| virtual bool | GetRxInvert (size_t i) override |
| Gets the transmit invert flag for a channel. | |
| virtual void | SetRxInvert (size_t i, bool invert) override |
| Sets the receive invert flag for a channel. | |
| virtual bool | HasRxCTLE () override |
| Determines whether the input buffer has a continuous-time linear equalizer. | |
| virtual std::vector< float > | GetRxCTLEGainSteps () override |
| Get the list of available RX CTLE gain values (in dB) | |
| virtual size_t | GetRxCTLEGainStep (size_t i) override |
| Gets the currently selected RX CTLE gain index. | |
| virtual void | SetRxCTLEGainStep (size_t i, size_t step) override |
| Sets the RX CTLE gain index. | |
| virtual Pattern | GetRxPattern (size_t i) override |
| Gets the currently selected receive pattern for a channel. | |
| virtual void | SetRxPattern (size_t i, Pattern pattern) override |
| Sets the receive pattern for the selected channel. | |
| virtual std::vector< Pattern > | GetAvailableRxPatterns (size_t i) override |
| Gets the list of available receive patterns for a channel. | |
| virtual bool | GetRxCdrLockState (size_t i) override |
| Gets the RX CDR lock state (true=lock, false=unlock) | |
| virtual void | MeasureHBathtub (size_t i) override |
| Acquires a bathtub curve. | |
| virtual void | MeasureEye (size_t i) override |
| Acquires an eye pattern. | |
| virtual void | SetBERIntegrationLength (int64_t uis) override |
| Set the integration period for BER measurements. | |
| virtual int64_t | GetBERIntegrationLength () override |
| Get the integration period for BER measurements. | |
| virtual void | SetBERSamplingPoint (size_t i, int64_t dx, float dy) override |
| Set the sampling point for BER measurements. | |
| virtual void | GetBERSamplingPoint (size_t i, int64_t &dx, float &dy) override |
| Get the sampling point for BER measurements. | |
| virtual size_t | GetRefclkOutMux () override |
| Gets the currently selected reference clock output mux setting. | |
| virtual void | SetRefclkOutMux (size_t i) override |
| Sets the reference clock output mux. | |
| virtual std::vector< std::string > | GetRefclkOutMuxNames () override |
| Gets the list of available reference clock mux settings. | |
| virtual int64_t | GetRefclkOutFrequency () override |
| Gets the currently selected refclk out frequency, in Hz. | |
| virtual int64_t | GetRefclkInFrequency () override |
| Gets the refclk in frequency, in Hz, required to generate the currently selected data rate. | |
| virtual bool | HasRefclkIn () override |
| Returns true if this instrument has a reference clock input port. | |
| virtual bool | HasRefclkOut () override |
| Returns true if this instrument has a reference clock output port. | |
| virtual bool | IsDataRatePerChannel () override |
| Determines whether the TX/RX clock is a per-instrument or per-channel setting. | |
| virtual int64_t | GetDataRate (size_t i) override |
| Gets the currently selected line rate (in symbols/sec) | |
| virtual void | SetDataRate (size_t i, int64_t rate) override |
| Sets the data rate (in symbols/sec) | |
| virtual std::vector< int64_t > | GetAvailableDataRates () override |
| Gets the list of available data rates, in symbols/sec. | |
| virtual void | SetUseExternalRefclk (bool external) override |
| Sets the reference clock source (internal or external) | |
| virtual bool | GetUseExternalRefclk () override |
| Sets the reference clock source. | |
Public Member Functions inherited from BERT | |
| virtual unsigned int | GetInstrumentTypes () const override |
| Returns a bitfield describing the set of instrument types that this instrument supports. | |
| virtual int64_t | GetExpectedBathtubCaptureTime (size_t i) |
| Returns the expected time, in femtoseconds, to complete a bathtub scan with the current settings. | |
| virtual int64_t | GetExpectedEyeCaptureTime (size_t i) |
| Returns the expected time, in femtoseconds, to complete an eye scan with the current settings. | |
| virtual bool | IsHBathtubScanInProgress (size_t i) |
| Returns true if a horizontal bathtub scan is in progress. | |
| virtual bool | IsEyeScanInProgress (size_t i) |
| Returns true if an eye scan is in progress. | |
| virtual float | GetScanProgress (size_t i) |
| Gets the estimated completion status (0-1) of the current scan. | |
| virtual bool | HasConfigurableScanDepth () |
| Determines whether this instrument has configurable integration depth for eye / bathtub scans. | |
| virtual std::vector< int64_t > | GetScanDepths (size_t i) |
| Returns the list of integration depths for eye / bathtub scans. | |
| virtual int64_t | GetScanDepth (size_t i) |
| Get the configured scan depth for a channel, in UIs per sample/pixel. | |
| virtual void | SetScanDepth (size_t i, int64_t depth) |
| Set the configured scan depth for a channel. | |
Public Member Functions inherited from Instrument | |
| virtual bool | IsOffline () |
| Checks if the instrument is currently online. | |
| size_t | GetChannelCount () const |
| Gets the number of channels (of any type) this instrument has. | |
| InstrumentChannel * | GetChannel (size_t i) const |
| Gets a given channel on the instrument. | |
| virtual std::string | GetChannelDisplayName (size_t i) |
| Gets the hardware display name for a channel. This is an arbitrary user-selected string. | |
| virtual void | SetChannelDisplayName (size_t i, std::string name) |
| Sets the hardware display name for a channel. This is an arbitrary user-selected string. | |
| InstrumentChannel * | GetChannelByDisplayName (const std::string &name) |
| Gets a channel given the display name. | |
| InstrumentChannel * | GetChannelByHwName (const std::string &name) |
| Gets a channel given the hardware name. | |
| virtual void | FlushConfigCache () |
| Instruments are allowed to cache configuration settings to reduce round trip queries to the device. | |
| virtual YAML::Node | SerializeConfiguration (IDTable &table) const |
| Serializes this instrument's configuration to a YAML node. | |
| virtual void | LoadConfiguration (int version, const YAML::Node &node, IDTable &idmap) |
| Load instrument and channel configuration from a save file. | |
| virtual void | PreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &warnings) |
| Parse a limited subset of instrument configuration but do not apply it. | |
Public Member Functions inherited from SCPIInstrument | |
| SCPIInstrument (SCPITransport *transport, bool identify=true) | |
| virtual std::string | GetTransportConnectionString () override |
| Gets the connection string for our transport. | |
| virtual std::string | GetTransportName () override |
| Gets the name of our transport. | |
| virtual std::string | GetName () const override |
| virtual std::string | GetVendor () const override |
| virtual std::string | GetSerial () const override |
| virtual std::string | GetDriverName () const =0 |
| virtual void | BackgroundProcessing () override |
| Run various background processing typically done by a second thread (e.g. InstrumentThread) | |
Public Member Functions inherited from SCPIDevice | |
| SCPIDevice (SCPITransport *transport, bool identify=true, unsigned int identify_timeout_us=5000000) | |
| SCPIDevice (const SCPIDevice &rhs)=delete | |
| SCPIDevice & | operator= (const SCPIDevice &rhs)=delete |
| SCPITransport * | GetTransport () const |
Static Public Member Functions | |
| static std::string | GetDriverNameInternal () |
| Return the constant driver name "mlbert". | |
Static Public Member Functions inherited from SCPIBERT | |
| static void | DoAddDriverClass (const std::string &name, BERTCreateProcType proc) |
| static void | EnumDrivers (std::vector< std::string > &names) |
| static std::shared_ptr< SCPIBERT > | CreateBERT (const std::string &driver, SCPITransport *transport) |
Static Public Member Functions inherited from BERT | |
| static std::string | GetPatternName (Pattern pat) |
| Converts a Pattern enum into a strnig. | |
| static Pattern | GetPatternOfName (const std::string &name) |
| Converts a string name into a Pattern enum. | |
Static Public Member Functions inherited from SCPIInstrument | |
| static void | DoAddDriverClass (const std::string &name, GetTransportsProcType proc) |
| static std::vector< SCPIInstrumentModel > | GetSupportedModels (const std::string &driver) |
| static std::vector< SCPIInstrumentModel > | GetDriverSupportedModels () |
Protected Types | |
| enum | RefclkMuxSelectors { RX0_DIV8 , RX0_DIV16 , RX1_DIV8 , RX1_DIV16 , RX2_DIV8 , RX2_DIV16 , RX3_DIV8 , RX3_DIV16 , LO_DIV32_OR_80 , SERDES } |
| Mux selectors for reference clock output. More... | |
Protected Types inherited from SCPIBERT | |
| typedef std::map< std::string, BERTCreateProcType > | BERTCreateMapType |
Protected Types inherited from SCPIInstrument | |
| typedef std::map< std::string, GetTransportsProcType > | GetTransportMapType |
Protected Attributes | |
| int | m_rxChannelBase |
| Index of the first receive channel. | |
| Pattern | m_txPattern [4] |
| Active transmit pattern. | |
| Pattern | m_rxPattern [4] |
| Active receive pattern. | |
| bool | m_txInvert [4] |
| Transmit invert flag. | |
| bool | m_rxInvert [4] |
| Receive invert flag. | |
| float | m_txDrive [4] |
| TX drive strength. | |
| bool | m_txEnable [4] |
| Transmit enable flag. | |
| float | m_txPreCursor [4] |
| TX FFE pre-cursor coefficient. | |
| float | m_txPostCursor [4] |
| TX FFE post-cursor coefficient. | |
| bool | m_rxLock [4] |
| RX pattern lock state. | |
| uint64_t | m_txCustomPattern |
| Bit pattern for TX custom-pattern mode. | |
| size_t | m_refclkOutMux |
| Reference clock output mux selector. | |
| size_t | m_rxCtleGainSteps [4] |
| CTLE gain step selected for each RX channel. | |
| int64_t | m_integrationLength |
| BER integration period. | |
| int64_t | m_sampleX [4] |
| Sample X position for BER measurements. | |
| float | m_sampleY [4] |
| Sample Y position for BER measurements. | |
| bool | m_useExternalRefclk |
| True if using external reference clock, false if internal. | |
| uint64_t | m_dataRate |
| Current data rate, in bits/sec. | |
Protected Attributes inherited from Instrument | |
| std::list< sigc::slot< void(YAML::Node &, IDTable &)> > | m_serializers |
| List of methods which need to be called to serialize this node's configuration. | |
| std::list< sigc::slot< void(int, const YAML::Node &, IDTable &)> > | m_loaders |
| List of methods which need to be called to deserialize this node's configuration. | |
| std::list< sigc::slot< void(int, const YAML::Node &, IDTable &, ConfigWarningList &)> > | m_preloaders |
| List of methods which need to be called to pre-load this node's configuration. | |
| std::vector< InstrumentChannel * > | m_channels |
| Set of all channels on this instrument. | |
Protected Attributes inherited from SCPIDevice | |
| SCPITransport * | m_transport |
| std::string | m_vendor |
| std::string | m_model |
| std::string | m_serial |
| std::string | m_fwVersion |
Additional Inherited Members | |
Public Types inherited from SCPIBERT | |
| typedef std::shared_ptr< SCPIBERT >(* | BERTCreateProcType) (SCPITransport *) |
Public Types inherited from BERT | |
| enum | Pattern { PATTERN_PRBS7 , PATTERN_PRBS9 , PATTERN_PRBS11 , PATTERN_PRBS15 , PATTERN_PRBS23 , PATTERN_PRBS31 , PATTERN_CUSTOM , PATTERN_CLOCK_DIV2 , PATTERN_CLOCK_DIV32 , PATTERN_AUTO } |
| Set of patterns we can generate or accept. More... | |
Public Types inherited from Instrument | |
| enum | InstrumentTypes { INST_OSCILLOSCOPE = 0x01 , INST_DMM = 0x02 , INST_PSU = 0x04 , INST_FUNCTION = 0x08 , INST_RF_GEN = 0x10 , INST_LOAD = 0x20 , INST_BERT = 0x40 , INST_MISC = 0x80 , INST_SWITCH_MATRIX = 0x100 } |
Public Types inherited from SCPIInstrument | |
| typedef std::vector< SCPIInstrumentModel >(* | GetTransportsProcType) () |
Public Attributes inherited from Instrument | |
| std::string | m_nickname |
| Optional user-selected nickname of the instrument. | |
Protected Member Functions inherited from BERT | |
| void | DoSerializeConfiguration (YAML::Node &node, IDTable &table) |
| Serializes this BERT's configuration to a YAML node. | |
| void | DoLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap) |
| Load instrument and channel configuration from a save file. | |
| void | DoPreLoadConfiguration (int version, const YAML::Node &node, IDTable &idmap, ConfigWarningList &list) |
| Validate instrument and channel configuration from a save file. | |
Protected Member Functions inherited from SCPIInstrument | |
| void | DoSerializeConfiguration (YAML::Node &node, IDTable &table) |
Static Protected Attributes inherited from SCPIBERT | |
| static BERTCreateMapType | m_bertcreateprocs |
Static Protected Attributes inherited from SCPIInstrument | |
| static GetTransportMapType | m_getTransportProcs |
A MultiLANE BERT accessed via scopehal-mlbert-bridge.
|
protected |
Mux selectors for reference clock output.
| MultiLaneBERT::MultiLaneBERT | ( | SCPITransport * | transport | ) |
Initialize the driver.
| transport | SCPITwinLanTransport connected to scopehal-mlbert-bridge |
|
overridevirtual |
Pull data from the instrument.
Implements Instrument.
Gets the list of available data rates, in symbols/sec.
Implements BERT.
|
overridevirtual |
Gets the list of available receive patterns for a channel.
| i | Channel index |
Implements BERT.
Gets the list of available drive strengths (in volts) for a channel.
Drive strength is nominal p-p swing with full main cursor tap and pre/post cursors at zero.
| i | Channel index |
Implements BERT.
|
overridevirtual |
Gets the list of available transmit patterns for a channel.
| i | Channel index |
Implements BERT.
|
overridevirtual |
Get the integration period for BER measurements.
Implements BERT.
Get the sampling point for BER measurements.
| i | Channel index |
| dx | Horizontal offset of the sampling point from the center of the eye, in femtoseconds |
| dy | Vertical offset of the sampling point from the center of the eye, in volts |
Implements BERT.
|
overridevirtual |
Returns the number of bits in a custom pattern (may change with line rate)
Implements BERT.
|
overridevirtual |
Gets the global custom pattern (only valid if IsCustomPatternPerChannel returns false)
Implements BERT.
Returns a bitfield describing the set of instrument types that a given channel supports.
| i | Channel index |
Implements Instrument.
|
overridevirtual |
Gets the refclk in frequency, in Hz, required to generate the currently selected data rate.
Implements BERT.
|
overridevirtual |
Gets the currently selected refclk out frequency, in Hz.
Implements BERT.
|
overridevirtual |
Gets the currently selected reference clock output mux setting.
Implements BERT.
Gets the list of available reference clock mux settings.
Mux selector names are free-form text whose meaning is defined by the instrument.
Implements BERT.
Gets the RX CDR lock state (true=lock, false=unlock)
NOTE: For some instruments this is just CDR lock, for others it indicates both CDR and pattern checker lock
| i | Channel index |
Implements BERT.
Gets the currently selected RX CTLE gain index.
To get the actual gain in dB, use this value as the index into the table returned by GetRxCTLEGainSteps()
| i | Channel index |
Implements BERT.
Get the list of available RX CTLE gain values (in dB)
Implements BERT.
|
overridevirtual |
Gets the currently selected receive pattern for a channel.
| i | Channel index |
Implements BERT.
|
overridevirtual |
Gets the currently selected transmit pattern for a channel.
| i | Channel index |
Implements BERT.
Get the post-cursor equalizer tap for a channel.
Equalizer coefficients are are normalized so that 0 is the lowest possible tap value and 1 is the highest possible tap value. Some instruments allow negative values (which invert the sign of the tap).
The exact mapping of normalized coefficients to FFE gain steps is instrument specific and may be nonlinear.
| i | Channel index |
Implements BERT.
Get the pre-cursor equalizer tap for a channel.
Equalizer coefficients are are normalized so that 0 is the lowest possible tap value and 1 is the highest possible tap value. Some instruments allow negative values (which invert the sign of the tap).
The exact mapping of normalized coefficients to FFE gain steps is instrument specific and may be nonlinear.
| i | Channel index |
Implements BERT.
|
overridevirtual |
Sets the reference clock source.
Implements BERT.
|
overridevirtual |
Returns true if this instrument has a reference clock input port.
Implements BERT.
|
overridevirtual |
Returns true if this instrument has a reference clock output port.
Implements BERT.
|
overridevirtual |
Determines whether the input buffer has a continuous-time linear equalizer.
Implements BERT.
|
overridevirtual |
Determines whether custom patterns are settable per channel, or shared by the whole device.
Implements BERT.
|
overridevirtual |
Determines whether the TX/RX clock is a per-instrument or per-channel setting.
Implements BERT.
|
overridevirtual |
Do initialization after the constructor finishes.
Implements SCPIBERT.
Set the integration period for BER measurements.
Longer values give better resolution for low BERs but update more slowly
Implements BERT.
Set the sampling point for BER measurements.
| i | Channel index |
| dx | Horizontal offset of the sampling point from the center of the eye, in femtoseconds |
| dy | Vertical offset of the sampling point from the center of the eye, in volts |
Implements BERT.
Sets the data rate (in symbols/sec)
| i | Channel index |
| rate | Baud rate of the channel |
Implements BERT.
Sets the global custom pattern (only valid if IsCustomPatternPerChannel returns false)
| pattern | The bit sequence (up to 64 bits in length) |
Implements BERT.
Sets the reference clock output mux.
| i | Index of the mux within the table returned by GetRefclkOutMuxNames() |
Implements BERT.
Sets the RX CTLE gain index.
| i | Channel index |
| step | Index of the gain value within the GetRxCTLEGainSteps() table to use |
Implements BERT.
Sets the receive invert flag for a channel.
| i | Channel index |
| invert | True = inverted, false = inverted |
Implements BERT.
Sets the receive pattern for the selected channel.
| i | Channel index |
| pattern | Desired input pattern |
Implements BERT.
Set the drive strength for a channel.
| i | Channel index |
| drive | Nominal p-p swing |
Implements BERT.
Sets the transmit enable flag for a channel.
| i | Channel index |
| enable | True = enabled, false = disabled |
Implements BERT.
Sets the transmit invert flag for a channel.
| i | Channel index |
| invert | True = inverted, false = normal |
Implements BERT.
Sets the transmit pattern for the selected channel.
| i | Channel index |
| pattern | The selected pattern |
Implements BERT.
Set the post-cursor equalizer tap for a channel.
Equalizer coefficients are are normalized so that 0 is the lowest possible tap value and 1 is the highest possible tap value. Some instruments allow negative values (which invert the sign of the tap).
The exact mapping of normalized coefficients to FFE gain steps is instrument specific and may be nonlinear.
| i | Channel index |
| postcursor | Post-cursor tap |
Implements BERT.
Set the pre-cursor equalizer tap for a channel.
Equalizer coefficients are are normalized so that 0 is the lowest possible tap value and 1 is the highest possible tap value. Some instruments allow negative values (which invert the sign of the tap).
The exact mapping of normalized coefficients to FFE gain steps is instrument specific and may be nonlinear.
| i | Channel index |
| precursor | Pre-cursor tap |
Implements BERT.
Sets the reference clock source (internal or external)
| external | True to select external clock, false to select internal |
Implements BERT.