URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 956 |
Rev 997 |
Line 37... |
Line 37... |
asm("l.add r3,r0,%0": : "r" (i));
|
asm("l.add r3,r0,%0": : "r" (i));
|
asm("l.nop %0": :"K" (NOP_EXIT));
|
asm("l.nop %0": :"K" (NOP_EXIT));
|
while (1);
|
while (1);
|
}
|
}
|
|
|
/* activate printf support in simulator */
|
/* activate PRINTF support in simulator */
|
void printf(const char *fmt, ...)
|
void PRINTF(const char *fmt, ...)
|
{
|
{
|
va_list args;
|
va_list args;
|
va_start(args, fmt);
|
va_start(args, fmt);
|
__asm__ __volatile__ (" l.addi\tr3,%0,0\n": : "r" (fmt) : "r3", "r4");
|
__asm__ __volatile__ (" l.addi\tr3,%0,0\n": : "r" (fmt) : "r3", "r4");
|
__asm__ __volatile__ (" l.addi\tr4,%0,0\n": : "r" (args): "r3", "r4");
|
__asm__ __volatile__ (" l.addi\tr4,%0,0\n": : "r" (args): "r3", "r4");
|
Line 93... |
Line 93... |
}
|
}
|
|
|
#else
|
#else
|
void report(unsigned long value)
|
void report(unsigned long value)
|
{
|
{
|
printf("report(0x%x);\n", (unsigned) value);
|
PRINTF("report(0x%x);\n", (unsigned) value);
|
}
|
}
|
|
|
/* start_TIMER */
|
/* start_TIMER */
|
void start_timer(int tmrnum)
|
void start_timer(int tmrnum)
|
{
|
{
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.