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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_66/] [or1ksim/] [sim-config.c] - Diff between revs 631 and 632

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

Rev 631 Rev 632
Line 27... Line 27...
#include "pic.h"
#include "pic.h"
#include "stats.h"
#include "stats.h"
#include "icache_model.h"
#include "icache_model.h"
#include "dcache_model.h"
#include "dcache_model.h"
 
 
 
#include "profiler.h"
 
#include "mprofiler.h"
 
 
#define WARNING(s) fprintf (stderr, "WARNING: config.%s: %s\n", sections[section].name, (s))
#define WARNING(s) fprintf (stderr, "WARNING: config.%s: %s\n", sections[section].name, (s))
#define ERROR(s) {fprintf (stderr, "ERROR: config.%s:%s\n", sections[section].name, s); if (runtime.sim.init) exit (1);}
#define ERROR(s) {fprintf (stderr, "ERROR: config.%s:%s\n", sections[section].name, s); if (runtime.sim.init) exit (1);}
#define MERROR(s) {fprintf (stderr, "ERROR: %s\n", s); if (runtime.sim.init) exit (1);}
#define MERROR(s) {fprintf (stderr, "ERROR: %s\n", s); if (runtime.sim.init) exit (1);}
 
 
#if !FAST_SIM
#if !FAST_SIM
Line 57... Line 60...
  strcpy (config.sim.spr_log_fn, "spr.log");
  strcpy (config.sim.spr_log_fn, "spr.log");
 
 
  config.sim.debug = 0;
  config.sim.debug = 0;
  config.sim.verbose = 1;
  config.sim.verbose = 1;
 
 
 
  config.sim.profile_mode = 0;
 
  config.sim.mprofile_mode = 0;
 
  config.sim.mprofile_group = 2;
  strcpy (config.sim.prof_fn, "sim.profile");
  strcpy (config.sim.prof_fn, "sim.profile");
  strcpy (config.sim.mprof_fn, "sim.mprofile");
  strcpy (config.sim.mprof_fn, "sim.mprofile");
  strcpy (runtime.sim.script_fn, "(default)");
  strcpy (runtime.sim.script_fn, "(default)");
  config.sim.clkcycle_ps = 4000; /* 4000 for 4ns (250MHz) */
  config.sim.clkcycle_ps = 4000; /* 4000 for 4ns (250MHz) */
 
 
Line 203... Line 209...
    } else
    } else
#if !FAST_SIM
#if !FAST_SIM
    if (strcmp(*argv, "--profile") == 0) {
    if (strcmp(*argv, "--profile") == 0) {
      config.sim.profile = 1;
      config.sim.profile = 1;
      argv++; argc--;
      argv++; argc--;
 
      if (argv[0][0] != '-') {
 
        if ((argv[0][0] == 'c') || (argv[0][1] == 'c')) config.sim.profile_mode |= PROF_CUMULATIVE;
 
        if ((argv[0][0] == 'q') || (argv[0][1] == 'q')) config.sim.profile_mode |= PROF_QUIET;
 
        argv++; argc--;
 
      }
 
    } else
 
    if (strcmp(*argv, "--mprofile_d") == 0) {
 
      config.sim.mprofile = 1;
 
      config.sim.mprofile_mode = MODE_DETAIL;
 
      argv++; argc--;
    } else
    } else
    if (strcmp(*argv, "--mprofile") == 0) {
    if (strcmp(*argv, "--mprofile_p") == 0) {
      config.sim.mprofile = 1;
      config.sim.mprofile = 1;
 
      config.sim.mprofile_mode = MODE_PRETTY;
      argv++; argc--;
      argv++; argc--;
    } else
    } else
 
    if (strcmp(*argv, "--mprofile_a") == 0) {
 
      config.sim.mprofile = 1;
 
      config.sim.mprofile_mode = MODE_ACCESS;
 
      argv++; argc--;
 
    } else
 
    if (strcmp(*argv, "--mprofile_w") == 0) {
 
      config.sim.mprofile = 1;
 
      config.sim.mprofile_mode = MODE_WIDTH;
 
      argv++; argc--;
 
    } else
 
    if (!strcmp(argv[0], "-g") || !strcmp(argv[0], "--group")) {
 
      argv++; argc--;
 
      config.sim.mprofile_group = strtoul(argv[0], NULL, 0);
 
      argv++; argc--;
 
    }
#endif
#endif
    if (strcmp(*argv, "--output-cfg") == 0) {
    if (strcmp(*argv, "--output-cfg") == 0) {
      runtime.sim.output_cfg = 1;
      runtime.sim.output_cfg = 1;
      argv++; argc--;
      argv++; argc--;
    } else {
    } else {

powered by: WebSVN 2.1.0

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