| aiengine Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

xaiesim.h File Reference

## Overview

This file contains the generic definitions for the AIE simulator interface.

    MODIFICATION HISTORY:

    Ver   Who     Date     Changes

    1.0  Naresh  04/06/2018  Initial creation
    1.1  Naresh  04/10/2018  Added the API declaration for XAieSim_Init
    1.2  Naresh  04/10/2018  Added macro XAIESIM_DEVCFG_SET_CONFIG
    1.3  Naresh  04/18/2018  Modified workaround for CRVO#1696/CR#999680 to extend
                             it to all types of registers and also for all tiles
    1.4  Naresh  05/07/2018  Fixed CR#1001816
    1.5  Naresh  05/23/2018  Updated code to fix CR#999693
    1.6  Naresh  07/11/2018  Updated copyright info
    1.7  Hyun    09/12/2018  Fixed CR#1006669
    1.8  Hyun    10/16/2018  Added XAieSim_SetIOMode and mask write APIs
    1.9  Nishad  12/05/2018  Renamed ME attributes to AIE
    2.0  Hyun    01/08/2018  Add the MaskPoll
    2.1  Hyun    04/05/2018  NPI support
    2.2  Tejus   10/14/2019  Removed assertion macros for simulation

uint32 | XAieSim_Read32 (uint64_t Addr)
| This is the memory IO function to read 32bit data from the specified address. More...
void | XAieSim_Read128 (uint64_t Addr, uint32 *Data)
| This is the memory IO function to read 128b data from the specified address. More...
void | XAieSim_Write32 (uint64_t Addr, uint32 Data)
| This is the memory IO function to write 32bit data to the specified address. More...
void | XAieSim_MaskWrite32 (uint64_t Addr, uint32 Mask, uint32 Data)
| This is the memory IO function to mask-write 32bit data to the address. More...
void | XAieSim_Write128 (uint64_t Addr, uint32 *Data)
| This is the memory IO function to write 128bit data to the specified address. More...
void | XAieSim_WriteCmd (uint8 Command, uint8 ColId, uint8 RowId, uint32 CmdWd0, uint32 CmdWd1, uint8 *CmdStr)
| This is the memory IO function to write 128bit data to the specified address. More...
uint32 | XAieSim_MaskPoll (uint64_t Addr, uint32 Mask, uint32 Value, uint32 TimeOutUs)
| This is the IO function to poll until the value at the address to be given masked value. More...
void | XAieSim_Init (uint8 NumCols, uint8 NumRows)
| This is the init routine to enable AIE sim workarounds. More...
uint8 | XAieSim_SetIOMode (uint8 Mode)
| This API sets the IO mode and switches to available backend for IO operations. More...
uint32 | XAieSim_NPIRead32 (uint64_t Addr)
| This is the memory IO function to read 32bit data from the NPI space. More...
void | XAieSim_NPIWrite32 (uint64_t Addr, uint32 Data)
| This is the memory IO function to write 32bit data to the NPI space. More...
void | XAieSim_NPIMaskWrite32 (uint64_t Addr, uint32 Mask, uint32 Data)
| This is the memory IO function to mask-write 32bit data to the NPI space. More...
uint32 | XAieSim_NPIMaskPoll (uint64_t Addr, uint32 Mask, uint32 Value, uint32 TimeOutUs)
| This is the IO function to poll until the value at the NPI address space to be given masked value. More...

## Function Documentation

void XAieSim_Init | ( | uint8 | NumCols,
|  | uint8 | NumRows
| ) |  |

This is the init routine to enable AIE sim workarounds.

Parameters

  NumCols,: | Number of columns.
  NumRows,: | Number of rows.

Returns
  None.

Note
  None.

Referenced by main().

uint32 XAieSim_MaskPoll | ( | uint64_t | Addr,
|  | uint32 | Mask,
|  | uint32 | Value,
|  | uint32 | TimeOutUs
| ) |  |

This is the IO function to poll until the value at the address to be given masked value.

Parameters

  Addr,: | Address to write to.
  Mask,: | Mask to be applied to read data.
  Value,: | The expected value
  TimeOutUs,: | Minimum timeout in usec.

Returns
  XAIESIM_SUCCESS if successful, else XAIESIM_FAILURE.

Note
  None.

Referenced by XAieLib_MaskPoll().

