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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_39/] [or1ksim/] [cpu/] [or32/] [execute.c] - Diff between revs 1177 and 1178

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

Rev 1177 Rev 1178
Line 480... Line 480...
/* Dump registers - 'r' or 't' command */
/* Dump registers - 'r' or 't' command */
void dumpreg()
void dumpreg()
{
{
  int i;
  int i;
  char temp[100];
  char temp[100];
 
  unsigned int physical_pc;
 
 
 
  if (physical_pc = peek_into_itlb(iqueue[0].insn_addr)) {
 
    /*
 
     * PRINTF("\t\t\tEA: %08x <--> PA: %08x\n", iqueue[0].insn_addr, physical_pc);
 
     */
 
    dumpmemory(physical_pc, physical_pc + 4, 1, 0);
 
  }
 
  else {
 
    PRINTF("INTERNAL SIMULATOR ERROR:\n");
 
    PRINTF("no translation for currently executed instruction\n");
 
  }
 
 
  dumpmemory(iqueue[0].insn_addr, iqueue[0].insn_addr + 4, 1, 0);
 
  generate_time_pretty (temp, runtime.sim.cycles * config.sim.clkcycle_ps);
  generate_time_pretty (temp, runtime.sim.cycles * config.sim.clkcycle_ps);
  PRINTF(" (executed) [time %s, #%i]\n", temp, runtime.cpu.instructions);
  PRINTF(" (executed) [time %s, #%i]\n", temp, runtime.cpu.instructions);
  if (config.cpu.superscalar)
  if (config.cpu.superscalar)
    PRINTF ("Superscalar CYCLES: %u", runtime.cpu.supercycles);
    PRINTF ("Superscalar CYCLES: %u", runtime.cpu.supercycles);
  if (config.cpu.hazards)
  if (config.cpu.hazards)
    PRINTF ("  HAZARDWAIT: %u\n", runtime.cpu.hazardwait);
    PRINTF ("  HAZARDWAIT: %u\n", runtime.cpu.hazardwait);
  else
  else
    if (config.cpu.superscalar)
    if (config.cpu.superscalar)
      PRINTF ("\n");
      PRINTF ("\n");
 
 
  if (peek_into_itlb(pc))
  if (physical_pc = peek_into_itlb(pc)) {
    dumpmemory(pc, pc + 4, 1, 0);
    /*
 
     * PRINTF("\t\t\tEA: %08x <--> PA: %08x\n", pc, physical_pc);
 
     */
 
    dumpmemory(physical_pc, physical_pc + 4, 1, 0);
 
  }
  else
  else
    PRINTF("%08x: : xxxxxxxx  ITLB miss follows", pc);
    PRINTF("%08x: : xxxxxxxx  ITLB miss follows", pc);
 
 
  PRINTF(" (next insn) %s", (delay_insn?"(delay insn)":""));
  PRINTF(" (next insn) %s", (delay_insn?"(delay insn)":""));
  for(i = 0; i < MAX_GPRS; i++) {
  for(i = 0; i < MAX_GPRS; i++) {

powered by: WebSVN 2.1.0

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