EDK 6.1: User Logic

Hello, I am trying to add user logic to an EDK project. I have tried attching to both the OPB and PLB busses using the ssp0 reference designs. I have striped down the user logic portion of the reference designs to be like a RAM that I can write to /read from. I can download the design to the development board, but the data that I read back is garbage. In the MHS file for the core, I have: BEGIN plb_simple_core  PARAMETER INSTANCE = plb_simple_core_0  PARAMETER C_BASEADDR = 0xD0000000  PARAMETER C_HIGHADDR = 0xD000FFFF  PARAMETER c_mir_baseaddr = 0xD0010100  PARAMETER c_mir_highaddr = 0xD00101FF  BUS_INTERFACE SPLB = plb  PORT plb_clk = sys_clk END And in the C code I have: #define CORE_ADDR XPAR_PLB_SIMPLE_CORE_0_BASEADDR Xuint32 reg_0; // Write data to core XIo_Out32( (CORE_ADDR + 0x0000), 0x00000000); // or some other data // Read data from core reg_0 = XIo_In32((CORE_ADDR + 0x0000)); xil_printf("Data at address 0 is: %d \r\n", reg_0); Is this the correct method for reading/writing to the core? If so any idea where else my error could be? Thanks, Joe

Reply to
Joe
Loading thread data ...

The C-code you are referring to appear to be from Xilinx drivers. Did you modify the driver for your own IP. Also, what driver have you assigned to this IP in the MSS file.

Amit.

Joe wrote:

Reply to
Amit Kasat

Hi! from the manual given along with the reference design, it seems you should use the C_BASEADDR to access user logic. I think your code should work if you change the CORE_ADDR macro definition to C_BASE_ADDR. #define CORE_ADDR C_BASE_ADDR

--yang

Joe wrote:

Reply to
qudhs

Thanks for the replies Amit and Yang. I solved the problem myself though - it was in my VHDL code. I wasn't taking into account that bit 30 and 31 of Bus2IP_Addr were being dropped. Now it is working as expected. Thanks, Joe

Reply to
joe

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.