AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
ntv2register.cpp File Reference

Implements most of CNTV2Card's register-based functions. More...

#include "ntv2card.h"
#include "ntv2devicefeatures.h"
#include "ntv2utils.h"
#include "ntv2registersmb.h"
#include "ntv2konaflashprogram.h"
#include "ntv2vpid.h"
#include "ajabase/system/debug.h"
#include <math.h>
#include <assert.h>
Include dependency graph for ntv2register.cpp:

Go to the source code of this file.

Macros

#define HEX16(__x__)   "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec
 
#define INSTP(_p_)   HEX16(uint64_t(_p_))
 
#define CVIDFAIL(__x__)   AJA_sERROR (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CVIDWARN(__x__)   AJA_sWARNING(AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CVIDNOTE(__x__)   AJA_sNOTICE (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CVIDINFO(__x__)   AJA_sINFO (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define CVIDDBG(__x__)   AJA_sDEBUG (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)
 
#define NOMINAL_H   0
 
#define MIN_H   1
 
#define MAX_H   2
 
#define NOMINAL_V   3
 
#define MIN_V   4
 
#define MAX_V   5
 
#define K2_NOMINAL_H   0x1000
 
#define K2_MIN_H   (K2_NOMINAL_H-0x800)
 
#define K2_MAX_H   (K2_NOMINAL_H+0x800)
 
#define K2_NOMINAL_V   0x0800
 
#define K2_MIN_V   (K2_NOMINAL_V-0x400)
 
#define K2_MAX_V   (K2_NOMINAL_V+0x400)
 
#define KLS_NOMINAL_525_H   0x0640
 
#define KLS_MIN_525_H   0x0000
 
#define KLS_MAX_525_H   0x06B3
 
#define KLS_NOMINAL_525_V   0x010A
 
#define KLS_MIN_525_V   0x0001
 
#define KLS_MAX_525_V   0x020D
 
#define KLS_NOMINAL_625_H   0x0638
 
#define KLS_MIN_625_H   0x0000
 
#define KLS_MAX_625_H   0x06BF
 
#define KLS_NOMINAL_625_V   0x0139
 
#define KLS_MIN_625_V   0x0001
 
#define KLS_MAX_625_V   0x0271
 

Functions

static bool WriteWatchdogControlBit (CNTV2Card &card, const ULWord inValue, const ULWord inMask, const ULWord inShift)
 

Variables

static const ULWord gChannelToGlobalControlRegNum []
 
static const ULWord gChannelToSDIOutControlRegNum []
 
static const ULWord gChannelToControlRegNum []
 
static const ULWord gChannelToOutputFrameRegNum []
 
static const ULWord gChannelToInputFrameRegNum []
 
static const ULWord gChannelToPCIAccessFrameRegNum []
 
static const ULWord gChannelToRS422ControlRegNum [] = { kRegRS422Control, kRegRS4222Control, 0}
 
static const ULWord gChannelToOutputTimingCtrlRegNum []
 
static const ULWord gChannelToSDIInput3GStatusRegNum []
 
static const ULWord gChannelToSDIIn3GbModeMask []
 
static const ULWord gChannelToSDIIn3GbModeShift []
 
static const ULWord gIndexToVidProcControlRegNum [] = { kRegVidProc1Control, kRegVidProc2Control, kRegVidProc3Control, kRegVidProc4Control, 0}
 
static const ULWord gIndexToVidProcMixCoeffRegNum [] = { kRegMixer1Coefficient, kRegMixer2Coefficient, kRegMixer3Coefficient, kRegMixer4Coefficient, 0}
 
static const ULWord gChannelToRP188ModeGCRegisterNum []
 
static const ULWord gChannelToRP188ModeMasks []
 
static const ULWord gChannelToRP188ModeShifts []
 
static const ULWord gChlToRP188DBBRegNum []
 
static const ULWord gChlToRP188Bits031RegNum []
 
static const ULWord gChlToRP188Bits3263RegNum []
 
static const ULWord gChannelToRXSDIStatusRegs [] = { kRegRXSDI1Status, kRegRXSDI2Status, kRegRXSDI3Status, kRegRXSDI4Status, kRegRXSDI5Status, kRegRXSDI6Status, kRegRXSDI7Status, kRegRXSDI8Status, 0}
 
static const ULWord gChannelToRXSDICRCErrorCountRegs [] = { kRegRXSDI1CRCErrorCount, kRegRXSDI2CRCErrorCount, kRegRXSDI3CRCErrorCount, kRegRXSDI4CRCErrorCount, kRegRXSDI5CRCErrorCount, kRegRXSDI6CRCErrorCount, kRegRXSDI7CRCErrorCount, kRegRXSDI8CRCErrorCount, 0 }
 
static const ULWord gChannelToSmpte372RegisterNum []
 
static const ULWord gChannelToSmpte372Masks []
 
static const ULWord gChannelToSmpte372Shifts []
 
