| dfxasm Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Data Structures | Macros | Functions
Overview

## Data Structures
struct | XDfxasm
| The XDfxasm instance data structure. More...

## Macros
#define | XDfxasm_ReadReg(Address) Xil_In32(Address)
| This macro reads a value from the given register. More...
#define | XDfxasm_WriteReg(Address, Data) Xil_Out32(Address, (u32)(Data))
| This macro writes a value to the given register. More...

## Functions
s32 | XDfxasm_CfgInitialize (XDfxasm *InstancePtr, XDfxasm_Config *ConfigPtr, UINTPTR EffectiveAddress)
| This function initializes a XDfxasm instance/driver. More...
void | XDfxasm_SetState (XDfxasm *InstancePtr, XDfxasm_State ShutdownValue)
| This function is used to set shutdown manager in shutdown or pass through mode. More...
u32 | XDfxasm_GetState (XDfxasm *InstancePtr)
| This function is used to read the state of the shutdown manager. More...
XDfxasm_Config * | XDfxasm_LookupConfig (u16 DeviceId)
| This function looks for the device configuration based on the unique device ID. More...

## Register Offset
#define | XDFX_ASM_CTRL_OFFSET (0x000)
| Control register Offset and status register is also mappped to same address as Control register. More...

## Register Mask
#define | XDFX_ASM_CTRL_SHUTDOWN_MASK (0x0000000F)
| Shutdown manager state mask. More...

## Macro Definition Documentation

#define XDFX_ASM_CTRL_OFFSET (0x000)

Control register Offset and status register is also mappped to same address as Control register.

Referenced by XDfxasm_GetState(), and XDfxasm_SetState().

#define XDFX_ASM_CTRL_SHUTDOWN_MASK (0x0000000F)

Shutdown manager state mask.

Referenced by XDfxasm_GetState().

#define XDfxasm_ReadReg | ( |  | Address | ) | Xil_In32(Address)

This macro reads a value from the given register.

Parameters

  Address | is the address of the register to read from.

Returns
  The 32-bit value read from register.

Note
  None.

Referenced by XDfxasm_GetState().

#define XDfxasm_WriteReg | ( |  | Address,
|  |  | Data
| ) |  | Xil_Out32(Address, (u32)(Data))

This macro writes a value to the given register.

Parameters

  Address | is the address of the register to write to.
  Data | is the 32-bit value to write to the register.

Returns
  None.

Note
  None.

Referenced by XDfxasm_SetState().

## Function Documentation

s32 XDfxasm_CfgInitialize | ( | XDfxasm * | InstancePtr,
|  | XDfxasm_Config * | ConfigPtr,
|  | UINTPTR | EffectiveAddress
| ) |  |

This function initializes a XDfxasm instance/driver.

Parameters

  InstancePtr | is a pointer to the XDfxasm instance.
  ConfigPtr | points to the XDfxasm device configuration structure.
  EffectiveAddress | is the device base address in the virtual memory address space. If the address translation is not used then the physical address is passed.

Returns
  - XST_SUCCESS if initialization was successful.

Note
  None.

Set some default values for instance data, don't indicate the device is ready to use until everything has been initialized successfully.

References XDfxasm::Config, and XDfxasm::IsReady.

Referenced by XDfxasm_Example().

u32 XDfxasm_GetState | ( | XDfxasm * | InstancePtr | ) |

This function is used to read the state of the shutdown manager.

Parameters

  InstancePtr | is a pointer to the XDfxasm instance.

Returns
  Returns shutdown manager state and its bit significance is as follows. -BIT0 - 0 Entry to Pass Through mode has been requested
  - 1 Entry to Shutdown mode has been requested -BIT1 - 0 The read or the write channel (or both) are in the Pass Through mode
  - 1 Both the read and write channels are in the Shutdown Mode -BIT2 - 0 The write channel is in the Pass Through mode
  - 1 The write channel is in the Shutdown Mode -BIT3 - 0 The read channel is in the Pass Through mode
  - 1 The read channel is in the Shutdown Mode

Note
  None.

References XDfxasm::Config, XDfxasm::IsReady, XDFX_ASM_CTRL_OFFSET, XDFX_ASM_CTRL_SHUTDOWN_MASK, and XDfxasm_ReadReg.

Referenced by XDfxasm_TestState().

XDfxasm_Config * XDfxasm_LookupConfig | ( | u16 | DeviceId | ) |

This function looks for the device configuration based on the unique device ID.

The table XDfxasm_ConfigTable[] contains the configuration information for each device in the system.

Parameters

  DeviceId | is the unique device ID of the device being looked up.

Returns
  A pointer to the configuration table entry corresponding to the given device ID, or NULL if no match is found.

Note
  None.

Referenced by XDfxasm_Example().

void XDfxasm_SetState | ( | XDfxasm * | InstancePtr,
|  | XDfxasm_State | ShutdownValue
| ) |  |

This function is used to set shutdown manager in shutdown or pass through mode.

Parameters

  InstancePtr | is a pointer to the XDfxasm instance.
  ShutdownValue | is to set shutdown manager in shutdown or pass through mode. Value can be either 0 or 1. Values are XDFX_ASM_PASSTHROUGH_MODE(0) if in passthrough mode XDFX_ASM_SHUTDOWN_MODE(1) if in shutdown mode

Returns
  None

Note
  When Shutdown manager is in shutdown mode it blocks the axi traffic thats going to the Reconfigurable partition from static logic while Partial Reconfiguration occurs.

References XDfxasm::Config, XDfxasm::IsReady, XDFX_ASM_CTRL_OFFSET, and XDfxasm_WriteReg.

Referenced by XDfxasm_TestState().