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

Subversion Repositories eco32

[/] [eco32/] [trunk/] [monitor/] [monitor/] [common/] [cpu.c] - Diff between revs 59 and 84

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

Rev 59 Rev 84
Line 265... Line 265...
  userContext.reg[30] = pc;
  userContext.reg[30] = pc;
  userContext.psw = psw;
  userContext.psw = psw;
  userContext.tlbIndex = mmuGetIndex();
  userContext.tlbIndex = mmuGetIndex();
  userContext.tlbHi = mmuGetEntryHi();
  userContext.tlbHi = mmuGetEntryHi();
  userContext.tlbLo = mmuGetEntryLo();
  userContext.tlbLo = mmuGetEntryLo();
 
  userContext.badAddr = mmuGetBadAddr();
  if (saveState(&stepState)) {
  if (saveState(&stepState)) {
    origReturn = monitorReturn;
    origReturn = monitorReturn;
    monitorReturn = &stepState;
    monitorReturn = &stepState;
    resume();
    resume();
  }
  }
Line 279... Line 280...
  pc = userContext.reg[30];
  pc = userContext.reg[30];
  psw = userContext.psw;
  psw = userContext.psw;
  mmuSetIndex(userContext.tlbIndex);
  mmuSetIndex(userContext.tlbIndex);
  mmuSetEntryHi(userContext.tlbHi);
  mmuSetEntryHi(userContext.tlbHi);
  mmuSetEntryLo(userContext.tlbLo);
  mmuSetEntryLo(userContext.tlbLo);
 
  mmuSetBadAddr(userContext.badAddr);
  mmuWriteWord(nextAddr, nextInstr);
  mmuWriteWord(nextAddr, nextInstr);
  if (nextAddr == pc) {
  if (nextAddr == pc) {
    return;
    return;
  }
  }
  if ((psw & PSW_PRIO_MASK) >> 16 == 21 &&
  if ((psw & PSW_PRIO_MASK) >> 16 == 21 &&
Line 326... Line 328...
    userContext.reg[30] = pc;
    userContext.reg[30] = pc;
    userContext.psw = psw;
    userContext.psw = psw;
    userContext.tlbIndex = mmuGetIndex();
    userContext.tlbIndex = mmuGetIndex();
    userContext.tlbHi = mmuGetEntryHi();
    userContext.tlbHi = mmuGetEntryHi();
    userContext.tlbLo = mmuGetEntryLo();
    userContext.tlbLo = mmuGetEntryLo();
 
    userContext.badAddr = mmuGetBadAddr();
    if (saveState(&runState)) {
    if (saveState(&runState)) {
      origReturn = monitorReturn;
      origReturn = monitorReturn;
      monitorReturn = &runState;
      monitorReturn = &runState;
      resume();
      resume();
    }
    }
Line 340... Line 343...
    pc = userContext.reg[30];
    pc = userContext.reg[30];
    psw = userContext.psw;
    psw = userContext.psw;
    mmuSetIndex(userContext.tlbIndex);
    mmuSetIndex(userContext.tlbIndex);
    mmuSetEntryHi(userContext.tlbHi);
    mmuSetEntryHi(userContext.tlbHi);
    mmuSetEntryLo(userContext.tlbLo);
    mmuSetEntryLo(userContext.tlbLo);
 
    mmuSetBadAddr(userContext.badAddr);
    if (breakSet) {
    if (breakSet) {
      mmuWriteWord(breakAddr, instr);
      mmuWriteWord(breakAddr, instr);
    }
    }
    if (breakSet && breakAddr == pc) {
    if (breakSet && breakAddr == pc) {
      return;
      return;

powered by: WebSVN 2.1.0

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