gamma: Gamma_v6_0

| gamma Xilinx SDK Drivers API Documentation

- Overview
- APIs
- File List
- Examples

Macros
Gamma_v6_0

## Macros
#define | GAMMA_CONTROL 0x000
| Register Offsets. More...
#define | GAMMA_STATUS 0x004
| Status. More...
#define | GAMMA_ERROR 0x008
| Error. More...
#define | GAMMA_IRQ_EN 0x00C
| IRQ Enable. More...
#define | GAMMA_VERSION 0x010
| Version. More...
#define | GAMMA_SYSDEBUG0 0x014
| System Debug 0. More...
#define | GAMMA_SYSDEBUG1 0x018
| System Debug 1. More...
#define | GAMMA_SYSDEBUG2 0x01C
| System Debug 2. More...
#define | GAMMA_ACTIVE_SIZE 0x020
| Active Size (V x H) More...
#define | GAMMA_TIMING_STATUS 0x024
| Timing Measurement Status. More...
#define | GAMMA_TABLE_UPDATE 0x100
| Swap to inactive LUT. More...
#define | GAMMA_ADDR_DATA 0x104
| Address and Data register. More...
#define | GAMMA_CTL_EN_MASK 0x00000001
| Gamma Enable. More...
#define | GAMMA_CTL_RUE_MASK 0x00000002
| Gamma Register Update Enable. More...
#define | GAMMA_CTL_BPE_MASK 0x00000010
| Gamma ByPass Enable. More...
#define | GAMMA_CTL_TPE_MASK 0x00000020
| Gamma Test Pattern Enable. More...
#define | GAMMA_RST_RESET 0x80000000
| Software Reset - Instantaneous. More...
#define | GAMMA_RST_AUTORESET 0x40000000
| Software Reset - Auto-synchronize to SOF. More...
#define | GAMMA_Enable(BaseAddress)
| This macro enables a instance. More...
#define | GAMMA_Disable(BaseAddress)
| This macro disables a Gamma instance. More...
#define | GAMMA_RegUpdateEnable(BaseAddress)
| This macro tells a Gamma instance to pick up all the register value changes made so far by the software. More...
#define | GAMMA_RegUpdateDisable(BaseAddress)
| This macro tells a Gamma instance not to update it's configuration registers made so far by the software. More...
#define | GAMMA_BypassEnable(BaseAddress)
| This macro enables Bypass mode. More...
#define | GAMMA_BypassDisable(BaseAddress)
| This macro disables Bypass mode. More...
#define | GAMMA_TestPatternEnable(BaseAddress)
| This macro enables Test Pattern Input. More...
#define | GAMMA_TestPatternDisable(BaseAddress)
| This macro disables Test Pattern Input. More...
#define | GAMMA_Reset(BaseAddress) GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, GAMMA_RST_RESET) \
| This macro resets a Gamma instance. More...
#define | GAMMA_ClearReset(BaseAddress) GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, 0) \
| This macro clears the Gamma's reset flag (which is set using GAMMA_Reset(), and returns it to normal operation. More...
#define | GAMMA_AutoSyncReset(BaseAddress) GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, GAMMA_RST_AUTORESET) \
| This macro resets a Gamma instance, but differs from GAMMA_Reset() in that it automatically synchronizes to the VBlank_in input of the core to prevent tearing. More...
#define | GAMMA_ReadReg(BaseAddress, RegOffset) GAMMA_In32((BaseAddress) + (RegOffset))
| Read the given register. More...
#define | GAMMA_WriteReg(BaseAddress, RegOffset, Data) GAMMA_Out32((BaseAddress) + (RegOffset), (Data))
| Write the given register. More...

## Macro Definition Documentation

#define GAMMA_ACTIVE_SIZE 0x020

Active Size (V x H)

#define GAMMA_ADDR_DATA 0x104

Address and Data register.

#define GAMMA_AutoSyncReset | ( |  | BaseAddress | ) | GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, GAMMA_RST_AUTORESET) \

This macro resets a Gamma instance, but differs from GAMMA_Reset() in that it automatically synchronizes to the VBlank_in input of the core to prevent tearing.

On the next rising-edge of VBlank_in following a call to GAMMA_AutoSyncReset(), 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

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_Reset(u32 BaseAddress);

#define GAMMA_BypassDisable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) & \
~GAMMA_CTL_BPE_MASK)
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_CTL_BPE_MASK
#define GAMMA_CTL_BPE_MASK
Gamma ByPass Enable.
Definition: gamma.h:91
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350

This macro disables Bypass mode.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_BypassDisable(u32 BaseAddress);

#define GAMMA_BypassEnable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) | \
GAMMA_CTL_BPE_MASK)
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_CTL_BPE_MASK
#define GAMMA_CTL_BPE_MASK
Gamma ByPass Enable.
Definition: gamma.h:91
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350

This macro enables Bypass mode.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_BypassEnable(u32 BaseAddress);

#define GAMMA_ClearReset | ( |  | BaseAddress | ) | GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, 0) \

This macro clears the Gamma's reset flag (which is set using GAMMA_Reset(), and returns it to normal operation.

This ClearReset effects the core immediately, and may cause image tearing.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_ClearReset(u32 BaseAddress);

#define GAMMA_CONTROL 0x000

Register Offsets.

Control

#define GAMMA_CTL_BPE_MASK 0x00000010

Gamma ByPass Enable.

#define GAMMA_CTL_EN_MASK 0x00000001

Gamma Enable.

