08-17-2015 08:22 PM
Hi all,
I have a question and want to make sure the way to write / read data on EDK
I don't have an experience on EDK
So, My design is to write data from my IP(pattern generation) to dual port BRAM
one port is only for write
another port is only for read
Whenever sending all of my data into BRAM is done, read data from BRAM to MicroBlaze
Writing data has to be happened between my RTL design and BRAM
Reading data has to be happened between BRAM, bran controller, and microblaze
My question is
if base address of my RTL design is 0x76000000,
if data is 0x55555555, (if 0x55555555 is sent to my RTL design, my RTL will be send enable signals/ address to BRAM
Can I use
Xil_out32(0x76000000, 0x55555555) to write data into BRAM??
if so, does the 0x76000000 & 0x55555555 values go into the port at address & data of the sub-module? if module has address and data port
Thank you in advance
08-18-2015 01:40 AM
Hi,
"Can I use
Xil_out32(0x76000000, 0x55555555) to write data into BRAM??
if so, does the 0x76000000 & 0x55555555 values go into the port at address & data of the sub-module? if module has address and data port"
The Xil_Out32 is actually a procedure programmed that way :
void Xil_Out32(INTPTR Addr, u32 Value) { u32 *LocalAddr = (u32 *)Addr; *LocalAddr = Value; }
So using "Xil_Out32(0x76000000, 0x55555555);" will actually send a write transaction with the 0x55555555 value (mind to always give a 32b value) to the 0x76000000 address of your BRAM if this address is within the address range of your BRAM and your write port is an AXI Slave interface connected to the AXI Master interface of your Processing System (through the AXI Interconnect of your block design if there is one).
To be brief, yes you can.
08-18-2015 01:40 AM
Hi,
"Can I use
Xil_out32(0x76000000, 0x55555555) to write data into BRAM??
if so, does the 0x76000000 & 0x55555555 values go into the port at address & data of the sub-module? if module has address and data port"
The Xil_Out32 is actually a procedure programmed that way :
void Xil_Out32(INTPTR Addr, u32 Value) { u32 *LocalAddr = (u32 *)Addr; *LocalAddr = Value; }
So using "Xil_Out32(0x76000000, 0x55555555);" will actually send a write transaction with the 0x55555555 value (mind to always give a 32b value) to the 0x76000000 address of your BRAM if this address is within the address range of your BRAM and your write port is an AXI Slave interface connected to the AXI Master interface of your Processing System (through the AXI Interconnect of your block design if there is one).
To be brief, yes you can.