Hi Guanwen,
okay, so just to make sure I have understood your problem correctly.
You have implemented you own hardware thread which accesses
the system memory via the ReconOS memory interface, i.e. it is not a
custom ip core having it's own custom interface to the bus. The
structures you have described look like the following:
struct S
{
uint32_t *a_address;
uint32_t *b_address;
uint32_t *c_address;
};
uint32_t a[100];
uint32_t b[100];
uint32_t c[100];
struct S s = { &a, &b, &c };
Now you send the address of s (s_address) to the hardware thread via
an mbox and read the entire struct via MEM_READ. Later you read an
array pointed to by a_address also by MEM_READ, correct?
RAM(uint32, 100, ram);
uint32 s_address = MBOX_GET(resource_...);
uint32 a_address;
MEM_READ(s_address, &a_address, 4); // note,
that we currently only support to access whole words (4 byte),
also ram needs to be uint32
MEM_READ(a_address, ram, 400);
Thereby, both s_address and a_address are virtual addresses and
should be translated by ReconOS automatically. You do not need to
worry about physical addresses inside of your hardware thread but
should only use virtual ones. The MMU implemented by ReconOS is
completely transparent to the hardware thread and has no interface
to get a physical address from a virtual one. I am not quite sure
why you want to translate those on your own, you can just use the
virtual a_address to access the memory via MEM_READ. Or do you want
to access the memory without the ReconOS memory interface?
Stucking in "reading, waiting for data" means, that the delegate
thread is waiting for any data from the hardware thread, so for
example an MBOX_GET to acknowledge a finished processing. If you
need further help you might want to share your implementation, so
that we can have a look at it.
Yours,
Christoph