Thanks for the answer!!
So the address range on my VHDL side goes from 0x0 to 0x7FFF.
When i write in C to the base address of the shared memory i should be able to get this value when reading from address b"0_0000_0000_0000" in VHDL. But i do not see anything.
Also the other way round, writing to memory from VHDL does not work.
I apply the write byteenable and a cs signal and try to write values to different location with a 32 bit (4 byte) offset. Like
addr0 := 0_0000_0000_0000
addr1 := 0_0000_0000_0100
addr2 := 0_0000_0000_1000
Since the bus is private and it is a point to point connection a CS is not necessary, but i tried just in case.
Then i want to check the values in C with
for (offset = sizeof(unsigned int);( offset & (mem_size -1)) != 0 ; offset << 1 ){
printf(" %d", IORD_32DIRECT(SHARED_MEM_BASE,offset));
}
my intention was, that uploading the *sof file first, the VHDL code gets executed first and after downloading the *.elf file the C Code reads from
the same addresses and returns the values.
But the memory is completely empty. Am i doing it wrong with the offsets? But then is should see at least some values in memory?
Or are my read and write routines wrong?
I ran a memory test program on the shared memory and it passed OK so i think i do not have timing issues.