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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc2/] [or1ksim/] [toplevel.c] - Diff between revs 1486 and 1506

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

Rev 1486 Rev 1506
Line 66... Line 66...
#include "dumpverilog.h"
#include "dumpverilog.h"
#include "trace.h"
#include "trace.h"
#include "cuc.h"
#include "cuc.h"
 
 
/* CVS revision number. */
/* CVS revision number. */
const char rcsrev[] = "$Revision: 1.127 $";
const char rcsrev[] = "$Revision: 1.128 $";
 
 
inline void debug(int level, const char *format, ...)
inline void debug(int level, const char *format, ...)
{
{
  char *p;
  char *p;
  va_list ap;
  va_list ap;
Line 422... Line 422...
 
 
    /* Each cycle has counter of mem_cycles; this value is joined with cycles
    /* Each cycle has counter of mem_cycles; this value is joined with cycles
       at the end of the cycle; no sim originated memory accesses should be
       at the end of the cycle; no sim originated memory accesses should be
       performed inbetween. */
       performed inbetween. */
    runtime.sim.mem_cycles = 0;
    runtime.sim.mem_cycles = 0;
    if (!config.pm.enabled || !testsprbits(SPR_PMR, SPR_PMR_DME | SPR_PMR_SME))
    if (!config.pm.enabled ||
 
        !(cpu_state.sprs[SPR_PMR] & (SPR_PMR_DME | SPR_PMR_SME)))
      if (cpu_clock ())
      if (cpu_clock ())
        /* A breakpoint has been hit, drop to interactive mode */
        /* A breakpoint has been hit, drop to interactive mode */
        handle_sim_command();
        handle_sim_command();
 
 
    if (config.vapi.enabled && runtime.vapi.enabled) vapi_check();
    if (config.vapi.enabled && runtime.vapi.enabled) vapi_check();
    if (config.debug.gdb_enabled) HandleServerSocket(false); /* block & check_stdin = false */
    if (config.debug.gdb_enabled) HandleServerSocket(false); /* block & check_stdin = false */
    if(config.debug.enabled)
    if(config.debug.enabled)
      if (testsprbits(SPR_DMR1, SPR_DMR1_ST)) set_stall_state (1);
      if (cpu_state.sprs[SPR_DMR1] & SPR_DMR1_ST) set_stall_state (1);
 
 
    runtime.sim.cycles += runtime.sim.mem_cycles;
    runtime.sim.cycles += runtime.sim.mem_cycles;
    scheduler.job_queue->time -= runtime.sim.cycles - time_start;
    scheduler.job_queue->time -= runtime.sim.cycles - time_start;
    if (scheduler.job_queue->time <= 0) do_scheduler ();
    if (scheduler.job_queue->time <= 0) do_scheduler ();
  }
  }

powered by: WebSVN 2.1.0

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