Video and Vision Processing Suite Intel® FPGA IP User Guide

ID 683329
Date 7/08/2024
Public
Document Table of Contents
1. About the Video and Vision Processing Suite 2. Getting Started with the Video and Vision Processing IPs 3. Video and Vision Processing IPs Functional Description 4. Video and Vision Processing IP Interfaces 5. Video and Vision Processing IP Registers 6. Video and Vision Processing IPs Software Programming Model 7. Protocol Converter Intel® FPGA IP 8. 1D LUT Intel® FPGA IP 9. 3D LUT Intel® FPGA IP 10. Adaptive Noise Reduction Intel® FPGA IP 11. Advanced Test Pattern Generator Intel® FPGA IP 12. AXI-Stream Broadcaster Intel® FPGA IP 13. Bits per Color Sample Adapter Intel FPGA IP 14. Black Level Correction Intel® FPGA IP 15. Black Level Statistics Intel® FPGA IP 16. Chroma Key Intel® FPGA IP 17. Chroma Resampler Intel® FPGA IP 18. Clipper Intel® FPGA IP 19. Clocked Video Input Intel® FPGA IP 20. Clocked Video to Full-Raster Converter Intel® FPGA IP 21. Clocked Video Output Intel® FPGA IP 22. Color Plane Manager Intel® FPGA IP 23. Color Space Converter Intel® FPGA IP 24. Defective Pixel Correction Intel® FPGA IP 25. Deinterlacer Intel® FPGA IP 26. Demosaic Intel® FPGA IP 27. FIR Filter Intel® FPGA IP 28. Frame Cleaner Intel® FPGA IP 29. Full-Raster to Clocked Video Converter Intel® FPGA IP 30. Full-Raster to Streaming Converter Intel® FPGA IP 31. Genlock Controller Intel® FPGA IP 32. Generic Crosspoint Intel® FPGA IP 33. Genlock Signal Router Intel® FPGA IP 34. Guard Bands Intel® FPGA IP 35. Histogram Statistics Intel® FPGA IP 36. Interlacer Intel® FPGA IP 37. Mixer Intel® FPGA IP 38. Pixels in Parallel Converter Intel® FPGA IP 39. Scaler Intel® FPGA IP 40. Stream Cleaner Intel® FPGA IP 41. Switch Intel® FPGA IP 42. Tone Mapping Operator Intel® FPGA IP 43. Test Pattern Generator Intel® FPGA IP 44. Unsharp Mask Intel® FPGA IP 45. Video and Vision Monitor Intel FPGA IP 46. Video Frame Buffer Intel® FPGA IP 47. Video Frame Reader Intel FPGA IP 48. Video Frame Writer Intel FPGA IP 49. Video Streaming FIFO Intel® FPGA IP 50. Video Timing Generator Intel® FPGA IP 51. Vignette Correction Intel® FPGA IP 52. Warp Intel® FPGA IP 53. White Balance Correction Intel® FPGA IP 54. White Balance Statistics Intel® FPGA IP 55. Design Security 56. Document Revision History for Video and Vision Processing Suite User Guide

43.5. Test Pattern Generator IP Software API

The IP includes software for run-time control. The IP does not fit any of the generic device models provided by the Nios II HAL and it exposes a set of dedicated accessors to the control and status registers. The IP driver structure inherits the base driver structure so all common methods defined in Video and Vision Processing IPs Software API are applicable.

Register definition header file: intel_vvp_tpg_regs.h

Include file: intel_vvp_tpg.h

