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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [cpu/] [or32/] [execute.c] - Diff between revs 472 and 552

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

Rev 472 Rev 552
Line 96... Line 96...
/* Store buffer analysis - stores are accumulated and commited when IO is
/* Store buffer analysis - stores are accumulated and commited when IO is
   idle. This file only */
   idle. This file only */
static int  sbuf_head              = 0;
static int  sbuf_head              = 0;
static int  sbuf_tail              = 0;
static int  sbuf_tail              = 0;
static int  sbuf_count             = 0;
static int  sbuf_count             = 0;
#if !(DYNAMIC_EXECUTION)
 
static int  sbuf_buf[MAX_SBUF_LEN] = { 0 };
static int  sbuf_buf[MAX_SBUF_LEN] = { 0 };
#endif
 
 
 
static int sbuf_prev_cycles = 0;
static int sbuf_prev_cycles = 0;
 
 
/* Variables used throughout this file to share information */
/* Variables used throughout this file to share information */
static int  breakpoint;
static int  breakpoint;
static int  next_delay_insn;
static int  next_delay_insn;
 
 
/* Forward declaration of static functions */
/* Forward declaration of static functions */
#if !(DYNAMIC_EXECUTION)
 
static void decode_execute (struct iqueue_entry *current);
static void decode_execute (struct iqueue_entry *current);
#endif
 
 
 
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*!Get an actual value of a specific register
/*!Get an actual value of a specific register
 
 
   Implementation specific. Abort if we are given a duff register. Only used
   Implementation specific. Abort if we are given a duff register. Only used
Line 485... Line 481...
    dump_exe_bin_insn_log (current);
    dump_exe_bin_insn_log (current);
 
 
}       /* analysis() */
}       /* analysis() */
 
 
 
 
#if !(DYNAMIC_EXECUTION)
 
 
 
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*!Store buffer analysis for store instructions
/*!Store buffer analysis for store instructions
 
 
   Stores are accumulated and commited when IO is idle
   Stores are accumulated and commited when IO is idle
 
 
Line 568... Line 562...
      sbuf_tail               = (sbuf_tail + 1) % MAX_SBUF_LEN;
      sbuf_tail               = (sbuf_tail + 1) % MAX_SBUF_LEN;
      sbuf_count--;
      sbuf_count--;
    }
    }
}       /* sbuf_load() */
}       /* sbuf_load() */
 
 
#endif  /* !DYNAMIC_EXECUTION */
 
 
 
 
 
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
/*!Outputs dissasembled instruction                                          */
/*!Outputs dissasembled instruction                                          */
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
void
void
dump_exe_log ()
dump_exe_log ()
Line 830... Line 821...
 
 
#ifndef HAVE_EXECUTION
#ifndef HAVE_EXECUTION
#error HAVE_EXECUTION has to be defined in order to execute programs.
#error HAVE_EXECUTION has to be defined in order to execute programs.
#endif
#endif
 
 
  /* FIXME: Most of this file is not needed with DYNAMIC_EXECUTION */
 
#if !(DYNAMIC_EXECUTION)
 
  decode_execute (current);
  decode_execute (current);
#endif
 
 
 
  if (breakpoint)
  if (breakpoint)
    {
    {
      except_handle (EXCEPT_TRAP, cpu_state.sprs[SPR_EEAR_BASE]);
      except_handle (EXCEPT_TRAP, cpu_state.sprs[SPR_EEAR_BASE]);
    }
    }
Line 915... Line 903...
 
 
  cpu_state.pc  = pcnext;
  cpu_state.pc  = pcnext;
  pcnext       += 4;
  pcnext       += 4;
 
 
  /* MM1409: All programs should set their stack pointer!  */
  /* MM1409: All programs should set their stack pointer!  */
#if !(DYNAMIC_EXECUTION)
 
  except_handle (EXCEPT_RESET, 0);
  except_handle (EXCEPT_RESET, 0);
  update_pc ();
  update_pc ();
#endif
 
 
 
  except_pending = 0;
  except_pending = 0;
  cpu_state.pc   = cpu_state.sprs[SPR_SR] & SPR_SR_EPH ?
  cpu_state.pc   = cpu_state.sprs[SPR_SR] & SPR_SR_EPH ?
    0xf0000000 + EXCEPT_RESET : EXCEPT_RESET;
    0xf0000000 + EXCEPT_RESET : EXCEPT_RESET;
 
 
Line 1281... Line 1267...
    analysis (&cpu_state.iqueue);
    analysis (&cpu_state.iqueue);
}
}
 
 
#include "insnset.c"
#include "insnset.c"
 
 
#elif defined(DYNAMIC_EXECUTION)
 
 
 
#else
#else
# error "Must define SIMPLE_EXECUTION, COMPLEX_EXECUTION or DYNAMIC_EXECUTION"
# error "Must define SIMPLE_EXECUTION, COMPLEX_EXECUTION"
#endif
#endif
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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