Friday, June 17, 2022

eXecute In Place (XIP) in Processor World


XIP Stands for 'eXecute In Place'

Scenario #1 : ( During System Boot-Up Process )

- When a System (Embedded Processor or Processor) starts after power up, the first code it executes should come from a Non-Volatile Memory (Flash / ROM Memory)

- The first code/program the system executes and makes the system up and running is called a Boot Code/ Bootloader

- There is no RAM (Stack/Heap) available while the system is booting and hence no memory is available to store the program variables.

- Hence, while booting the system does the code execution using its own registers (Processor Registers)

- The first code the processor executes is executed from where it is. This type of code execution is called 'eXecute In Place'

- Since there is no RAM available during boot-up, the Boot-Up code is always written in assembly language as the execution of C - Program almost always requires a Stack to be setup in Read/Write Memory (RAM) to store variables, and at startup or power-up RAM may not be available.


Scenario #2 : ( Lack of Sufficient On-Chip Memory)

- When the On-Chip memory is not sufficient to store the complete program data, we go for an external memory and execute the code directly reading from the external memory rather than copying it first to on-chip memory segment by segment and then execute

- The access time of external memory will be slow depending on the system - External Memory interface type

- One way to mitigate this slow access time is to use QUAD SPI interface and prefetch mechanism where the data retrieval speed of external memory can be made comparable to the on-chip memory access time.

XIP Address Mapping -





- As shown above this is usually done by memory mapping the External Memory addresses onto the Processor’s memory space. The processor treats the external memory location as its own on-chip memory.

Thank !

1 comment: