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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_69/] [or1ksim/] [cuc/] [cuc.c] - Diff between revs 904 and 905

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

Rev 904 Rev 905
Line 470... Line 470...
    config.cuc.memory_order == MO_NONE ? "no" : config.cuc.memory_order == MO_WEAK ? "weak" :
    config.cuc.memory_order == MO_NONE ? "no" : config.cuc.memory_order == MO_WEAK ? "weak" :
    config.cuc.memory_order == MO_STRONG ? "strong" : "exact");
    config.cuc.memory_order == MO_STRONG ? "strong" : "exact");
 
 
  prof_set (1, 0);
  prof_set (1, 0);
  assert (prof_acquire (config.sim.prof_fn) == 0);
  assert (prof_acquire (config.sim.prof_fn) == 0);
  //cuc_debug = 9;
  cuc_debug = 9;
 
 
  if (config.cuc.calling_convention)
  if (config.cuc.calling_convention)
    printf ("Assuming OpenRISC standard calling convention.\n");
    printf ("Assuming OpenRISC standard calling convention.\n");
 
 
  /* Try all functions except "total" */
  /* Try all functions except "total" */
Line 531... Line 531...
            int s = calc_size (func[i]);
            int s = calc_size (func[i]);
            f = func[i]->orig_time / nt;
            f = func[i]->orig_time / nt;
            ntime += nt * func[i]->num_runs;
            ntime += nt * func[i]->num_runs;
            size += s;
            size += s;
          } else ntime += prof_func[i].cum_cycles;
          } else ntime += prof_func[i].cum_cycles;
          printf ("%8.1f |%8.1f | %-8s|\n", 1.f * prof_func[i].cum_cycles / func[i]->timings.new_time, f, format_func_options (tmp, func[i]));
          printf ("%8.1f |%8.1f | %-8s|\n", 1.f * prof_func[i].cum_cycles
 
                          / func[i]->timings.new_time, f, format_func_options (tmp, func[i]));
        } else {
        } else {
          printf ("     N/A |     N/A |         |\n");
          printf ("     N/A |     N/A |         |\n");
          ntime += prof_func[i].cum_cycles;
          ntime += prof_func[i].cum_cycles;
        }
        }
        prof_func[i].cum_cycles = -prof_func[i].cum_cycles;
        prof_func[i].cum_cycles = -prof_func[i].cum_cycles;
      }
      }
      for (i = 0; i < prof_nfuncs; i++)
      for (i = 0; i < prof_nfuncs; i++)
        prof_func[i].cum_cycles = -prof_func[i].cum_cycles;
        prof_func[i].cum_cycles = -prof_func[i].cum_cycles;
      printf ("-----------------------------------------------------------------------------\n");
      printf ("-----------------------------------------------------------------------------\n");
      printf ("Total %i cycles (was %i), total added gates = %i. Speed factor %.1f\n", ntime, prof_cycles, size, 1. * prof_cycles / ntime);
      printf ("Total %i cycles (was %i), total added gates = %i. Speed factor %.1f\n",
 
                      ntime, prof_cycles, size, 1. * prof_cycles / ntime);
    } else if (strncmp (tmp1, "d", 1) == 0 || strncmp (tmp1, "debug", 5) == 0) {
    } else if (strncmp (tmp1, "d", 1) == 0 || strncmp (tmp1, "debug", 5) == 0) {
      /* debug command */
      /* debug command */
      sscanf (tmp1, "%*s %i", &cuc_debug);
      sscanf (tmp1, "%*s %i", &cuc_debug);
      if (cuc_debug < 0) cuc_debug = 0;
      if (cuc_debug < 0) cuc_debug = 0;
      if (cuc_debug > 9) cuc_debug = 9;
      if (cuc_debug > 9) cuc_debug = 9;

powered by: WebSVN 2.1.0

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