Table 824.  Test Pattern Generator IP Software API
Name Description
intel_vvp_tpg_init Initialize the TPG instance
Intel_vvp_core_* .Accessors defined in Video and Vision Processing IPs Software Programming Model . Writable when Lite is on. Readable when Lite is off and Debug features is on.
intel_vvp_tpg_get_lite_mode Returns if Lite mode is on
intel_vvp_tpg_get_debug_enabled Returns if Lite mode is on
intel_vvp_tpg_get_num_patterns Returns the number of patterns available
intel_vvp_tpg_get_bits_per_sample Returns the number of bits in a color sample
intel_vvp_tpg_get_pixels_in_parallel Returns the number of pixels processed in parallel per clock cycle
intel_vvp_tpg_get_pattern_data Returns pattern type and subsampling
intel_vvp_tpg_is_running Returns if the IP is producing data
intel_vvp_tpg_get_commit_status Returns if there are uncommitted writes
intel_vvp_tpg_get_status Reads the status register
intel_vvp_tpg_enable Starts/stops the IP
intel_vvp_tpg_start Start the IP
intel_vvp_tpg_stop Stops the IP
intel_vvp_tpg_is_enabled Returns if the IP is currently enabled
intel_vvp_tpg_set_pattern Select the current output pattern
intel_vvp_tpg_get_pattern Query the current output pattern
intel_vvp_tpg_get_fields_since_sequence_reset Returns the number of output fields generated since the sequence started
intel_vvp_tpg_set_bars_type Selects a type of color bars for the bar pattern
intel_vvp_tpg_get_bars_type Returns the current type of color bars
intel_vvp_tpg_set_colors Selects the color for the uniform pattern
intel_vvp_tpg_get_colors Returns the current uniform color
intel_vvp_tpg_set_zone_plate_origin Sets the zone plate origin to the coordinates provided
intel_vvp_tpg_get_zone_plate_origin Returns the zone plate center coordinates
intel_vvp_tpg_set_zone_plate_factors Sets the coarse and fine tune scaling coefficients of the zone plate
intel_vvp_tpg_get_zone_plate_factors Returns the coarse and fine tune coefficients of the zone plate
intel_vvp_tpg_set_digital_clock_background_color Sets the background color for the digital clock pattern.
Intel_vvp_tpg_get_digital_clock_background_color Returns the background color for the digital clock pattern.
intel_vvp_tpg_set_digital_clock_font_color Sets the font color for the digital clock pattern.
intel_vvp_tpg_get_digital_clock_font_color Returns the font color for the digital clock pattern.
intel_vvp_tpg_set_digital_clock_location Sets the location for the digital clock pattern.
intel_vvp_tpg_get_digital_clock_location Returns the location for the digital clock pattern.
intel_vvp_tpg_set_digital_clock_scale_factor Sets the scale factor for the digital clock pattern
intel_vvp_tpg_get_digital_clock_scale_factor Returns the scale factor for the digital clock pattern
intel_vvp_tpg_set_digital_clock_fps Sets the FPS for the digital clock pattern. This value does not affect the output video refresh rate
intel_vvp_tpg_get_digital_clock_fps Returns the FPS for the digital clock pattern.
intel_vvp_tpg_commit_writes Commit all outstanding writes

enum eIntelVvpTpgPatternType

Members

kIntelVvpTpgBarsPattern – Bar pattern

kIntelVvpTpgUniformPattern – Uniform pattern

kIntelVvpTpgPathologicalPattern – Pattern that stresses SDI receiving equipment

kIntelVvpTpgZonePlatePattern – zone plate pattern

kIntelVvpTpgDigitalClockPattern – digital clock pattern

kIntelVvpTpgInvalidPattern – Invalid pattern (to indicate errors)

Description

Enumeration for the supported pattern types

enum eIntelVvpTpgPatternColor

Members

kIntelVvpTpgRgb – RGB 4:4:4

kIntelVvpTpgYcc444 – YCbCr/YUV 4:4:4

kIntelVvpTpgYcc422 – YCbCr/YUV 4:2:2

kIntelVvpTpgYcc420 – YCbCr/YUV 4:2:0

kIntelVvpTpgMono – Monochrome

kIntelVvpTpgInvalidColor – Invalid colorspace/subsampling (used to indicate errors)

Description

Enumeration for the supported color spaces and subsampling

