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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_50/] [or1ksim/] [cpu/] [or1k/] [sprs.c] - Diff between revs 884 and 886

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

Rev 884 Rev 886
Line 99... Line 99...
                  printf ("SUSPEND: PMR[SUME] bit was set.\n");
                  printf ("SUSPEND: PMR[SUME] bit was set.\n");
                  runtime.sim.cont_run = 0;
                  runtime.sim.cont_run = 0;
          }
          }
          break;
          break;
  default:
  default:
 
    /* Mask reseved bits in DTLBMR and DTLBMR registers */
 
    if ( (regno >= SPR_DTLBMR_BASE(0)) && (regno < SPR_DTLBTR_LAST(3))) {
 
      if((regno & 0xff) < 0x80)
 
        sprs[regno] = ((value / (config.dmmu.pagesize * config.dmmu.nsets)) *
 
                                config.dmmu.pagesize * config.dmmu.nsets) |
 
                              (value & (SPR_DTLBMR_V | SPR_DTLBMR_PL1 | SPR_DTLBMR_CID | SPR_DTLBMR_LRU));
 
      else
 
        sprs[regno] = ((value / config.dmmu.pagesize) * config.dmmu.pagesize) |
 
                              (value & (SPR_DTLBTR_CC | SPR_DTLBTR_CI | SPR_DTLBTR_WBC | SPR_DTLBTR_WOM |
 
                              SPR_DTLBTR_A | SPR_DTLBTR_D | SPR_DTLBTR_URE | SPR_DTLBTR_UWE | SPR_DTLBTR_SRE |
 
                              SPR_DTLBTR_SWE));
 
    }
 
 
 
    /* Mask reseved bits in ITLBMR and ITLBMR registers */
 
    if ( (regno >= SPR_ITLBMR_BASE(0)) && (regno < SPR_ITLBTR_LAST(3))) {
 
      if((regno & 0xff) < 0x80)
 
        sprs[regno] = ((value / (config.immu.pagesize * config.immu.nsets)) *
 
                                config.immu.pagesize * config.immu.nsets) |
 
                              (value & (SPR_ITLBMR_V | SPR_ITLBMR_PL1 | SPR_ITLBMR_CID | SPR_ITLBMR_LRU));
 
      else
 
        sprs[regno] = ((value / config.immu.pagesize) * config.immu.pagesize) |
 
                              (value & (SPR_ITLBTR_CC | SPR_ITLBTR_CI | SPR_ITLBTR_WBC | SPR_ITLBTR_WOM |
 
                              SPR_ITLBTR_A | SPR_ITLBTR_D | SPR_ITLBTR_SXE | SPR_ITLBTR_UXE));
 
    }
    /* Links to GPRS */
    /* Links to GPRS */
    if(regno >= 0x0400 && regno < 0x0420) {
    if(regno >= 0x0400 && regno < 0x0420) {
      extern unsigned long reg[32];
      extern unsigned long reg[32];
      reg[regno - 0x0400] = value;
      reg[regno - 0x0400] = value;
    }
    }

powered by: WebSVN 2.1.0

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