|
ngscopeclient v0.2.1
|
A pattern checker channel of a BERT. More...
#include <BERTInputChannel.h>


Public Types | |
| enum | StreamIDs { STREAM_HBATHTUB = 0 , STREAM_EYE = 1 , STREAM_BER = 2 , STREAM_MASKHITRATE = 3 } |
| Well known indexes of output streams. More... | |
Public Types inherited from OscilloscopeChannel | |
| enum | CouplingType { COUPLE_DC_1M , COUPLE_AC_1M , COUPLE_DC_50 , COUPLE_AC_50 , COUPLE_GND , COUPLE_SYNTHETIC } |
Public Types inherited from InstrumentChannel | |
| enum | PhysicalConnector { CONNECTOR_BANANA_DUAL , CONNECTOR_BMA , CONNECTOR_BNC , CONNECTOR_K , CONNECTOR_K_DUAL , CONNECTOR_N , CONNECTOR_SMA } |
| enum | VisibilityMode { VIS_HIDE , VIS_AUTO , VIS_SHOW } |
| Selects how the channel should be displayed in e.g. the ngscopeclient filter graph editor. | |
| enum | DownloadState { DOWNLOAD_UNKNOWN , DOWNLOAD_NONE , DOWNLOAD_WAITING , DOWNLOAD_IN_PROGRESS , DOWNLOAD_FINISHED } |
| Enum values to be mapped to GetDownloadState() int result value for specific channel download states. More... | |
Public Types inherited from FlowGraphNode | |
| enum class | ExecutionCapabilities { None = 0 , CommandBufferAppend = 1 , CommandBufferTailCall = 2 , VulkanOnly = 4 , DynamicShader = 8 } |
| typedef std::map< std::string, FilterParameter > | ParameterMapType |
| Short name for a map of strings to parameters. | |
Public Member Functions | |
| BERTInputChannel (const std::string &hwname, std::weak_ptr< BERT > bert, const std::string &color="#808080", size_t index=0) | |
| Initialize the channel. | |
| virtual void | Refresh (vk::raii::CommandBuffer &cmdBuf, std::shared_ptr< QueueHandle > queue) override |
| virtual bool | ValidateChannel (size_t i, StreamDescriptor stream) override |
| Check if a stream is allowed to be connected to the given input. | |
| std::weak_ptr< BERT > | GetBERT () const |
| Get the BERT we're part of. | |
| bool | GetInvert () |
| Get the polarity inversion state. | |
| void | SetInvert (bool invert) |
| Set the polarity inversion state. | |
| bool | GetCdrLockState () |
| Check if the CDR is currently locked. | |
| void | SetPattern (BERT::Pattern pattern) |
| Set the pattern this channel is expecting to see. | |
| BERT::Pattern | GetPattern () |
| Get the pattern this channel is expecting to see. | |
| std::vector< BERT::Pattern > | GetAvailablePatterns () |
| Get a list of all patterns this channel knows how to match. | |
| int64_t | GetScanDepth () |
| Gets the currently selected integration depth for eye / bathtub scans. | |
| std::vector< int64_t > | GetScanDepths () |
| Gets the available integration depths for eye / bathtub scans. | |
| void | SetScanDepth (int64_t depth) |
| Sets the currently selected integration depth for eye / bathtub scans. | |
| StreamDescriptor | GetHBathtubStream () |
| Gets the stream for the horizontal bathtub output. | |
| StreamDescriptor | GetEyeStream () |
| Gets the stream for the eye pattern output. | |
| StreamDescriptor | GetBERStream () |
| Gets the stream for the realtime BER output. | |
| bool | HasCTLE () |
| Returns true if the channel has a CTLE on the input. | |
| std::vector< float > | GetCTLEGainSteps () |
| Get the set of available gain steps for the CTLE, in dB. | |
| size_t | GetCTLEGainStep () |
| Gets the currently selected CTLE gain step. | |
| void | SetCTLEGainStep (size_t step) |
| Sets the gain for the CTLE. | |
| void | SetBERSamplingPoint (int64_t dx, float dy) |
| Sets the sampling location for real time offset BER measurements. | |
| void | GetBERSamplingPoint (int64_t &dx, float &dy) |
| Gets the sampling location for real time offset BER measurements. | |
| int64_t | GetDataRate () |
| Gets the data rate of this channel, in symbols per second. | |
| void | SetDataRate (int64_t rate) |
| Sets the data rate of this channel, in symbols per second. | |
| const std::string & | GetMaskFile () |
| Gets the path of the mask file for pass/fail testing (if any) | |
| void | SetMaskFile (const std::string &fname) |
| Sets the path of the mask file for pass/fail testing. | |
| EyeMask & | GetMask () |
| Gets the EyeMask being used for pass/fail testing (may be blank) | |
| virtual PhysicalConnector | GetPhysicalConnector () override |
| int64_t | GetExpectedBathtubCaptureTime () |
| Estimate the time needed to capture a bathtub curve with the current settings. | |
| int64_t | GetExpectedEyeCaptureTime () |
| Estimate the time needed to capture an eye pattern with the current settings. | |
| bool | IsEyeScanInProgress () |
| Check if an eye scan is currently executing. | |
| float | GetScanProgress () |
| Returns an estimate of the current scan progress (if an eye or bathtub scan is executing) | |
| bool | IsHBathtubScanInProgress () |
| Check if a bathtub scan is currently executing. | |
| virtual void | ClearStreams () override |
| Clears out any existing streams. | |
| virtual size_t | AddStream (Unit yunit, const std::string &name, Stream::StreamType stype, uint8_t flags=0) override |
| Adds a new data stream to the channel. | |
| virtual float | GetVoltageRange (size_t stream) override |
| virtual void | SetVoltageRange (float range, size_t stream) override |
| virtual float | GetOffset (size_t stream) override |
| virtual void | SetOffset (float offset, size_t stream) override |
Public Member Functions inherited from OscilloscopeChannel | |
| OscilloscopeChannel (Oscilloscope *scope, const std::string &hwname, const std::string &color, Unit xunit=Unit(Unit::UNIT_FS), size_t index=0) | |
| OscilloscopeChannel (Oscilloscope *scope, const std::string &hwname, const std::string &color, Unit xunit=Unit(Unit::UNIT_FS), Unit yunit=Unit(Unit::UNIT_VOLTS), Stream::StreamType stype=Stream::STREAM_TYPE_ANALOG, size_t index=0) | |
| Oscilloscope * | GetScope () |
| size_t | GetRefCount () |
| virtual void | SetDisplayName (std::string name) override |
| Sets the human-readable nickname for this channel, as displayed in the GUI. | |
| virtual std::string | GetDisplayName () override |
| Gets the human-readable nickname for this channel, as displayed in the GUI. | |
| bool | IsEnabled () |
| void | Enable () |
| void | Disable () |
| virtual void | AddRef () |
| virtual void | Release () |
| virtual CouplingType | GetCoupling () |
| virtual void | SetCoupling (CouplingType type) |
| virtual std::vector< OscilloscopeChannel::CouplingType > | GetAvailableCouplings () |
| virtual double | GetAttenuation () |
| virtual void | SetAttenuation (double atten) |
| virtual int | GetBandwidthLimit () |
| virtual void | SetBandwidthLimit (int mhz) |
| virtual void | SetDeskew (int64_t skew) |
| virtual int64_t | GetDeskew () |
| bool | IsPhysicalChannel () |
| virtual bool | IsInverted (size_t stream) |
| virtual bool | IsHighRateOffsetCapable () |
| Check if this channel is able to handle high rate (e.g. every mouse movement) offset changes. | |
| void | SetDigitalHysteresis (float level) |
| void | SetDigitalThreshold (float level) |
| void | SetCenterFrequency (int64_t freq) |
| bool | CanAutoZero () |
| void | AutoZero () |
| bool | CanDegauss () |
| void | Degauss () |
| std::string | GetProbeName () |
| virtual bool | CanInvert () |
| virtual void | Invert (bool invert) |
| virtual bool | IsInverted () |
| virtual bool | HasInputMux () |
| virtual size_t | GetInputMuxSetting () |
| virtual void | SetInputMux (size_t select) |
| void | SetDefaultDisplayName () |
| Gives a channel a default display name if there's not one already. | |
| virtual DownloadState | GetDownloadState () override |
| Returns the current download state of this channel. | |
| virtual float | GetDownloadProgress () override |
| returns the current completion of the download (on the range [0, 1]), if not DOWNLOAD_UNKNOWN | |
| virtual double | GetDownloadStartTime () override |
| returns the start time of a download, if we are DOWNLOAD_IN_PROGRESS; undefined, otherwise | |
Public Member Functions inherited from InstrumentChannel | |
| InstrumentChannel (Instrument *inst, const std::string &hwname, const std::string &color="#808080", Unit xunit=Unit(Unit::UNIT_FS), size_t index=0) | |
| InstrumentChannel (Instrument *inst, const std::string &hwname, const std::string &color="#808080", Unit xunit=Unit(Unit::UNIT_FS), Unit yunit=Unit(Unit::UNIT_VOLTS), Stream::StreamType stype=Stream::STREAM_TYPE_ANALOG, size_t index=0) | |
| const std::string & | GetHwname () const |
| Gets the hardware name of the channel (m_hwname) | |
| size_t | GetIndex () const |
| Gets the (zero based) index of the channel. | |
| Instrument * | GetInstrument () const |
| Gets the instrument this channel is part of (if any) | |
| void | ClearCachedDisplayName () |
| Sets the display name to an empty string, causing a fetch from hardware. | |
| void | SetData (WaveformBase *pNew, size_t stream) |
| Sets the waveform data for a given stream, replacing any previous waveform. | |
| virtual Unit | GetXAxisUnits () |
| Returns the X axis unit for this channel. | |
| virtual Unit | GetYAxisUnits (size_t stream) |
| Returns the Y axis unit for a specified stream. | |
| virtual void | SetXAxisUnits (const Unit &rhs) |
| Changes the X axis unit for this channel. | |
| virtual void | SetYAxisUnits (const Unit &rhs, size_t stream) |
| Changes the X axis unit for a specified stream. | |
| Stream::StreamType | GetType (size_t stream) |
| Returns the type of a specified stream. | |
| size_t | GetStreamCount () |
| Get the number of data streams. | |
| std::string | GetStreamName (size_t stream) |
| Gets the name of a stream (for display in the UI) | |
| WaveformBase * | GetData (size_t stream) |
| Get the contents of a data stream. | |
| uint8_t | GetStreamFlags (size_t stream) |
| Get the flags of a data stream. | |
| float | GetScalarValue (size_t stream) |
| Gets the value of a scalar data stream. | |
| void | SetScalarValue (size_t stream, float value) |
| Sets the value of a scalar data stream. | |
| uint64_t | GetDigitalScalarValue (size_t stream) |
| Gets the value of a scalar data stream. | |
| uint64_t | GetDigitalWidth (size_t stream) |
| Gets the width of a digital data stream. | |
| void | SetDigitalWidth (size_t stream, uint64_t width) |
| Set the width of a digital data stream. | |
| void | SetDigitalScalarValue (size_t stream, uint64_t value) |
| Sets the value of a scalar data stream. | |
| WaveformBase * | Detach (size_t stream) |
| Detach the capture data from this channel. | |
| virtual bool | ShouldPersistWaveform () |
| Determine whether the channel's waveform(s) should be persisted to a session file. | |
Public Member Functions inherited from FlowGraphNode | |
| void | DetachInputs () |
| Disconnects all inputs from the node without releasing them. | |
| size_t | GetInputCount () |
| Get the number of input ports. | |
| std::string | GetInputName (size_t i) |
| void | SetInput (size_t i, StreamDescriptor stream, bool force=false) |
| Connects a stream to the input of this node. | |
| void | SetInput (const std::string &name, StreamDescriptor stream, bool force=false) |
| bool | HasInput (StreamDescriptor desc) |
| Checks if the given stream is connected to at least one of our inputs. | |
| StreamDescriptor | GetInput (size_t i) |
| Gets the descriptor for one of our inputs. | |
| std::shared_ptr< InputConstraint > | GetInputConstraints (size_t i) |
| Get the constraints on one of our inputs. | |
| FilterParameter & | GetParameter (std::string s) |
| bool | HasParameter (std::string s) |
| Checks if we have a parameter with a given name. | |
| ParameterMapType::iterator | GetParamBegin () |
| Returns an iterator to the beginning of our parameter map. | |
| ParameterMapType::iterator | GetParamEnd () |
| Returns an iterator to the end of our parameter map. | |
| size_t | GetParamCount () |
| Returns the number of parameter we have. | |
| virtual YAML::Node | SerializeConfiguration (IDTable &table) |
| Serializes this trigger's configuration to a YAML string. | |
| virtual void | LoadParameters (const YAML::Node &node, IDTable &table) |
| Load configuration from a save file. | |
| virtual void | LoadInputs (const YAML::Node &node, IDTable &table) |
| bool | IsDownstreamOf (std::set< FlowGraphNode * > nodes) |
| Determines if this node is downstream of any of the specified other nodes. | |
| virtual uint32_t | GetExecutionCapabilitiesMask () |
| Returns a bitmask of ExecutionCapabilities fields. | |
| bool | HasMessages () const |
| Checks if this graph has any messages. | |
| const std::vector< FlowGraphNodeMessage > & | GetMessages () const |
| Walking through any messages. | |
| const FlowGraphNodeMessage * | GetMostSevereMessage () const |
| void | AddSink (size_t stream, FlowGraphNode *node) |
| void | RemoveSink (size_t stream, FlowGraphNode *node) |
| const std::set< FlowGraphNode * > & | GetSinks (size_t stream) |
| sigc::signal< void()> | signal_parametersChanged () |
| sigc::signal< void()> | signal_inputsChanged () |
Protected Attributes | |
| std::vector< float > | m_ranges |
| Voltage range of each stream. | |
| std::vector< float > | m_offsets |
| Vertical offset of each stream. | |
| std::string | m_maskFile |
| Path to the YAML file, if any, that m_mask was loaded from. | |
| EyeMask | m_mask |
| Eye mask used for pass/fail testing. | |
| std::weak_ptr< BERT > | m_bert |
| Pointer to the parent instrument. | |
Protected Attributes inherited from OscilloscopeChannel | |
| size_t | m_refcount |
| Number of references (channel is disabled when last ref is released) | |
Protected Attributes inherited from InstrumentChannel | |
| Instrument * | m_instrument |
| The instrument we're part of (may be null in the case of filters etc) | |
| std::string | m_hwname |
| Hardware name of the channel. | |
| std::string | m_displayname |
| Display name (user defined, defaults to m_hwname). | |
| size_t | m_index |
| Zero based index of the channel within the instrument. | |
| Unit | m_xAxisUnit |
| Unit of measurement for our horizontal axis (common to all streams) | |
| std::vector< Stream > | m_streams |
| Configuration data for each of our output streams. | |
Protected Attributes inherited from FlowGraphNode | |
| std::vector< std::shared_ptr< InputDescriptor > > | m_inputs |
| Input ports. | |
| std::vector< std::set< FlowGraphNode * > > | m_sinks |
| The nodes (if any) that each of our streams drives. | |
| ParameterMapType | m_parameters |
| sigc::signal< void()> | m_parametersChangedSignal |
| Signal emitted when the set of parameters changes. | |
| sigc::signal< void()> | m_inputsChangedSignal |
| Signal emitted when the set of inputs changes. | |
| std::vector< FlowGraphNodeMessage > | m_messages |
Additional Inherited Members | |
Public Attributes inherited from InstrumentChannel | |
| std::string | m_displaycolor |
| Display color (HTML hex notation with optional alpha channel: #RRGGBB or ##RRGGBBAA) | |
| enum InstrumentChannel::VisibilityMode | m_visibilityMode |
Protected Member Functions inherited from OscilloscopeChannel | |
| void | SharedCtorInit (Unit unit) |
Protected Member Functions inherited from FlowGraphNode | |
| virtual void | OnInputChanged (size_t i) |
| Called when a new input is connected to the node. | |
| WaveformBase * | GetInputWaveform (size_t i) |
| Gets the waveform attached to the specified input. | |
| SparseAnalogWaveform * | GetSparseAnalogInputWaveform (size_t i) |
| Gets the analog waveform attached to the specified input. | |
| UniformAnalogWaveform * | GetUniformAnalogInputWaveform (size_t i) |
| Gets the analog waveform attached to the specified input. | |
| SparseDigitalWaveform * | GetSparseDigitalInputWaveform (size_t i) |
| Gets the digital waveform attached to the specified input. | |
| UniformDigitalWaveform * | GetUniformDigitalInputWaveform (size_t i) |
| Gets the digital waveform attached to the specified input. | |
| virtual void | CreateInput (const std::string &name) |
| Gets the digital bus waveform attached to the specified input. | |
| template<class T , class... Args> | |
| void | CreateInput (const std::string &name, Args &&... args) |
| std::string | GetInputDisplayName (size_t i) |
| Gets the display name for one of our inputs. | |
| void | ClearMessages () |
| Remove any messages left over from the last graph refresh. | |
| void | AddMessage (const FlowGraphNodeMessage &msg) |
| Attach a new message to the node. | |
| void | AddMessage (Severity severity, const std::string &title, const std::string &message) |
| Attach a new message to the node. | |
| void | AddErrorMessage (const std::string &err) |
| Add a new error message. | |
| void | AddErrorMessage (const std::string &title, const std::string &err) |
| Add a new error message with a title. | |
A pattern checker channel of a BERT.
Derived from OscilloscopeChannel because we can output time domain bathtub curves etc
| BERTInputChannel::BERTInputChannel | ( | const std::string & | hwname, |
| std::weak_ptr< BERT > | bert, | ||
| const std::string & | color = "#808080", |
||
| size_t | index = 0 |
||
| ) |
Initialize the channel.
| hwname | Hardware name of the channel |
| bert | BERT the channel is part of |
| color | Initial display color of the channel |
| index | Number of the channel |
|
overridevirtual |
Adds a new data stream to the channel.
Reimplemented from InstrumentChannel.
|
overridevirtual |
Clears out any existing streams.
Reimplemented from InstrumentChannel.
Gets the sampling location for real time offset BER measurements.
| 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 |
|
inline |
Gets the currently selected CTLE gain step.
The actual gain value can be looked up in the table returned by GetCTLEGainSteps().
|
inline |
Estimate the time needed to capture a bathtub curve with the current settings.
This can be used for displaying progress bars, hints in the GUI, etc.
|
inline |
Estimate the time needed to capture an eye pattern with the current settings.
This can be used for displaying progress bars, hints in the GUI, etc.
Reimplemented from OscilloscopeChannel.
|
overridevirtual |
Reimplemented from InstrumentChannel.
|
inline |
Gets the currently selected integration depth for eye / bathtub scans.
|
inline |
Returns an estimate of the current scan progress (if an eye or bathtub scan is executing)
Reimplemented from OscilloscopeChannel.
|
inline |
Check if an eye scan is currently executing.
|
inline |
Check if a bathtub scan is currently executing.
|
overridevirtual |
Reimplemented from InstrumentChannel.
Sets the sampling location for real time offset BER measurements.
| 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 |
Sets the gain for the CTLE.
The actual gain value can be looked up in the table returned by GetCTLEGainSteps().
| step | Step index |
Sets the data rate of this channel, in symbols per second.
Depending on the clocking architecture of the instrument, this may affect other channels.
For example, on MultiLane BERTs all channels share a single timebase. Antikernel Labs BERTs are based on Xilinx FPGAs and channels are divided into quads which each share some clocking resources.
| rate | Desired data rate |
Set the polarity inversion state.
| invert | True for inverted polarity, false for normal |
Sets the path of the mask file for pass/fail testing.
| fname | Path of the YAML mask file |
Reimplemented from OscilloscopeChannel.
|
inline |
Set the pattern this channel is expecting to see.
| pattern | Expected pattern |
Sets the currently selected integration depth for eye / bathtub scans.
| depth | Integration depth, in UIs per pixel or point |
Reimplemented from OscilloscopeChannel.
|
overridevirtual |
Check if a stream is allowed to be connected to the given input.
Reimplemented from FlowGraphNode.
|
protected |
Pointer to the parent instrument.
TODO: this needs to get refactored away so we can just use InstrumentChannel::m_instrument