Is there away to run say a program from sd card when I have the system setup to run from DDR???????????
Just out of curiosity lads!
Is there away to run say a program from sd card when I have the system setup to run from DDR???????????
Just out of curiosity lads!
I'm not sure if the SAMA5 has XIP (execute in place) for the sdcard interface. Time for a read of the user manuals methinks. If it can, then there will be a means of mapping the data into the memory space and cache settings. My gut instinct tells me that it might be unlikely it does support XIP. Write your os to support virtual memory and have the SDCARD as backing store. Bonus points if you write a virtual machine that maps the sdcard into the virtual space like IBM did with the System38 (they didn't do it with a sdcard at the time).
As an aside, I've tried XIP using serial flash chips on a Cortex M7. It's like knocking the turbo off a F1 car. Cache is no substitute for memory bandwidth.
As Kartman says, your key term here is "Execute In Place"
If your particular chip doesn't have than, then you'd need to read from the card into memory, then execute from that memory.
I think the latest Raspberry Pi microcontroller has XIP: https://www.avrfreaks.net/commen... - whether it works from SD-Card is another question, though.
So XIP is necessary - but not sufficient?
XIP is CPU+Peripheral thing.
For example, peripheral in A5D2 says this
The fetch size of QSPI is usually pretty small as well. So CPU does not need to wait too much if there is a branch instruction. Caching and other methods are already implemented to make sure this works properly.
But in the same device, I dont think XIP feature is there for SDMMC peripheral. It is just not implemented from what I can see. Implementing XIP for SDMMC is a bit tricky and costly in terms of die area.
So XIP is basically a CPUs ability to fetch code through a peripheral. It might support fetching code through a peripheral and might not support though other.
Thanks guys.
If that's answered the question, please mark the solution.
See Tip #5 in my signature:
As Kartman says, your key term here is "Execute In Place"
If your particular chip doesn't have than, then you'd need to read from the card into memory, then execute from that memory.
I think the latest Raspberry Pi microcontroller has XIP: https://www.avrfreaks.net/commen... - whether it works from SD-Card is another question, though.
So XIP is necessary - but not sufficient?
I don't believe it has XIP, so I'll have to look into what Kartman says.
I think what you might be wanting is called 'virtual memory'. When you run out of real memory to allocate, you swap blocks in and out from secondary storage. The mmu is used to detect when you drop off the edge of allocated memory - this is called a page fault. Your os, then swaps data to/from the secondary storage to ram, you then fix up the mmu page tables and that task can run again. Demand Paged Virtual Memory - its what most larger os/s do.
Demand Paged Virtual Memory - its what most larger os/s do.
Indeed.
You've posted under Cortex-A; so likely you'd be using a "larger OS" such as Linux - so that would do this for you.
I'm actually looking to create this for a custom OS...