URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 84 to Rev 85
- ↔ Reverse comparison
Rev 84 → Rev 85
/trunk/or1ksim/support/dumpverilog.c
1,4 → 1,5
/* dumpverilog.c -- Dumps memory region as Verilog representation |
or as hex code |
Copyright (C) 2000 Damjan Lampret, lampret@opencores.org |
|
This file is part of OpenRISC 1000 Architectural Simulator. |
100,3 → 101,31
} |
printf(OR1K_MEM_VERILOG_FOOTER); |
} |
|
|
void dumphex(unsigned int from, unsigned int to) |
{ |
unsigned int i, done = 0; |
|
for(i = from; i < to && i < (MEMORY_START + MEMORY_LEN); i++) { |
if (mem[i].insn) { |
printf("%.2x%.2x", mem[i].data, mem[i+1].data); |
printf("%.2x%.2x\n", mem[i+2].data, mem[i+3].data); |
i += (insn_len(mem[i].insn->insn) - 1); |
} else |
{ |
printf("%.2x\n", (unsigned char)mem[i].data); |
} |
done = 1; |
} |
|
if (done) { |
return; |
} |
|
/* this needs to be fixed */ |
|
for(i = from; i < to; i++) { |
printf("%.2x", (unsigned char)evalsim_mem32(i)); |
} |
} |