Difference between target "internal xROM-xRAM" & "internal pROM-xRAM"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Difference between target "internal xROM-xRAM" & "internal pROM-xRAM"

Jump to solution
2,417 Views
Dekabrist
Contributor I

Hi,

During creating new stationary project CW created two targets : "internal xROM-xRAM" & "internal pROM-xRAM". What difference between this targets?

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
721 Views
J2MEJediMaster
Specialist I

The Freescale DSP uses a Harvard architecture, where a distinction is made between data (x, y) memory and program (p) memory. The data can usually be accessed in parallel on two separate data buses, hence the x and y notation. So, when you program flash memory, you have to load the code into program flash memory space (pROM), while the data constants go into the data flash memory space (xROM). If you have a huge number of constants (quite possible when you're doing digital filtering), there might not be enough room in the CPU's xROM space to hold them. Therefore a sleight of hand is to have the linker load the data constants into program flash memory, which is typically larger in size than the data flash memory. A little code at start-up copies the data constants out of the program code space and loads them into xRAM where they are then treated properly like data.

 

In summary:

The internal xROM-xRAM target has all constant data loaded into the data flash space (xROM).

The internal pROM-xRAM target has the constant data loaded into the program flash space (pROM).

 

Both projects use on-chip Flash and RAM for program execution, hence the term 'internal'.

 

More information can be found in the Targeting 56800E manual (Targeting_56800E.pdf). See the section, Utilizing Program Flash and Data RAM for Constant Data in C.

View solution in original post

0 Kudos
Reply
2 Replies
722 Views
J2MEJediMaster
Specialist I

The Freescale DSP uses a Harvard architecture, where a distinction is made between data (x, y) memory and program (p) memory. The data can usually be accessed in parallel on two separate data buses, hence the x and y notation. So, when you program flash memory, you have to load the code into program flash memory space (pROM), while the data constants go into the data flash memory space (xROM). If you have a huge number of constants (quite possible when you're doing digital filtering), there might not be enough room in the CPU's xROM space to hold them. Therefore a sleight of hand is to have the linker load the data constants into program flash memory, which is typically larger in size than the data flash memory. A little code at start-up copies the data constants out of the program code space and loads them into xRAM where they are then treated properly like data.

 

In summary:

The internal xROM-xRAM target has all constant data loaded into the data flash space (xROM).

The internal pROM-xRAM target has the constant data loaded into the program flash space (pROM).

 

Both projects use on-chip Flash and RAM for program execution, hence the term 'internal'.

 

More information can be found in the Targeting 56800E manual (Targeting_56800E.pdf). See the section, Utilizing Program Flash and Data RAM for Constant Data in C.

0 Kudos
Reply
721 Views
Dekabrist
Contributor I

Thank you for explanation.

0 Kudos
Reply