J
Joe
Guest
Hello, <p>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. <p>In the MHS file for the core, I have: <BR>
BEGIN plb_simple_core <BR>
&nbsp;PARAMETER INSTANCE = plb_simple_core_0 <BR>
&nbsp;PARAMETER C_BASEADDR = 0xD0000000 <BR>
&nbsp;PARAMETER C_HIGHADDR = 0xD000FFFF <BR>
&nbsp;PARAMETER c_mir_baseaddr = 0xD0010100 <BR>
&nbsp;PARAMETER c_mir_highaddr = 0xD00101FF <BR>
&nbsp;BUS_INTERFACE SPLB = plb <BR>
&nbsp;PORT plb_clk = sys_clk <BR>
END <p>And in the C code I have: <BR>
#define CORE_ADDR XPAR_PLB_SIMPLE_CORE_0_BASEADDR <p>Xuint32 reg_0; <p>// Write data to core <BR>
XIut32( (CORE_ADDR + 0x0000), 0x00000000); // or some other data <p>// Read data from core <BR>
reg_0 = XIo_In32((CORE_ADDR + 0x0000)); <BR>
xil_printf("Data at address 0 is: %d \r\n", reg_0); <p>Is this the correct method for reading/writing to the core? <p>If so any idea where else my error could be? <p>Thanks, <BR>
Joe
BEGIN plb_simple_core <BR>
&nbsp;PARAMETER INSTANCE = plb_simple_core_0 <BR>
&nbsp;PARAMETER C_BASEADDR = 0xD0000000 <BR>
&nbsp;PARAMETER C_HIGHADDR = 0xD000FFFF <BR>
&nbsp;PARAMETER c_mir_baseaddr = 0xD0010100 <BR>
&nbsp;PARAMETER c_mir_highaddr = 0xD00101FF <BR>
&nbsp;BUS_INTERFACE SPLB = plb <BR>
&nbsp;PORT plb_clk = sys_clk <BR>
END <p>And in the C code I have: <BR>
#define CORE_ADDR XPAR_PLB_SIMPLE_CORE_0_BASEADDR <p>Xuint32 reg_0; <p>// Write data to core <BR>
XIut32( (CORE_ADDR + 0x0000), 0x00000000); // or some other data <p>// Read data from core <BR>
reg_0 = XIo_In32((CORE_ADDR + 0x0000)); <BR>
xil_printf("Data at address 0 is: %d \r\n", reg_0); <p>Is this the correct method for reading/writing to the core? <p>If so any idea where else my error could be? <p>Thanks, <BR>
Joe