star103765.cpp revision 12855:588919e0e4aa
112771Sqtt2@cornell.edu/*****************************************************************************
212771Sqtt2@cornell.edu
312771Sqtt2@cornell.edu  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
412771Sqtt2@cornell.edu  more contributor license agreements.  See the NOTICE file distributed
512771Sqtt2@cornell.edu  with this work for additional information regarding copyright ownership.
612771Sqtt2@cornell.edu  Accellera licenses this file to you under the Apache License, Version 2.0
712771Sqtt2@cornell.edu  (the "License"); you may not use this file except in compliance with the
812771Sqtt2@cornell.edu  License.  You may obtain a copy of the License at
912771Sqtt2@cornell.edu
1012771Sqtt2@cornell.edu    http://www.apache.org/licenses/LICENSE-2.0
1112771Sqtt2@cornell.edu
1212771Sqtt2@cornell.edu  Unless required by applicable law or agreed to in writing, software
1312771Sqtt2@cornell.edu  distributed under the License is distributed on an "AS IS" BASIS,
1412771Sqtt2@cornell.edu  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
1512771Sqtt2@cornell.edu  implied.  See the License for the specific language governing
1612771Sqtt2@cornell.edu  permissions and limitations under the License.
1712771Sqtt2@cornell.edu
1812771Sqtt2@cornell.edu *****************************************************************************/
1912771Sqtt2@cornell.edu
2012771Sqtt2@cornell.edu/*****************************************************************************
2112771Sqtt2@cornell.edu
2212771Sqtt2@cornell.edu  star103765.cpp --
2312771Sqtt2@cornell.edu
2412771Sqtt2@cornell.edu  Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
2512771Sqtt2@cornell.edu
2612771Sqtt2@cornell.edu *****************************************************************************/
2712771Sqtt2@cornell.edu
2812771Sqtt2@cornell.edu/*****************************************************************************
2912771Sqtt2@cornell.edu
3012771Sqtt2@cornell.edu  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
3112771Sqtt2@cornell.edu  changes you are making here.
3212771Sqtt2@cornell.edu
3312771Sqtt2@cornell.edu      Name, Affiliation, Date:
3412771Sqtt2@cornell.edu  Description of Modification:
3512771Sqtt2@cornell.edu
3612771Sqtt2@cornell.edu *****************************************************************************/
3712771Sqtt2@cornell.edu
3812771Sqtt2@cornell.edu#include <systemc.h>
3912771Sqtt2@cornell.edu#include "test.h"
4012771Sqtt2@cornell.edu
4112771Sqtt2@cornell.eduvoid test::reset_loop() {
4212771Sqtt2@cornell.edu  sc_uint<8> tmp;
4312771Sqtt2@cornell.edu  unsigned int i, j;
4412771Sqtt2@cornell.edu
4512771Sqtt2@cornell.edu  wait();
4612771Sqtt2@cornell.edu
4712771Sqtt2@cornell.edu  done = 0;
4812771Sqtt2@cornell.edu  dato = 0;
4912771Sqtt2@cornell.edu  tmp = 0;
5012771Sqtt2@cornell.edu
5112771Sqtt2@cornell.edu  wait();
5212771Sqtt2@cornell.edu  operational_loop: while(1 != 0) {
5312771Sqtt2@cornell.edu    wait();
5412771Sqtt2@cornell.edu
5512771Sqtt2@cornell.edu    block1 : for(i = 0; i < 1; i++) {
5612771Sqtt2@cornell.edu      tmp = tmp + 1;
5712771Sqtt2@cornell.edu      dato = tmp;
5812771Sqtt2@cornell.edu      wait();
5912771Sqtt2@cornell.edu
6012771Sqtt2@cornell.edu      tmp = tmp + 1;
6112771Sqtt2@cornell.edu      if(tmp < 5) {
6212771Sqtt2@cornell.edu        break;
6312771Sqtt2@cornell.edu      } else {
6412771Sqtt2@cornell.edu        continue;
6512771Sqtt2@cornell.edu      }
6612771Sqtt2@cornell.edu      tmp = tmp + 1; // should never get here
6712771Sqtt2@cornell.edu    }
6812771Sqtt2@cornell.edu    wait();
6912771Sqtt2@cornell.edu    done_loop : while(1) {
7012771Sqtt2@cornell.edu      dato = tmp;
7112771Sqtt2@cornell.edu      done = 1;
7212771Sqtt2@cornell.edu      wait();
7312771Sqtt2@cornell.edu    }
7412771Sqtt2@cornell.edu  }
7512771Sqtt2@cornell.edu}
7612771Sqtt2@cornell.edu
7712771Sqtt2@cornell.edu