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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [sim/] [mmu.c] - Diff between revs 202 and 203

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

Rev 202 Rev 203
Line 65... Line 65...
    /* trying to access a privileged address from user mode */
    /* trying to access a privileged address from user mode */
    mmuBadAccs = (writing ? MMU_ACCS_WRITE : MMU_ACCS_READ) | accsWidth;
    mmuBadAccs = (writing ? MMU_ACCS_WRITE : MMU_ACCS_READ) | accsWidth;
    mmuBadAddr = vAddr;
    mmuBadAddr = vAddr;
    throwException(EXC_PRV_ADDRESS);
    throwException(EXC_PRV_ADDRESS);
  }
  }
 
  updateRandomIndex();
  if ((vAddr & 0xC0000000) == 0xC0000000) {
  if ((vAddr & 0xC0000000) == 0xC0000000) {
    /* unmapped address space */
    /* unmapped address space */
    /* simulate delay introduced by assoc when using mapped
    /* simulate delay introduced by assoc when using mapped
       addresses but not experienced with unmapped addresses */
       addresses but not experienced with unmapped addresses */
    assoc(0);
    assoc(0);
    pAddr = vAddr & ~0xC0000000;
    pAddr = vAddr & ~0xC0000000;
  } else {
  } else {
    /* mapped address space */
    /* mapped address space */
    updateRandomIndex();
 
    page = vAddr & PAGE_MASK;
    page = vAddr & PAGE_MASK;
    offset = vAddr & OFFSET_MASK;
    offset = vAddr & OFFSET_MASK;
    index = assoc(page);
    index = assoc(page);
    if (index == -1) {
    if (index == -1) {
      /* TLB miss exception */
      /* TLB miss exception */

powered by: WebSVN 2.1.0

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