enum eIntelVvpTpgBarsType

Members

kIntelVvpTpgColorBars – Standard color bars

kIntelVvpTpgGreyBars – Grey bars

kIntelVvpTpgBlackWhiteBars– Alternating black and white bars

kIntelVvpTpgMixedBars – Mixed bars types

kIntelVvpTpgInvalidBars – Invalid bar pattern (used to indicate errors)

Description

Enumeration for the supported color bar patterns

struct intel_vvp_tpg_pattern

Members

eIntelVvpTpgPatternType type – the configured type for the pattern

eIntelVvpTpgPatternColor color – The configured color space for the pattern

Description

Structure used to return the compile-time configuration for a given test pattern

intel_vvp_tpg_init

Prototype
 int intel_vvp_tpg_init(intel_vvp_tpg_instance *instance, intel_vvp_core_base base);
Description

Initializes a TPG instance. The initialization stops early if the vendor ID or product ID read at the base address are not a match or if the register map version is not supported. Otherwise, the function proceeds to read and store the IP compile-time parameterization. The instance does not fully initialized and should not be used further by the application if returning a non-zero error code.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

base – base address of the register map

Returns

kIntelVvpCoreOk (0) in case of success, a negative error code in case of error

kIntelVvpCoreVidErr if the vendor id of the core is not the IntelFPGA vendor ID (0x6AF7).

kIntelVvpCorePidErr if the product_id does not match with the TPG product ID

kIntelVvpCoreInstanceErr if the instance is a null pointer

kIntelVvpTpgRegMapVersionErr if the register map is not supported

intel_vvp_tpg_get_lite_mode

Prototype
 bool intel_vvp_tpg_get_lite_mode(intel_vvp_tpg_instance *instance);
Description

Returns the value of the LITE_MODE register. The instance must be a valid intel_vvp_tpg_instance fully initialized

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

true if the IP is parameterized in lite mode

intel_vvp_tpg_get_debug_enabled

Prototype
 int intel_vvp_tpg_get_debug_enabled(intel_vvp_tpg_instance *instance);
Description

Returns the value of the DEBUG_ENABLED register. The instance must be a valid intel_vvp_tpg_instance fully initialized.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

true if the IP is parameterized with debug features enabled

intel_vvp_tpg_get_num_patterns

Prototype
 uint8_t intel_vvp_tpg_get_num_patterns(intel_vvp_tpg_instance* instance);
Description

Returns the value of the NUM_PATTERNS register. The instance must be a valid intel_vvp_tpg_instance fully initialized.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

The number of patterns available

intel_vvp_tpg_get_bits_per_sample

Prototype
 uint8_t intel_vvp_tpg_get_bits_per_sample(intel_vvp_tpg_instance* instance);
Description

Returns the value of the BPS register. The instance must be a valid intel_vvp_tpg_instance fully initialized.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

The compile-time bps parameter

intel_vvp_tpg_get_pixels_in_parallel

Prototype
 uint8_t intel_vvp_tpg_get_pixels_in_parallel(intel_vvp_tpg_instance* instance);
Description

Returns the value of the PIP register. The instance must be a valid intel_vvp_tpg_instance fully initialized.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

The compile-time pixels in parallel parameter. This is the number of pixels generated per clock cycle.

intel_vvp_tpg_get_pattern_data

Prototype
 int intel_vvp_tpg_get_pattern_data(intel_vvp_tpg_instance* instance, uint8_t pattern, intel_vvp_tpg_pattern* pattern_data);
Description

Returns the pattern configuration for a given pattern. The instance must be a valid intel_vvp_tpg_instance fully initialized. The selected pattern must be valid and pattern_data must point to a valid memory location to store the result.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

pattern – a valid pattern in the range [0..intel_vvp_get_num_patterns(instance)-1]

pattern_data – valid memory location for a intel_vvp_tpg_pattern structure

Returns

kIntelVvpCoreOk (0) in case of succes, a negative error code in case of error

