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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [testbench/] [functest.c] - Blame information for rev 574

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 574 markom
/* Simple test, that test function parameters */
2 479 markom
#include "support.h"
3 421 markom
 
4
int gk = 0;
5
int c = 0;
6
int fun1 (int a, int b, int c, int d, int e, int f, int g)
7
{
8
  int j = 0;
9
  volatile char x[50];
10
  &x;
11
 
12
  while(j < 2) {
13
    a++;
14
    j++;
15
  }
16
 
17
  return a;
18
}
19
 
20
int main(void)
21
{
22
  int i, j, k;
23
  i = j = k = 0;
24
 
25
  while (c++ < 10) {
26
    j = fun1(gk, k + 1, k + 2, k + 3, k + 4, k + 5, k + 6);
27
    printf ("%i\n", gk);
28
    if(j > 40)
29
      gk = j - 20;
30
    else
31
      gk = j;
32
  }
33 424 markom
  report (gk);
34
  if (gk == 20)
35 421 markom
    report(0xdeaddead);
36 424 markom
  return (gk != 20);
37 421 markom
}

powered by: WebSVN 2.1.0

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