#define GAMMA_CTL_RUE_MASK 0x00000002

Gamma Register Update Enable.

#define GAMMA_CTL_TPE_MASK 0x00000020

Gamma Test Pattern Enable.

#define GAMMA_Disable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) & \
~GAMMA_CTL_EN_MASK)
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_CTL_EN_MASK
#define GAMMA_CTL_EN_MASK
Gamma Enable.
Definition: gamma.h:89
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350

This macro disables a Gamma instance.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_Disable(u32 BaseAddress);

#define GAMMA_Enable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) | \
GAMMA_CTL_EN_MASK)
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_CTL_EN_MASK
#define GAMMA_CTL_EN_MASK
Gamma Enable.
Definition: gamma.h:89
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350

This macro enables a instance.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_Enable(u32 BaseAddress);

#define GAMMA_ERROR 0x008

Error.

#define GAMMA_IRQ_EN 0x00C

IRQ Enable.

#define GAMMA_ReadReg | ( |  | BaseAddress,
|  |  | RegOffset
| ) |  | GAMMA_In32((BaseAddress) + (RegOffset))

Read the given register.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)
  RegOffset | is the register offset of the register (defined at top of this file)

Returns
  The 32-bit value of the register

Note
  C-style signature: u32 GAMMA_ReadReg(u32 BaseAddress, u32 RegOffset)

#define GAMMA_RegUpdateDisable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) & \
~GAMMA_CTL_RUE_MASK)
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350
GAMMA_CTL_RUE_MASK
#define GAMMA_CTL_RUE_MASK
Gamma Register Update Enable.
Definition: gamma.h:90

This macro tells a Gamma instance not to update it's configuration registers made so far by the software.

When disabled, changes to other configuration registers are stored, but do not effect the core's behavior.

This function only works when the Gamma core is enabled.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_RegUpdateDisable(u32 BaseAddress);

#define GAMMA_RegUpdateEnable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) | \
GAMMA_CTL_RUE_MASK)
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350
GAMMA_CTL_RUE_MASK
#define GAMMA_CTL_RUE_MASK
Gamma Register Update Enable.
Definition: gamma.h:90

This macro tells a Gamma instance to pick up all the register value changes made so far by the software.

The registers will be automatically updated on the next rising-edge of the VBlank_in signal on the core. It is up to the user to manually disable the register update after a sufficient amount if time.

This function only works when the Gamma core is enabled.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_RegUpdateEnable(u32 BaseAddress);

#define GAMMA_Reset | ( |  | BaseAddress | ) | GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, GAMMA_RST_RESET) \

This macro resets a Gamma instance.

This reset effects the core immediately, and may cause image tearing.

This reset resets the Gamma's configuration registers, and holds the core's outputs in their reset state until GAMMA_ClearReset() is called.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_Reset(u32 BaseAddress);

#define GAMMA_RST_AUTORESET 0x40000000

Software Reset - Auto-synchronize to SOF.

#define GAMMA_RST_RESET 0x80000000

Software Reset - Instantaneous.

#define GAMMA_STATUS 0x004

Status.

#define GAMMA_SYSDEBUG0 0x014

System Debug 0.

#define GAMMA_SYSDEBUG1 0x018

System Debug 1.

#define GAMMA_SYSDEBUG2 0x01C

System Debug 2.

#define GAMMA_TABLE_UPDATE 0x100

Swap to inactive LUT.

#define GAMMA_TestPatternDisable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) & \
~GAMMA_CTL_TPE_MASK)
GAMMA_CTL_TPE_MASK
#define GAMMA_CTL_TPE_MASK
Gamma Test Pattern Enable.
Definition: gamma.h:92
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350

This macro disables Test Pattern Input.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_TestPatternDisable(u32 BaseAddress);

#define GAMMA_TestPatternEnable | ( |  | BaseAddress | ) |

Value:
GAMMA_WriteReg(BaseAddress, GAMMA_CONTROL, \
GAMMA_ReadReg(BaseAddress, GAMMA_CONTROL) | \
GAMMA_CTL_TPE_MASK)
GAMMA_CTL_TPE_MASK
#define GAMMA_CTL_TPE_MASK
Gamma Test Pattern Enable.
Definition: gamma.h:92
GAMMA_CONTROL
#define GAMMA_CONTROL
Register Offsets.
Definition: gamma.h:71
GAMMA_WriteReg
#define GAMMA_WriteReg(BaseAddress, RegOffset, Data)
Write the given register.
Definition: gamma.h:369
GAMMA_ReadReg
#define GAMMA_ReadReg(BaseAddress, RegOffset)
Read the given register.
Definition: gamma.h:350

This macro enables Test Pattern Input.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)

Returns
  None.

Note
  C-style signature: void GAMMA_TestPatternEnable(u32 BaseAddress);

#define GAMMA_TIMING_STATUS 0x024

Timing Measurement Status.

#define GAMMA_VERSION 0x010

Version.

#define GAMMA_WriteReg | ( |  | BaseAddress,
|  |  | RegOffset,
|  |  | Data
| ) |  | GAMMA_Out32((BaseAddress) + (RegOffset), (Data))

Write the given register.

Parameters

  BaseAddress | is the Xilinx EDK base address of the Gamma core (from xparameters.h)
  RegOffset | is the register offset of the register (defined at top of this file)
  Data | is the 32-bit value to write to the register

Returns
  None.

Note
  C-style signature: void GAMMA_WriteReg(u32 BaseAddress, u32 RegOffset, u32 Data)