kIntelVvpCoreInstanceErr if the instance is null

kIntelVvpTpgPatternNumErr if the pattern is out-of-range

kIntelVvpCoreNullPtrErr if pattern_data is null

Upon successful return, pattern_data is filled with the configuration for the selected pattern. This includes the pattern type (eIntelVvpTpgPatternType) and the colorspace/subsampling (eIntelVvpTpgPatternColor)

intel_vvp_tpg_is_running

Prototype
 bool intel_vvp_tpg_is_running(intel_vvp_tpg_instance* instance);
Description

Reads and returns the running bit of the STATUS register. The instance must be a valid intel_vvp_tpg_instance fully initialized.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

True is the TPG is currently generating an output field, false when disabled and/or between two fields

intel_vvp_tpg_get_commit_status

Prototype
 bool intel_vvp_tpg_get_commit_status(intel_vvp_tpg_instance* instance);
Description

Reads and returns the commit pending bit of the STATUS register. The instance must be a valid intel_vvp_tpg_instance fully initialized and configured in full mode.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

True is the TPG is configured in full mode and if the agent interface contains uncommitted writes.

intel_vvp_tpg_get_status

Prototype
 uint8_t intel_vvp_tpg_get_status(intel_vvp_tpg_instance* instance);
Description

Reads and returns the STATUS register. The instance must be a valid intel_vvp_tpg_instance fully initialized.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

The value read from the status register

intel_vvp_tpg_enable

Prototype

int intel_vvp_tpg_enable(intel_vvp_tpg_instance* instance, bool enable);

Description

Starts the TPG IP. The instance must be a valid intel_vvp_tpg_instance fully initialized.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

enable – true to start the IP and generate fields, false to stop/pause the IP after the current field

Returns

kIntelVvpCoreOk (0) in case of success, otherwise negative error code. kIntelVvpCoreInstanceErr if the instance is null

intel_vvp_tpg_start

Prototype
int intel_vvp_tpg_start(intel_vvp_tpg_instance* instance); 
Description

Starts the TPG IP. The instance must be a valid intel_vvp_tpg_instance fully initialized. An alias for intel_vvp_tpg_enable(instance, true)

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

kIntelVvpCoreOk (0) in case of success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is null

intel_vvp_tpg_stop

Prototype
int intel_vvp_tpg_stop(intel_vvp_tpg_instance* instance); 
Description

Stops the TPG IP. The instance must be a valid intel_vvp_tpg_instance fully initialized. An alias for intel_vvp_tpg_enable(instance, false)

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

kIntelVvpCoreOk (0) in case of success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is null

intel_vvp_tpg_is_enabled

Prototype
 bool intel_vvp_tpg_is_enabled(intel_vvp_tpg_instance* instance);
Description

Returns if the TPG IP is started or paused. The instance must be a valid intel_vvp_tpg_instance fully initialized. The state cannot be checked if debug is not enabled

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

true is the IP is enabled and in debug mode, false otherwise

intel_vvp_tpg_set_pattern

Prototype
 int intel_vvp_tpg_set_pattern(intel_vvp_tpg_instance* instance, uint8_t pattern);
Description

Select/change the output test pattern. intel_vvp_tpg_instance must be valid and fully initialized. The pattern must be valid.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

pattern – A valid pattern configured at compile-time in the range [0..intel_vvp_get_num_patterns(instance)-1]

Returns

kIntelVvpCoreOk (0) in case of success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is null

kIntelVvpTpgPatternNumErr if the pattern is out of range

intel_vvp_tpg_get_pattern

Prototype
 uint8_t intel_vvp_tpg_get_pattern(intel_vvp_tpg_instance* instance);
Description

Returns the selected test pattern. The instance must be a valid intel_vvp_tpg_instance fully initialized. The pattern cannot be retrieved if debug is not enabled

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

Currently selected pattern or error code 255 if the instance is invalid or debug disabled

