Memory extender and/or virtual memory subsystem
Posted: Fri Jul 31, 2015 7:27 pm
Hi Folks,
I don't want to reinvent the wheel, therefore I would you like to discuss the topic first here. Probably, it would be nice to find participate partners too for specification/design/implementation steps of the subject.
I spent one month to implement a gui+view/controller framework plus the required busines logic for some kind of "hard coded" system. There are some limitations, what I have to keep in mind during the refactoring of the whole system. The most important factor is the 64k memory limit. There are several technics, which are already published. I did some study to figure out what is possible, and what would be reasonable. Lets talk about!
Imagine a system-design, where we have more than one xmos chips (tiles), somewhere in the system we have an SDRAM, spare SPI flash, and several "block / stream devices" (throughput demand) and several modest peripherals.
It would be nice to have a common virtual address space, where pages/blocks can be allocated for the different external memories (compile time). Each tile would have an allocator (or cache) table, which stores informations about the local storage, and the origins, actual state. The local storage can be a buffer pool, where several pages can be loaded partially (from the specific external ram/flash memory or from other tiles shared memory). Each tile will have an event handler, which one catch ET_LOAD_STORE exception. Exception handler will check the hit in the local cache table, then if address is paged to local memory returns by the internal ram address, or loads up from the external source if it is not loaded actually. (this is just a quick explanation) So, user code can use 32bits virtual address simply to reach more than 64k.
There are already some examples/studies, possible can be part of this system. Namely: sc_memory_extender, lib_sdram, lib_flash, etc. I've just took a look on these codes, and wondering if how would be the best to build up a new system based on this idea...
I don't want to reinvent the wheel, therefore I would you like to discuss the topic first here. Probably, it would be nice to find participate partners too for specification/design/implementation steps of the subject.
I spent one month to implement a gui+view/controller framework plus the required busines logic for some kind of "hard coded" system. There are some limitations, what I have to keep in mind during the refactoring of the whole system. The most important factor is the 64k memory limit. There are several technics, which are already published. I did some study to figure out what is possible, and what would be reasonable. Lets talk about!
Imagine a system-design, where we have more than one xmos chips (tiles), somewhere in the system we have an SDRAM, spare SPI flash, and several "block / stream devices" (throughput demand) and several modest peripherals.
It would be nice to have a common virtual address space, where pages/blocks can be allocated for the different external memories (compile time). Each tile would have an allocator (or cache) table, which stores informations about the local storage, and the origins, actual state. The local storage can be a buffer pool, where several pages can be loaded partially (from the specific external ram/flash memory or from other tiles shared memory). Each tile will have an event handler, which one catch ET_LOAD_STORE exception. Exception handler will check the hit in the local cache table, then if address is paged to local memory returns by the internal ram address, or loads up from the external source if it is not loaded actually. (this is just a quick explanation) So, user code can use 32bits virtual address simply to reach more than 64k.
There are already some examples/studies, possible can be part of this system. Namely: sc_memory_extender, lib_sdram, lib_flash, etc. I've just took a look on these codes, and wondering if how would be the best to build up a new system based on this idea...