From 6f722da6910966c78b785279d2712ef5c44bebd7 Mon Sep 17 00:00:00 2001 From: Durga challa Date: Tue, 8 Jul 2014 18:42:33 +0530 Subject: [PATCH] tpg: Added html files. Modified tpg.mdd and tpg.tcl files. Signed-off-by: Durga challa --- XilinxProcessorIPLib/drivers/tpg/data/tpg.mdd | 1 - XilinxProcessorIPLib/drivers/tpg/data/tpg.tcl | 7 +- .../drivers/tpg/doc/html/api/annotated.html | 28 + .../drivers/tpg/doc/html/api/files.html | 18 +- .../drivers/tpg/doc/html/api/functions.html | 63 + .../tpg/doc/html/api/functions_vars.html | 63 + .../drivers/tpg/doc/html/api/globals.html | 51 + .../tpg/doc/html/api/globals_0x63.html | 50 + .../tpg/doc/html/api/globals_0x74.html | 93 + .../tpg/doc/html/api/globals_0x78.html | 241 ++ .../tpg/doc/html/api/globals_defs.html | 208 ++ .../tpg/doc/html/api/globals_enum.html | 42 + .../tpg/doc/html/api/globals_eval.html | 66 + .../tpg/doc/html/api/globals_func.html | 93 + .../tpg/doc/html/api/globals_type.html | 41 + .../tpg/doc/html/api/globals_vars.html | 40 + .../drivers/tpg/doc/html/api/index.html | 92 +- .../doc/html/api/struct_x_tpg-members.html | 35 + .../tpg/doc/html/api/struct_x_tpg.html | 206 ++ .../api/struct_x_tpg___config-members.html | 44 + .../doc/html/api/struct_x_tpg___config.html | 359 +++ .../drivers/tpg/doc/html/api/xtpg_8c.html | 1622 +++++++++++ .../drivers/tpg/doc/html/api/xtpg_8h.html | 2541 +++++++++++++++++ .../drivers/tpg/doc/html/api/xtpg__g_8c.html | 50 + .../drivers/tpg/doc/html/api/xtpg__hw_8h.html | 2480 ++++++++++++++++ .../tpg/doc/html/api/xtpg__intr_8c.html | 136 + .../tpg/doc/html/api/xtpg__selftest_8c.html | 73 + .../tpg/doc/html/api/xtpg__sinit_8c.html | 72 + .../drivers/tpg/examples/example.c | 86 - 29 files changed, 8804 insertions(+), 97 deletions(-) create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/annotated.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions_vars.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x63.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x74.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x78.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_defs.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_enum.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_eval.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_func.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_type.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_vars.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg-members.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config-members.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8c.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8h.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__g_8c.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__hw_8h.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__intr_8c.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__selftest_8c.html create mode 100755 XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__sinit_8c.html delete mode 100755 XilinxProcessorIPLib/drivers/tpg/examples/example.c diff --git a/XilinxProcessorIPLib/drivers/tpg/data/tpg.mdd b/XilinxProcessorIPLib/drivers/tpg/data/tpg.mdd index 91536f7e..6c2fbd12 100755 --- a/XilinxProcessorIPLib/drivers/tpg/data/tpg.mdd +++ b/XilinxProcessorIPLib/drivers/tpg/data/tpg.mdd @@ -29,7 +29,6 @@ # this Software without prior written authorization from Xilinx. # ############################################################################## -OPTION psf_version = 2.1; BEGIN driver tpg diff --git a/XilinxProcessorIPLib/drivers/tpg/data/tpg.tcl b/XilinxProcessorIPLib/drivers/tpg/data/tpg.tcl index a41c897b..1ce46977 100755 --- a/XilinxProcessorIPLib/drivers/tpg/data/tpg.tcl +++ b/XilinxProcessorIPLib/drivers/tpg/data/tpg.tcl @@ -37,6 +37,9 @@ ############################################################### proc generate {drv_handle} { - xdefine_include_file $drv_handle "xparameters.h" "tpg" "C_BASEADDR" "C_HIGHADDR" - xdefine_canonical_xpars $drv_handle "xparameters.h" "tpg" "C_BASEADDR" "C_HIGHADDR" + xdefine_include_file $drv_handle "xparameters.h" "TPG" "NUM_INSTANCES" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_S_AXIS_VIDEO_FORMAT" "C_M_AXIS_VIDEO_FORMAT" "C_S_AXI_CLK_FREQ_HZ" "C_ACTIVE_ROWS" "C_ACTIVE_COLS" "C_PATTERN_CONTROL" "C_MOTION_SPEED" "C_CROSS_HAIRS" "C_ZPLATE_HOR_CONTROL" "C_ZPLATE_VER_CONTROL" "C_BOX_SIZE" "C_BOX_COLOR" "C_STUCK_PIXEL_THRESH" "C_NOISE_GAIN" "C_BAYER_PHASE" "C_HAS_INTC_IF" "C_ENABLE_MOTION" + + xdefine_config_file $drv_handle "xtpg_g.c" "XTpg" "DEVICE_ID" "C_BASEADDR" "C_S_AXIS_VIDEO_FORMAT" "C_M_AXIS_VIDEO_FORMAT" "C_S_AXI_CLK_FREQ_HZ" "C_ACTIVE_ROWS" "C_ACTIVE_COLS" "C_PATTERN_CONTROL" "C_MOTION_SPEED" "C_CROSS_HAIRS" "C_ZPLATE_HOR_CONTROL" "C_ZPLATE_VER_CONTROL" "C_BOX_SIZE" "C_BOX_COLOR" "C_STUCK_PIXEL_THRESH" "C_NOISE_GAIN" "C_BAYER_PHASE" "C_HAS_INTC_IF" "C_ENABLE_MOTION" + + xdefine_canonical_xpars $drv_handle "xparameters.h" "TPG" "DEVICE_ID" "C_BASEADDR" "C_HIGHADDR" "C_S_AXIS_VIDEO_FORMAT" "C_M_AXIS_VIDEO_FORMAT" "C_S_AXI_CLK_FREQ_HZ" "C_ACTIVE_ROWS" "C_ACTIVE_COLS" "C_PATTERN_CONTROL" "C_MOTION_SPEED" "C_CROSS_HAIRS" "C_ZPLATE_HOR_CONTROL" "C_ZPLATE_VER_CONTROL" "C_BOX_SIZE" "C_BOX_COLOR" "C_STUCK_PIXEL_THRESH" "C_NOISE_GAIN" "C_BAYER_PHASE" "C_HAS_INTC_IF" "C_ENABLE_MOTION" } diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/annotated.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/annotated.html new file mode 100755 index 00000000..cbc04164 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/annotated.html @@ -0,0 +1,28 @@ + + + + + Class List + + + + +Software Drivers +
+ + + +

Class List

Here are the classes, structs, unions and interfaces with brief descriptions: + + +
XTpg
XTpg_Config
+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/files.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/files.html index 40e2c000..ee90c3a9 100755 --- a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/files.html +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/files.html @@ -9,13 +9,25 @@ Software Drivers
- + -

File List

Here is a list of all documented files with brief descriptions: - + +

File List

Here is a list of all files with brief descriptions:
tpg.c
+ + + + + + +
xtpg.c
xtpg.h
xtpg_g.c
xtpg_hw.h
xtpg_intr.c
xtpg_selftest.c
xtpg_sinit.c
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions.html new file mode 100755 index 00000000..0e6ac78f --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions.html @@ -0,0 +1,63 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + +
+ +
+Here is a list of all class members with links to the classes they belong to: +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions_vars.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions_vars.html new file mode 100755 index 00000000..331c83e3 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/functions_vars.html @@ -0,0 +1,63 @@ + + + + + Class Members - Variables + + + + +Software Drivers +
+ + + +
+ +
+  +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals.html new file mode 100755 index 00000000..405f225f --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals.html @@ -0,0 +1,51 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- b -

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x63.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x63.html new file mode 100755 index 00000000..3833765d --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x63.html @@ -0,0 +1,50 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- c -

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x74.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x74.html new file mode 100755 index 00000000..8da9150a --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x74.html @@ -0,0 +1,93 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- t -

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x78.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x78.html new file mode 100755 index 00000000..09ab583e --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_0x78.html @@ -0,0 +1,241 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +
+ +
+ +

+Here is a list of all file members with links to the files they belong to: +

+

- x -

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_defs.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_defs.html new file mode 100755 index 00000000..85e999e2 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_defs.html @@ -0,0 +1,208 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +
+
    +
  • t
  • +
  • x
  • +
+
+ +

+  +

+

- t -

+

- x -

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_enum.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_enum.html new file mode 100755 index 00000000..273659d4 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_enum.html @@ -0,0 +1,42 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +  +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_eval.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_eval.html new file mode 100755 index 00000000..e4afe494 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_eval.html @@ -0,0 +1,66 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +  +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_func.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_func.html new file mode 100755 index 00000000..a786a420 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_func.html @@ -0,0 +1,93 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +
+
    +
  • x
  • +
+
+ +

+  +

+

- x -

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_type.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_type.html new file mode 100755 index 00000000..f48424e6 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_type.html @@ -0,0 +1,41 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +  +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_vars.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_vars.html new file mode 100755 index 00000000..7c8f4288 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/globals_vars.html @@ -0,0 +1,40 @@ + + + + + Class Members + + + + +Software Drivers +
+ + + + +  +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/index.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/index.html index 49feae94..8e3e0c97 100755 --- a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/index.html +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/index.html @@ -2,21 +2,103 @@ - tpg v2_0 + TPG V3_0 Software Drivers
- + -

tpg v2_0

+

TPG V3_0

This header file contains identifiers and register-level driver functions (or macros) that can be used to access the Xilinx Test Pattern Generator (TPG) core instance.

-MODIFICATION HISTORY:

-Ver Who Date Changes ----- ---- -------- ------------------------------------------------------- 1.00a se 10/01/12 Initial creation 2.0a se 02/12/14 Cleaned up comments, updated masks and registers 2.0 adk 19/12/13 Updated as per the New Tcl API's Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. +The TPG core provides a wide variety of tests patterns enabling you to debug and assess video system color, quality, edge, and motion performance.

+The Test Pattern Generator core produces the following patterns in RGB, YCbCr 444, or YCbCr 422 video format.

+

+Initialization & Configuration

+The device driver enables higher layer software (e.g., an application) to communicate to the TPG core.

+XTpg_CfgInitialize() API is used to initialize the TPG core. The user needs to first call the XTpg_LookupConfig() API which returns the Configuration structure pointer which is passed as a parameter to the XTpg_CfgInitialize() API.

+ Interrupts

+The driver provides an interrupt handler XTpg_IntrHandler for handling the interrupt from the TPG core. The users of this driver have to register this handler with the interrupt system and provide the callback functions by using XTpg_SetCallBack API.

+ Virtual Memory

+This driver supports Virtual Memory. The RTOS is responsible for calculating the correct device base address in Virtual Memory space.

+ Threads

+This driver is not thread safe. Any needs for threads or thread mutual exclusion must be satisfied by the layer above this driver.

+ Asserts

+Asserts are used within all Xilinx drivers to enforce constraints on argument values. Asserts can be turned off on a system-wide basis by defining, at compile time, the NDEBUG identifier. By default, asserts are turned on and it is recommended that users leave asserts on during development.

+ Building the driver

+The XTpg driver is composed of several source files. This allows the user to build and link only those parts of the driver that are necessary.

+

+ MODIFICATION HISTORY:

+

 Ver   Who    Date     Changes
+ ----- ------ -------- --------------------------------------------------
+ 1.00a se     10/01/12 Initial creation.
+ 2.0a  se     02/12/14 Cleaned up comments, updated masks and registers.
+ 2.0   adk    19/12/13 Updated as per the New Tcl API's.
+ 3.0   adk    02/19/14 Changed the file name from "tpg.h" to "xtpg.h"
+                       Register offsets, TPG_In32, TPG_In32, TPG_ReadReg,
+                       TPG_WriteReg and bit definitions of tpg.h file
+                       were moved to xtpg_hw.h file.

+

                       Removed the following bit definitions :
+                       TPG_CTL_CS_MASK.

+

                       Defined the following handler types as enum values:
+                       XTPG_HANDLER_PROCSTART ,XTPG_HANDLER_FRAMEDONE and
+                       XTPG_HANDLER_ERROR.
+                       Defined the following enums:
+                       BackgroundPattern, ComponentMask and
+                       BayerPhaseCombination.

+

                       Defined the following range macros
+                       XTPG_MOTION_SPEED_MIN, XTPG_MOTION_SPEED_MAX,
+                       XTPG_VSIZE_FIRST, XTPG_VSIZE_LAST, XTPG_HSIZE_FIRST,
+                       XTPG_HSIZE_LAST.

+

                       Added the following function macros:
+                       XTpg_Enable, XTpg_Disable, XTpg_Start, XTpg_Stop,
+                       XTpg_RegUpdateEnable, XTpg_RegUpdateDisable,
+                       XTpg_Reset, XTpg_SyncReset, XTpg_IntrEnable,
+                       XTpg_IntrDisable, XTpg_StatusGetPending,
+                       XTpg_IntrGetPending, XTpg_IntrClear.

+

                       Removed following function macros:
+                       TPG_Enable, TPG_Disable, TPG_RegUpdateEnable,
+                       TPG_RegUpdateDisable, TPG_Reset, TPG_FSyncReset
+                       TPG_ClearStatus, TPG_ClearReset.
+                       Added the following structures
+                       XTpg and XTpg_Config.

+

                       Implemented XTpg_LookupConfig in xtpg_sinit.c
+                       Implemented XTpg_SelfTest in xtpg_selftest.c
+                       Implemented XTpg_IntrHandler, XTpg_SetCallBack in
+                       xtpg_intr.c.

+

                       Added the register offsets and bit masks for the
+                       registers and added backward compatibility for
+                       macros.in xtpg_hw.h.

+

                       Modification history from xtpg.c file:
+                       Changed the file name form "tpg.c" to "xtpg.c".
+                       Implemented the following functions:
+                       XTpg_CfgInitialize, XTpg_Setup, XTpg_GetVersion,
+                       XTpg_SetActiveSize, XTpg_GetActiveSize,
+                       XTpg_SetBackground, XTpg_GetBackground,
+                       XTpg_EnableCrossHair, XTpg_DisableCrossHair,
+                       XTpg_EnableBox, XTpg_DisableBox, XTpg_SetComponentMask,
+                       XTpg_GetComponentMask, XTpg_EnableStuckPixel,
+                       XTpg_DisableStuckPixel, XTPg_EnableNoise,
+                       XTPg_DisableNoise, XTpg_EnableMotion,
+                       XTpg_DisableMotion, XTpg_SetMotionSpeed,
+                       XTpg_GetMotionSpeed, XTpg_SetCrosshairPosition,
+                       XTpg_GetCrosshairPosition, XTpg_SetZPlateHStart,
+                       XTpg_GetZPlateHStart, XTpg_SetZPlateHSpeed,
+                       XTpg_GetZPlateHSpeed, XTpg_SetZPlateVStart,
+                       XTpg_GetZPlateVStart, XTpg_SetZPlateVSpeed,
+                       XTpg_GetZPlateVSpeed, XTpg_SetBoxSize, XTpg_GetBoxSize,
+                       XTpg_SetBoxColor, XTpg_GetBoxColor,
+                       XTpg_SetStuckPixelThreshold,
+                       XTpg_GetStuckPixelThreshold, XTpg_SetNoiseGain,
+                       XTpg_GetNoiseGain, XTpg_SetBayerPhase,
+                       XTpg_GetBayerPhase, XTpg_SetPattern, XTpg_GetPattern.

+

 
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg-members.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg-members.html new file mode 100755 index 00000000..fe8dd52b --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg-members.html @@ -0,0 +1,35 @@ + + + + + Member List + + + + +Software Drivers +
+ + + +

XTpg Member List

This is the complete list of members for XTpg, including all inherited members.

+ + + + + + + + + + +
ConfigXTpg
ErrCallBackXTpg
ErrRefXTpg
FrameDoneCallBackXTpg
FrameDoneRefXTpg
HSizeXTpg
IsReadyXTpg
ProcStartCallBackXTpg
ProcStartRefXTpg
VSizeXTpg
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg.html new file mode 100755 index 00000000..79767ac7 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg.html @@ -0,0 +1,206 @@ + + + + + XTpg Struct Reference + + + +

+Software Drivers +
+ + + +

XTpg Struct Reference

#include <xtpg.h> +

+List of all members.


Detailed Description

+The XTpg driver instance data structure. A pointer to an instance data structure is passed around by functions to refer to a specific driver instance. +

+ + + + + + + + + + + + + + + + + + + + + + + +

Public Attributes

XTpg_Config Config
u32 IsReady
u16 HSize
u16 VSize
XTpg_CallBack ProcStartCallBack
void * ProcStartRef
XTpg_CallBack FrameDoneCallBack
void * FrameDoneRef
XTpg_ErrorCallBack ErrCallBack
void * ErrRef
+


Member Data Documentation

+ +
+ +
+ +

+Hardware configuration +

+

+ +

+ +
+ +

+Callback for Error interrupt +

+

+ +

+
+ + + + +
void* XTpg::ErrRef
+
+
+ +

+To be passed to the Error interrupt callback +

+

+ +

+ +
+ +

+Callback for Frame Done interrupt +

+

+ +

+
+ + + + +
void* XTpg::FrameDoneRef
+
+
+ +

+To be passed to the Frame Done interrupt callback +

+

+ +

+
+ + + + +
u16 XTpg::HSize
+
+
+ +

+Active Video Horizontal Size +

+

+ +

+
+ + + + +
u32 XTpg::IsReady
+
+
+ +

+Core and the driver instance are initialized +

+

+ +

+ +
+ +

+Callback for Processing Start interrupt +

+

+ +

+
+ + + + +
void* XTpg::ProcStartRef
+
+
+ +

+To be passed to the Process Start interrupt callback +

+

+ +

+
+ + + + +
u16 XTpg::VSize
+
+
+ +

+Active Video Vertical Size +

+

+


The documentation for this struct was generated from the following file: +Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config-members.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config-members.html new file mode 100755 index 00000000..4743a37d --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config-members.html @@ -0,0 +1,44 @@ + + + + + Member List + + + + +Software Drivers +
+ + + +

XTpg_Config Member List

This is the complete list of members for XTpg_Config, including all inherited members.

+ + + + + + + + + + + + + + + + + + + +
ActiveColumnsXTpg_Config
ActiveRowsXTpg_Config
BaseAddressXTpg_Config
BayerPhaseXTpg_Config
BoxColorXTpg_Config
BoxSizeXTpg_Config
CrossHairsXTpg_Config
DeviceIdXTpg_Config
EnableMotionXTpg_Config
HasIntcIfXTpg_Config
MasterAxisVideoFormatXTpg_Config
MotionSpeedXTpg_Config
NoiseGainXTpg_Config
PatternControlXTpg_Config
SlaveAxiClkFreqHzXTpg_Config
SlaveAxisVideoFormatXTpg_Config
StuckPixelThresholdXTpg_Config
ZPlateHorizontalControlXTpg_Config
ZPlateVerticalControlXTpg_Config
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config.html new file mode 100755 index 00000000..a67e22d9 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/struct_x_tpg___config.html @@ -0,0 +1,359 @@ + + + + + XTpg_Config Struct Reference + + + +

+Software Drivers +
+ + + +

XTpg_Config Struct Reference

#include <xtpg.h> +

+List of all members.


Detailed Description

+This typedef contains configuration information for a TPG core. Each TPG core should have a configuration structure associated. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Attributes

u16 DeviceId
u32 BaseAddress
u32 SlaveAxisVideoFormat
u32 MasterAxisVideoFormat
u32 SlaveAxiClkFreqHz
u32 ActiveRows
u32 ActiveColumns
u32 PatternControl
u8 MotionSpeed
u32 CrossHairs
u32 ZPlateHorizontalControl
u32 ZPlateVerticalControl
u16 BoxSize
u32 BoxColor
u16 StuckPixelThreshold
u8 NoiseGain
u8 BayerPhase
u16 HasIntcIf
u16 EnableMotion
+


Member Data Documentation

+ +
+ +
+ +

+Active Columns +

+

+ +

+
+ + + + +
u32 XTpg_Config::ActiveRows
+
+
+ +

+Active Rows +

+

+ +

+
+ + + + +
u32 XTpg_Config::BaseAddress
+
+
+ +

+BaseAddress is the physical base address of the TPG core registers +

+

+ +

+
+ + + + +
u8 XTpg_Config::BayerPhase
+
+
+ +

+Bayer Phase +

+

+ +

+
+ + + + +
u32 XTpg_Config::BoxColor
+
+
+ +

+Box Color +

+

+ +

+
+ + + + +
u16 XTpg_Config::BoxSize
+
+
+ +

+Box Size +

+

+ +

+
+ + + + +
u32 XTpg_Config::CrossHairs
+
+
+ +

+Cross Hair +

+

+ +

+
+ + + + +
u16 XTpg_Config::DeviceId
+
+
+ +

+DeviceId is the unique ID of the TPG core +

+

+ +

+
+ + + + +
u16 XTpg_Config::EnableMotion
+
+
+ +

+Enable Motion +

+

+ +

+
+ + + + +
u16 XTpg_Config::HasIntcIf
+
+
+ +

+Has Interrupt Control Flag +

+

+ +

+ +
+ +

+Master Axis Video Format +

+

+ +

+
+ + + + +
u8 XTpg_Config::MotionSpeed
+
+
+ +

+Motion Speed +

+

+ +

+
+ + + + +
u8 XTpg_Config::NoiseGain
+
+
+ +

+Noise Gain +

+

+ +

+ +
+ +

+Pattern Control +

+

+ +

+ +
+ +

+Slave Clock Frequency +

+

+ +

+ +
+ +

+Slave Axis Video Format +

+

+ +

+ +
+ +

+Stuck Pixel Threshold +

+

+ +

+ +
+ +

+ZPlate Horizontal Control +

+

+ +

+ +
+ +

+ZPlate Vertical Control +

+

+


The documentation for this struct was generated from the following file: +Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8c.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8c.html new file mode 100755 index 00000000..ef02ba4e --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8c.html @@ -0,0 +1,1622 @@ + + + + + xtpg.c File Reference + + + + +Software Drivers +
+ + + +

xtpg.c File Reference


Detailed Description

+This file contains the implementation of the interface functions for Test Pattern Generator (TPG) driver. Refer to the header file xtpg.h for more detailed information.

+

+ MODIFICATION HISTORY:

+

 Ver   Who    Date     Changes
+ ----- ------ -------- -------------------------------------------------------
+ 1.00a se     10/01/12 Initial creation.
+ 2.0   se     01/24/13 Cleaned up comments.
+ 3.0   adk    02/19/14 Changed the file name form "tpg.c" to "xtpg.c".
+                       Implemented the following functions:
+                       XTpg_CfgInitialize, XTpg_Setup, XTpg_GetVersion,
+                       XTpg_SetActiveSize, XTpg_GetActiveSize,
+                       XTpg_SetBackground, XTpg_GetBackground,
+                       XTpg_EnableCrossHair, XTpg_DisableCrossHair,
+                       XTpg_EnableBox, XTpg_DisableBox, XTpg_SetComponentMask,
+                       XTpg_GetComponentMask, XTpg_EnableStuckPixel,
+                       XTpg_DisableStuckPixel, XTPg_EnableNoise,
+                       XTPg_DisableNoise, XTpg_EnableMotion,
+                       XTpg_DisableMotion, XTpg_SetMotionSpeed,
+                       XTpg_GetMotionSpeed, XTpg_SetCrosshairPosition,
+                       XTpg_GetCrosshairPosition, XTpg_SetZPlateHStart,
+                       XTpg_GetZPlateHStart, XTpg_SetZPlateHSpeed,
+                       XTpg_GetZPlateHSpeed, XTpg_SetZPlateVStart,
+                       XTpg_GetZPlateVStart, XTpg_SetZPlateVSpeed,
+                       XTpg_GetZPlateVSpeed, XTpg_SetBoxSize, XTpg_GetBoxSize,
+                       XTpg_SetBoxColor, XTpg_GetBoxColor,
+                       XTpg_SetStuckPixelThreshold,
+                       XTpg_GetStuckPixelThreshold, XTpg_SetNoiseGain,
+                       XTpg_GetNoiseGain, XTpg_SetBayerPhase,
+                       XTpg_GetBayerPhase, XTpg_SetPattern, XTpg_GetPattern.

+

 
+

+#include "xtpg.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

int XTpg_CfgInitialize (XTpg *InstancePtr, XTpg_Config *CfgPtr, u32 EffectiveAddr)
void XTpg_Setup (XTpg *InstancePtr)
u32 XTpg_GetVersion (XTpg *InstancePtr)
void XTpg_SetActiveSize (XTpg *InstancePtr, u16 HSize, u16 VSize)
void XTpg_GetActiveSize (XTpg *InstancePtr, u16 *HSize, u16 *VSize)
void XTpg_SetBackground (XTpg *InstancePtr, enum BackgroundPattern Pattern)
u32 XTpg_GetBackground (XTpg *InstancePtr)
void XTpg_EnableCrossHair (XTpg *InstancePtr)
void XTpg_DisableCrossHair (XTpg *InstancePtr)
void XTpg_EnableBox (XTpg *InstancePtr)
void XTpg_DisableBox (XTpg *InstancePtr)
void XTpg_SetComponentMask (XTpg *InstancePtr, enum ComponentMask Mask)
u32 XTpg_GetComponentMask (XTpg *InstancePtr)
void XTpg_EnableStuckPixel (XTpg *InstancePtr)
void XTpg_DisableStuckPixel (XTpg *InstancePtr)
void XTPg_EnableNoise (XTpg *InstancePtr)
void XTPg_DisableNoise (XTpg *InstancePtr)
void XTpg_EnableMotion (XTpg *InstancePtr)
void XTpg_DisableMotion (XTpg *InstancePtr)
void XTpg_SetMotionSpeed (XTpg *InstancePtr, u32 MotionSpeed)
u32 XTpg_GetMotionSpeed (XTpg *InstancePtr)
void XTpg_SetCrosshairPosition (XTpg *InstancePtr, u16 HPos, u16 VPos)
void XTpg_GetCrosshairPosition (XTpg *InstancePtr, u16 *HPos, u16 *VPos)
void XTpg_SetZPlateHStart (XTpg *InstancePtr, u16 ZPlateHStart)
u16 XTpg_GetZPlateHStart (XTpg *InstancePtr)
void XTpg_SetZPlateHSpeed (XTpg *InstancePtr, u16 ZPlateHSpeed)
u16 XTpg_GetZPlateHSpeed (XTpg *InstancePtr)
void XTpg_SetZPlateVStart (XTpg *InstancePtr, u16 ZPlateVStart)
u16 XTpg_GetZPlateVStart (XTpg *InstancePtr)
void XTpg_SetZPlateVSpeed (XTpg *InstancePtr, u16 ZPlateVSpeed)
u16 XTpg_GetZPlateVSpeed (XTpg *InstancePtr)
int XTpg_SetBoxSize (XTpg *InstancePtr, u32 BoxSize)
u32 XTpg_GetBoxSize (XTpg *InstancePtr)
void XTpg_SetBoxColor (XTpg *InstancePtr, u16 Blue, u16 Green, u16 Red)
void XTpg_GetBoxColor (XTpg *InstancePtr, u16 *Blue, u16 *Green, u16 *Red)
void XTpg_SetStuckPixelThreshold (XTpg *InstancePtr, u32 PixelThreshold)
u32 XTpg_GetStuckPixelThreshold (XTpg *InstancePtr)
void XTpg_SetNoiseGain (XTpg *InstancePtr, u32 NoiseGain)
u32 XTpg_GetNoiseGain (XTpg *InstancePtr)
void XTpg_SetBayerPhase (XTpg *InstancePtr, enum BayerPhaseCombination BayerPhaseComb)
u32 XTpg_GetBayerPhase (XTpg *InstancePtr)
void XTpg_SetPattern (XTpg *InstancePtr, u32 Pattern)
u32 XTpg_GetPattern (XTpg *InstancePtr)
+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int XTpg_CfgInitialize (XTpg InstancePtr,
XTpg_Config CfgPtr,
u32  EffectiveAddr 
)
+
+
+ +