void XAieSim_MaskWrite32 | ( | uint64_t | Addr,
|  | uint32 | Mask,
|  | uint32 | Data
| ) |  |

This is the memory IO function to mask-write 32bit data to the address.

Parameters

  Addr,: | Address to write to.
  Mask,: | Mask to be applied.
  Data,: | 32-bit data to be written.

Returns
  None.

Note
  None.

Referenced by XAieLib_MaskWrite32().

uint32 XAieSim_NPIMaskPoll | ( | uint64_t | Addr,
|  | uint32 | Mask,
|  | uint32 | Value,
|  | uint32 | TimeOutUs
| ) |  |

This is the IO function to poll until the value at the NPI address space to be given masked value.

Parameters

  Addr,: | Address to write to.
  Mask,: | Mask to be applied to read data.
  Value,: | The expected value
  TimeOutUs,: | Minimum timeout in usec.

Returns
  XAIESIM_SUCCESS if successful, else XAIESIM_FAILURE.

Note
  None.

Referenced by XAieLib_NPIMaskPoll().

void XAieSim_NPIMaskWrite32 | ( | uint64_t | Addr,
|  | uint32 | Mask,
|  | uint32 | Data
| ) |  |

This is the memory IO function to mask-write 32bit data to the NPI space.

Parameters

  Addr,: | Address to write to.
  Mask,: | Mask to be applied.
  Data,: | 32-bit data to be written.

Returns
  None.

Note
  None.

Referenced by XAieLib_NPIMaskWrite32().

uint32 XAieSim_NPIRead32 | ( | uint64_t | Addr | ) |

This is the memory IO function to read 32bit data from the NPI space.

Parameters

  Addr,: | Address to read from.

Returns
  32-bit read value.

Note
  None.

Referenced by XAieLib_NPIRead32().

void XAieSim_NPIWrite32 | ( | uint64_t | Addr,
|  | uint32 | Data
| ) |  |

This is the memory IO function to write 32bit data to the NPI space.

Parameters

  Addr,: | Address to write to.
  Data,: | 32-bit data to be written.

Returns
  None.

Note
  None.

Referenced by XAieLib_NPIWrite32().

void XAieSim_Read128 | ( | uint64_t | Addr,
|  | uint32 * | Data
| ) |  |

This is the memory IO function to read 128b data from the specified address.

Parameters

  Addr,: | Address to read from.
  Data,: | Pointer to the 128-bit buffer to store the read data.

Returns
  None.

Note
  None.

uint32 XAieSim_Read32 | ( | uint64_t | Addr | ) |

This is the memory IO function to read 32bit data from the specified address.

Parameters

  Addr,: | Address to read from.

Returns
  32-bit read value.

Note
  None.

Referenced by XAieLib_Read128(), and XAieLib_Read32().

uint8 XAieSim_SetIOMode | ( | uint8 | Mode | ) |

This API sets the IO mode and switches to available backend for IO operations.

Parameters

  Mode,: | IO mode. Should be XAIESIM_IO_MODE_* in xaiesim.h

Returns
  XAIESIM_SUCCESS on success.

Note
  None.

void XAieSim_Write128 | ( | uint64_t | Addr,
|  | uint32 * | Data
| ) |  |

This is the memory IO function to write 128bit data to the specified address.

Parameters

  Addr,: | Address to write to.
  Data,: | Pointer to the 128-bit data buffer.

Returns
  None.

Note
  None.

Referenced by XAieLib_Write128().

void XAieSim_Write32 | ( | uint64_t | Addr,
|  | uint32 | Data
| ) |  |

This is the memory IO function to write 32bit data to the specified address.

Parameters

  Addr,: | Address to write to.
  Data,: | 32-bit data to be written.

Returns
  None.

Note
  None.

Referenced by XAieLib_Write32().

void XAieSim_WriteCmd | ( | uint8 | Command,
|  | uint8 | ColId,
|  | uint8 | RowId,
|  | uint32 | CmdWd0,
|  | uint32 | CmdWd1,
|  | uint8 * | CmdStr
| ) |  |

This is the memory IO function to write 128bit data to the specified address.

Parameters

  Addr,: | Address to write to.
  Data,: | Pointer to the 128-bit data buffer.

Returns
  None.

Note
  None.

Referenced by XAieLib_WriteCmd(), XAieSim_LoadElf(), and XAieSim_LoadSymbols().