static const ULWord gChannelToSDIIn3GModeMask []
 
static const ULWord gChannelToSDIIn3GModeShift []
 
static const ULWord gChannelToSDIIn6GModeMask []
 
static const ULWord gChannelToSDIIn6GModeShift []
 
static const ULWord gChannelToSDIIn12GModeMask []
 
static const ULWord gChannelToSDIIn12GModeShift []
 
static const ULWord gChannelToSDIInputStatusRegNum []
 
static const ULWord gChannelToSDIInputRateMask []
 
static const ULWord gChannelToSDIInputRateHighMask []
 
static const ULWord gChannelToSDIInputRateShift []
 
static const ULWord gChannelToSDIInputRateHighShift []
 
static const ULWord gChannelToSDIInputGeometryMask []
 
static const ULWord gChannelToSDIInputGeometryHighMask []
 
static const ULWord gChannelToSDIInputGeometryShift []
 
static const ULWord gChannelToSDIInputGeometryHighShift []
 
static const ULWord gChannelToSDIInputProgressiveMask []
 
static const ULWord gChannelToSDIInputProgressiveShift []
 
static const ULWord gSDIOutToRP188Input [] = { 0, 2, 1, 3, 0, 2, 1, 3, 0 }
 
static const ULWord gMatteColorRegs [] = { kRegFlatMatteValue , kRegFlatMatte2Value , kRegFlatMatte3Value , kRegFlatMatte4Value , 0, 0, 0, 0}
 
static const ULWord sSDIXmitEnableMasks []
 
static const ULWord sSDIXmitEnableShifts []
 

Detailed Description

Implements most of CNTV2Card's register-based functions.

Definition in file ntv2register.cpp.

Macro Definition Documentation

◆ CVIDDBG

#define CVIDDBG (   __x__)    AJA_sDEBUG (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 28 of file ntv2register.cpp.

◆ CVIDFAIL

#define CVIDFAIL (   __x__)    AJA_sERROR (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 24 of file ntv2register.cpp.

◆ CVIDINFO

#define CVIDINFO (   __x__)    AJA_sINFO (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 27 of file ntv2register.cpp.

◆ CVIDNOTE

#define CVIDNOTE (   __x__)    AJA_sNOTICE (AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 26 of file ntv2register.cpp.

◆ CVIDWARN

#define CVIDWARN (   __x__)    AJA_sWARNING(AJA_DebugUnit_VideoGeneric, INSTP(this) << "::" << AJAFUNC << ": " << __x__)

Definition at line 25 of file ntv2register.cpp.

◆ HEX16

#define HEX16 (   __x__)    "0x" << hex << setw(16) << setfill('0') << uint64_t(__x__) << dec

Definition at line 22 of file ntv2register.cpp.

◆ INSTP

#define INSTP (   _p_)    HEX16(uint64_t(_p_))

Definition at line 23 of file ntv2register.cpp.

◆ K2_MAX_H

#define K2_MAX_H   (K2_NOMINAL_H+0x800)

Definition at line 44 of file ntv2register.cpp.

◆ K2_MAX_V

#define K2_MAX_V   (K2_NOMINAL_V+0x400)

Definition at line 47 of file ntv2register.cpp.

◆ K2_MIN_H

#define K2_MIN_H   (K2_NOMINAL_H-0x800)

Definition at line 43 of file ntv2register.cpp.

◆ K2_MIN_V

#define K2_MIN_V   (K2_NOMINAL_V-0x400)

Definition at line 46 of file ntv2register.cpp.

◆ K2_NOMINAL_H

#define K2_NOMINAL_H   0x1000

Definition at line 42 of file ntv2register.cpp.

◆ K2_NOMINAL_V

#define K2_NOMINAL_V   0x0800

Definition at line 45 of file ntv2register.cpp.

◆ KLS_MAX_525_H

#define KLS_MAX_525_H   0x06B3

Definition at line 51 of file ntv2register.cpp.

◆ KLS_MAX_525_V

#define KLS_MAX_525_V   0x020D

Definition at line 54 of file ntv2register.cpp.

◆ KLS_MAX_625_H

#define KLS_MAX_625_H   0x06BF

Definition at line 58 of file ntv2register.cpp.

◆ KLS_MAX_625_V

#define KLS_MAX_625_V   0x0271

Definition at line 61 of file ntv2register.cpp.

◆ KLS_MIN_525_H

#define KLS_MIN_525_H   0x0000

Definition at line 50 of file ntv2register.cpp.

◆ KLS_MIN_525_V

#define KLS_MIN_525_V   0x0001

Definition at line 53 of file ntv2register.cpp.

◆ KLS_MIN_625_H

#define KLS_MIN_625_H   0x0000

Definition at line 57 of file ntv2register.cpp.

◆ KLS_MIN_625_V

#define KLS_MIN_625_V   0x0001

Definition at line 60 of file ntv2register.cpp.

