![]() |
trafgen
Vitis Drivers API Documentation
|
Data Structures | |
struct | XTrafGen_CRamCmd |
Command Ram word fields. More... | |
struct | XTrafGen_PRamCmd |
Parameter Ram word fields. More... | |
struct | XTrafGen_Cmd |
Command structure exposed to user. More... | |
struct | XTrafGen_CmdEntry |
Command Entry structure. More... | |
struct | XTrafGen_Config |
The configuration structure for Traffic Generator device. More... | |
struct | XTrafGen_CmdInfo |
Command Information Structure. More... | |
struct | XTrafGen |
The XTrafGen driver instance data. More... | |
Macros | |
#define | XTrafGen_GetCmdInfo(InstancePtr) (&((InstancePtr)->CmdInfo)) |
Get Command Info pointer. More... | |
#define | MAX_NUM_ENTRIES 256 |
Number of command entries per region. More... | |
#define | NUM_BLOCKS 2 |
Number of Read and write regions. More... | |
#define | XTG_WRITE 1 |
Write Direction Flag. More... | |
#define | XTG_READ 0 |
Read Direction Flag. More... | |
#define | XTG_MODE_FULL 0 |
Full Mode. More... | |
#define | XTG_MODE_BASIC 1 |
Basic Mode. More... | |
#define | XTG_MODE_STATIC 2 |
Static Mode. More... | |
#define | XTG_MODE_STREAMING 3 |
Streaming Mode. More... | |
#define | XTG_MODE_SYS_INIT 4 |
System Init Mode. More... | |
#define | XTG_MWIDTH_32 0 |
Master Width - 32. More... | |
#define | XTG_MWIDTH_64 1 |
Master Width - 64. More... | |
#define | XTG_SWIDTH_32 0 |
Slave Width - 32. More... | |
#define | XTG_SWIDTH_64 1 |
Slave Width - 64. More... | |
#define | XTG_PRM_RAM_BLOCK_SIZE 0x400 |
PARAM Block Size (1KB) More... | |
#define | XTG_CMD_RAM_BLOCK_SIZE 0x1000 |
Cmd RAM Block Size (4KB) More... | |
#define | XTG_EXTCMD_RAM_BLOCK_SIZE 0x400 |
Extended CMDRAM Block Size (1KB) More... | |
#define | XTG_PARAM_RAM_SIZE 0x800 |
Parameter RAM (2KB) More... | |
#define | XTG_COMMAND_RAM_SIZE 0x2000 |
Command RAM (8KB) More... | |
#define | XTG_MASTER_RAM_SIZE 0x2000 |
Master RAM (8KB) More... | |
#define | ERROR_INTRID 0 |
Error Interrupt Handler. More... | |
#define | MASTER_INTRID 1 |
Master Complete Interrupt Handler. More... | |
#define | XTrafGen_ReadCoreRevision(InstancePtr) |
XTrafGen_ReadCoreRevision reads revision of core. More... | |
#define | XTrafGen_ReadIdWidth(InstancePtr) |
XTrafGen_ReadIdWidth reads M_ID_WIDTH. More... | |
#define | XTrafGen_StartMasterLogic(InstancePtr) |
XTrafGen_StartMasterLogic starts traffic generator master logic. More... | |
#define | XTrafGen_IsMasterLogicDone(InstancePtr) |
XTrafGen_IsMasterLogicDone checks for traffic generator master logic completed bit. More... | |
#define | XTrafGen_LoopEnable(InstancePtr) |
XTrafGen_LoopEnable loops through the command set created using CMDRAM and PARAMRAM indefinitely in Advanced mode/Basic mode of ATG. More... | |
#define | XTrafGen_LoopDisable(InstancePtr) |
XTrafGen_LoopDisable Disables the loop bit in Master control regiset in Advanced mode/Basic mode of ATG. More... | |
#define | XTrafGen_WriteSlaveControlReg(InstancePtr, Value) |
XTrafGen_WriteSlaveControlReg enables control bits of Slave Control Register. More... | |
#define | XTrafGen_CheckforMasterComplete(InstancePtr) |
XTrafGen_CheckforMasterComplete checks for master complete. More... | |
#define | XTrafGen_ReadErrors(InstancePtr) |
XTrafGen_ReadErrors read master and slave errors. More... | |
#define | XTrafGen_EnableMasterCmpInterrupt(InstancePtr) |
XTrafGen_EnableMasterCmpInterrupt enables Master logic complete bit. More... | |
#define | XTrafGen_ClearMasterCmpInterrupt(InstancePtr) |
XTrafGen_ClearMasterCmpInterrupt clear Master logic complete interrupt bit. More... | |
#define | XTrafGen_ClearErrors(InstancePtr, Mask) |
XTrafGen_ClearErrors clear errors specified in Mask. More... | |
#define | XTrafGen_EnableErrors(InstancePtr, Mask) |
XTrafGen_EnableErrors enable errors specified in Mask. More... | |
#define | XTrafGen_MasterErrIntrEnable(InstancePtr) |
XTrafGen_MasterErrIntrEnable enables Global Master error bit. More... | |
#define | XTrafGen_MasterErrIntrDisable(InstancePtr) |
XTrafGen_MasterErrIntrDisable disables Global Master error bit. More... | |
#define | XTrafGen_SlaveErrIntrEnable(InstancePtr) |
XTrafGen_SlaveErrIntrEnable enables Global Slave error bit. More... | |
#define | XTrafGen_SlaveErrIntrDisable(InstancePtr) |
XTrafGen_SlaveErrIntrDisable disables Global Slave error bit. More... | |
#define | XTrafGen_ReadConfigStatus(InstancePtr) |
XTrafGen_ReadConfigStatus reads Config status register. More... | |
#define | XTrafGen_StaticEnable(InstancePtr) |
XTrafGen_StaticEnable enable the traffic generation when the core is configured Static Mode. More... | |
#define | XTrafGen_StaticDisable(InstancePtr) |
XTrafGen_StaticDisable disables the traffic generation on the Axi TrafGen when the core is configured in Static Mode. More... | |
#define | XTrafGen_StaticVersion(InstancePtr) |
XTrafGen_StaticVersion returns the version value for the Axi TrafGen When configured in Static Mode. More... | |
#define | XTrafGen_SetStaticBurstLen(InstancePtr, Value) |
XTrafGen_SetStaticBurstLen Configures the Burst Length for AxiTrafGen In Static Mode. More... | |
#define | XTrafGen_GetStaticBurstLen(InstancePtr) |
XTrafGen_GetStaticBurstLen Gets the Burst Length for AxiTrafGen in StaticMode. More... | |
#define | XTrafGen_GetStaticTransferDone(InstancePtr) |
XTrafGen_GetStaticTransferDone gets the state of Transfer done bit in Control register When the TraficGen is configured in Static Mode. More... | |
#define | XTrafGen_SetStaticTransferDone(InstancePtr) |
XTrafGen_SetStaticTransferDone sets the Transfer done bit in Control register When AxiTrafGen is Configured in Static Mode. More... | |
#define | XTrafGen_IsStaticTransferDone(InstancePtr) |
XTrafGen_IsStaticTransferDone checks for reset value When Static Traffic generation Completed by reading Control Register. More... | |
#define | XTrafGen_StreamEnable(InstancePtr) |
XTrafGen_StreamEnable enable the traffic generation on the Axi TrafGen When the core is configured in Streaming Mode. More... | |
#define | XTrafGen_StreamDisable(InstancePtr) |
XTrafGen_StreamDisable Disable the traffic generation on the Axi TrafGen When core is configured in Streaming Mode. More... | |
#define | XTrafGen_StreamVersion(InstancePtr) |
XTrafGen_StreamVersion returns the version value for the Axi TrafGen When configured in Streaming Mode. More... | |
#define | XTrafGen_SetStreamingTransLen(InstancePtr, Value) |
XTrafGen_SetStreamingTransLen Configures the length of transaction for AxiTrafGen in Streaming Mode. More... | |
#define | XTrafGen_GetStreamingTransLen(InstancePtr) |
XTrafGen_GetStreamingTransLen Gets the length of transaction for AxiTrafGen in Streaming Mode. More... | |
#define | XTrafGen_GetStreamingTransCnt(InstancePtr) |
XTrafGen_GetStreamingTransCnt Gets the transfer count for AxiTrafGen in Streaming Mode. More... | |
#define | XTrafGen_SetStreamingRandomLen(InstancePtr, Value) |
XTrafGen_SetStreamingRandomLen Configures the random transaction length for AxiTrafGen in Streaming Mode. More... | |
#define | XTrafGen_GetStreamingProgDelay(InstancePtr) |
XTrafGen_GetStreamingProgDelay Gets the Programmable Delay for AxiTrafGen in Streaming Mode. More... | |
#define | XTrafGen_SetStreamingTransCnt(InstancePtr, Value) |
XTrafGen_SetStreamingTransCnt Configures the transfer count for AxiTrafGen in Streaming Mode. More... | |
#define | XTrafGen_SetStreamingProgDelay(InstancePtr, Value) |
XTrafGen_SetStreamingProgDelay Configures the Programmable Delay for AxiTrafGen in Streaming Mode. More... | |
#define | XTrafGen_SetStreamingTdestPort(InstancePtr, Value) |
XTrafGen_SetStreamingTdestPort Configures the Value to drive on TDEST port for Axi TrafGen in Streaming Mode. More... | |
#define | XTrafGen_SetStreamingTransferDone(InstancePtr) |
XTrafGen_SetTransferDone sets the Transfer done bit in Control register When AxiTrafGen is Configured in Streaming Mode. More... | |
#define | XTrafGen_IsStreamingTransferDone(InstancePtr) |
XTrafGen_IsStreamingTransferDone checks for reset value When Streaming Traffic generation is Completed by reading Stream Control Register. More... | |
#define | XTrafGen_ResetStreamingRandomLen(InstancePtr) |
XTrafGen_ResetStreamingRandomLen resets the random transaction length for AxiTrafGen in Streaming Mode. More... | |
Typedefs | |
typedef struct XTrafGen_CRamCmd | XTrafGen_CRamCmd |
Command Ram word fields. More... | |
typedef struct XTrafGen_PRamCmd | XTrafGen_PRamCmd |
Parameter Ram word fields. More... | |
typedef struct XTrafGen_Cmd | XTrafGen_Cmd |
Command structure exposed to user. More... | |
typedef struct XTrafGen_CmdEntry | XTrafGen_CmdEntry |
Command Entry structure. More... | |
typedef struct XTrafGen_Config | XTrafGen_Config |
The configuration structure for Traffic Generator device. More... | |
typedef struct XTrafGen_CmdInfo | XTrafGen_CmdInfo |
Command Information Structure. More... | |
typedef struct XTrafGen | XTrafGen |
The XTrafGen driver instance data. More... | |
Functions | |
int | XTrafGen_CfgInitialize (XTrafGen *InstancePtr, XTrafGen_Config *Config, UINTPTR EffectiveAddress) |
This function initializes a AXI Traffic Generator device. More... | |
int | XTrafGen_AddCommand (XTrafGen *InstancePtr, XTrafGen_Cmd *CmdPtr) |
Add a command to the software list of commands. More... | |
int | XTrafGen_GetLastValidIndex (XTrafGen *InstancePtr, u32 RdWrFlag) |
Get last Valid Command Index of Write/Read region. More... | |
int | XTrafGen_WriteCmdsToHw (XTrafGen *InstancePtr) |
Write Commands to internal Command and Parameter RAMs. More... | |
int | XTrafGen_EraseAllCommands (XTrafGen *InstancePtr) |
Erase all Command Entry values. More... | |
void | XTrafGen_AccessMasterRam (XTrafGen *InstancePtr, u32 Offset, int Length, u8 RdWrFlag, u32 *Data) |
Write or Read Master RAM. More... | |
void | XTrafGen_PrintCmds (XTrafGen *InstancePtr) |
Display Command Entry values. More... | |
XTrafGen_Config * | XTrafGen_LookupConfig (u32 DeviceId) |
Look up the hardware configuration for a device instance. More... | |
Device registers | |
#define | XTG_MCNTL_OFFSET 0x00 |
Master Control. More... | |
#define | XTG_SCNTL_OFFSET 0x04 |
Slave Control. More... | |
#define | XTG_ERR_STS_OFFSET 0x08 |
Error Status. More... | |
#define | XTG_ERR_EN_OFFSET 0x0C |
Error Enable. More... | |
#define | XTG_MSTERR_INTR_OFFSET 0x10 |
Master Err Interrupt Enable. More... | |
#define | XTG_CFG_STS_OFFSET 0x14 |
Config Status. More... | |
#define | XTG_STREAM_CNTL_OFFSET 0x30 |
Streaming Control. More... | |
#define | XTG_STREAM_CFG_OFFSET 0x34 |
Streaming Config. More... | |
#define | XTG_STREAM_TL_OFFSET 0x38 |
Streaming Transfer Length. More... | |
#define | XTG_STATIC_CNTL_OFFSET 0x60 |
Static Mode Register Descrptions. More... | |
#define | XTG_STATIC_LEN_OFFSET 0x64 |
Static Length. More... | |
Internal RAM Offsets | |
#define | XTG_PARAM_RAM_OFFSET 0x1000 |
Parameter RAM Offset. More... | |
#define | XTG_COMMAND_RAM_OFFSET 0x8000 |
Command RAM Offset. More... | |
#define | XTG_MASTER_RAM_OFFSET 0xC000 |
Master RAM Offset. More... | |
#define | XTG_COMMAND_RAM_MSB_OFFSET 0xa000 |
Command RAM MSB Offset. More... | |
Master Control Register bit definitions. | |
These bits are associated with the XTG_MCNTL_OFFSET register. | |
#define | XTG_MCNTL_REV_MASK 0xFF000000 |
Core Revision Mask. More... | |
#define | XTG_MCNTL_MSTID_MASK 0x00E00000 |
M_ID_WIDTH Mask. More... | |
#define | XTG_MCNTL_MSTEN_MASK 0x00100000 |
Master Logic Enable Mask. More... | |
#define | XTG_MCNTL_LOOPEN_MASK 0x00080000 |
Loop enable Mask. More... | |
#define | XTG_MCNTL_REV_SHIFT 24 |
Core Rev shift. More... | |
#define | XTG_MCNTL_MSTID_SHIFT 21 |
M_ID_WIDTH shift. More... | |
Slave Control Register bit definitions. | |
These bits are associated with the XTG_SCNTL_OFFSET register. | |
#define | XTG_SCNTL_BLKRD_MASK 0x00080000 |
Enable Block Read. More... | |
#define | XTG_SCNTL_DISEXCL_MASK 0x00040000 |
Disable Exclusive Access. More... | |
#define | XTG_SCNTL_WORDR_MASK 0x00020000 |
Write Response Order Enable. More... | |
#define | XTG_SCNTL_RORDR_MASK 0x00010000 |
Read Response Order Enable. More... | |
#define | XTG_SCNTL_ERREN_MASK 0x00008000 |
Slv Error Interrupt Enable. More... | |
Error bitmasks | |
These bits are shared with the XTG_ERR_STS_OFFSET and XTG_ERR_EN_OFFSET register. | |
#define | XTG_ERR_ALL_MSTERR_MASK 0x001F0000 |
Master Errors Mask. More... | |
#define | XTG_ERR_ALL_SLVERR_MASK 0x00000003 |
Slave Errors Mask. More... | |
#define | XTG_ERR_ALL_ERR_MASK 0x001F0003 |
All Errors Mask. More... | |
#define | XTG_ERR_MSTCMP_MASK 0x80000000 |
Master Complete Mask. More... | |
#define | XTG_ERR_RIDER_MASK 0x00100000 |
Master Invalid RVALID Mask. More... | |
#define | XTG_ERR_WIDER_MASK 0x00080000 |
Master Invalid BVALID Mask. More... | |
#define | XTG_ERR_WRSPER_MASK 0x00040000 |
MW Invalid RESP Mask. More... | |
#define | XTG_ERR_RERRSP_MASK 0x00020000 |
MR Invalid RESP Mask. More... | |
#define | XTG_ERR_RLENER_MASK 0x00010000 |
Master Read Length Mask. More... | |
#define | XTG_ERR_SWSTRB_MASK 0x00000002 |
Slave WSTRB Illegal Mask. More... | |
#define | XTG_ERR_SWLENER_MASK 0x00000001 |
Slave Read Length Mask. More... | |
#define ERROR_INTRID 0 |
Error Interrupt Handler.
Referenced by XTrafGenInterruptExample().
#define MASTER_INTRID 1 |
Master Complete Interrupt Handler.
Referenced by XTrafGenInterruptExample().
#define MAX_NUM_ENTRIES 256 |
Number of command entries per region.
Referenced by XTrafGen_AddCommand(), XTrafGen_EraseAllCommands(), and XTrafGen_PrintCmds().
#define NUM_BLOCKS 2 |
Number of Read and write regions.
Referenced by XTrafGen_EraseAllCommands(), and XTrafGen_WriteCmdsToHw().
#define XTG_CFG_STS_OFFSET 0x14 |
Config Status.
#define XTG_CMD_RAM_BLOCK_SIZE 0x1000 |
Cmd RAM Block Size (4KB)
#define XTG_COMMAND_RAM_MSB_OFFSET 0xa000 |
Command RAM MSB Offset.
#define XTG_COMMAND_RAM_OFFSET 0x8000 |
Command RAM Offset.
#define XTG_COMMAND_RAM_SIZE 0x2000 |
Command RAM (8KB)
#define XTG_ERR_ALL_ERR_MASK 0x001F0003 |
All Errors Mask.
#define XTG_ERR_ALL_MSTERR_MASK 0x001F0000 |
Master Errors Mask.
#define XTG_ERR_ALL_SLVERR_MASK 0x00000003 |
Slave Errors Mask.
#define XTG_ERR_EN_OFFSET 0x0C |
Error Enable.
#define XTG_ERR_MSTCMP_MASK 0x80000000 |
Master Complete Mask.
#define XTG_ERR_RERRSP_MASK 0x00020000 |
MR Invalid RESP Mask.
#define XTG_ERR_RIDER_MASK 0x00100000 |
Master Invalid RVALID Mask.
#define XTG_ERR_RLENER_MASK 0x00010000 |
Master Read Length Mask.
#define XTG_ERR_STS_OFFSET 0x08 |
Error Status.
#define XTG_ERR_SWLENER_MASK 0x00000001 |
Slave Read Length Mask.
#define XTG_ERR_SWSTRB_MASK 0x00000002 |
Slave WSTRB Illegal Mask.
#define XTG_ERR_WIDER_MASK 0x00080000 |
Master Invalid BVALID Mask.
#define XTG_ERR_WRSPER_MASK 0x00040000 |
MW Invalid RESP Mask.
#define XTG_EXTCMD_RAM_BLOCK_SIZE 0x400 |
Extended CMDRAM Block Size (1KB)
#define XTG_MASTER_RAM_OFFSET 0xC000 |
Master RAM Offset.
#define XTG_MASTER_RAM_SIZE 0x2000 |
Master RAM (8KB)
Referenced by XTrafGen_AccessMasterRam().
#define XTG_MCNTL_LOOPEN_MASK 0x00080000 |
Loop enable Mask.
#define XTG_MCNTL_MSTEN_MASK 0x00100000 |
Master Logic Enable Mask.
#define XTG_MCNTL_MSTID_MASK 0x00E00000 |
M_ID_WIDTH Mask.
#define XTG_MCNTL_MSTID_SHIFT 21 |
M_ID_WIDTH shift.
#define XTG_MCNTL_OFFSET 0x00 |
Master Control.
#define XTG_MCNTL_REV_MASK 0xFF000000 |
Core Revision Mask.
#define XTG_MCNTL_REV_SHIFT 24 |
Core Rev shift.
#define XTG_MODE_BASIC 1 |
Basic Mode.
Referenced by XTrafGen_CfgInitialize().
#define XTG_MODE_FULL 0 |
Full Mode.
Referenced by XTrafGen_CfgInitialize().
#define XTG_MODE_STATIC 2 |
Static Mode.
Referenced by XTrafGen_CfgInitialize(), and XTrafGenStaticModeExample().
#define XTG_MODE_STREAMING 3 |
Streaming Mode.
Referenced by XTrafGen_CfgInitialize(), and XTrafGenStremingModeMasterExample().
#define XTG_MODE_SYS_INIT 4 |
System Init Mode.
Referenced by XTrafGen_CfgInitialize().
#define XTG_MSTERR_INTR_OFFSET 0x10 |
Master Err Interrupt Enable.
#define XTG_MWIDTH_32 0 |
Master Width - 32.
#define XTG_MWIDTH_64 1 |
Master Width - 64.
#define XTG_PARAM_RAM_OFFSET 0x1000 |
Parameter RAM Offset.
#define XTG_PARAM_RAM_SIZE 0x800 |
Parameter RAM (2KB)
#define XTG_PRM_RAM_BLOCK_SIZE 0x400 |
PARAM Block Size (1KB)
#define XTG_READ 0 |
Read Direction Flag.
Referenced by XTrafGenInterruptExample(), and XTrafGenPollingExample().
#define XTG_SCNTL_BLKRD_MASK 0x00080000 |
Enable Block Read.
#define XTG_SCNTL_DISEXCL_MASK 0x00040000 |
Disable Exclusive Access.
#define XTG_SCNTL_ERREN_MASK 0x00008000 |
Slv Error Interrupt Enable.
#define XTG_SCNTL_OFFSET 0x04 |
Slave Control.
#define XTG_SCNTL_RORDR_MASK 0x00010000 |
Read Response Order Enable.
#define XTG_SCNTL_WORDR_MASK 0x00020000 |
Write Response Order Enable.
#define XTG_STATIC_CNTL_OFFSET 0x60 |
Static Mode Register Descrptions.
Static Control
#define XTG_STATIC_LEN_OFFSET 0x64 |
Static Length.
#define XTG_STREAM_CFG_OFFSET 0x34 |
Streaming Config.
#define XTG_STREAM_CNTL_OFFSET 0x30 |
Streaming Control.
#define XTG_STREAM_TL_OFFSET 0x38 |
Streaming Transfer Length.
#define XTG_SWIDTH_32 0 |
Slave Width - 32.
#define XTG_SWIDTH_64 1 |
Slave Width - 64.
#define XTG_WRITE 1 |
Write Direction Flag.
Referenced by XTrafGen_AccessMasterRam(), XTrafGen_AddCommand(), XTrafGen_GetLastValidIndex(), XTrafGenInterruptExample(), and XTrafGenPollingExample().
#define XTrafGen_CheckforMasterComplete | ( | InstancePtr | ) |
XTrafGen_CheckforMasterComplete checks for master complete.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_ClearErrors | ( | InstancePtr, | |
Mask | |||
) |
XTrafGen_ClearErrors clear errors specified in Mask.
The corresponding error for each bit set to 1 in Mask, will be enabled.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Mask | contains a bit mask of the errors to clear. The mask can be formed using a set of bit wise or'd values from the definitions in xtrafgen_hw.h file. |
Referenced by XTrafGenPollingExample().
#define XTrafGen_ClearMasterCmpInterrupt | ( | InstancePtr | ) |
XTrafGen_ClearMasterCmpInterrupt clear Master logic complete interrupt bit.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_EnableErrors | ( | InstancePtr, | |
Mask | |||
) |
XTrafGen_EnableErrors enable errors specified in Mask.
The corresponding error for each bit set to 1 in Mask, will be enabled.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Mask | contains a bit mask of the errors to enable. The mask can be formed using a set of bit wise or'd values from the definitions in xtrafgen_hw.h file. |
#define XTrafGen_EnableMasterCmpInterrupt | ( | InstancePtr | ) |
XTrafGen_EnableMasterCmpInterrupt enables Master logic complete bit.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenInterruptExample().
#define XTrafGen_GetCmdInfo | ( | InstancePtr | ) | (&((InstancePtr)->CmdInfo)) |
Get Command Info pointer.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGen_AddCommand(), XTrafGen_EraseAllCommands(), XTrafGen_GetLastValidIndex(), and XTrafGen_PrintCmds().
#define XTrafGen_GetStaticBurstLen | ( | InstancePtr | ) |
XTrafGen_GetStaticBurstLen Gets the Burst Length for AxiTrafGen in StaticMode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_GetStaticTransferDone | ( | InstancePtr | ) |
XTrafGen_GetStaticTransferDone gets the state of Transfer done bit in Control register When the TraficGen is configured in Static Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStaticModeExample().
#define XTrafGen_GetStreamingProgDelay | ( | InstancePtr | ) |
XTrafGen_GetStreamingProgDelay Gets the Programmable Delay for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_GetStreamingTransCnt | ( | InstancePtr | ) |
XTrafGen_GetStreamingTransCnt Gets the transfer count for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStremingModeMasterExample().
#define XTrafGen_GetStreamingTransLen | ( | InstancePtr | ) |
XTrafGen_GetStreamingTransLen Gets the length of transaction for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStremingModeMasterExample().
#define XTrafGen_IsMasterLogicDone | ( | InstancePtr | ) |
XTrafGen_IsMasterLogicDone checks for traffic generator master logic completed bit.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenPollingExample().
#define XTrafGen_IsStaticTransferDone | ( | InstancePtr | ) |
XTrafGen_IsStaticTransferDone checks for reset value When Static Traffic generation Completed by reading Control Register.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStaticModeExample().
#define XTrafGen_IsStreamingTransferDone | ( | InstancePtr | ) |
XTrafGen_IsStreamingTransferDone checks for reset value When Streaming Traffic generation is Completed by reading Stream Control Register.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_LoopDisable | ( | InstancePtr | ) |
XTrafGen_LoopDisable Disables the loop bit in Master control regiset in Advanced mode/Basic mode of ATG.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_LoopEnable | ( | InstancePtr | ) |
XTrafGen_LoopEnable loops through the command set created using CMDRAM and PARAMRAM indefinitely in Advanced mode/Basic mode of ATG.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_MasterErrIntrDisable | ( | InstancePtr | ) |
XTrafGen_MasterErrIntrDisable disables Global Master error bit.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_MasterErrIntrEnable | ( | InstancePtr | ) |
XTrafGen_MasterErrIntrEnable enables Global Master error bit.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_ReadConfigStatus | ( | InstancePtr | ) |
XTrafGen_ReadConfigStatus reads Config status register.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGen_CfgInitialize().
#define XTrafGen_ReadCoreRevision | ( | InstancePtr | ) |
XTrafGen_ReadCoreRevision reads revision of core.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_ReadErrors | ( | InstancePtr | ) |
XTrafGen_ReadErrors read master and slave errors.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenPollingExample().
#define XTrafGen_ReadIdWidth | ( | InstancePtr | ) |
XTrafGen_ReadIdWidth reads M_ID_WIDTH.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_ResetStreamingRandomLen | ( | InstancePtr | ) |
XTrafGen_ResetStreamingRandomLen resets the random transaction length for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStremingModeMasterExample().
#define XTrafGen_SetStaticBurstLen | ( | InstancePtr, | |
Value | |||
) |
XTrafGen_SetStaticBurstLen Configures the Burst Length for AxiTrafGen In Static Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Value | is the Burst length to set in the Static length register. |
Referenced by XTrafGenStaticModeExample().
#define XTrafGen_SetStaticTransferDone | ( | InstancePtr | ) |
XTrafGen_SetStaticTransferDone sets the Transfer done bit in Control register When AxiTrafGen is Configured in Static Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStaticModeExample().
#define XTrafGen_SetStreamingProgDelay | ( | InstancePtr, | |
Value | |||
) |
XTrafGen_SetStreamingProgDelay Configures the Programmable Delay for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Value | is the value that's need to be configure in the Stream Config Register. |
#define XTrafGen_SetStreamingRandomLen | ( | InstancePtr, | |
Value | |||
) |
XTrafGen_SetStreamingRandomLen Configures the random transaction length for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Value | is the random length that's need to be Configure in the Streaming Config register. |
#define XTrafGen_SetStreamingTdestPort | ( | InstancePtr, | |
Value | |||
) |
XTrafGen_SetStreamingTdestPort Configures the Value to drive on TDEST port for Axi TrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Value | is the Port value that's need to be set. |
#define XTrafGen_SetStreamingTransCnt | ( | InstancePtr, | |
Value | |||
) |
XTrafGen_SetStreamingTransCnt Configures the transfer count for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Value | is the transfer length that needs to be configured in Transfer length register. |
Referenced by XTrafGenStremingModeMasterExample().
#define XTrafGen_SetStreamingTransferDone | ( | InstancePtr | ) |
XTrafGen_SetTransferDone sets the Transfer done bit in Control register When AxiTrafGen is Configured in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_SetStreamingTransLen | ( | InstancePtr, | |
Value | |||
) |
XTrafGen_SetStreamingTransLen Configures the length of transaction for AxiTrafGen in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Value | is the transfer length to set in the transfer length Register. |
Referenced by XTrafGenStremingModeMasterExample().
#define XTrafGen_SlaveErrIntrDisable | ( | InstancePtr | ) |
XTrafGen_SlaveErrIntrDisable disables Global Slave error bit.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_SlaveErrIntrEnable | ( | InstancePtr | ) |
XTrafGen_SlaveErrIntrEnable enables Global Slave error bit.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_StartMasterLogic | ( | InstancePtr | ) |
XTrafGen_StartMasterLogic starts traffic generator master logic.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenInterruptExample(), and XTrafGenPollingExample().
#define XTrafGen_StaticDisable | ( | InstancePtr | ) |
XTrafGen_StaticDisable disables the traffic generation on the Axi TrafGen when the core is configured in Static Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStaticModeExample().
#define XTrafGen_StaticEnable | ( | InstancePtr | ) |
XTrafGen_StaticEnable enable the traffic generation when the core is configured Static Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStaticModeExample().
#define XTrafGen_StaticVersion | ( | InstancePtr | ) |
XTrafGen_StaticVersion returns the version value for the Axi TrafGen When configured in Static Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_StreamDisable | ( | InstancePtr | ) |
XTrafGen_StreamDisable Disable the traffic generation on the Axi TrafGen When core is configured in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_StreamEnable | ( | InstancePtr | ) |
XTrafGen_StreamEnable enable the traffic generation on the Axi TrafGen When the core is configured in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Referenced by XTrafGenStremingModeMasterExample().
#define XTrafGen_StreamVersion | ( | InstancePtr | ) |
XTrafGen_StreamVersion returns the version value for the Axi TrafGen When configured in Streaming Mode.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
#define XTrafGen_WriteSlaveControlReg | ( | InstancePtr, | |
Value | |||
) |
XTrafGen_WriteSlaveControlReg enables control bits of Slave Control Register.
This API will write the value passed from the user.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Value | is the Slave Control Register value to set |
The XTrafGen driver instance data.
An instance must be allocated for each Traffic Generator device in use.
typedef struct XTrafGen_Cmd XTrafGen_Cmd |
Command structure exposed to user.
This structure should be updated by user with required configuration
typedef struct XTrafGen_CmdEntry XTrafGen_CmdEntry |
Command Entry structure.
This structure denotes each entry of 256 commands.
typedef struct XTrafGen_CmdInfo XTrafGen_CmdInfo |
Command Information Structure.
This structure is maintained by the driver
typedef struct XTrafGen_Config XTrafGen_Config |
The configuration structure for Traffic Generator device.
This structure passes the hardware building information to the driver
typedef struct XTrafGen_CRamCmd XTrafGen_CRamCmd |
Command Ram word fields.
typedef struct XTrafGen_PRamCmd XTrafGen_PRamCmd |
Parameter Ram word fields.
void XTrafGen_AccessMasterRam | ( | XTrafGen * | InstancePtr, |
u32 | Offset, | ||
int | Length, | ||
u8 | RdWrFlag, | ||
u32 * | Data | ||
) |
Write or Read Master RAM.
The MSTRAM has 8 KB of internal RAM used for the following:
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
Offset | is the offset value in Master RAM. |
Length | is the size of data to write/read. |
RdWrFlag | specifies whether to write or read |
Data | is the pointer to array which contains data to write or reads data into. |
References XTrafGen_Config::BaseAddress, XTrafGen::Config, XTG_MASTER_RAM_SIZE, XTG_WRITE, XTrafGen_ReadMasterRam, and XTrafGen_WriteMasterRam.
Referenced by XTrafGenInterruptExample(), and XTrafGenPollingExample().
int XTrafGen_AddCommand | ( | XTrafGen * | InstancePtr, |
XTrafGen_Cmd * | CmdPtr | ||
) |
Add a command to the software list of commands.
This function prepares the four Command Words and one Parameter Word from the Command structure passed from the user application. It then adds to a list of commands (maintained in the software). Both CMDRAM and PARAMRAM are divided into two regions, one for reads and one for writes. Each region can hold 256 commands with each entry containing four Command RAM words and one Parameter RAM word.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
CmdPtr | is a pointer to Command structure. |
References XTrafGen_CmdInfo::CmdEntry, XTrafGen_CmdEntry::CmdWords, XTrafGen_Cmd::CRamCmd, XTrafGen_CmdInfo::LastRdValidIndex, XTrafGen_CmdInfo::LastWrValidIndex, MAX_NUM_ENTRIES, XTrafGen_CmdEntry::ParamWord, XTrafGen_CmdInfo::RdIndex, XTrafGen_CmdInfo::RdIndexEnd, XTrafGen_Cmd::RdWrFlag, XTrafGen_CRamCmd::ValidCmd, XTrafGen_CmdInfo::WrIndex, XTrafGen_CmdInfo::WrIndexEnd, XTG_WRITE, and XTrafGen_GetCmdInfo.
Referenced by XTrafGenInterruptExample(), and XTrafGenPollingExample().
int XTrafGen_CfgInitialize | ( | XTrafGen * | InstancePtr, |
XTrafGen_Config * | Config, | ||
UINTPTR | EffectiveAddress | ||
) |
This function initializes a AXI Traffic Generator device.
This function must be called prior to using a AXI Traffic Generator Device. Initializing a engine includes setting up the register base address, setting up the instance data, and ensuring the hardware is in a quiescent state.
InstancePtr | is a pointer to the Axi Traffic Generator instance to be worked on. |
CfgPtr | references the structure holding the hardware configuration for the Axi Traffic Generator core to initialize. |
EffectiveAddr | is the device base address in the virtual memory address space. The caller is responsible for keeping the address mapping from EffectiveAddr to the device 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, use Config->BaseAddress for this parameters, passing the physical address instead. |
References XTrafGen_Config::AddressWidth, XTrafGen_Config::BaseAddress, XTrafGen_Config::BusType, XTrafGen::CmdInfo, XTrafGen::Config, XTrafGen_Config::DeviceId, XTrafGen_Config::IntId, XTrafGen_CmdInfo::LastRdValidIndex, XTrafGen_CmdInfo::LastWrValidIndex, XTrafGen::MasterWidth, XTrafGen_Config::Mode, XTrafGen_Config::ModeType, XTrafGen::OperatingMode, XTrafGen::SlaveWidth, XTG_CFG_STS_MBASIC_MASK, XTG_CFG_STS_MFULL_MASK, XTG_CFG_STS_MWIDTH_MASK, XTG_CFG_STS_MWIDTH_SHIFT, XTG_CFG_STS_SWIDTH_MASK, XTG_CFG_STS_SWIDTH_SHIFT, XTG_MODE_BASIC, XTG_MODE_FULL, XTG_MODE_STATIC, XTG_MODE_STREAMING, XTG_MODE_SYS_INIT, and XTrafGen_ReadConfigStatus.
Referenced by XTrafGenInterruptExample(), XTrafGenPollingExample(), XTrafGenStaticModeExample(), and XTrafGenStremingModeMasterExample().
int XTrafGen_EraseAllCommands | ( | XTrafGen * | InstancePtr | ) |
Erase all Command Entry values.
This function erases all the 256 entries of both write and read regions with each entry containing four command words and parameter word.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
References XTrafGen_CmdInfo::CmdEntry, XTrafGen_CmdInfo::LastRdValidIndex, XTrafGen_CmdInfo::LastWrValidIndex, MAX_NUM_ENTRIES, NUM_BLOCKS, XTrafGen_CmdInfo::RdIndex, XTrafGen_CmdInfo::RdIndexEnd, XTrafGen_CmdInfo::WrIndex, XTrafGen_CmdInfo::WrIndexEnd, and XTrafGen_GetCmdInfo.
int XTrafGen_GetLastValidIndex | ( | XTrafGen * | InstancePtr, |
u32 | RdWrFlag | ||
) |
Get last Valid Command Index of Write/Read region.
The last valid command index is used to set 'my_depend' and 'other_depend' fields of the Command RAM (Word 2).
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
RdWrFlag | specifies a Read or Write Region |
References XTrafGen_CmdInfo::LastRdValidIndex, XTrafGen_CmdInfo::LastWrValidIndex, XTG_WRITE, and XTrafGen_GetCmdInfo.
Referenced by XTrafGenInterruptExample(), and XTrafGenPollingExample().
XTrafGen_Config * XTrafGen_LookupConfig | ( | u32 | DeviceId | ) |
Look up the hardware configuration for a device instance.
DeviceId | is the unique device ID of the device to lookup for |
Referenced by XTrafGenInterruptExample(), XTrafGenPollingExample(), XTrafGenStaticModeExample(), and XTrafGenStremingModeMasterExample().
void XTrafGen_PrintCmds | ( | XTrafGen * | InstancePtr | ) |
Display Command Entry values.
This function prints all the 256 entries of both write and read regions with each entry containing four command words and parameter word.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
References XTrafGen_CmdInfo::CmdEntry, XTrafGen_CmdEntry::CmdWords, MAX_NUM_ENTRIES, XTrafGen_CmdEntry::ParamWord, and XTrafGen_GetCmdInfo.
Referenced by XTrafGenInterruptExample(), and XTrafGenPollingExample().
int XTrafGen_WriteCmdsToHw | ( | XTrafGen * | InstancePtr | ) |
Write Commands to internal Command and Parameter RAMs.
This function writes all the prepared commands to hardware.
InstancePtr | is a pointer to the Axi TrafGen instance to be worked on. |
References NUM_BLOCKS.
Referenced by XTrafGenInterruptExample(), and XTrafGenPollingExample().