URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 1487 |
Rev 1556 |
Line 223... |
Line 223... |
/* Changed parameters so address can be passed as argument */
|
/* Changed parameters so address can be passed as argument */
|
void addprogram(oraddr_t address, uint32_t insn, int* breakpoint)
|
void addprogram(oraddr_t address, uint32_t insn, int* breakpoint)
|
{
|
{
|
int vaddr = (!runtime.sim.filename) ? translate(address,breakpoint) : translate(freemem,breakpoint);
|
int vaddr = (!runtime.sim.filename) ? translate(address,breakpoint) : translate(freemem,breakpoint);
|
|
|
set_program32 (vaddr, insn);
|
/* 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);
|
#if IMM_STATS
|
#if IMM_STATS
|
check_insn (insn);
|
check_insn (insn);
|
#endif
|
#endif
|
if(runtime.sim.filename)
|
if(runtime.sim.filename)
|
freemem += insn_len (insn_decode (insn));
|
freemem += insn_len (insn_decode (insn));
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.