URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 63 |
Rev 66 |
Line 270... |
Line 270... |
MemoryLoad::addprogram (oraddr_t address,
|
MemoryLoad::addprogram (oraddr_t address,
|
uint32_t insn,
|
uint32_t insn,
|
int *breakpoint)
|
int *breakpoint)
|
{
|
{
|
|
|
// Memory is word addressed, not byte, so /4 the address we get
|
int vaddr = (int) address;
|
int vaddr = (int) address/4; /*(!runtime.sim.filename) ? translate (address, breakpoint) :
|
|
translate (freemem, breakpoint);
|
|
-- jb
|
|
*/
|
|
/* We can't have set_program32 functions since it is not gauranteed that the
|
|
section we're loading is aligned on a 4-byte boundry */
|
|
/*
|
|
set_program8 (vaddr, (insn >> 24) & 0xff);
|
|
set_program8 (vaddr + 1, (insn >> 16) & 0xff);
|
|
set_program8 (vaddr + 2, (insn >> 8) & 0xff);
|
|
set_program8 (vaddr + 3, insn & 0xff);
|
|
*/
|
|
/* Use the whole-word write */
|
/* Use the whole-word write */
|
accessor->set_mem(vaddr, insn);
|
accessor->set_mem32(vaddr, insn);
|
PRINTF("* addprogram: addr 0x%.8x insn: 0x%.8x (conf: 0x%.8x)\n", vaddr, insn, accessor->get_mem(vaddr));
|
PRINTF("* addprogram: addr 0x%.8x insn: 0x%.8x (conf: 0x%.8x)\n", vaddr, insn, accessor->get_mem32(vaddr));
|
|
|
|
|
#if IMM_STATS
|
|
check_insn (insn);
|
|
#endif
|
|
|
|
//if (runtime.sim.filename)
|
|
//{
|
|
//freemem += insn_len (insn_decode (insn));
|
|
//}
|
|
freemem += 4;
|
freemem += 4;
|
|
|
} /* addprogram () */
|
} /* addprogram () */
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.