test.cpp revision 12855:588919e0e4aa
1/*****************************************************************************
2
3  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
4  more contributor license agreements.  See the NOTICE file distributed
5  with this work for additional information regarding copyright ownership.
6  Accellera licenses this file to you under the Apache License, Version 2.0
7  (the "License"); you may not use this file except in compliance with the
8  License.  You may obtain a copy of the License at
9
10    http://www.apache.org/licenses/LICENSE-2.0
11
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15  implied.  See the License for the specific language governing
16  permissions and limitations under the License.
17
18 *****************************************************************************/
19
20/*****************************************************************************
21
22  test.cpp --
23
24  Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
25
26 *****************************************************************************/
27
28/*****************************************************************************
29
30  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
31  changes you are making here.
32
33      Name, Affiliation, Date:
34  Description of Modification:
35
36 *****************************************************************************/
37
38//
39//	Verifies loop unrolling
40//
41//      Test Plan: 5.2
42//      From 37.sc
43//
44//	Author: PRP
45//	Date Created: 05 APR 99
46//
47
48
49#include "test.h"
50
51void test::entry()
52{
53  int i,j;
54  int a[10],b[10];
55
56
57  do { wait(); } while  (cont1 == 0);
58  wait ();
59
60  i = 0;
61  wait ();
62  for (; i < 3; /*i++*/) {
63        a[i] = 11;
64        i += 2;
65	wait ();
66  }
67
68  for (i=0; i < 3; i ++) {
69        a[i] = 1;
70  }
71
72 for (i=0; i < 3;) {
73        a[i] = 2;
74        ++i;
75  }
76
77  i = 0;
78  for (; i < 3; ) {
79        a[i] = 3;
80        i += 2;
81  }
82
83  if (i)
84        j = 1;
85  else
86        j = 3;
87
88  wait();
89  for (; i < 5;++i) {
90        a[i] = 8;
91	wait();
92  }
93  if (i)
94        i = 1;
95  else
96        j = 3;
97  i = 0;
98  for (; i < 3;++i) {
99        a[i] = 9;
100  }
101
102  i = j;
103  if (j) {
104        i = 0;
105        for (; i < 3;++i) {
106                a[i] = 10;
107        }
108  }
109
110  for (j = 0; j < 2; j++) {
111        i = 0;
112        for (; i < 3;++i) {
113                a[i] = 11;
114        }
115        b[j] = i;
116  }
117
118  wait();
119
120}
121
122