+This function initializes the TPG core. This function must be called prior to using the TPG core. Initialization of the TPG includes setting up the instance data and ensuring the hardware is in a quiescent state.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
CfgPtr is a reference to a structure containing information about a specific XTpg instace.
EffectiveAddr is the core base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the core physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead.
+
+
Returns:
- XST_SUCCESS if XTpg instance initialization was successful.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableBox (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Moving Box feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableCrossHair (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableMotion (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Motion feature in the Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTPg_DisableNoise (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Noise on the output by disabling this feature in Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableStuckPixel (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Stuck Pixel feature in the Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableBox (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Moving Box feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
    +
  • XTpg_SetBoxSize API should be used for setting box size.
  • XTpg_SetBoxColor API should be used for setting box color.
+
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableCrossHair (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
To draw the Cross Hairs, the position of drawing must be set by using XTpg_SetCrosshairPosition.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableMotion (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Motion Feature in the Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTPg_EnableNoise (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Noise on the output by setting value in Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
XTpg_SetNoiseGain API should be used to increase or decrease the noise produced on the output.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableStuckPixel (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Stuck Pixel Feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
XTpg_SetStuckPixelThreshold API should be used to set Stuck Pixel threshold value.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_GetActiveSize (XTpg InstancePtr,
u16 *  HSize,
u16 *  VSize 
)
+
+
+ +

+This function gets the number of Active Pixel per Scan line and number of Active Lines per Frame from the Active Size register.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HSize is a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned. (Range is 32 to 7680).
VSize is a pointer to 16-bit variable in which the number of Active Lines per Frame is returned. (Range is 32 to 7680).
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetBackground (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the background pattern for TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Background pattern is returned. The enum values for corresponding Background pattern value is
    +
  • 0x0 XTPG_PASS_THROUGH- Pass video input straight video output
  • 0x1 XTPG_H_RAMP - Horizontal ramp
  • 0x2 XTPG_V_RAMP - Vertical ramp
  • 0x3 XTPG_R_RAMP - Temporal ramp
  • 0x4 XTPG_RED_PLANE - Solid red output
  • 0x5 XTPG_GREEN_PLANE - Solid green output
  • 0x6 XTPG_BLUE_PLANE - Solid blue output
  • 0x7 XTPG_BLACK_PLANE - Solid black output
  • 0x8 XTPG_WHITE_PLANE - Solid white output
  • 0x9 XTPG_COLOR_BARS - Color bars
  • 0xA XTPG_ZONE_PLATE - Zone plate output (sinusoidal)
  • 0xB XTPG_TARAN_BARS - Tartan color bars
  • 0xC XTPG_CROSS_HATCH - Cross hatch pattern
  • 0xE XTPG_HV_RAMP - Horizontal vertical ramp
  • 0xF XTPG_BLACK_AND_WHITE_CHECKERBOARD - Black and white checker board
+
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetBayerPhase (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the Bayer phase value which indicates starting pixel position.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
BayerPhase is the starting pixel indicator is returned. Corresponding enum values for Bayer Phase are:
    +
  • Bayer Phase 0 - XTPG_BAYER_PHASE_RGRG.
  • Bayer Phase 1 - XTPG_BAYER_PHASE_GRGR.
  • Bayer Phase 2 - XTPG_BAYER_PHASE_GBGB.
  • Bayer Phase 3 - XTPG_BAYER_PHASE_BGBG.
  • Bayer Phase 4 - XTPG_BAYER_PHASE_TURNOFF.
  • It is a double buffered register.
+
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_GetBoxColor (XTpg InstancePtr,
u16 *  Blue,
u16 *  Green,
u16 *  Red 
)
+
+
+ +

+This function gets the color components of the box in the Box Color register of the TPG core.

+

Parameters:
+ + + + + +
InstancePtr is a pointer to the XTpg instance.
Blue is a pointer to 16 bit color component of the box in which blue or Y (for YCbCr mode) is returned.
Green is a pointer to 16 bit color component of the box in which Green or Cr (for YCbCr mode) is returned.
Red is a pointer to 16 bit color component of the box in which Red or Cb (for YCbCr mode) is returned.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetBoxSize (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the Box Size in pixel.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
BoxSize is the size of a box in pixel.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetComponentMask (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the color component mask status in the Pattern Control Register.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Color component value is returned. Corresponding enum values for Color component value is
    +
  • 0x0 XTPG_NOMASK - No masking.
  • 0x1 XTPG_MASKOUT_RED - Mask out red, Cr(for YCbCr mode) component.
  • 0x2 XTPG_MASKOUT_GREE- Mask out green,N Y(for YCbCr mode) component.
  • 0x4 XTPG_MASKOUT_BLUE- Mask out blue, Cb(for YCbCr mode) component.
+
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_GetCrosshairPosition (XTpg InstancePtr,
u16 *  HPos,
u16 *  VPos 
)
+
+
+ +

+This function gets the cross hair positions.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HPos is the row of the frame that will have horizontal line of Cross Hairs is returned.
VPos is the column of the frame that will have vertical line of Cross Hairs is returned.
+
+
Returns:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetMotionSpeed (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the Motion Speed.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
MotionSpeed, which indicates the speed that affects on test pattern changes from frame to frame is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetNoiseGain (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the noise gain of each component of TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
NoiseGain is a value to increase the noise added to each component.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetPattern (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the contents of the Pattern Control Register.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Contents of the Pattern Control Register is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetStuckPixelThreshold (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the stuck pixel threshold in the STUCK_PIXEL_THRESH register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Stuck pixel threshold is an upper limit for PRNG for insertion of stuck pixel is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetVersion (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the contents of the Version register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
Content of Version register is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateHSpeed (XTpg InstancePtr  ) 
+
+
+ +

+This function gets how fast (the speed of) horizontal component changes.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateHSpeed is speed of the horizontal component changes is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateHStart (XTpg InstancePtr  ) 
+
+
+ +

+This function gets a starting point in the ROM based sinusoidal values for the horizontal component.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateHStart is starting point in the ROM based sinusoidal value for horizontal component is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateVSpeed (XTpg InstancePtr  ) 
+
+
+ +

+This function gets how fast (the speed of) the vertical component changes.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateVSpeed is a 16 bit variable the speed of the vertical component changes is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateVStart (XTpg InstancePtr  ) 
+
+
+ +

+This function gets a starting point in the ROM based sinusoidal values for the vertical component.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateVStart is starting point in the ROM based sinusoidal value for vertical component is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_SetActiveSize (XTpg InstancePtr,
u16  HSize,
u16  VSize 
)
+
+
+ +

+This function sets the active H/V sizes in the Active Size register.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HSize specifies the number of Active Pixels per Scan Line that needs to be set (Range is 32 to 7680).
VSize specifies the number of Active Lines per Frame that needs to be set (Range is 32 to 7680).
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetBackground (XTpg InstancePtr,
enum BackgroundPattern  Pattern 
)
+
+
+ +

+This function sets the background pattern in the Pattern Control Register.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
Pattern is the pattern to be generated. The enum values to be used for the patterns are :
    +
  • XTPG_PASS_THROUGH- Pass video input straight through the video output
  • XTPG_H_RAMP - Horizontal ramp
  • XTPG_V_RAMP - Vertical ramp
  • XTPG_R_RAMP - Temporal ramp
  • XTPG_RED_PLANE - Solid red output
  • XTPG_GREEN_PLANE - Solid green output
  • XTPG_BLUE_PLANE - Solid blue output
  • XTPG_BLACK_PLANE - Solid black output
  • XTPG_WHITE_PLANE - Solid white output
  • XTPG_COLOR_BARS - Color bars
  • XTPG_ZONE_PLATE - Zone plate output(sinusoidal)
  • XTPG_TARAN_BARS - Tartan color bars
  • XTPG_CROSS_HATCH - Cross hatch pattern
  • XTPG_HV_RAMP - Horizontal vertical ramp
  • XTPG_BLACK_AND_WHITE_CHECKERBOARD - Black and white checker board
+
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetBayerPhase (XTpg InstancePtr,
enum BayerPhaseCombination  BayerPhaseComb 
)
+
+
+ +

+This function specifies or sets whether the starting position pixel(0,0) of the Bayer sampling grid is on a red-green or blue-green line and whether the first pixel is green or not.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
BayerPhaseComb is Bayer phase value to be set to identify starting pixel position. The enum values of Bayer phase are
    +
  • Bayer Phase 0 - XTPG_BAYER_PHASE_RGRG.
  • Bayer Phase 1 - XTPG_BAYER_PHASE_GRGR.
  • Bayer Phase 2 - XTPG_BAYER_PHASE_GBGB.
  • Bayer Phase 3 - XTPG_BAYER_PHASE_BGBG.
  • Bayer Phase 4 - XTPG_BAYER_PHASE_TURNOFF.
  • It is a double buffered register.
+
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_SetBoxColor (XTpg InstancePtr,
u16  Blue,
u16  Green,
u16  Red 
)
+
+
+ +

+This function sets the color components of the box in the Box Color register of the TPG core.

+

Parameters:
+ + + + + +
InstancePtr is a pointer to the XTpg instance.
Blue is the color component of the box which needs to be set.
Green is the color component of the box which needs to be set.
Red is the color component of the box which needs to be set.
+
+
Returns:
None.
+
Note:
XTpg_EnableBox API should be used to enable the Box feature.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int XTpg_SetBoxSize (XTpg InstancePtr,
u32  BoxSize 
)
+
+
+ +

+This function sets the Box Size.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
BoxSize is size of the box in pixel.
+
+
Returns:
-XST_SUCCESS if BoxSize is less than active size. -XST_FAILURE if BoxSize is greater than active size.
+
Note:
    +
  • The size of the box has to be set smaller than the frame size that is set in the ACTIVE_SIZE register.
  • XTpg_EnableBox API should be used to enable the Box feature.
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetComponentMask (XTpg InstancePtr,
enum ComponentMask  Mask 
)
+
+
+ +

+This function masks out the specified color component by setting the Pattern Control Register of the TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
Mask specifies the ComponentMask that needs to be set. the enum values as
    +
  • XTPG_NOMASK, - No masking.
  • XTPG_MASKOUT_RED, - Mask out red, Cr(for YCbCr mode) component.
  • XTPG_MASKOUT_GREEN, - Mask out green, Y(for YCbCr mode) component.
  • XTPG_MASKOUT_BLUE - Mask out blue, Cb(for YCbCr mode) component.
+
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_SetCrosshairPosition (XTpg InstancePtr,
u16  HPos,
u16  VPos 
)
+
+
+ +

+This function sets the Cross Hairs Positions.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HPos is the row of the frame that will have horizontal line of Cross Hairs that need to be set.
VPos is the column of the frame that will have vertical line of Cross Hairs that need to be set.
+
+
Returns:
None.
+
Note:
Cross hair feature should be enabled by using the API XTpg_EnableCrossHair
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetMotionSpeed (XTpg InstancePtr,
u32  MotionSpeed 
)
+
+
+ +

+This function sets the Motion Speed.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
MotionSpeed is how fast the temporal features of supported test pattern changes from frame to frame which need to be set. Range is 0 to 255.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetNoiseGain (XTpg InstancePtr,
u32  NoiseGain 
)
+
+
+ +

+This function sets the noise gain in Noise Gain register of the TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
NoiseGain is a value to increase the noise added to each component which needs to be set.
+
+
Returns:
None.
+
Note:
- XTPg_EnableNoise API should be used to enable Noise feature.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetPattern (XTpg InstancePtr,
u32  Pattern 
)
+
+
+ +

+This function sets the Pattern Control Register of TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
Pattern is the 32 bit value to be written to the Pattern Control Register.
+
+
Returns:
None.
+
Note:
This API is used for writing the complete Pattern Control Register. Use the following APIs for the individual patterns separately
    +
  • XTpg_SetBackground
  • XTpg_EnableCrossHair
  • XTpg_DisableCrossHair
  • XTpg_EnableBox
  • XTpg_DisableBox
  • XTpg_SetComponentMask
  • XTpg_EnableStuckPixel
  • XTpg_DisableStuckPixel
  • XTPg_EnableNoise
  • XTPg_DisableNoise
  • XTpg_EnableMotion
  • XTpg_DisableMotion
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetStuckPixelThreshold (XTpg InstancePtr,
u32  PixelThreshold 
)
+
+
+ +

+This function sets the stuck pixel threshold in STUCK_PIXEL_THRESH register of the TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
PixelThreshold is an upper limit for PRNG for insertion of stuck pixel which needs to be set.
+
+
Returns:
None.
+
Note:
- XTpg_EnableStuckPixel API should be used to enable Stuck Pixel threshold value.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_Setup (XTpg InstancePtr  ) 
+
+
+ +

+This function sets the input/output frame size in Active Size register and enables the register update.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateHSpeed (XTpg InstancePtr,
u16  ZPlateHSpeed 
)
+
+
+ +

+This function sets how fast (the speed of) the horizontal component changes.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateHSpeed is the speed of the horizontal component changes which need to be set.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateHStart (XTpg InstancePtr,
u16  ZPlateHStart 
)
+
+
+ +

+This function sets a starting point in the ROM based sinusoidal values for the horizontal component.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateHStart is starting point in the ROM based sinusoidal value for horizontal component.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateVSpeed (XTpg InstancePtr,
u16  ZPlateVSpeed 
)
+
+
+ +

+This function sets how fast (the speed of) the vertical component changes.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateVSpeed is the speed of the vertical component changes which need to be set.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateVStart (XTpg InstancePtr,
u16  ZPlateVStart 
)
+
+
+ +

+This function sets a starting point in the ROM based sinusoidal values for the vertical component.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateVStart is starting point in the ROM based sinusoidal value for vertical component which need to be set.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8h.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8h.html new file mode 100755 index 00000000..506b6f0e --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg_8h.html @@ -0,0 +1,2541 @@ + + + + + xtpg.h File Reference + + + +

+Software Drivers +
+ + + +

xtpg.h File Reference

+

+#include "xil_assert.h"
+#include "xstatus.h"
+#include "xtpg_hw.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Classes

struct  XTpg_Config
struct  XTpg

Motion Speed Ranges

#define XTPG_MOTION_SPEED_MIN   0
#define XTPG_MOTION_SPEED_MAX   255

Active Size Ranges

#define XTPG_VSIZE_FIRST   32
#define XTPG_VSIZE_LAST   7680
#define XTPG_HSIZE_FIRST   32
#define XTPG_HSIZE_LAST   7680

Macros for operating a TPG core

#define XTpg_Enable(InstancePtr)
#define XTpg_Disable(InstancePtr)
#define XTpg_Start   XTpg_Enable
#define XTpg_Stop   XTpg_Disable
#define XTpg_RegUpdateEnable(InstancePtr)
#define XTpg_RegUpdateDisable(InstancePtr)
#define XTpg_SyncReset(InstancePtr)
#define XTpg_Reset(InstancePtr)
#define XTpg_IntrEnable(InstancePtr, IntrType)
#define XTpg_IntrDisable(InstancePtr, IntrType)
#define XTpg_StatusGetPending(InstancePtr)
#define XTpg_IntrGetPending(InstancePtr)
#define XTpg_IntrClear(InstancePtr, IntrType)

Handler Types

enum  { XTPG_HANDLER_PROCSTART = 1, +XTPG_HANDLER_FRAMEDONE, +XTPG_HANDLER_ERROR + }

BackgroundPattern

enum  BackgroundPattern {
+  XTPG_PASS_THROUGH, +XTPG_H_RAMP, +XTPG_V_RAMP, +XTPG_T_RAMP, +
+  XTPG_RED_PLANE, +XTPG_GREEN_PLANE, +XTPG_BLUE_PLANE, +XTPG_BLACK_PLANE, +
+  XTPG_WHITE_PLANE, +XTPG_COLOR_BARS, +XTPG_ZONE_PLATE, +XTPG_TARAN_BARS, +
+  XTPG_CROSS_HATCH, +XTPG_HV_RAMP = 0xE, +XTPG_BLACK_AND_WHITE_CHECKERBOARD +
+ }

ComponentMask

enum  ComponentMask { XTPG_NOMASK, +XTPG_MASKOUT_RED, +XTPG_MASKOUT_GREEN, +XTPG_MASKOUT_BLUE = 0x4 + }

Bayer phase combinations

enum  BayerPhaseCombination {
+  XTPG_BAYER_PHASE_RGRG, +XTPG_BAYER_PHASE_GRGR, +XTPG_BAYER_PHASE_GBGB, +XTPG_BAYER_PHASE_BGBG, +
+  XTPG_BAYER_PHASE_TURNOFF +
+ }

Defines

#define XTPG_H_

Typedefs

typedef void(*) XTpg_CallBack (void *CallBackRef)
typedef void(*) XTpg_ErrorCallBack (void *CallBackRef, u32 ErrorMask)

Functions

XTpg_ConfigXTpg_LookupConfig (u16 DeviceId)
int XTpg_CfgInitialize (XTpg *InstancePtr, XTpg_Config *CfgPtr, u32 EffectiveAddr)
void XTpg_Setup (XTpg *InstancePtr)
u32 XTpg_GetVersion (XTpg *InstancePtr)
void XTpg_SetActiveSize (XTpg *InstancePtr, u16 HSize, u16 VSize)
void XTpg_GetActiveSize (XTpg *InstancePtr, u16 *HSize, u16 *VSize)
void XTpg_SetPattern (XTpg *InstancePtr, u32 Pattern)
u32 XTpg_GetPattern (XTpg *InstancePtr)
void XTpg_SetBackground (XTpg *InstancePtr, enum BackgroundPattern Pattern)
u32 XTpg_GetBackground (XTpg *InstancePtr)
void XTpg_EnableCrossHair (XTpg *InstancePtr)
void XTpg_DisableCrossHair (XTpg *InstancePtr)
void XTpg_EnableMotion (XTpg *InstancePtr)
void XTpg_DisableMotion (XTpg *InstancePtr)
void XTpg_EnableBox (XTpg *InstancePtr)
void XTpg_DisableBox (XTpg *InstancePtr)
void XTpg_SetComponentMask (XTpg *InstancePtr, enum ComponentMask Mask)
u32 XTpg_GetComponentMask (XTpg *InstancePtr)
void XTpg_EnableStuckPixel (XTpg *InstancePtr)
void XTpg_DisableStuckPixel (XTpg *InstancePtr)
void XTPg_EnableNoise (XTpg *InstancePtr)
void XTPg_DisableNoise (XTpg *InstancePtr)
void XTpg_SetMotionSpeed (XTpg *InstancePtr, u32 MotionSpeed)
u32 XTpg_GetMotionSpeed (XTpg *InstancePtr)
void XTpg_SetCrosshairPosition (XTpg *InstancePtr, u16 HPos, u16 VPos)
void XTpg_GetCrosshairPosition (XTpg *InstancePtr, u16 *HPos, u16 *VPos)
void XTpg_SetZPlateHStart (XTpg *InstancePtr, u16 ZPlateHStart)
u16 XTpg_GetZPlateHStart (XTpg *InstancePtr)
void XTpg_SetZPlateHSpeed (XTpg *InstancePtr, u16 ZPlateHSpeed)
u16 XTpg_GetZPlateHSpeed (XTpg *InstancePtr)
void XTpg_SetZPlateVStart (XTpg *InstancePtr, u16 ZPlateVStart)
u16 XTpg_GetZPlateVStart (XTpg *InstancePtr)
void XTpg_SetZPlateVSpeed (XTpg *InstancePtr, u16 ZPlateVSpeed)
u16 XTpg_GetZPlateVSpeed (XTpg *InstancePtr)
int XTpg_SetBoxSize (XTpg *InstancePtr, u32 BoxSize)
u32 XTpg_GetBoxSize (XTpg *InstancePtr)
void XTpg_SetBoxColor (XTpg *InstancePtr, u16 Blue, u16 Green, u16 Red)
void XTpg_GetBoxColor (XTpg *InstancePtr, u16 *Blue, u16 *Green, u16 *Red)
void XTpg_SetStuckPixelThreshold (XTpg *InstancePtr, u32 PixelThreshold)
u32 XTpg_GetStuckPixelThreshold (XTpg *InstancePtr)
void XTpg_SetNoiseGain (XTpg *InstancePtr, u32 NoiseGain)
u32 XTpg_GetNoiseGain (XTpg *InstancePtr)
void XTpg_SetBayerPhase (XTpg *InstancePtr, enum BayerPhaseCombination BayerPhaseComb)
u32 XTpg_GetBayerPhase (XTpg *InstancePtr)
int XTpg_SelfTest (XTpg *InstancePtr)
void XTpg_IntrHandler (void *InstancePtr)
int XTpg_SetCallBack (XTpg *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
+


Define Documentation

+ +
+
+ + + + + + + + + +
#define XTpg_Disable (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \
+                (XTPG_CONTROL_OFFSET), \
+                        (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                                (XTPG_CONTROL_OFFSET)) & \
+                                        (~(XTPG_CTL_SW_EN_MASK))))
+
This function macro disables the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_Disable(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + + + + + + +
#define XTpg_Enable (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \
+                (XTPG_CONTROL_OFFSET), \
+                        (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                                (XTPG_CONTROL_OFFSET)) | (XTPG_CTL_SW_EN_MASK)))
+
This function macro enables the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_Enable(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + +
#define XTPG_H_
+
+
+ +

+Prevent circular inclusions by using protection macros +

+

+ +

+
+ + + + +
#define XTPG_HSIZE_FIRST   32
+
+
+ +

+Horizontal Size starting value +

+

+ +

+
+ + + + +
#define XTPG_HSIZE_LAST   7680
+
+
+ +

+Horizontal Size ending value +

+

+ +

+
+ + + + + + + + + + + + +
#define XTpg_IntrClear (InstancePtr,
IntrType   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \
+                                (XTPG_STATUS_OFFSET),\
+                (IntrType) & ((u32)(XTPG_IXR_ALLINTR_MASK)))
+
This function macro clears/acknowledges pending interrupts of the TPG core in the Status register. Bit positions of 1 will be cleared.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance to be worked on.
IntrType is the pending interrupts to clear/acknowledge. Use OR'ing of XTPG_IXR_*_MASK constants defined in xtpg_hw.h to create this parameter value.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_IntrClear(XTpg *InstancePtr, u32 IntrType)
+ +
+

+ +

+
+ + + + + + + + + + + + +
#define XTpg_IntrDisable (InstancePtr,
IntrType   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, (XTPG_IRQ_EN_OFFSET),\
+                XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                        (XTPG_IRQ_EN_OFFSET)) & ((~(IntrType)) & \
+                                (XTPG_IXR_ALLINTR_MASK)))
+
This function macro disables individual interrupts of the TPG core by updating the IRQ_ENABLE register.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance to be worked on.
IntrType is the bit-mask of the interrupts to be disabled. Bit positions of 1 will be disabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XTPG_IXR_*_MASK bits defined in xtpg_hw.h.
+
+
Returns:
None.
+
Note:
Any other interrupt not covered by parameter IntrType, if enabled before this macro is called, will remain enabled. C-style signature: void XTpg_IntrDisable(XTpg *InstancePtr, u32 IntrType)
+ +
+

+ +

+
+ + + + + + + + + + + + +
#define XTpg_IntrEnable (InstancePtr,
IntrType   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, (XTPG_IRQ_EN_OFFSET),\
+                ((IntrType) & (XTPG_IXR_ALLINTR_MASK)) | \
+                        (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                                (XTPG_IRQ_EN_OFFSET))))
+
This function macro enables individual interrupts of the TPG core by updating the IRQ_ENABLE register.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance to be worked on.
IntrType is the bit-mask of the interrupts to be enabled. Bit positions of 1 will be enabled. Bit positions of 0 will keep the previous setting. This mask is formed by OR'ing XTPG_IXR_*_MASK bits defined in xtpg_hw.h.
+
+
Returns:
None.
+
Note:
The existing enabled interrupt(s) will remain enabled. C-style signature: void XTpg_IntrEnable(XTpg *InstancePtr, u32 IntrType)
+ +
+

+ +

+
+ + + + + + + + + +
#define XTpg_IntrGetPending (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                                (XTPG_IRQ_EN_OFFSET)) &\
+                (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                        (XTPG_STATUS_OFFSET)) & ((u32)XTPG_IXR_ALLINTR_MASK))
+
This function macro returns the pending interrupts of the TPG core for the interrupts that have been enabled.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
The pending interrupts of the TPG. Use XTPG_IXR_*_MASK constants defined in xtpg_hw.h to interpret this value. The returned value is a logical AND of the contents of the Status Register and the IRQ_ENABLE Register.
+
Note:
C-style signature: u32 XTpg_IntrGetPending(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + +
#define XTPG_MOTION_SPEED_MAX   255
+
+
+ +

+Motion Speed maximum value +

+

+ +

+
+ + + + +
#define XTPG_MOTION_SPEED_MIN   0
+
+
+ +

+Motion Speed minimum value +

+

+ +

+
+ + + + + + + + + +
#define XTpg_RegUpdateDisable (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \
+                (XTPG_CONTROL_OFFSET), \
+                        (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                        (XTPG_CONTROL_OFFSET)) & (~(XTPG_CTL_RUE_MASK))))
+
This function macro prevents the TPG core from committing recent changes made so far by the software. When disabled, changes to other configuration registers are stored, but do not effect the behavior of the core.

+This function only works when the TPG core is enabled.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_RegUpdateDisable(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + + + + + + +
#define XTpg_RegUpdateEnable (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \
+                (XTPG_CONTROL_OFFSET), \
+                        (XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                                (XTPG_CONTROL_OFFSET)) | (XTPG_CTL_RUE_MASK)))
+
This function macro commits all the register value changes made so far by the software to the TPG core.

+This function only works when the TPG core is enabled.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_RegUpdateEnable(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + + + + + + +
#define XTpg_Reset (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_WriteReg((InstancePtr)->Config.BaseAddress, \
+                (XTPG_CONTROL_OFFSET), (XTPG_CTL_RESET_MASK))
+
This function macro resets a TPG core. This reset effects the core immediately and may cause image tearing.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
This reset resets the TPG configuration registers. C-style signature: void XTpg_Reset(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + +
#define XTpg_Start   XTpg_Enable
+
+
+ +

+This function macro enables/starts the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_Start(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + + + + + + +
#define XTpg_StatusGetPending (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_ReadReg((InstancePtr)->Config.BaseAddress, \
+                                (XTPG_STATUS_OFFSET)) & \
+                                        (XTPG_IXR_ALLINTR_MASK)
+
This function macro returns the pending interrupt status of the TPG core read from the Status register.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
The pending interrupts of the TPG. Use XTPG_IXR_*_MASK constants defined in xtpg_hw.h to interpret this value.
+
Note:
C-style signature: u32 XTpg_StatusGePending(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + +
#define XTpg_Stop   XTpg_Disable
+
+
+ +

+This function macro disables/stops the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_Stop(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + + + + + + +
#define XTpg_SyncReset (InstancePtr   ) 
+
+
+ +

+Value:

XTpg_WriteReg(((InstancePtr)->Config.BaseAddress), \
+                (XTPG_CONTROL_OFFSET), (XTPG_CTL_AUTORESET_MASK))
+
This function macro resets a TPG core at the end of the frame being processed. It enables core automatically synchronizes to the SOF of the core to prevent image tearing. This function macro is differ from XTpg_Reset().

+On the next rising-edge of SOF following a call to XTpg_SyncReset(), all of the core's configuration registers and outputs will be reset, then the reset flag will be immediately released, allowing the core to immediately resume default operation.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_SyncReset(XTpg *InstancePtr)
+ +
+

+ +

+
+ + + + +
#define XTPG_VSIZE_FIRST   32
+
+
+ +

+Vertical Size starting value +

+

+ +

+
+ + + + +
#define XTPG_VSIZE_LAST   7680
+
+
+ +

+Vertical Size ending value +

+

+


Typedef Documentation

+ +
+
+ + + + +
typedef void(*) XTpg_CallBack(void *CallBackRef)
+
+
+ +

+Callback type for all interrupts except error interrupt.

+

Parameters:
+ + +
CallBackRef is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
+
+ +
+

+ +

+
+ + + + +
typedef void(*) XTpg_ErrorCallBack(void *CallBackRef, u32 ErrorMask)
+
+
+ +

+Callback type for Error interrupt.

+

Parameters:
+ + + +
CallBackRef is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked.
ErrorMask is a bit mask indicating the cause of the error. Its value equals 'OR'ing one or more XTPG_IXR_*_MASK values defined in xtpg_hw.h.
+
+ +
+

+


Enumeration Type Documentation

+ +
+
+ + + + +
anonymous enum
+
+
+ +

+These constants specify different types of handlers and used to differentiate interrupt requests from core.

Enumerator:
+ + + + +
XTPG_HANDLER_PROCSTART  +A processing start event interrupt type
XTPG_HANDLER_FRAMEDONE  +A frame done event interrupt type
XTPG_HANDLER_ERROR  +An error condition event interrupt type
+
+ +
+

+ +

+
+ + + + +
enum BackgroundPattern
+
+
+ +

+These constants specify different types of background patterns supported by the core.

Enumerator:
+ + + + + + + + + + + + + + + + +
XTPG_PASS_THROUGH  +Pass video input straight through the video output
XTPG_H_RAMP  +Horizontal ramp
XTPG_V_RAMP  +Vertical ramp
XTPG_T_RAMP  +Temporal ramp
XTPG_RED_PLANE  +Solid red output
XTPG_GREEN_PLANE  +Solid green output
XTPG_BLUE_PLANE  +Solid blue output
XTPG_BLACK_PLANE  +Solid black output
XTPG_WHITE_PLANE  +Solid white output
XTPG_COLOR_BARS  +Color bars
XTPG_ZONE_PLATE  +Zone plate output (sinusoidal)
XTPG_TARAN_BARS  +Tartan color bars
XTPG_CROSS_HATCH  +Cross hatch pattern
XTPG_HV_RAMP  +Horizontal vertical ramp
XTPG_BLACK_AND_WHITE_CHECKERBOARD  +Black and white checker board
+
+ +
+

+ +

+
+ + + + +
enum BayerPhaseCombination
+
+
+ +

+These constants specify Bayer phase combinations of the core.

Enumerator:
+ + + + + + +
XTPG_BAYER_PHASE_RGRG  +Red green combination
XTPG_BAYER_PHASE_GRGR  +Green red combination
XTPG_BAYER_PHASE_GBGB  +Green blue combination
XTPG_BAYER_PHASE_BGBG  +Blue green combination
XTPG_BAYER_PHASE_TURNOFF  +Turn off the Bayer phase
+
+ +
+

+ +

+
+ + + + +
enum ComponentMask
+
+
+ +

+These constants specify mask outs for a particular color component.

Enumerator:
+ + + + + +
XTPG_NOMASK  +No masking
XTPG_MASKOUT_RED  +Mask out red, Cr(for YCbCr mode) component
XTPG_MASKOUT_GREEN  +Mask out green, Y( for YCbCr mode) component
XTPG_MASKOUT_BLUE  +Mask out blue, Cr(for YCbCr mode) component
+
+ +
+

+


Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int XTpg_CfgInitialize (XTpg InstancePtr,
XTpg_Config CfgPtr,
u32  EffectiveAddr 
)
+
+
+ +

+This function initializes the TPG core. This function must be called prior to using the TPG core. Initialization of the TPG includes setting up the instance data and ensuring the hardware is in a quiescent state.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
CfgPtr is a reference to a structure containing information about a specific XTpg instace.
EffectiveAddr is the core base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the core physical base address unchanged once this function is invoked. Unexpected errors may occur if the address mapping changes after this function is called. If address translation is not used, pass in the physical address instead.
+
+
Returns:
- XST_SUCCESS if XTpg instance initialization was successful.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableBox (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Moving Box feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableCrossHair (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableMotion (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Motion feature in the Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTPg_DisableNoise (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Noise on the output by disabling this feature in Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_DisableStuckPixel (XTpg InstancePtr  ) 
+
+
+ +

+This function disables the Stuck Pixel feature in the Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableBox (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Moving Box feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
    +
  • XTpg_SetBoxSize API should be used for setting box size.
  • XTpg_SetBoxColor API should be used for setting box color.
+
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableCrossHair (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the drawing of Cross Hairs feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
To draw the Cross Hairs, the position of drawing must be set by using XTpg_SetCrosshairPosition.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableMotion (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Motion Feature in the Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTPg_EnableNoise (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Noise on the output by setting value in Pattern Control register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
XTpg_SetNoiseGain API should be used to increase or decrease the noise produced on the output.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_EnableStuckPixel (XTpg InstancePtr  ) 
+
+
+ +

+This function enables the Stuck Pixel Feature in the Pattern Control Register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
XTpg_SetStuckPixelThreshold API should be used to set Stuck Pixel threshold value.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_GetActiveSize (XTpg InstancePtr,
u16 *  HSize,
u16 *  VSize 
)
+
+
+ +

+This function gets the number of Active Pixel per Scan line and number of Active Lines per Frame from the Active Size register.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HSize is a pointer to 16-bit variable in which the number of Active Pixels per Scan Line is returned. (Range is 32 to 7680).
VSize is a pointer to 16-bit variable in which the number of Active Lines per Frame is returned. (Range is 32 to 7680).
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetBackground (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the background pattern for TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Background pattern is returned. The enum values for corresponding Background pattern value is
    +
  • 0x0 XTPG_PASS_THROUGH- Pass video input straight video output
  • 0x1 XTPG_H_RAMP - Horizontal ramp
  • 0x2 XTPG_V_RAMP - Vertical ramp
  • 0x3 XTPG_R_RAMP - Temporal ramp
  • 0x4 XTPG_RED_PLANE - Solid red output
  • 0x5 XTPG_GREEN_PLANE - Solid green output
  • 0x6 XTPG_BLUE_PLANE - Solid blue output
  • 0x7 XTPG_BLACK_PLANE - Solid black output
  • 0x8 XTPG_WHITE_PLANE - Solid white output
  • 0x9 XTPG_COLOR_BARS - Color bars
  • 0xA XTPG_ZONE_PLATE - Zone plate output (sinusoidal)
  • 0xB XTPG_TARAN_BARS - Tartan color bars
  • 0xC XTPG_CROSS_HATCH - Cross hatch pattern
  • 0xE XTPG_HV_RAMP - Horizontal vertical ramp
  • 0xF XTPG_BLACK_AND_WHITE_CHECKERBOARD - Black and white checker board
+
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetBayerPhase (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the Bayer phase value which indicates starting pixel position.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
BayerPhase is the starting pixel indicator is returned. Corresponding enum values for Bayer Phase are:
    +
  • Bayer Phase 0 - XTPG_BAYER_PHASE_RGRG.
  • Bayer Phase 1 - XTPG_BAYER_PHASE_GRGR.
  • Bayer Phase 2 - XTPG_BAYER_PHASE_GBGB.
  • Bayer Phase 3 - XTPG_BAYER_PHASE_BGBG.
  • Bayer Phase 4 - XTPG_BAYER_PHASE_TURNOFF.
  • It is a double buffered register.
+
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_GetBoxColor (XTpg InstancePtr,
u16 *  Blue,
u16 *  Green,
u16 *  Red 
)
+
+
+ +

+This function gets the color components of the box in the Box Color register of the TPG core.

+

Parameters:
+ + + + + +
InstancePtr is a pointer to the XTpg instance.
Blue is a pointer to 16 bit color component of the box in which blue or Y (for YCbCr mode) is returned.
Green is a pointer to 16 bit color component of the box in which Green or Cr (for YCbCr mode) is returned.
Red is a pointer to 16 bit color component of the box in which Red or Cb (for YCbCr mode) is returned.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetBoxSize (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the Box Size in pixel.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
BoxSize is the size of a box in pixel.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetComponentMask (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the color component mask status in the Pattern Control Register.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Color component value is returned. Corresponding enum values for Color component value is
    +
  • 0x0 XTPG_NOMASK - No masking.
  • 0x1 XTPG_MASKOUT_RED - Mask out red, Cr(for YCbCr mode) component.
  • 0x2 XTPG_MASKOUT_GREE- Mask out green,N Y(for YCbCr mode) component.
  • 0x4 XTPG_MASKOUT_BLUE- Mask out blue, Cb(for YCbCr mode) component.
+
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_GetCrosshairPosition (XTpg InstancePtr,
u16 *  HPos,
u16 *  VPos 
)
+
+
+ +

+This function gets the cross hair positions.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HPos is the row of the frame that will have horizontal line of Cross Hairs is returned.
VPos is the column of the frame that will have vertical line of Cross Hairs is returned.
+
+
Returns:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetMotionSpeed (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the Motion Speed.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
MotionSpeed, which indicates the speed that affects on test pattern changes from frame to frame is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetNoiseGain (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the noise gain of each component of TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
NoiseGain is a value to increase the noise added to each component.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetPattern (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the contents of the Pattern Control Register.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Contents of the Pattern Control Register is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetStuckPixelThreshold (XTpg InstancePtr  ) 
+
+
+ +

+This function gets the stuck pixel threshold in the STUCK_PIXEL_THRESH register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
Stuck pixel threshold is an upper limit for PRNG for insertion of stuck pixel is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u32 XTpg_GetVersion (XTpg InstancePtr  ) 
+
+
+ +

+This function returns the contents of the Version register of the TPG core.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance to be worked on.
+
+
Returns:
Content of Version register is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateHSpeed (XTpg InstancePtr  ) 
+
+
+ +

+This function gets how fast (the speed of) horizontal component changes.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateHSpeed is speed of the horizontal component changes is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateHStart (XTpg InstancePtr  ) 
+
+
+ +

+This function gets a starting point in the ROM based sinusoidal values for the horizontal component.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateHStart is starting point in the ROM based sinusoidal value for horizontal component is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateVSpeed (XTpg InstancePtr  ) 
+
+
+ +

+This function gets how fast (the speed of) the vertical component changes.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateVSpeed is a 16 bit variable the speed of the vertical component changes is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
u16 XTpg_GetZPlateVStart (XTpg InstancePtr  ) 
+
+
+ +

+This function gets a starting point in the ROM based sinusoidal values for the vertical component.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
ZPlateVStart is starting point in the ROM based sinusoidal value for vertical component is returned.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_IntrHandler (void *  InstancePtr  ) 
+
+
+ +

+This function is the interrupt handler for the TPG driver.

+This handler reads the pending interrupt from the STATUS register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE register, and finally clears the interrupts.

+The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XTpg_SetCallBack() during initialization phase.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance that just interrupted.
+
+
Returns:
None.
+
Note:
Interrupt interface should be enabled.
+ +
+

+ +

+
+ + + + + + + + + +
XTpg_Config* XTpg_LookupConfig (u16  DeviceId  ) 
+
+
+ +

+This function returns a reference to an XTpg_Config structure based on the unique device id, DeviceId. The return value will refer to an entry in the device configuration table defined in the xtpg_g.c file.

+

Parameters:
+ + +
DeviceId is the unique Device ID of the device for the lookup operation.
+
+
Returns:
CfgPtr is a reference to a config record in the configuration table (in xtpg_g.c) corresponding to DeviceId, or NULL if no match is found.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + +
int XTpg_SelfTest (XTpg InstancePtr  ) 
+
+
+ +

+This function reads Version register of TPG core and compares with zero as part of self test.

+

Parameters:
+ + +
InstancePtr is a pointer to the TPG instance.
+
+
Returns:
    +
  • XST_SUCCESS if the Version register read test was successful.
  • XST_FAILURE if the Version register read test failed.
+
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_SetActiveSize (XTpg InstancePtr,
u16  HSize,
u16  VSize 
)
+
+
+ +

+This function sets the active H/V sizes in the Active Size register.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HSize specifies the number of Active Pixels per Scan Line that needs to be set (Range is 32 to 7680).
VSize specifies the number of Active Lines per Frame that needs to be set (Range is 32 to 7680).
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetBackground (XTpg InstancePtr,
enum BackgroundPattern  Pattern 
)
+
+
+ +

+This function sets the background pattern in the Pattern Control Register.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
Pattern is the pattern to be generated. The enum values to be used for the patterns are :
    +
  • XTPG_PASS_THROUGH- Pass video input straight through the video output
  • XTPG_H_RAMP - Horizontal ramp
  • XTPG_V_RAMP - Vertical ramp
  • XTPG_R_RAMP - Temporal ramp
  • XTPG_RED_PLANE - Solid red output
  • XTPG_GREEN_PLANE - Solid green output
  • XTPG_BLUE_PLANE - Solid blue output
  • XTPG_BLACK_PLANE - Solid black output
  • XTPG_WHITE_PLANE - Solid white output
  • XTPG_COLOR_BARS - Color bars
  • XTPG_ZONE_PLATE - Zone plate output(sinusoidal)
  • XTPG_TARAN_BARS - Tartan color bars
  • XTPG_CROSS_HATCH - Cross hatch pattern
  • XTPG_HV_RAMP - Horizontal vertical ramp
  • XTPG_BLACK_AND_WHITE_CHECKERBOARD - Black and white checker board
+
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetBayerPhase (XTpg InstancePtr,
enum BayerPhaseCombination  BayerPhaseComb 
)
+
+
+ +

+This function specifies or sets whether the starting position pixel(0,0) of the Bayer sampling grid is on a red-green or blue-green line and whether the first pixel is green or not.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
BayerPhaseComb is Bayer phase value to be set to identify starting pixel position. The enum values of Bayer phase are
    +
  • Bayer Phase 0 - XTPG_BAYER_PHASE_RGRG.
  • Bayer Phase 1 - XTPG_BAYER_PHASE_GRGR.
  • Bayer Phase 2 - XTPG_BAYER_PHASE_GBGB.
  • Bayer Phase 3 - XTPG_BAYER_PHASE_BGBG.
  • Bayer Phase 4 - XTPG_BAYER_PHASE_TURNOFF.
  • It is a double buffered register.
+
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_SetBoxColor (XTpg InstancePtr,
u16  Blue,
u16  Green,
u16  Red 
)
+
+
+ +

+This function sets the color components of the box in the Box Color register of the TPG core.

+

Parameters:
+ + + + + +
InstancePtr is a pointer to the XTpg instance.
Blue is the color component of the box which needs to be set.
Green is the color component of the box which needs to be set.
Red is the color component of the box which needs to be set.
+
+
Returns:
None.
+
Note:
XTpg_EnableBox API should be used to enable the Box feature.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
int XTpg_SetBoxSize (XTpg InstancePtr,
u32  BoxSize 
)
+
+
+ +

+This function sets the Box Size.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
BoxSize is size of the box in pixel.
+
+
Returns:
-XST_SUCCESS if BoxSize is less than active size. -XST_FAILURE if BoxSize is greater than active size.
+
Note:
    +
  • The size of the box has to be set smaller than the frame size that is set in the ACTIVE_SIZE register.
  • XTpg_EnableBox API should be used to enable the Box feature.
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int XTpg_SetCallBack (XTpg InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)
+
+
+ +

+This function installs an asynchronous callback function for the given HandlerType.

+

+ HandlerType              Callback Function Type
+ -----------------------  ----------------------
+ XTPG_HANDLER_FRAMEDONE   FrameDoneCallBack
+ XTPG_HANDLER_PROCSTART   ProcStartCallBack
+ XTPG_HANDLER_ERROR       ErrCallBack

+

 

+

Parameters:
+ + + + + +
InstancePtr is a pointer to the XTpg instance to be worked on.
HandlerType specifies which callback is to be attached.
CallBackFunc is the address of the callback function.
CallBackRef is a user data item that will be passed to the callback function when it is invoked.
+
+
Returns:
    +
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
+
+
Note:
Invoking this function for a handler that already has been installed replaces it with the new handler.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetComponentMask (XTpg InstancePtr,
enum ComponentMask  Mask 
)
+
+
+ +

+This function masks out the specified color component by setting the Pattern Control Register of the TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
Mask specifies the ComponentMask that needs to be set. the enum values as
    +
  • XTPG_NOMASK, - No masking.
  • XTPG_MASKOUT_RED, - Mask out red, Cr(for YCbCr mode) component.
  • XTPG_MASKOUT_GREEN, - Mask out green, Y(for YCbCr mode) component.
  • XTPG_MASKOUT_BLUE - Mask out blue, Cb(for YCbCr mode) component.
+
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void XTpg_SetCrosshairPosition (XTpg InstancePtr,
u16  HPos,
u16  VPos 
)
+
+
+ +

+This function sets the Cross Hairs Positions.

+

Parameters:
+ + + + +
InstancePtr is a pointer to the XTpg instance.
HPos is the row of the frame that will have horizontal line of Cross Hairs that need to be set.
VPos is the column of the frame that will have vertical line of Cross Hairs that need to be set.
+
+
Returns:
None.
+
Note:
Cross hair feature should be enabled by using the API XTpg_EnableCrossHair
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetMotionSpeed (XTpg InstancePtr,
u32  MotionSpeed 
)
+
+
+ +

+This function sets the Motion Speed.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
MotionSpeed is how fast the temporal features of supported test pattern changes from frame to frame which need to be set. Range is 0 to 255.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetNoiseGain (XTpg InstancePtr,
u32  NoiseGain 
)
+
+
+ +

+This function sets the noise gain in Noise Gain register of the TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
NoiseGain is a value to increase the noise added to each component which needs to be set.
+
+
Returns:
None.
+
Note:
- XTPg_EnableNoise API should be used to enable Noise feature.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetPattern (XTpg InstancePtr,
u32  Pattern 
)
+
+
+ +

+This function sets the Pattern Control Register of TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
Pattern is the 32 bit value to be written to the Pattern Control Register.
+
+
Returns:
None.
+
Note:
This API is used for writing the complete Pattern Control Register. Use the following APIs for the individual patterns separately
    +
  • XTpg_SetBackground
  • XTpg_EnableCrossHair
  • XTpg_DisableCrossHair
  • XTpg_EnableBox
  • XTpg_DisableBox
  • XTpg_SetComponentMask
  • XTpg_EnableStuckPixel
  • XTpg_DisableStuckPixel
  • XTPg_EnableNoise
  • XTPg_DisableNoise
  • XTpg_EnableMotion
  • XTpg_DisableMotion
+
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetStuckPixelThreshold (XTpg InstancePtr,
u32  PixelThreshold 
)
+
+
+ +

+This function sets the stuck pixel threshold in STUCK_PIXEL_THRESH register of the TPG core.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
PixelThreshold is an upper limit for PRNG for insertion of stuck pixel which needs to be set.
+
+
Returns:
None.
+
Note:
- XTpg_EnableStuckPixel API should be used to enable Stuck Pixel threshold value.
+ +
+

+ +

+
+ + + + + + + + + +
void XTpg_Setup (XTpg InstancePtr  ) 
+
+
+ +

+This function sets the input/output frame size in Active Size register and enables the register update.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateHSpeed (XTpg InstancePtr,
u16  ZPlateHSpeed 
)
+
+
+ +

+This function sets how fast (the speed of) the horizontal component changes.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateHSpeed is the speed of the horizontal component changes which need to be set.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateHStart (XTpg InstancePtr,
u16  ZPlateHStart 
)
+
+
+ +

+This function sets a starting point in the ROM based sinusoidal values for the horizontal component.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateHStart is starting point in the ROM based sinusoidal value for horizontal component.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateVSpeed (XTpg InstancePtr,
u16  ZPlateVSpeed 
)
+
+
+ +

+This function sets how fast (the speed of) the vertical component changes.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateVSpeed is the speed of the vertical component changes which need to be set.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + +
void XTpg_SetZPlateVStart (XTpg InstancePtr,
u16  ZPlateVStart 
)
+
+
+ +

+This function sets a starting point in the ROM based sinusoidal values for the vertical component.

+

Parameters:
+ + + +
InstancePtr is a pointer to the XTpg instance.
ZPlateVStart is starting point in the ROM based sinusoidal value for vertical component which need to be set.
+
+
Returns:
None.
+
Note:
None.
+ +
+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__g_8c.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__g_8c.html new file mode 100755 index 00000000..5bf8a7cb --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__g_8c.html @@ -0,0 +1,50 @@ + + + + + xtpg_g.c File Reference + + + +

+Software Drivers +
+ + + +

xtpg_g.c File Reference

+

+#include "xparameters.h"
+#include "xtpg.h"
+ + + + + +

Variables

XTpg_Config XTpg_ConfigTable []
+


Variable Documentation

+ +
+ +
+ +

+ +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__hw_8h.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__hw_8h.html new file mode 100755 index 00000000..8b13f695 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__hw_8h.html @@ -0,0 +1,2480 @@ + + + + + xtpg_hw.h File Reference + + + +

+Software Drivers +
+ + + +

xtpg_hw.h File Reference


Detailed Description

+This header file contains the hardware register offsets and register bit definitions for the Xilinx Test Pattern Generator (TPG) core.

+

+ MODIFICATION HISTORY:

+

 Ver   Who    Date     Changes
+ ----- ------ -------- -----------------------------------------------------
+ 3.0   adk    02/19/14 First release.
+                       Added the register offsets and bit masks for the
+                       registers and added backward compatibility for macros.
+ 
+

+#include "xil_io.h"
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

TPG registers offsets

#define XTPG_CONTROL_OFFSET   0x000
#define XTPG_STATUS_OFFSET   0x004
#define XTPG_ERROR_OFFSET   0x008
#define XTPG_IRQ_EN_OFFSET   0x00C
#define XTPG_VERSION_OFFSET   0x010
#define XTPG_ACTIVE_SIZE_OFFSET   0x020
#define XTPG_PATTERN_CONTROL_OFFSET   0x100
#define XTPG_MOTION_SPEED_OFFSET   0x104
#define XTPG_CROSS_HAIRS_OFFSET   0x108
#define XTPG_ZPLATE_HOR_CONTROL_OFFSET   0x10C
#define XTPG_ZPLATE_VER_CONTROL_OFFSET   0x110
#define XTPG_BOX_SIZE_OFFSET   0x114
#define XTPG_BOX_COLOR_OFFSET   0x118
#define XTPG_STUCK_PIXEL_THRESH_OFFSET   0x11C
#define XTPG_NOISE_GAIN_OFFSET   0x120
#define XTPG_BAYER_PHASE_OFFSET   0x124

Control register bit masks

#define XTPG_CTL_SW_EN_MASK   0x00000001
#define XTPG_CTL_RUE_MASK   0x00000002
#define XTPG_CTL_AUTORESET_MASK   0x40000000
#define XTPG_CTL_RESET_MASK   0x80000000

Interrupt register bit masks. It is applicable for

Status and IRQ_ENABLE Registers

#define XTPG_IXR_PROCS_STARTED_MASK   0x00000001
#define XTPG_IXR_EOF_MASK   0x00000002
#define XTPG_IXR_SE_MASK   0x00010000
#define XTPG_IXR_ALLINTR_MASK   0x00010003

Error register bit mask definitions

#define XTPG_ERR_EOL_EARLY_MASK   0x00000001
#define XTPG_ERR_EOL_LATE_MASK   0x00000002
#define XTPG_ERR_SOF_EARLY_MASK   0x00000004
#define XTPG_ERR_SOF_LATE_MASK   0x00000008

Version register bit masks and shifts

#define XTPG_VER_REV_NUM_MASK   0x000000FF
#define XTPG_VER_PID_MASK   0x00000F00
#define XTPG_VER_REV_MASK   0x0000F000
#define XTPG_VER_MINOR_MASK   0x00FF0000
#define XTPG_VER_MAJOR_MASK   0xFF000000
#define XTPG_VER_INTERNAL_SHIFT   8
#define XTPG_VER_REV_SHIFT   12
#define XTPG_VER_MINOR_SHIFT   16
#define XTPG_VER_MAJOR_SHIFT   24

Active Size register bit masks and shifts

#define XTPG_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF
#define XTPG_ACTSIZE_NUM_LINE_MASK   0x1FFF0000
#define XTPG_ACTSIZE_NUM_LINE_SHIFT   16

Pattern Control register bit masks

#define XTPG_PTRN_CTL_SET_BG_MASK   0x0000000F
#define XTPG_PTRN_CTL_EN_CROSSHAIR_MASK   0x00000010
#define XTPG_PTRN_CTL_EN_BOX_MASK   0x00000020
#define XTPG_PTRN_CTL_MASK_COLR_COMP_MASK   0x000001C0
#define XTPG_PTRN_CTL_EN_STUCK_MASK   0x00000200
#define XTPG_PTRN_CTL_EN_NOISE_MASK   0x00000400
#define XTPG_PTRN_CTL_EN_MOTION_MASK   0x00001000
#define XTPG_PTRN_CTL_MASK_COLR_COMP_SHIFT   5

Pattern values of Pattern Control register

#define XTPG_PTRN_CTL_PASS_THROUGH   0x00000000
#define XTPG_PTRN_CTL_HOR_RAMP   0x00000001
#define XTPG_PTRN_CTL_VER_RAMP   0x00000002
#define XTPG_PTRN_CTL_TEMP_RAMP   0x00000003
#define XTPG_PTRN_CTL_SOLID_RED   0x00000004
#define XTPG_PTRN_CTL_SOLID_GREEN   0x00000005
#define XTPG_PTRN_CTL_SOLID_BLUE   0x00000006
#define XTPG_PTRN_CTL_SOLID_BLACK   0x00000007
#define XTPG_PTRN_CTL_SOLID_WHITE   0x00000008
#define XTPG_PTRN_CTL_COLOR_BARS   0x00000009
#define XTPG_PTRN_CTL_ZONE_PLATE   0x0000000A
#define XTPG_PTRN_CTL_TARTAN_BARS   0x0000000B
#define XTPG_PTRN_CTL_CROSS_HATCH   0x0000000C
#define XTPG_PTRN_CTL_VER_HOR_RAMP   0x0000000E
#define XTPG_PTRN_CTL_CHECKER_BOARD   0x0000000F
#define XTPG_PTRN_CTL_MASK_RED_CR   0x00000040
#define XTPG_PTRN_CTL_MASK_GREEN_Y   0x00000080
#define XTPG_PTRN_CTL_MASK_BLUE_CB   0x00000100

Motion Speed register bit mask

#define XTPG_MOTION_SPEED_MASK   0x000000FF

Cross Hair register bit masks and shift

#define XTPG_CROSSHAIR_HPOS_MASK   0x00001FFF
#define XTPG_CROSSHAIR_VPOS_MASK   0x1FFF0000
#define XTPG_CROSSHAIR_SHIFT   16

ZPlate Horizontal Control register bit masks and shift

#define XTPG_ZPLATEHOR_START_MASK   0x0000FFFF
#define XTPG_ZPLATEHOR_SPEED_MASK   0xFFFF0000
#define XTPG_ZPLATEHOR_SPEED_SHIFT   16

ZPlate Vertical Control register bit masks

#define XTPG_ZPLATEVER_START_MASK   0x0000FFFF
#define XTPG_ZPLATEVER_SPEED_MASK   0xFFFF0000
#define XTPG_ZPLATEVER_SPEED_SHIFT   16

Box Size register bit mask

#define XTPG_BOX_SIZE_MASK   0x00001FFF

TPG Box Color register bit masks

#define XTPG_BOXCOL_BLUE_MASK   0x000000FF
#define XTPG_BOXCOL_GREEN_MASK   0x0000FF00
#define XTPG_BOXCOL_RED_MASK   0x00FF0000
#define XTPG_BOXCOL_GREEN_SHIFT   8
#define XTPG_BOXCOL_RED_SHIFT   16

Stuck Pixel Threshold register bit mask

#define XTPG_STUCKPIX_THRESH_MASK   0x0000FFFF

Noise Gain register bit mask

#define XTPG_NOISE_GAIN_MASK   0x000000FF

Bayer Phase register bit mask

#define XTPG_BAYER_PHASE_MASK   0x00000007

General purpose masks

#define XTPG_8_BIT_MASK   0x000000FF

Backward compatibility macros

#define TPG_CONTROL   XTPG_CONTROL_OFFSET
#define TPG_STATUS   XTPG_STATUS_OFFSET
#define TPG_ERROR   XTPG_ERROR_OFFSET
#define TPG_IRQ_EN   XTPG_IRQ_EN_OFFSET
#define TPG_VERSION   XTPG_VERSION_OFFSET
#define TPG_ACTIVE_SIZE   XTPG_ACTIVE_SIZE_OFFSET
#define TPG_PATTERN_CONTROL   XTPG_PATTERN_CONTROL_OFFSET
#define TPG_MOTION_SPEED   XTPG_MOTION_SPEED_OFFSET
#define TPG_CROSS_HAIRS   XTPG_CROSS_HAIRS_OFFSET
#define TPG_ZPLATE_HOR_CONTROL   XTPG_ZPLATE_HOR_CONTROL_OFFSET
#define TPG_ZPLATE_VER_CONTROL   XTPG_ZPLATE_VER_CONTROL_OFFSET
#define TPG_BOX_SIZE   XTPG_BOX_SIZE_OFFSET_OFFSET
#define TPG_BOX_COLOR   XTPG_BOX_COLOR_OFFSET
#define TPG_STUCK_PIXEL_THRESH   XTPG_STUCK_PIXEL_THRESH_OFFSET
#define TPG_NOISE_GAIN   XTPG_NOISE_GAIN_OFFSET
#define TPG_CTL_EN_MASK   XTPG_CTL_SW_EN_MASK
#define TPG_CTL_RUE_MASK   XTPG_CTL_RUE_MASK
#define TPG_RST_RESET   XTPG_CTL_RESET_MASK
#define TPG_RST_AUTORESET   XTPG_CTL_AUTORESET_MASK
#define TPG_BAYER_PHASE   XTPG_BAYER_PHASE_OFFSET
#define TPG_PASS_THROUGH   XTPG_PASS_THROUGH
#define TPG_HOR_RAMP   XTPG_HOR_RAMP
#define TPG_VER_RAMP   XTPG_VER_RAMP
#define TPG_TEMP_RAMP   XTPG_TEMP_RAMP
#define TPG_SOLID_RED   XTPG_SOLID_RED
#define TPG_SOLID_GREEN   XTPG_SOLID_GREEN
#define TPG_SOLID_BLUE   XTPG_SOLID_BLUE
#define TPG_SOILD_BLACK   XTPG_SOLID_BLACK
#define TPG_SOLID_WHITE   XTPG_SOLID_WHITE
#define TPG_COLOR_BARS   XTPG_COLOR_BARS
#define TPG_ZONE_PLATE   XTPG_ZONE_PLATE
#define TPG_TARTAN_BARS   XTPG_TARTAN_BARS
#define TPG_CROSS_HATCH   XTPG_CROSS_HATCH
#define TPG_VER_HOR_RAMP   XTPG_VER_HOR_RAMP
#define TPG_CHECKER_BOARD   XTPG_CHECKER_BOARD
#define TPG_CROSS_HAIRS   XTPG_PTRN_CTL_EN_CROSSHAIR_MASK
#define TPG_MOVING_BOX   XTPG_PTRN_CTL_EN_BOX_MASK
#define TPG_MASK_RED_CR   XTPG_MASK_RED_CR
#define TPG_MASK_GREEN_Y   XTPG_MASK_GREEN_Y
#define TPG_MASK_BLUE_CB   XTPG_MASK_BLUE_CB
#define TPG_ENABLE_STUCK   XTPG_PTRN_CTL_EN_STUCK_MASK
#define TPG_ENABLE_NOISE   XTPG_PTRN_CTL_EN_NOISE_MASK
#define TPG_ENABLE_MOTION   XTPG_PTRN_CTL_EN_MOTION_MASK
#define TPG_In32   XTpg_In32
#define TPG_Out32   XTpg_Out32
#define XTPG_ReadReg   XTpg_ReadReg
#define XTPG_WriteReg   XTpg_WriteReg

Interrupt Enable and Status Registers Offsets

#define XTPG_ISR_OFFSET   XTPG_STATUS_OFFSET
#define XTPG_IER_OFFSET   XTPG_IRQ_EN_OFFSET

Defines

#define XTPG_HW_H_
#define XTpg_In32   Xil_In32
#define XTpg_Out32   Xil_Out32
#define XTpg_ReadReg(BaseAddress, RegOffset)   XTpg_In32((BaseAddress) + (u32)(RegOffset))
#define XTpg_WriteReg(BaseAddress, RegOffset, Data)   XTpg_Out32((BaseAddress) + (u32)(RegOffset), (Data))
+


Define Documentation

+ +
+
+ + + + +
#define TPG_ACTIVE_SIZE   XTPG_ACTIVE_SIZE_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_BAYER_PHASE   XTPG_BAYER_PHASE_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_BOX_COLOR   XTPG_BOX_COLOR_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_BOX_SIZE   XTPG_BOX_SIZE_OFFSET_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_CHECKER_BOARD   XTPG_CHECKER_BOARD
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_COLOR_BARS   XTPG_COLOR_BARS
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_CONTROL   XTPG_CONTROL_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_CROSS_HAIRS   XTPG_PTRN_CTL_EN_CROSSHAIR_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_CROSS_HAIRS   XTPG_CROSS_HAIRS_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_CROSS_HATCH   XTPG_CROSS_HATCH
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_CTL_EN_MASK   XTPG_CTL_SW_EN_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_CTL_RUE_MASK   XTPG_CTL_RUE_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_ENABLE_MOTION   XTPG_PTRN_CTL_EN_MOTION_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_ENABLE_NOISE   XTPG_PTRN_CTL_EN_NOISE_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_ENABLE_STUCK   XTPG_PTRN_CTL_EN_STUCK_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_ERROR   XTPG_ERROR_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_HOR_RAMP   XTPG_HOR_RAMP
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_In32   XTpg_In32
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_IRQ_EN   XTPG_IRQ_EN_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_MASK_BLUE_CB   XTPG_MASK_BLUE_CB
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_MASK_GREEN_Y   XTPG_MASK_GREEN_Y
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_MASK_RED_CR   XTPG_MASK_RED_CR
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_MOTION_SPEED   XTPG_MOTION_SPEED_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_MOVING_BOX   XTPG_PTRN_CTL_EN_BOX_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_NOISE_GAIN   XTPG_NOISE_GAIN_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_Out32   XTpg_Out32
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_PASS_THROUGH   XTPG_PASS_THROUGH
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_PATTERN_CONTROL   XTPG_PATTERN_CONTROL_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_RST_AUTORESET   XTPG_CTL_AUTORESET_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_RST_RESET   XTPG_CTL_RESET_MASK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_SOILD_BLACK   XTPG_SOLID_BLACK
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_SOLID_BLUE   XTPG_SOLID_BLUE
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_SOLID_GREEN   XTPG_SOLID_GREEN
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_SOLID_RED   XTPG_SOLID_RED
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_SOLID_WHITE   XTPG_SOLID_WHITE
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_STATUS   XTPG_STATUS_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_STUCK_PIXEL_THRESH   XTPG_STUCK_PIXEL_THRESH_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_TARTAN_BARS   XTPG_TARTAN_BARS
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_TEMP_RAMP   XTPG_TEMP_RAMP
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_VER_HOR_RAMP   XTPG_VER_HOR_RAMP
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_VER_RAMP   XTPG_VER_RAMP
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_VERSION   XTPG_VERSION_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_ZONE_PLATE   XTPG_ZONE_PLATE
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_ZPLATE_HOR_CONTROL   XTPG_ZPLATE_HOR_CONTROL_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define TPG_ZPLATE_VER_CONTROL   XTPG_ZPLATE_VER_CONTROL_OFFSET
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define XTPG_8_BIT_MASK   0x000000FF
+
+
+ +

+8-bit Mask +

+

+ +

+
+ + + + +
#define XTPG_ACTIVE_SIZE_OFFSET   0x020
+
+
+ +

+Active Size (V x H) Offset +

+

+ +

+
+ + + + +
#define XTPG_ACTSIZE_NUM_LINE_MASK   0x1FFF0000
+
+
+ +

+Number of Active lines per Frame (Vertical) Mask +

+

+ +

+
+ + + + +
#define XTPG_ACTSIZE_NUM_LINE_SHIFT   16
+
+
+ +

+Shift for number of lines +

+

+ +

+
+ + + + +
#define XTPG_ACTSIZE_NUM_PIXEL_MASK   0x00001FFF
+
+
+ +

+Number of Active pixels per scan line (Horizontal) Mask +

+

+ +

+
+ + + + +
#define XTPG_BAYER_PHASE_MASK   0x00000007
+
+
+ +

+Bayer Phase Mask +

+

+ +

+
+ + + + +
#define XTPG_BAYER_PHASE_OFFSET   0x124
+
+
+ +

+Bayer Phase Offset +

+

+ +

+
+ + + + +
#define XTPG_BOX_COLOR_OFFSET   0x118
+
+
+ +

+Box Color Offset +

+

+ +

+
+ + + + +
#define XTPG_BOX_SIZE_MASK   0x00001FFF
+
+
+ +

+Box Size Mask +

+

+ +

+
+ + + + +
#define XTPG_BOX_SIZE_OFFSET   0x114
+
+
+ +

+Box Size Offset +

+

+ +

+
+ + + + +
#define XTPG_BOXCOL_BLUE_MASK   0x000000FF
+
+
+ +

+Blue Color Mask +

+

+ +

+
+ + + + +
#define XTPG_BOXCOL_GREEN_MASK   0x0000FF00
+
+
+ +

+Green Color Mask +

+

+ +

+
+ + + + +
#define XTPG_BOXCOL_GREEN_SHIFT   8
+
+
+ +

+Green color shift +

+

+ +

+
+ + + + +
#define XTPG_BOXCOL_RED_MASK   0x00FF0000
+
+
+ +

+Red Color Mask +

+

+ +

+
+ + + + +
#define XTPG_BOXCOL_RED_SHIFT   16
+
+
+ +

+Red color shift +

+

+ +

+
+ + + + +
#define XTPG_CONTROL_OFFSET   0x000
+
+
+ +

+Control Offset +

+

+ +

+
+ + + + +
#define XTPG_CROSS_HAIRS_OFFSET   0x108
+
+
+ +

+Cross Hair Offset +

+

+ +

+
+ + + + +
#define XTPG_CROSSHAIR_HPOS_MASK   0x00001FFF
+
+
+ +

+CrossHair Horizontal Position Mask +

+

+ +

+
+ + + + +
#define XTPG_CROSSHAIR_SHIFT   16
+
+
+ +

+Cross Hair Shift +

+

+ +

+
+ + + + +
#define XTPG_CROSSHAIR_VPOS_MASK   0x1FFF0000
+
+
+ +

+CrossHair Vertical Position Mask +

+

+ +

+
+ + + + +
#define XTPG_CTL_AUTORESET_MASK   0x40000000
+
+
+ +

+Software Reset - Auto-synchronize to SOF Mask +

+

+ +

+
+ + + + +
#define XTPG_CTL_RESET_MASK   0x80000000
+
+
+ +

+Software Reset - Instantaneous Mask +

+

+ +

+
+ + + + +
#define XTPG_CTL_RUE_MASK   0x00000002
+
+
+ +

+Register Update Enable Mask +

+

+ +

+
+ + + + +
#define XTPG_CTL_SW_EN_MASK   0x00000001
+
+
+ +

+S/W Enable Mask +

+

+ +

+
+ + + + +
#define XTPG_ERR_EOL_EARLY_MASK   0x00000001
+
+
+ +

+End of Line Early Mask +

+

+ +

+
+ + + + +
#define XTPG_ERR_EOL_LATE_MASK   0x00000002
+
+
+ +

+End of Line Late Mask +

+

+ +

+
+ + + + +
#define XTPG_ERR_SOF_EARLY_MASK   0x00000004
+
+
+ +

+Start of Frame Early Mask +

+

+ +

+
+ + + + +
#define XTPG_ERR_SOF_LATE_MASK   0x00000008
+
+
+ +

+Start of Frame Late Mask +

+

+ +

+
+ + + + +
#define XTPG_ERROR_OFFSET   0x008
+
+
+ +

+Error Offset +

+

+ +

+
+ + + + +
#define XTPG_HW_H_
+
+
+ +

+Prevent circular inclusions by using protection macros +

+

+ +

+
+ + + + +
#define XTPG_IER_OFFSET   XTPG_IRQ_EN_OFFSET
+
+
+ +

+Interrupt Enable Offset +

+

+ +

+
+ + + + +
#define XTpg_In32   Xil_In32
+
+
+ +

+Input Operation +

+

+ +

+
+ + + + +
#define XTPG_IRQ_EN_OFFSET   0x00C
+
+
+ +

+IRQ Enable Offset +

+

+ +

+
+ + + + +
#define XTPG_ISR_OFFSET   XTPG_STATUS_OFFSET
+
+
+ +

+Interrupt status register generates a interrupt if the corresponding bits of interrupt enable register bits are set. Interrupt Status Offset +

+

+ +

+
+ + + + +
#define XTPG_IXR_ALLINTR_MASK   0x00010003
+
+
+ +

+Addition of all Masks +

+

+ +

+
+ + + + +
#define XTPG_IXR_EOF_MASK   0x00000002
+
+
+ +

+End-Of-Frame Mask +

+

+ +

+
+ + + + +
#define XTPG_IXR_PROCS_STARTED_MASK   0x00000001
+
+
+ +

+Process started Mask +

+

+ +

+
+ + + + +
#define XTPG_IXR_SE_MASK   0x00010000
+
+
+ +

+Slave Error Mask +

+

+ +

+
+ + + + +
#define XTPG_MOTION_SPEED_MASK   0x000000FF
+
+
+ +

+Motion Speed Mask +

+

+ +

+
+ + + + +
#define XTPG_MOTION_SPEED_OFFSET   0x104
+
+
+ +

+Motion Speed Offset +

+

+ +

+
+ + + + +
#define XTPG_NOISE_GAIN_MASK   0x000000FF
+
+
+ +

+Nose Gain Mask +

+

+ +

+
+ + + + +
#define XTPG_NOISE_GAIN_OFFSET   0x120
+
+
+ +

+Noise Gain Offset +

+

+ +

+
+ + + + +
#define XTpg_Out32   Xil_Out32
+
+
+ +

+Output Operation +

+

+ +

+
+ + + + +
#define XTPG_PATTERN_CONTROL_OFFSET   0x100
+
+
+ +

+Pattern Control Offset +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_CHECKER_BOARD   0x0000000F
+
+
+ +

+Value for Black and White Checker Board +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_COLOR_BARS   0x00000009
+
+
+ +

+Value for Color Bars Output +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_CROSS_HATCH   0x0000000C
+
+
+ +

+Value for Cross Hatch +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_EN_BOX_MASK   0x00000020
+
+
+ +

+Moving box enable Mask +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_EN_CROSSHAIR_MASK   0x00000010
+
+
+ +

+Enable Cross Hair Mask +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_EN_MOTION_MASK   0x00001000
+
+
+ +

+Enable Motion Mask +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_EN_NOISE_MASK   0x00000400
+
+
+ +

+Enable Noise Mask +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_EN_STUCK_MASK   0x00000200
+
+
+ +

+Enable Stuck Mask +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_HOR_RAMP   0x00000001
+
+
+ +

+Value for Horizontal Ramp +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_MASK_BLUE_CB   0x00000100
+
+
+ +

+Value for Masking Blue Component +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_MASK_COLR_COMP_MASK   0x000001C0
+
+
+ +

+Mask out a particular color component mask +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_MASK_COLR_COMP_SHIFT   5
+
+
+ +

+Shift for a particular color component shift +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_MASK_GREEN_Y   0x00000080
+
+
+ +

+Value for Masking Green Component +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_MASK_RED_CR   0x00000040
+
+
+ +

+Value for Masking Red Component +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_PASS_THROUGH   0x00000000
+
+
+ +

+Value for Pass Through +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_SET_BG_MASK   0x0000000F
+
+
+ +

+Set background pattern mask +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_SOLID_BLACK   0x00000007
+
+
+ +

+Value for Solid Black Output +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_SOLID_BLUE   0x00000006
+
+
+ +

+Value for Solid Blue Output +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_SOLID_GREEN   0x00000005
+
+
+ +

+Value for Solid Green Output +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_SOLID_RED   0x00000004
+
+
+ +

+Value for Solid Red Output +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_SOLID_WHITE   0x00000008
+
+
+ +

+Value for Solid White Output +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_TARTAN_BARS   0x0000000B
+
+
+ +

+Value for Tartan Bars +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_TEMP_RAMP   0x00000003
+
+
+ +

+Value for Temporal Ramp +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_VER_HOR_RAMP   0x0000000E
+
+
+ +

+Value for Combined Vertical and Horizontal ramp +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_VER_RAMP   0x00000002
+
+
+ +

+Value for Vertical Ramp +

+

+ +

+
+ + + + +
#define XTPG_PTRN_CTL_ZONE_PLATE   0x0000000A
+
+
+ +

+Value for Zone Plate +

+

+ +

+
+ + + + + + + + + + + + +
#define XTpg_ReadReg (BaseAddress,
RegOffset   )    XTpg_In32((BaseAddress) + (u32)(RegOffset))
+
+
+ +

+This function macro reads the given register.

+

Parameters:
+ + + +
BaseAddress is the base address of the TPG core.
RegOffset is the register offset of the register (defined at top of this file).
+
+
Returns:
32-bit value of the register.
+
Note:
C-style signature: u32 XTpg_ReadReg(u32 BaseAddress, u32 RegOffset)
+ +
+

+ +

+
+ + + + +
#define XTPG_ReadReg   XTpg_ReadReg
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define XTPG_STATUS_OFFSET   0x004
+
+
+ +

+Status Offset +

+

+ +

+
+ + + + +
#define XTPG_STUCK_PIXEL_THRESH_OFFSET   0x11C
+
+
+ +

+Stuck Pixel Threshold Offset +

+

+ +

+
+ + + + +
#define XTPG_STUCKPIX_THRESH_MASK   0x0000FFFF
+
+
+ +

+Stuck Pixel Threshold Mask +

+

+ +

+
+ + + + +
#define XTPG_VER_INTERNAL_SHIFT   8
+
+
+ +

+Version Internal Shift +

+

+ +

+
+ + + + +
#define XTPG_VER_MAJOR_MASK   0xFF000000
+
+
+ +

+Version Major Mask +

+

+ +

+
+ + + + +
#define XTPG_VER_MAJOR_SHIFT   24
+
+
+ +

+Version Major Shift +

+

+ +

+
+ + + + +
#define XTPG_VER_MINOR_MASK   0x00FF0000
+
+
+ +

+Version Minor Mask +

+

+ +

+
+ + + + +
#define XTPG_VER_MINOR_SHIFT   16
+
+
+ +

+Version Minor Shift +

+

+ +

+
+ + + + +
#define XTPG_VER_PID_MASK   0x00000F00
+
+
+ +

+Version Patch ID Mask +

+

+ +

+
+ + + + +
#define XTPG_VER_REV_MASK   0x0000F000
+
+
+ +

+Version Revision Mask +

+

+ +

+
+ + + + +
#define XTPG_VER_REV_NUM_MASK   0x000000FF
+
+
+ +

+Version Revision Number Mask +

+

+ +

+
+ + + + +
#define XTPG_VER_REV_SHIFT   12
+
+
+ +

+Version Revision Shift +

+

+ +

+
+ + + + +
#define XTPG_VERSION_OFFSET   0x010
+
+
+ +

+Version Offset +

+

+ +

+
+ + + + + + + + + + + + + + + +
#define XTpg_WriteReg (BaseAddress,
RegOffset,
Data   )    XTpg_Out32((BaseAddress) + (u32)(RegOffset), (Data))
+
+
+ +

+This function macro writes the given register.

+

Parameters:
+ + + + +
BaseAddress is the base address of the TPG core.
RegOffset is the register offset of the register (defined at top of this file).
Data is the 32-bit value to write into the register.
+
+
Returns:
None.
+
Note:
C-style signature: void XTpg_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)
+ +
+

+ +

+
+ + + + +
#define XTPG_WriteReg   XTpg_WriteReg
+
+
+ +

+ +

+

+ +

+
+ + + + +
#define XTPG_ZPLATE_HOR_CONTROL_OFFSET   0x10C
+
+
+ +

+ZPlate Horizontal Control Offset +

+

+ +

+
+ + + + +
#define XTPG_ZPLATE_VER_CONTROL_OFFSET   0x110
+
+
+ +

+ZPlate Vertical Control Offset +

+

+ +

+
+ + + + +
#define XTPG_ZPLATEHOR_SPEED_MASK   0xFFFF0000
+
+
+ +

+ZPlate Horizontal Speed Mask +

+

+ +

+
+ + + + +
#define XTPG_ZPLATEHOR_SPEED_SHIFT   16
+
+
+ +

+ZPlate Horizontal Speed Shift +

+

+ +

+
+ + + + +
#define XTPG_ZPLATEHOR_START_MASK   0x0000FFFF
+
+
+ +

+ZPlate Horizontal Start Mask +

+

+ +

+
+ + + + +
#define XTPG_ZPLATEVER_SPEED_MASK   0xFFFF0000
+
+
+ +

+ZPlate Vertical Speed Mask +

+

+ +

+
+ + + + +
#define XTPG_ZPLATEVER_SPEED_SHIFT   16
+
+
+ +

+ZPlate Vertical Speed +

+

+ +

+
+ + + + +
#define XTPG_ZPLATEVER_START_MASK   0x0000FFFF
+
+
+ +

+ZPlate Vertical Start Mask +

+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__intr_8c.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__intr_8c.html new file mode 100755 index 00000000..5b9957e2 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__intr_8c.html @@ -0,0 +1,136 @@ + + + + + xtpg_intr.c File Reference + + + +

+Software Drivers +
+ + + +

xtpg_intr.c File Reference


Detailed Description

+This file contains interrupt related functions of the TPG core. Please see xtpg.h for more details of the driver.

+

+ MODIFICATION HISTORY:

+

 Ver   Who    Date    Changes
+ ----- ----- -------  --------------------------------------------------
+ 3.0   adk   02/19/14  First Release
+                       Implemented the following functions:
+                       XTpg_IntrHandler and XTpg_SetCallBack.

+

 
+

+#include "xtpg.h"
+ + + + + + + +

Functions

void XTpg_IntrHandler (void *InstancePtr)
int XTpg_SetCallBack (XTpg *InstancePtr, u32 HandlerType, void *CallBackFunc, void *CallBackRef)
+


Function Documentation

+ +
+
+ + + + + + + + + +
void XTpg_IntrHandler (void *  InstancePtr  ) 
+
+
+ +

+This function is the interrupt handler for the TPG driver.

+This handler reads the pending interrupt from the STATUS register, determines the source of the interrupts and calls the respective callbacks for the interrupts that are enabled in IRQ_ENABLE register, and finally clears the interrupts.

+The application is responsible for connecting this function to the interrupt system. Application beyond this driver is also responsible for providing callbacks to handle interrupts and installing the callbacks using XTpg_SetCallBack() during initialization phase.

+

Parameters:
+ + +
InstancePtr is a pointer to the XTpg instance that just interrupted.
+
+
Returns:
None.
+
Note:
Interrupt interface should be enabled.
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int XTpg_SetCallBack (XTpg InstancePtr,
u32  HandlerType,
void *  CallBackFunc,
void *  CallBackRef 
)
+
+
+ +

+This function installs an asynchronous callback function for the given HandlerType.

+

+ HandlerType              Callback Function Type
+ -----------------------  ----------------------
+ XTPG_HANDLER_FRAMEDONE   FrameDoneCallBack
+ XTPG_HANDLER_PROCSTART   ProcStartCallBack
+ XTPG_HANDLER_ERROR       ErrCallBack

+

 

+

Parameters:
+ + + + + +
InstancePtr is a pointer to the XTpg instance to be worked on.
HandlerType specifies which callback is to be attached.
CallBackFunc is the address of the callback function.
CallBackRef is a user data item that will be passed to the callback function when it is invoked.
+
+
Returns:
    +
  • XST_SUCCESS when handler is installed.
  • XST_INVALID_PARAM when HandlerType is invalid.
+
+
Note:
Invoking this function for a handler that already has been installed replaces it with the new handler.
+ +
+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__selftest_8c.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__selftest_8c.html new file mode 100755 index 00000000..fb919030 --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__selftest_8c.html @@ -0,0 +1,73 @@ + + + + + xtpg_selftest.c File Reference + + + +

+Software Drivers +
+ + + +

xtpg_selftest.c File Reference


Detailed Description

+This file contains the self-test functions for the TPG driver. The self test function reads the Version Register.

+

+ MODIFICATION HISTORY:

+

 Ver   Who    Date     Changes
+ ----- -----  ------- ----------------------------------------------
+ 3.0   adk   02/19/14 First Release.
+                      Implemented XTpg_SelfTest function.
+ 
+

+#include "xtpg.h"
+#include "xstatus.h"
+ + + + + +

Functions

int XTpg_SelfTest (XTpg *InstancePtr)
+


Function Documentation

+ +
+
+ + + + + + + + + +
int XTpg_SelfTest (XTpg InstancePtr  ) 
+
+
+ +

+This function reads Version register of TPG core and compares with zero as part of self test.

+

Parameters:
+ + +
InstancePtr is a pointer to the TPG instance.
+
+
Returns:
    +
  • XST_SUCCESS if the Version register read test was successful.
  • XST_FAILURE if the Version register read test failed.
+
+
Note:
None.
+ +
+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__sinit_8c.html b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__sinit_8c.html new file mode 100755 index 00000000..d42a67da --- /dev/null +++ b/XilinxProcessorIPLib/drivers/tpg/doc/html/api/xtpg__sinit_8c.html @@ -0,0 +1,72 @@ + + + + + xtpg_sinit.c File Reference + + + +

+Software Drivers +
+ + + +

xtpg_sinit.c File Reference


Detailed Description

+This file contains static initialization methods for Xilinx TPG core driver.

+

+ MODIFICATION HISTORY:

+

 Ver   Who    Date     Changes
+ ----- ------ -------- --------------------------------------------------
+ 3.0   adk    02/19/14 First release.
+                       Implemented the following functions:
+                       XTpg_LookupConfig.
+ 
+

+#include "xtpg.h"
+#include "xparameters.h"
+ + + + + +

Functions

XTpg_ConfigXTpg_LookupConfig (u16 DeviceId)
+


Function Documentation

+ +
+
+ + + + + + + + + +
XTpg_Config* XTpg_LookupConfig (u16  DeviceId  ) 
+
+
+ +

+This function returns a reference to an XTpg_Config structure based on the unique device id, DeviceId. The return value will refer to an entry in the device configuration table defined in the xtpg_g.c file.

+

Parameters:
+ + +
DeviceId is the unique Device ID of the device for the lookup operation.
+
+
Returns:
CfgPtr is a reference to a config record in the configuration table (in xtpg_g.c) corresponding to DeviceId, or NULL if no match is found.
+
Note:
None.
+ +
+

+Copyright @ 1995-2014 Xilinx, Inc. All rights reserved. diff --git a/XilinxProcessorIPLib/drivers/tpg/examples/example.c b/XilinxProcessorIPLib/drivers/tpg/examples/example.c deleted file mode 100755 index ab50c3f2..00000000 --- a/XilinxProcessorIPLib/drivers/tpg/examples/example.c +++ /dev/null @@ -1,86 +0,0 @@ -/***************************************************************************** -* -* Copyright (C) 2001 - 2014 Xilinx, Inc. All rights reserved. -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"),to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* Use of the Software is limited solely to applications: -* (a) running on a Xilinx device, or -* (b) that interact with a Xilinx device through a bus or interconnect. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* XILINX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -* SOFTWARE. -* -* Except as contained in this notice, the name of the Xilinx shall not be used -* in advertising or otherwise to promote the sale, use or other dealings in -* this Software without prior written authorization from Xilinx. -* -*****************************************************************************/ - /** - * - * @file example.c - * - * This file demonstrates how to use Xilinx Test Pattern Generator (TPG) - * ore pcore driver functions. - * - * - * *************************************************************************** - */ - -#include "tpg.h" -#include "xparameters.h" - -/***************************************************************************/ -// Test Pattern Generator Register Reading Example -// This function provides an example of how to read the current configuration -// settings of the TPG core. -/***************************************************************************/ -void report_tpg_settings(u32 BaseAddress) { - - u32 status, reg_val; - unsigned char inchar=0; - - xil_printf("Test Pattern Generator Core Configuration:\r\n"); - xil_printf(" Enable Bit: %1d\r\n", TPG_ReadReg(BaseAddress, TPG_CONTROL) & TPG_CTL_EN_MASK); - xil_printf(" Register Update Bit: %1d\r\n", (TPG_ReadReg(BaseAddress, TPG_CONTROL) & TPG_CTL_RUE_MASK) >> 1); - xil_printf(" Reset Bit: %1d\r\n", TPG_ReadReg(BaseAddress, TPG_CONTROL) & TPG_RST_RESET); - status = TPG_ReadReg(BaseAddress, TPG_STATUS); - xil_printf(" TPG Status: %08x \r\n", status); - xil_printf(" Core Version: %1d.%1d\r\n", TPG_ReadReg(BaseAddress, TPG_VERSION)); - reg_val = TPG_ReadReg(BaseAddress, TPG_CONTROL ); - xil_printf("TPG_CONTROL : %8x\r\n", reg_val); - reg_val = TPG_ReadReg(BaseAddress, TPG_IRQ_EN ); - xil_printf("TPG_IRQ_EN : %8x\r\n", reg_val); - reg_val = (TPG_ReadReg(BaseAddress, TPG_ACTIVE_SIZE ) && 0x1FFF); - xil_printf("Active Rows : %8d\r\n", reg_val); - reg_val = (TPG_ReadReg(BaseAddress, TPG_ACTIVE_SIZE) >> 16); - xil_printf("Active Columns : %8d\r\n", reg_val); - xil_printf("Press Space to continue!\r\n", reg_val); - while (inchar != ' ') inchar = inbyte(); -} - -/*****************************************************************************/ -// -// This is the main function for the TPG example. -// -/*****************************************************************************/ -int main(void) -{ - // Print the current settings for the TPG core - report_tpg_settings(XPAR_TPG_0_BASEADDR); - - return 0; -}