OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_71/] [or1ksim/] [testbench/] [support/] [support.c] - Diff between revs 378 and 381

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 378 Rev 381
Line 2... Line 2...
 
 
#include <sys/time.h> 
#include <sys/time.h> 
#include "support.h"
#include "support.h"
#include "int.h"
#include "int.h"
 
 
 
#if OR1K
void excpt_dummy();
void excpt_dummy();
void int_main();
void int_main();
 
 
unsigned long excpt_buserr = (unsigned long) excpt_dummy;
unsigned long excpt_buserr = (unsigned long) excpt_dummy;
unsigned long excpt_dpfault = (unsigned long) excpt_dummy;
unsigned long excpt_dpfault = (unsigned long) excpt_dummy;
Line 19... Line 20...
unsigned long excpt_range = (unsigned long) excpt_dummy;
unsigned long excpt_range = (unsigned long) excpt_dummy;
unsigned long excpt_syscall = (unsigned long) excpt_dummy;
unsigned long excpt_syscall = (unsigned long) excpt_dummy;
unsigned long excpt_break = (unsigned long) excpt_dummy;
unsigned long excpt_break = (unsigned long) excpt_dummy;
unsigned long excpt_trap = (unsigned long) excpt_dummy;
unsigned long excpt_trap = (unsigned long) excpt_dummy;
 
 
#if OR1K
 
 
 
/* Start function, called by reset exception handler.  */
/* Start function, called by reset exception handler.  */
void reset ()
void reset ()
{
{
  int i = main();
  int i = main();
Line 93... Line 93...
 
 
#else
#else
void report(unsigned long value)
void report(unsigned long value)
{
{
  unsigned long spr = 0x1234;
  unsigned long spr = 0x1234;
  printf("l.mtspr %x,%x\n", spr, value);
  printf("l.mtspr 0x%x, 0x%x\n", (unsigned) spr, (unsigned) value);
  return;
 
}
}
 
 
/* start_TIMER                    */
/* start_TIMER                    */
void start_timer(int tmrnum)
void start_timer(int tmrnum)
{
{
  return;
 
}
}
 
 
/* read_TIMER                    */
/* read_TIMER                    */
/*  Returns a value since started in uS */
/*  Returns a value since started in uS */
unsigned int read_timer(int tmrnum)
unsigned int read_timer(int tmrnum)
Line 121... Line 119...
 
 
void *memcpy (void *__restrict dstvoid,
void *memcpy (void *__restrict dstvoid,
              __const void *__restrict srcvoid, size_t length)
              __const void *__restrict srcvoid, size_t length)
{
{
  char *dst = dstvoid;
  char *dst = dstvoid;
  const char *src = srcvoid;
  const char *src = (const char *) srcvoid;
 
 
  while (length--)
  while (length--)
    *dst++ = *src++;
    *dst++ = *src++;
  return dst;
  return dst;
}
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.