Caching of external memory

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View

We are working on a Virtex4 FX12 PowerPC system. The code below is stored
in BRAM and so are the stack and heap.

Using cache on the external memory crashes the program after approx.
10000 checks. When only caching BRAM it works fine.

The program below clears the memory, then it checks half the memoryspace
for zeros and writes the addresses of the zeros in the other half.

Any sugestions why caching of external memory doesn't work?

///////    CODE     ////////////////////


Xuint32* CheckPtr = (Xuint32*)CHECK_BASE_ADDR;
Xuint32* WritePtr = (Xuint32*)WRITE_BASE_ADDR;

int main (void) {

        ClearMemory();//write zeros at all memory locations


            *WritePtr = CheckPtr;
            if(++WritePtr > WRITE_HIGH_ADDR)
                WritePtr = WRITE_BASE_ADDR;
        if(++CheckPtr > CHECK_HIGH_ADDR)
            CheckPtr = CHECK_BASE_ADDR;

Re: Caching of external memory

Just an update for anybody reading this thread later.

We found a work around. After updating from EDK 8.2 SP1 to SP2, we where
able to connect to the memory through the PLB instead of the OPB bus. This
change made the cache function correctly.

It was a beautiful and sunny day when Rune Dahl Jorgensen wrote

Quoted text here. Click to load it

Rune D. Jorgensen

Site Timeline