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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_68/] [or1ksim/] [toplevel.c] - Diff between revs 1344 and 1350

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

Rev 1344 Rev 1350
Line 30... Line 30...
#include <stdarg.h>
#include <stdarg.h>
#include <fcntl.h>
#include <fcntl.h>
#include <limits.h>
#include <limits.h>
#include <time.h>
#include <time.h>
 
 
 
#include "config.h"
 
 
 
#ifdef HAVE_INTTYPES_H
 
#include <inttypes.h>
 
#endif
 
 
#ifdef HAVE_LIBREADLINE
#ifdef HAVE_LIBREADLINE
#include <readline/readline.h>
#include <readline/readline.h>
#include <readline/history.h>
#include <readline/history.h>
#endif /* HAVE_LIBREADLINE */
#endif /* HAVE_LIBREADLINE */
 
 
#include "config.h"
#include "port.h"
#include "arch.h"
#include "arch.h"
#include "parse.h"
#include "parse.h"
#include "abstract.h"
#include "abstract.h"
#include "labels.h"
#include "labels.h"
#include "execute.h"
#include "execute.h"
Line 74... Line 80...
#include "dumpverilog.h"
#include "dumpverilog.h"
#include "trace.h"
#include "trace.h"
#include "cuc.h"
#include "cuc.h"
 
 
/* CVS revision number. */
/* CVS revision number. */
const char rcsrev[] = "$Revision: 1.100 $";
const char rcsrev[] = "$Revision: 1.101 $";
 
 
/* History of execution */
/* History of execution */
int histexec[HISTEXEC_LEN];
int histexec[HISTEXEC_LEN];
 
 
char *sim_commands [] = {
char *sim_commands [] = {
Line 372... Line 378...
 
 
/* Cleanup */
/* Cleanup */
void sim_done ()
void sim_done ()
{
{
  if (config.sim.profile) {
  if (config.sim.profile) {
    fprintf(runtime.sim.fprof,"-%08X FFFFFFFF\n", runtime.sim.cycles);
    fprintf(runtime.sim.fprof,"-%08llX FFFFFFFF\n", runtime.sim.cycles);
    fclose(runtime.sim.fprof);
    fclose(runtime.sim.fprof);
  }
  }
 
 
  if (config.sim.mprofile) fclose(runtime.sim.fmprof);
  if (config.sim.mprofile) fclose(runtime.sim.fmprof);
  if (config.sim.exe_log)   fclose(runtime.sim.fexe_log);
  if (config.sim.exe_log)   fclose(runtime.sim.fexe_log);
Line 639... Line 645...
      char item2[20];
      char item2[20];
      char item3[20];
      char item3[20];
 
 
      strtoken(linestr, item2, 2);
      strtoken(linestr, item2, 2);
      strtoken(linestr, item3, 3);
      strtoken(linestr, item3, 3);
      setsim_reg32(strtoul(item2, NULL,0), strtoul(item3, NULL, 0));
      setsim_reg(strtoul(item2, NULL,0), strtoul(item3, NULL, 0));
    } else
    } else
    if (strcmp(item1, "pc") == 0) { /* patch PC */
    if (strcmp(item1, "pc") == 0) { /* patch PC */
      char item2[20];
      char item2[20];
 
 
      strtoken(linestr, item2, 2);
      strtoken(linestr, item2, 2);

powered by: WebSVN 2.1.0

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