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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0/] [or1ksim/] [sim-cmd.c] - Diff between revs 1584 and 1588

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

Rev 1584 Rev 1588
Line 390... Line 390...
void check_insn_exec(void *dat)
void check_insn_exec(void *dat)
{
{
  if(runtime.cpu.instructions < to_insn_num) {
  if(runtime.cpu.instructions < to_insn_num) {
    /* Instruction count has not yet been reached, reschedule */
    /* Instruction count has not yet been reached, reschedule */
    long long int  delta = to_insn_num - runtime.cpu.instructions;
    long long int  delta = to_insn_num - runtime.cpu.instructions;
    SCHED_ADD(check_insn_exec, NULL, (delta > INT_MAX) ? INT_MAX : delta);
    SCHED_ADD(check_insn_exec, NULL, (delta > INT32_MAX) ? INT32_MAX : delta);
    return;
    return;
  }
  }
  handle_sim_command();
  handle_sim_command();
}
}
 
 
Line 422... Line 422...
      if(runtime.sim.hush) {
      if(runtime.sim.hush) {
        /* Schedule a job to run in to_insn_num cycles time since an instruction
        /* Schedule a job to run in to_insn_num cycles time since an instruction
         * may execute in only 1 cycle.  check_insn_exec will check if the right
         * may execute in only 1 cycle.  check_insn_exec will check if the right
         * number of instructions have been executed.  If not it will
         * number of instructions have been executed.  If not it will
         * reschedule.  */
         * reschedule.  */
        SCHED_ADD(check_insn_exec, NULL, (to_insn_num > INT_MAX) ? INT_MAX : to_insn_num);
        SCHED_ADD(check_insn_exec, NULL, (to_insn_num > INT32_MAX) ? INT32_MAX : to_insn_num);
      } else {
      } else {
        /* The user wants to see the execution dumps.  Schedule a task to show
        /* The user wants to see the execution dumps.  Schedule a task to show
         * it to him after each cycle */
         * it to him after each cycle */
        sched_next_insn(print_insn_exec, NULL);
        sched_next_insn(print_insn_exec, NULL);
      }
      }

powered by: WebSVN 2.1.0

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