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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [testbench/] [functest.c] - Diff between revs 1024 and 1419

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 1024 Rev 1419
/* Simple test, that test function parameters */
/* Simple test, that test function parameters */
#include "support.h"
#include "support.h"
 
 
int gk = 0;
int gk = 0;
int c = 0;
int c = 0;
int fun1 (int a, int b, int c, int d, int e, int f, int g)
int fun1 (int a, int b, int c, int d, int e, int f, int g)
{
{
  int j = 0;
  int j = 0;
  volatile char x[50];
  volatile char x[50];
  &x;
  &x;
 
 
  while(j < 2) {
  while(j < 2) {
    a++;
    a++;
    j++;
    j++;
  }
  }
 
 
  return a;
  return a;
}
}
 
 
int main(void)
int main(void)
{
{
  int i, j, k;
  int i, j, k;
  i = j = k = 0;
  i = j = k = 0;
 
 
  while (c++ < 10) {
  while (c++ < 10) {
    j = fun1(gk, k + 1, k + 2, k + 3, k + 4, k + 5, k + 6);
    j = fun1(gk, k + 1, k + 2, k + 3, k + 4, k + 5, k + 6);
    printf ("%i\n", gk);
    printf ("%i\n", gk);
    if(j > 40)
    if(j > 40)
      gk = j - 20;
      gk = j - 20;
    else
    else
      gk = j;
      gk = j;
  }
  }
  report (gk);
  report (gk);
  if (gk == 20)
  if (gk == 20)
    report(0xdeaddead);
    report(0xdeaddead);
  return (gk != 20);
  return (gk != 20);
}
}
 
 

powered by: WebSVN 2.1.0

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