If your memory bandwidth allows you to share memory b/w two processor, we can achieve this w/o much difficult.
Concept behind sharing memory for processor
For Example, we have two processor & want to run in a single memory & Total memory address area is 0x0000_0000 to 0x4FFF_FFFF
- Split memory address area to two (eg: 0x0000_0000 to 2FFF_FFFF and 0x3000_00000 to 0x4FFF_FFFF)
- Load applications to base these base address(0x0000_0000 and 0x3000_0000)
- Make processors reset vector to these base address
- Reset the processor
It should work.
In case of Xilinx FPGA
- Design a dual processor reference design
- Create application for both processor
- Open lscript.ld file change the Base address of application to differrent area
- Build & generate elf
- Run the applications w/o resetting the entire system.
You can see the outputs in your terminal
Note:
- Make sure that there is enough memory band width available in your system to run both application at the same time.
- Its only possible if you have Multi port DDR controller
- Its not possible to use a single DDR memory if you are going to use second memory outside the FPGA (Only Possible to use multiple processor in a single FPGA/SoC with multi port DDR controller)