Jump to content

SeanLock

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by SeanLock

  1. Thank you @JColvin. I have just start learning about AXI and Mircoblaze coding; I was worried I might be missing an important point. I am struggling to find a comprehensive documentation on the subject; rather the user has to check many sources. Regardless, as we can note in the OP, the tool generates redundancy definitions as in the following: #define XPAR_GPIO_0_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID #define XPAR_AXI_GPIO_0_DEVICE_ID 0 #define GPIO_OUTPUT_DEVICE_ID XPAR_GPIO_0_DEVICE_ID GpioOutputExample( GPIO_OUTPUT_DEVICE_ID, GPIO_BITWIDTH); GpioInputExample(XPAR_AXI_GPIO_0_DEVICE_ID, &DataRead); A last point, the XGPIO function: int XGpio_Initialize(XGpio *InstancePtr, u16 DeviceId); takes DeviceID as a parameter. The file xparameters.h includes the below macro definitions. Will the tool set the GPIO struct parameters (BASEADDR, HIGHADDER, INTERRUPT_PRESENT, IS_DUAL) to the corresponding defined symbols automatically given the common "XPAR_AXI_GPIO_0" or "XPAR_GPIO_0" prefix? /* Definitions for peripheral AXI_GPIO_0 */ #define XPAR_AXI_GPIO_0_BASEADDR 0x80000000 #define XPAR_AXI_GPIO_0_HIGHADDR 0x8000FFFF #define XPAR_AXI_GPIO_0_DEVICE_ID 0 #define XPAR_AXI_GPIO_0_INTERRUPT_PRESENT 1 #define XPAR_AXI_GPIO_0_IS_DUAL 1 /******************************************************************/ /* Canonical definitions for peripheral AXI_GPIO_0 */ #define XPAR_GPIO_0_BASEADDR 0x80000000 #define XPAR_GPIO_0_HIGHADDR 0x8000FFFF #define XPAR_GPIO_0_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID #define XPAR_GPIO_0_INTERRUPT_PRESENT 1 #define XPAR_GPIO_0_IS_DUAL 1 Thank you
  2. Thank you, @Richm. My question was not about the OP;I noticed that the generated "xaparameters.h"by VIVADO for a design including an AXI_GOPIO comprises two sets of identical values C macros: XPAR_AXI_GPIO_Id_XXX, and XPAR_GPIO_Id_XX. I wonder why this duplication? I wonder which set should be used in different functions? Thank you
  3. Hi, What is the difference between the canonical definitions and the other definitions listed below /* Definitions for peripheral AXI_GPIO_0 */ #define XPAR_AXI_GPIO_0_BASEADDR 0x40000000 #define XPAR_AXI_GPIO_0_HIGHADDR 0x4000FFFF #define XPAR_AXI_GPIO_0_DEVICE_ID 0 #define XPAR_AXI_GPIO_0_INTERRUPT_PRESENT 0 #define XPAR_AXI_GPIO_0_IS_DUAL 1 /* Canonical definitions for peripheral AXI_GPIO_0 */ #define XPAR_GPIO_0_BASEADDR 0x40000000 #define XPAR_GPIO_0_HIGHADDR 0x4000FFFF #define XPAR_GPIO_0_DEVICE_ID XPAR_AXI_GPIO_0_DEVICE_ID #define XPAR_GPIO_0_INTERRUPT_PRESENT 0 #define XPAR_GPIO_0_IS_DUAL 1 Thank you
×
×
  • Create New...