Far Memory.

The question is about far memory type.

I use 8951RD2.
I define:
LX51 and AX51,
use on-chip XRAM,
support far memory type.

The on-chip XRAM of RD2 is 1.7Kb.
In listing far memory defined as HDATA.

I define variable of type far 440 bytes, and it passes compiling.
The listing:

MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 3444 ----
CONSTANT SIZE = 50 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 16 24
IDATA SIZE = 28 5
BIT SIZE = 4 2
EDATA SIZE = ---- ----
HDATA SIZE = 440 ----
XDATA CONST SIZE = ---- ----
FAR CONST SIZE = ---- ----
END OF MODULE INFORMATION.

But, if I define far memory 4000 bytes, it also passes compiling.
HDATA SIZE = 4000 ----
(remember? 1.7Kb maximum)

Why?
Where are these variables fisically allocated?

Parents
  • Where are these variables fisically allocated?

    Elsewhere. :-)

    Seriously: they're wherever you configured the far data system of C51 to put them. Your chip (8951RD2 isn't quite a usable name --- but it seems you're talking about the AT89C51RD2) has an external memory bus, too, not only on-chip XRAM, right? So there's nothing stopping your board from providing 64K of external XRAM to the cpu, is there? I don't think the "use internal XRAM" means to use only that.

Reply
  • Where are these variables fisically allocated?

    Elsewhere. :-)

    Seriously: they're wherever you configured the far data system of C51 to put them. Your chip (8951RD2 isn't quite a usable name --- but it seems you're talking about the AT89C51RD2) has an external memory bus, too, not only on-chip XRAM, right? So there's nothing stopping your board from providing 64K of external XRAM to the cpu, is there? I don't think the "use internal XRAM" means to use only that.

Children
More questions in this forum