intel_vvp_tpg_get_fields_since_sequence_reset

Prototype
 uint32_t intel_vvp_tpg_get_fields_since_sequence_reset(intel_vvp_tpg_instance* instance)
Description

Read and returns the FIELD_COUNT register. The field counter is automatically reset when the pattern changes or the image specifications change (after a write to the image info area). The value may remain undefined after a reset until the first field of the new sequence is sent.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

the field counter value

intel_vvp_tpg_set_bars_type

Prototype
 int intel_vvp_tpg_set_bars_type(intel_vvp_tpg_instance* instance, eIntelVvpTpgBarsType bar_type);
Description

Selects the type of color bars (black/white, grey, color) for patterns of type kIntelVvpTpgBarsPattern

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

bar_type – the type of color bars

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise.

intel_vvp_tpg_get_bars_type

Prototype

eIntelVvpTpgBarsType intel_vvp_tpg_set_bars_type(intel_vvp_tpg_instance* instance)

Description

Read and returns the selected bar type for patterns of type kIntelVvpTpgBarsPattern. Instance must be valid and debug enabled

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

the selected bar type, kIntelVvpTpgInvalidBars in case of error

intel_vvp_tpg_set_colors

Prototype
 int intel_vvp_tpg_set_colors (intel_vvp_tpg_instance* instance, uint16_t color1, uint16_t color2, uint16_t color3);
Description

Selects the uniform color for patterns of type kIntelVvpTpgUniformPattern

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

color1, color2, color3 – the three new color sample values for the uniform pattern

The color samples must be in the range [0 .. (1 << intel_vvp_tpg_get_bits_per_sample(instance)) – 1]

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise.

kIntelVvpCoreInstanceErr if the instance is invalid

kIntelVvpTpgC1Err/ kIntelVvpTpgC2Err/ kIntelVvpTpgC3Err if the color sample is out-of-range

intel_vvp_tpg_get_colors

Prototype
 int intel_vvp_tpg_get_colors(intel_vvp_tpg_instance* instance, uint16_t* color1, uint16_t* color2, uint16_t* color3)
Description

Reads and returns the selected color sample values for pattern of type kIntelVvpTpgUniformPattern. The instance must be a valid intel_vvp_tpg_instance with debug enabled. The three points that return values must point to valid memory locations containing uint16_t variables

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

color1, color2, color3 – three memory locations to store the returned color sample values

Returns

kIntelVvpCoreOk in case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr, invalid instance (null pointer or debug disabled)

kIntelVvpCoreNullPtrErr, one of the uint16_t pointer is the null pointer

intel_vvp_tpg_set_zone_plate_origin

Prototype
intintel_vvp_tpg_set_zone_plate_origin(intel_vvp_tpg_instance*
instance,uint16_t x_coord, uint16_t y_coord);
Description

Set to change the coordinates of the origin of patterns of type kIntelVvpTpgZonePlate

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

x_coord, y_coord – the coordinates of the origin

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr if the instance is invalid (null)

intel_vvp_tpg_get_zone_plate_origin
Prototype
intintel_vvp_tpg_get_zone_plate_origin(intel_vvp_tpg_instance*
instance,uint16_t *x_coord, uint16_t *y_coord);
Description

Returns the coordinates of the origin of patterns of type kIntelVvpTpgZonePlate

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

x_coord, y_coord – Pointers to uint16_t to store the x-coordinate and y-coordinate of the zone plate origin

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr,invalid instance (null pointer or debug disabled)

kIntelVvpCoreNullPtrErr if either x_coord or y_coord are null pointers

intel_vvp_tpg_set_zone_plate_factors
Prototype
intintel_vvp_tpg_set_zone_plate_factors(intel_vvp_tpg_instance*
instance,uint16_t coarse_factor, uint16_t fine_factor);
Description

Set to change the coarse and fine tune scaling coefficients of patterns of type kIntelVvpTpgZonePlate

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

coarse_factor – The coarse scaling coefficient

