URL
https://opencores.org/ocsvn/or1k/or1k/trunk
[/] [or1k/] [trunk/] [or1ksim/] [support/] [dumpverilog.c] - Diff between revs 1344 and 1350
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1344 |
Rev 1350 |
Line 23... |
Line 23... |
#include <stdio.h>
|
#include <stdio.h>
|
#include <ctype.h>
|
#include <ctype.h>
|
#include <string.h>
|
#include <string.h>
|
|
|
#include "config.h"
|
#include "config.h"
|
#include "sim-config.h"
|
|
|
|
|
#ifdef HAVE_INTTYPES_H
|
|
#include <inttypes.h>
|
|
#endif
|
|
|
|
#include "port.h"
|
|
#include "sim-config.h"
|
|
#include "arch.h"
|
#include "parse.h"
|
#include "parse.h"
|
#include "abstract.h"
|
#include "abstract.h"
|
#include "opcode/or32.h"
|
#include "opcode/or32.h"
|
#include "labels.h"
|
#include "labels.h"
|
#include "arch.h"
|
|
#include "execute.h"
|
#include "execute.h"
|
#include "sprs.h"
|
#include "sprs.h"
|
#include "stats.h"
|
#include "stats.h"
|
#include "except.h"
|
#include "except.h"
|
#include "dumpverilog.h"
|
#include "dumpverilog.h"
|
Line 57... |
Line 62... |
{
|
{
|
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%.8lx;", i/DWQ, DW, evalsim_mem32(i));
|
PRINTF("\n\tmem['h%x] = %d'h%.8"PRIx32";", i/DWQ, DW, evalsim_mem32(i));
|
|
|
disassemble_insn (_insn);
|
disassemble_insn (_insn);
|
strcpy (dis, disassembled);
|
strcpy (dis, disassembled);
|
|
|
if (strlen(dis) < DISWIDTH)
|
if (strlen(dis) < DISWIDTH)
|
Line 108... |
Line 113... |
for(i = from; i < to; i++) {
|
for(i = from; i < to; i++) {
|
unsigned int _insn = evalsim_mem32 (i);
|
unsigned int _insn = evalsim_mem32 (i);
|
int index = insn_decode(_insn);
|
int index = insn_decode(_insn);
|
if (index >= 0)
|
if (index >= 0)
|
{
|
{
|
PRINTF("%.8lx\n", evalsim_mem32(i));
|
PRINTF("%.8"PRIx32"\n", evalsim_mem32(i));
|
|
|
i += insn_len(index) - 1;
|
i += insn_len(index) - 1;
|
}
|
}
|
else
|
else
|
PRINTF("%.2x\n", evalsim_mem8(i));
|
PRINTF("%.2x\n", evalsim_mem8(i));
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.