star103765.cpp revision 12855:588919e0e4aa
12023SN/A/***************************************************************************** 22023SN/A 32023SN/A Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 42023SN/A more contributor license agreements. See the NOTICE file distributed 52023SN/A with this work for additional information regarding copyright ownership. 62023SN/A Accellera licenses this file to you under the Apache License, Version 2.0 72023SN/A (the "License"); you may not use this file except in compliance with the 82023SN/A License. You may obtain a copy of the License at 92023SN/A 102023SN/A http://www.apache.org/licenses/LICENSE-2.0 112023SN/A 122023SN/A Unless required by applicable law or agreed to in writing, software 132023SN/A distributed under the License is distributed on an "AS IS" BASIS, 142023SN/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 152023SN/A implied. See the License for the specific language governing 162023SN/A permissions and limitations under the License. 172023SN/A 182023SN/A *****************************************************************************/ 192023SN/A 202023SN/A/***************************************************************************** 212023SN/A 222023SN/A star103765.cpp -- 232023SN/A 242023SN/A Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 252023SN/A 262023SN/A *****************************************************************************/ 272023SN/A 282665Ssaidi@eecs.umich.edu/***************************************************************************** 292665Ssaidi@eecs.umich.edu 302665Ssaidi@eecs.umich.edu MODIFICATION LOG - modifiers, enter your name, affiliation, date and 312023SN/A changes you are making here. 324202Sbinkertn@umich.edu 332023SN/A Name, Affiliation, Date: 344202Sbinkertn@umich.edu Description of Modification: 359022Sgblack@eecs.umich.edu 364997Sgblack@eecs.umich.edu *****************************************************************************/ 374202Sbinkertn@umich.edu 388780Sgblack@eecs.umich.edu#include <systemc.h> 398780Sgblack@eecs.umich.edu#include "test.h" 408745Sgblack@eecs.umich.edu 414997Sgblack@eecs.umich.eduvoid test::reset_loop() { 426313Sgblack@eecs.umich.edu sc_uint<8> tmp; 438777Sgblack@eecs.umich.edu unsigned int i, j; 448780Sgblack@eecs.umich.edu 458780Sgblack@eecs.umich.edu wait(); 468780Sgblack@eecs.umich.edu 478777Sgblack@eecs.umich.edu done = 0; 484997Sgblack@eecs.umich.edu dato = 0; 498780Sgblack@eecs.umich.edu tmp = 0; 506327Sgblack@eecs.umich.edu 514202Sbinkertn@umich.edu wait(); 528777Sgblack@eecs.umich.edu operational_loop: while(1 != 0) { 538780Sgblack@eecs.umich.edu wait(); 544997Sgblack@eecs.umich.edu 554826Ssaidi@eecs.umich.edu block1 : for(i = 0; i < 1; i++) { 568755Sgblack@eecs.umich.edu tmp = tmp + 1; 572023SN/A dato = tmp; 588745Sgblack@eecs.umich.edu wait(); 599384SAndreas.Sandberg@arm.com 608780Sgblack@eecs.umich.edu tmp = tmp + 1; 614997Sgblack@eecs.umich.edu if(tmp < 5) { 624997Sgblack@eecs.umich.edu break; 634202Sbinkertn@umich.edu } else { 6412222Sgabeblack@google.com continue; 65 } 66 tmp = tmp + 1; // should never get here 67 } 68 wait(); 69 done_loop : while(1) { 70 dato = tmp; 71 done = 1; 72 wait(); 73 } 74 } 75} 76 77