fine_factor – The fine tune scaling coefficient

Returns

kIntelVvpCoreOk in case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr if the instance is invalid(null pointer or debug disabled)

intel_vvp_tpg_get_zone_plate_factors
Prototype
intintel_vvp_tpg_get_zone_plate_factors(intel_vvp_tpg_instance*
instance,uint16_t
                                  *coarse_factor, uint16_t
                                  *fine_factor);
Description

Get to change the coordinates of the origin of patterns of type kIntelVvpTpgZonePlate

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

coarse_factor – Pointer to uint16_t to store the coarse scaling coefficient of the zone plate

fine_factor – Pointer to uint16_t to store the fine tune scaling coefficient of the zone plate

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr if the instance is invalid(null pointer or debug disabled)

kIntelVvpCoreNullPtrErr if either coarse_factor or fine_factor are null pointers

intel_vvp_tpg_set_digital_clock_background_color
Prototype
int
                                intel_vvp_tpg_set_digital_clock_background_color(intel_vvp_tpg_instance*
                                instance, uint16_t background_r, uint16_t background_g, uint16_t
                                background_b);
Description

Selects the background color of types kIntelVvpTpgDigitalClockPattern

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

background_r, background_g, background_b– the respective color components of the background color

Thecolor samples must be in the range [0 .. (1 << intel_vvp_tpg_get_bits_per_sample(instance)) – 1]

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is invalid

kIntelVvpTpgC1Err/kIntelVvpTpgC2Err/ kIntelVvpTpgC3Err if the corresponding color sample is out of range

intel_vvp_tpg_get_digital_clock_background_color
Prototype
int
                                intel_vvp_tpg_get_digital_clock_background_color(intel_vvp_tpg_instance*
                                instance, uint16_t* background_r, uint16_t* background_g, uint16_t*
                                background_b);
Description

Reads and returns the selected color sample values for pattern of type kIntelVvpTpgDigitalClockPattern .

The instance must be a valid intel_vvp_tpg_instancewith debug enabled. The three points that return values must point to valid memory locations containing uint16_t variables

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

background_r, background_g, background_b– the respective color components of the background color

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr,invalid instance (null pointer or debug disabled)

kIntelVvpCoreNullPtrErr,one of the uint16_t pointer is the null pointer

intel_vvp_tpg_set_digital_clock_font_color
Prototype
int
                                intel_vvp_tpg_set_digital_clock_font_color(intel_vvp_tpg_instance*
                                instance, uint16_t font_r, uint16_t font_g, uint16_t
                                font_b);
Description

Selects the font color of types kIntelVvpTpgDigitalClockPattern

font_r, font_g, font_b– the respective color components of the background color

The color samples must be in the range [0 .. (1 << intel_vvp_tpg_get_bits_per_sample(instance)) – 1]

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is invalid

kIntelVvpTpgC1Err/kIntelVvpTpgC2Err/ kIntelVvpTpgC3Err if the corresponding color sample is out of range

intel_vvp_tpg_get_digital_clock_font_color
Prototype
int
                                intel_vvp_tpg_get_digital_clock_font_color(intel_vvp_tpg_instance*
                                instance, uint16_t* font_r, uint16_t* font_g, uint16_t*
                                font_b);
Description

Reads and returns the selected color sample values for pattern of type kIntelVvpTpgDigitalClockPattern .

The instance must be a valid intel_vvp_tpg_instance with debug enabled. The three points that return values must point to valid memory locations containing uint16_t variables

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

font_r, font_g, font_b– the respective color components of the background color

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr,invalid instance (null pointer or debug disabled)

kIntelVvpCoreNullPtrErr,one of the uint16_t pointer is the null pointer

intel_vvp_tpg_set_digital_clock_location
Prototype
int
                                intel_vvp_tpg_set_digital_clock_location(intel_vvp_tpg_instance*
                                instance, uint16_t location_x, uint16_t
                              location_y);
