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

Subversion Repositories or1k

[/] [or1k/] [tags/] [tn_m001/] [or1ksim/] [toplevel.c] - Diff between revs 624 and 632

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

Rev 624 Rev 632
Line 48... Line 48...
#include "vapi.h"
#include "vapi.h"
#include "gdbcomm.h"
#include "gdbcomm.h"
#include "debug_unit.h"
#include "debug_unit.h"
#include "coff.h"
#include "coff.h"
 
 
 
#include "profiler.h"
 
#include "mprofiler.h"
 
 
/* CVS revision number. */
/* CVS revision number. */
const char rcsrev[] = "$Revision: 1.72 $";
const char rcsrev[] = "$Revision: 1.73 $";
 
 
/* Continuos run versus single step tracing switch. */
/* Continuos run versus single step tracing switch. */
int cont_run;
int cont_run;
 
 
/* History of execution */
/* History of execution */
Line 183... Line 186...
    runtime.sim.fprof = fopen(config.sim.prof_fn, "wt+");
    runtime.sim.fprof = fopen(config.sim.prof_fn, "wt+");
    if(!runtime.sim.fprof) {
    if(!runtime.sim.fprof) {
      fprintf(stderr, "ERROR: Problems opening profile file.\n");
      fprintf(stderr, "ERROR: Problems opening profile file.\n");
      exit (1);
      exit (1);
    } else
    } else
      fprintf(runtime.sim.fprof, "+00000000 FFFFFFFF FFFFFFFF main\n");
      fprintf(runtime.sim.fprof, "+00000000 FFFFFFFF FFFFFFFF total\n");
  }
  }
 
 
  if (config.sim.mprofile) {
  if (config.sim.mprofile) {
    runtime.sim.fmprof = fopen(config.sim.mprof_fn, "wb+");
    runtime.sim.fmprof = fopen(config.sim.mprof_fn, "wb+");
    if(!runtime.sim.fmprof) {
    if(!runtime.sim.fmprof) {
Line 338... Line 341...
{
{
  if (config.sim.profile) {
  if (config.sim.profile) {
    extern int cycles;
    extern int cycles;
    fprintf(runtime.sim.fprof,"-%08X FFFFFFFF\n", cycles);
    fprintf(runtime.sim.fprof,"-%08X FFFFFFFF\n", cycles);
    fclose(runtime.sim.fprof);
    fclose(runtime.sim.fprof);
 
 
 
    main_profile(config.sim.profile_mode, config.sim.prof_fn);
  }
  }
 
 
  if (config.sim.mprofile)
  if (config.sim.mprofile) {
    fclose(runtime.sim.fmprof);
    fclose(runtime.sim.fmprof);
 
 
 
    main_mprofiler(config.sim.mprofile_mode,
 
                  config.sim.mprofile_group,
 
                  config.sim.mprof_fn);
 
  }
 
 
  if (config.sim.exe_log)   fclose(runtime.sim.fexe_log);
  if (config.sim.exe_log)   fclose(runtime.sim.fexe_log);
  if (runtime.vapi.enabled)  vapi_done ();
  if (runtime.vapi.enabled)  vapi_done ();
  done_memory_table ();
  done_memory_table ();
  exit(0);
  exit(0);
}
}
 
 
 
 
 
 
 
/*###############################################
 
| MAIN
 
###############################################*/
int main(argc, argv)
int main(argc, argv)
     int argc;
     int argc;
     char *argv[];
     char *argv[];
{
{
  char *linestr;
  char *linestr;
Line 370... Line 385...
    printf(" -i                 enable interactive command prompt\n");
    printf(" -i                 enable interactive command prompt\n");
    printf(" --nosrv            do not launch JTAG proxy server\n"); /* (CZ) */
    printf(" --nosrv            do not launch JTAG proxy server\n"); /* (CZ) */
    printf(" --srv <n>          launch JTAG proxy server on port <n>; [random]\n"); /* (CZ) */
    printf(" --srv <n>          launch JTAG proxy server on port <n>; [random]\n"); /* (CZ) */
#if !FAST_SIM
#if !FAST_SIM
    printf(" -f or --file       load script file [sim.cfg]\n");
    printf(" -f or --file       load script file [sim.cfg]\n");
    printf(" --profile          enable profiling\n");
    printf(" --profile <[c]|[q]>  enable profiling. c - cumulative, q - quiet\n");
    printf(" --mprofile         enable memory profiling\n");
    printf(" --mprofile <[c]|[q]> enable memory profiling. c - cumulative, q - quiet\n");
#endif
#endif
    printf(" --output-cfg       prints C structure of current configuration to standard output\n");
    printf(" --output-cfg       prints C structure of current configuration to standard output\n");
    exit(-1);
    exit(-1);
  }
  }
 
 

powered by: WebSVN 2.1.0

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