OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [testbench/] [cache.c] - Diff between revs 322 and 349

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 322 Rev 349
Line 185... Line 185...
        int i;
        int i;
        unsigned long base, add;
        unsigned long base, add;
 
 
        base = (((unsigned long)&dummy / (IC_SETS*IC_BLOCK_SIZE)) * IC_SETS*IC_BLOCK_SIZE) + IC_SETS*IC_BLOCK_SIZE;
        base = (((unsigned long)&dummy / (IC_SETS*IC_BLOCK_SIZE)) * IC_SETS*IC_BLOCK_SIZE) + IC_SETS*IC_BLOCK_SIZE;
 
 
        icache_enable();
 
 
 
        /* Copy jr to various location */
        /* Copy jr to various location */
        add = base;
        add = base;
        for(i = 0; i < IC_WAYS; i++) {
        for(i = 0; i < IC_WAYS; i++) {
                copy_jr(add);
                copy_jr(add);
                copy_jr(add + 2*IC_BLOCK_SIZE + 4);
                copy_jr(add + 2*IC_BLOCK_SIZE + 4);
Line 233... Line 231...
        REG32(0x3c*i + 4) = (unsigned long)&jalr;
        REG32(0x3c*i + 4) = (unsigned long)&jalr;
 
 
        /* Initilalize table index */
        /* Initilalize table index */
        REG32(0) = 0;
        REG32(0) = 0;
 
 
 
        icache_enable();
 
 
        /* Go */
        /* Go */
        call(base);
        call(base);
 
 
        icache_disable();
        icache_disable();
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.