Description

Selects the display location for patterns of type kIntelVvpTpgDigitalClockPattern

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

location_x, location_y– the respective location coordinate components

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is invalid

intel_vvp_tpg_get_digital_clock_location
Prototype
int
                                intel_vvp_tpg_get_digital_clock_location(intel_vvp_tpg_instance*
                                instance, uint16_t* location_x, uint16_t*
                              location_y);
Description

Reads and returns the current display location for patterns of type kIntelVvpTpgDigitalClockPattern .

The instance must be a valid intel_vvp_tpg_instancewith debug enabled. The two points that return values must point to valid memory locations containing uint16_t variables

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

location_x, location_y– the respective location coordinate components

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr,invalid instance (null pointer or debug disabled)

kIntelVvpCoreNullPtrErr,one or more of the uint16_t pointers are a null pointer

intel_vvp_tpg_set_digital_clock_scale_factor
Prototype
int
                                intel_vvp_tpg_set_digital_clock_scale_factor(intel_vvp_tpg_instance*
                                instance, uint16_t scale_factor);
Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

scale_factor – The scaling coefficient to apply to the digital clock size

Description

Sets the scale factor of patterns of type kIntelVvpTpgDigitalClockPattern

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is invalid

kIntelVvpTpgScaleFactorErr ifthe corresponding scale factor sample is greater than 11 bits

intel_vvp_tpg_get_digital_clock_scale_factor
Prototype
int
                                intel_vvp_tpg_get_digital_clock_scale_factor(intel_vvp_tpg_instance*
                                instance, uint16_t* scale_factor);
Description

Reads and returns the FPS for patterns of type kIntelVvpTpgDigitalClockPattern

The instance must be a valid intel_vvp_tpg_instancewith debug enabled. The two points that return values must point to valid memory locations containing uint16_t variables

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

scale_factor – pointer to store the scaling coefficient of the digital clock size

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr,invalid instance (null pointer or debug disabled)

kIntelVvpCoreNullPtrErr,one or more of the uint16_t pointers are a null pointer

intel_vvp_tpg_set_digital_clock_fps
Prototype
int intel_vvp_tpg_set_digital_clock_fps(intel_vvp_tpg_instance*
                                instance, uint16_t fps);
Description

Selects the FPS of patterns of type kIntelVvpTpgDigitalClockPattern . This value controls the increment of one second.

This value does not affect the output video refresh rate.

Arguments

Arguments instance– pointer to the intel_vvp_tpg_instance software driver instance structure

fps –the frames per second to determine when a second has passed

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise. kIntelVvpCoreInstanceErr if the instance is invalid

kIntelVvpTpgFpsErr if the FPS sample is out of range

intel_vvp_tpg_get_digital_clock_fps
Prototype
int intel_vvp_tpg_get_digital_clock_fps(intel_vvp_tpg_instance*
                                instance, uint16_t* fps);
Description

Reads and returns the FPS for patterns of type kIntelVvpTpgDigitalClockPattern .

The instance must be a valid intel_vvp_tpg_instance with debug enabled. The two points that return values must point to valid memory locations containing uint16_t variables

Arguments

instance– pointer to the intel_vvp_tpg_instance software driver instance structure

fps– pointer to a uint16_t to store the FPS value

Returns

kIntelVvpCoreOkin case of success, negative error code otherwise.

kIntelVvpCoreInstanceErr,invalid instance (null pointer or debug disabled)

kIntelVvpCoreNullPtrErr,one or more of the uint16_t pointers are a null pointer

intel_vvp_tpg_commit_writes

Prototype
 int intel_vvp_tpg_commit_writes(intel_vvp_tpg_instance* instance)
Description

Commits all pending writes before starting the next output field. The instance must be valid and parameterized in full mode.

Arguments

instance – pointer to the intel_vvp_tpg_instance software driver instance structure

Returns

kIntelVvpCoreOk (0) for success, negative error code otherwise.