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

Subversion Repositories or1k

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

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

Rev 823 Rev 847
Line 65... Line 65...
  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 (config.sim.fstdout, "stdout.txt");
  strcpy (config.sim.fstdout, "stdout.txt");
  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 176... Line 173...
{
{
  unsigned long val;
  unsigned long val;
 
 
  argv++; argc--;
  argv++; argc--;
  while (argc) {
  while (argc) {
    if (argc && (*argv[0] != '-')) {
    if (strcmp(*argv, "profiler") == 0) {
 
      exit (main_profiler (argc, argv));
 
    } else
 
    if (strcmp(*argv, "mprofiler") == 0) {
 
      exit (main_mprofiler (argc, argv));
 
    } else
 
    if (*argv[0] != '-') {
      runtime.sim.filename = argv[0];
      runtime.sim.filename = argv[0];
      argc--;
      argc--;
      argv++;
      argv++;
    } else
    } else
#if !FAST_SIM /* Constant cfg */
#if !FAST_SIM /* Constant cfg */
Line 220... Line 223...
    } 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
 
    if (strcmp(*argv, "--mprofile_p") == 0) {
 
      config.sim.mprofile = 1;
 
      config.sim.mprofile_mode = MODE_PRETTY;
 
      argv++; argc--;
 
    } else
 
    if (strcmp(*argv, "--mprofile_a") == 0) {
 
      config.sim.mprofile = 1;
 
      config.sim.mprofile_mode = MODE_ACCESS;
 
      argv++; argc--;
 
    } else
    } else
    if (strcmp(*argv, "--mprofile_w") == 0) {
    if (strcmp(*argv, "--mprofile") == 0) {
      config.sim.mprofile = 1;
      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--;
      argv++; argc--;
    } else
    } else
#endif
#endif
    if (strcmp(*argv, "--output-cfg") == 0) {
    if (strcmp(*argv, "--output-cfg") == 0) {
      runtime.sim.output_cfg = 1;
      runtime.sim.output_cfg = 1;

powered by: WebSVN 2.1.0

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