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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [or1ksim/] [support/] [dumpverilog.c] - Diff between revs 19 and 230

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

Rev 19 Rev 230
Line 102... Line 102...
  for (i = from; i < to; i++)
  for (i = from; i < to; i++)
    {
    {
      if (!(i & 3))
      if (!(i & 3))
        {
        {
          insn = eval_direct32 (i, 0, 0);
          insn = eval_direct32 (i, 0, 0);
          index = insn_decode (insn);
          index = or1ksim_insn_decode (insn);
          if (index >= 0)
          if (index >= 0)
            {
            {
              if (verify_memoryarea (i) && (tmp = get_label (i)))
              if (verify_memoryarea (i) && (tmp = get_label (i)))
                if (tmp)
                if (tmp)
                  PRINTF ("\n//\t%s%s", tmp->name, LABELEND_CHAR);
                  PRINTF ("\n//\t%s%s", tmp->name, LABELEND_CHAR);
 
 
              PRINTF ("\n\tmem['h%x] = %d'h%.8" PRIx32 ";", i / DWQ, DW,
              PRINTF ("\n\tmem['h%x] = %d'h%.8" PRIx32 ";", i / DWQ, DW,
                      eval_direct32 (i, 0, 0));
                      eval_direct32 (i, 0, 0));
 
 
              disassemble_insn (insn);
              or1ksim_disassemble_insn (insn);
              strcpy (dis, disassembled);
              strcpy (dis, or1ksim_disassembled);
 
 
              if (strlen (dis) < DISWIDTH)
              if (strlen (dis) < DISWIDTH)
                memset (dis + strlen (dis), ' ', DISWIDTH);
                memset (dis + strlen (dis), ' ', DISWIDTH);
              dis[DISWIDTH] = '\0';
              dis[DISWIDTH] = '\0';
              PRINTF ("\n\tdis['h%x] = {\"%s\"};", i / DWQ, dis);
              PRINTF ("\n\tdis['h%x] = {\"%s\"};", i / DWQ, dis);
              dis[0] = '\0';
              dis[0] = '\0';
              i += insn_len (index) - 1;
              i += or1ksim_insn_len (index) - 1;
              done = 1;
              done = 1;
              continue;
              continue;
            }
            }
        }
        }
 
 
Line 168... Line 168...
  for (i = from; i < to; i++)
  for (i = from; i < to; i++)
    {
    {
      if (!(i & 3))
      if (!(i & 3))
        {
        {
          insn = eval_direct32 (i, 0, 0);
          insn = eval_direct32 (i, 0, 0);
          index = insn_decode (insn);
          index = or1ksim_insn_decode (insn);
          if (index >= 0)
          if (index >= 0)
            {
            {
              PRINTF ("%.8" PRIx32 "\n", eval_direct32 (i, 0, 0));
              PRINTF ("%.8" PRIx32 "\n", eval_direct32 (i, 0, 0));
              i += insn_len (index) - 1;
              i += or1ksim_insn_len (index) - 1;
              continue;
              continue;
            }
            }
        }
        }
      PRINTF ("%.2x\n", eval_direct8 (i, 0, 0));
      PRINTF ("%.2x\n", eval_direct8 (i, 0, 0));
    }
    }

powered by: WebSVN 2.1.0

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