◆ KLS_NOMINAL_525_H

#define KLS_NOMINAL_525_H   0x0640

Definition at line 49 of file ntv2register.cpp.

◆ KLS_NOMINAL_525_V

#define KLS_NOMINAL_525_V   0x010A

Definition at line 52 of file ntv2register.cpp.

◆ KLS_NOMINAL_625_H

#define KLS_NOMINAL_625_H   0x0638

Definition at line 56 of file ntv2register.cpp.

◆ KLS_NOMINAL_625_V

#define KLS_NOMINAL_625_V   0x0139

Definition at line 59 of file ntv2register.cpp.

◆ MAX_H

#define MAX_H   2

Definition at line 35 of file ntv2register.cpp.

◆ MAX_V

#define MAX_V   5

Definition at line 38 of file ntv2register.cpp.

◆ MIN_H

#define MIN_H   1

Definition at line 34 of file ntv2register.cpp.

◆ MIN_V

#define MIN_V   4

Definition at line 37 of file ntv2register.cpp.

◆ NOMINAL_H

#define NOMINAL_H   0

Definition at line 33 of file ntv2register.cpp.

◆ NOMINAL_V

#define NOMINAL_V   3

Definition at line 36 of file ntv2register.cpp.

Function Documentation

◆ WriteWatchdogControlBit()

static bool WriteWatchdogControlBit ( CNTV2Card card,
const ULWord  inValue,
const ULWord  inMask,
const ULWord  inShift 
)
static

Definition at line 4089 of file ntv2register.cpp.

Variable Documentation

◆ gChannelToControlRegNum

◆ gChannelToGlobalControlRegNum

◆ gChannelToInputFrameRegNum

◆ gChannelToOutputFrameRegNum

◆ gChannelToOutputTimingCtrlRegNum

◆ gChannelToPCIAccessFrameRegNum

◆ gChannelToRP188ModeGCRegisterNum

◆ gChannelToRP188ModeMasks

◆ gChannelToRP188ModeShifts

◆ gChannelToRS422ControlRegNum

const ULWord gChannelToRS422ControlRegNum[] = { kRegRS422Control, kRegRS4222Control, 0}
static

Definition at line 84 of file ntv2register.cpp.

◆ gChannelToRXSDICRCErrorCountRegs

◆ gChannelToRXSDIStatusRegs

◆ gChannelToSDIIn12GModeMask

◆ gChannelToSDIIn12GModeShift

◆ gChannelToSDIIn3GbModeMask

◆ gChannelToSDIIn3GbModeShift

◆ gChannelToSDIIn3GModeMask

◆ gChannelToSDIIn3GModeShift

◆ gChannelToSDIIn6GModeMask

◆ gChannelToSDIIn6GModeShift

◆ gChannelToSDIInput3GStatusRegNum

◆ gChannelToSDIInputGeometryHighMask

◆ gChannelToSDIInputGeometryHighShift

◆ gChannelToSDIInputGeometryMask

◆ gChannelToSDIInputGeometryShift

◆ gChannelToSDIInputProgressiveMask

◆ gChannelToSDIInputProgressiveShift

◆ gChannelToSDIInputRateHighMask

◆ gChannelToSDIInputRateHighShift

◆ gChannelToSDIInputRateMask

◆ gChannelToSDIInputRateShift

◆ gChannelToSDIInputStatusRegNum

◆ gChannelToSDIOutControlRegNum

◆ gChannelToSmpte372Masks

◆ gChannelToSmpte372RegisterNum

◆ gChannelToSmpte372Shifts

◆ gChlToRP188Bits031RegNum

◆ gChlToRP188Bits3263RegNum

◆ gChlToRP188DBBRegNum

◆ gIndexToVidProcControlRegNum

const ULWord gIndexToVidProcControlRegNum[] = { kRegVidProc1Control, kRegVidProc2Control, kRegVidProc3Control, kRegVidProc4Control, 0}
static

Definition at line 98 of file ntv2register.cpp.

◆ gIndexToVidProcMixCoeffRegNum

const ULWord gIndexToVidProcMixCoeffRegNum[] = { kRegMixer1Coefficient, kRegMixer2Coefficient, kRegMixer3Coefficient, kRegMixer4Coefficient, 0}
static

Definition at line 100 of file ntv2register.cpp.

◆ gMatteColorRegs

const ULWord gMatteColorRegs[] = { kRegFlatMatteValue , kRegFlatMatte2Value , kRegFlatMatte3Value , kRegFlatMatte4Value , 0, 0, 0, 0}
static

Definition at line 3070 of file ntv2register.cpp.

◆ gSDIOutToRP188Input

const ULWord gSDIOutToRP188Input[] = { 0, 2, 1, 3, 0, 2, 1, 3, 0 }
static

Definition at line 2645 of file ntv2register.cpp.

◆ sSDIXmitEnableMasks

◆ sSDIXmitEnableShifts