stimgen.cpp revision 12855:588919e0e4aa
19538Satgutier@umich.edu/*****************************************************************************
29538Satgutier@umich.edu
39538Satgutier@umich.edu  Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
49538Satgutier@umich.edu  more contributor license agreements.  See the NOTICE file distributed
59538Satgutier@umich.edu  with this work for additional information regarding copyright ownership.
69538Satgutier@umich.edu  Accellera licenses this file to you under the Apache License, Version 2.0
79538Satgutier@umich.edu  (the "License"); you may not use this file except in compliance with the
89538Satgutier@umich.edu  License.  You may obtain a copy of the License at
99538Satgutier@umich.edu
109538Satgutier@umich.edu    http://www.apache.org/licenses/LICENSE-2.0
119538Satgutier@umich.edu
129538Satgutier@umich.edu  Unless required by applicable law or agreed to in writing, software
139538Satgutier@umich.edu  distributed under the License is distributed on an "AS IS" BASIS,
149538Satgutier@umich.edu  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
159538Satgutier@umich.edu  implied.  See the License for the specific language governing
169538Satgutier@umich.edu  permissions and limitations under the License.
179538Satgutier@umich.edu
189538Satgutier@umich.edu *****************************************************************************/
199538Satgutier@umich.edu
209538Satgutier@umich.edu/*****************************************************************************
219538Satgutier@umich.edu
229538Satgutier@umich.edu  stimgen.cpp --
239538Satgutier@umich.edu
249538Satgutier@umich.edu  Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15
259538Satgutier@umich.edu
269538Satgutier@umich.edu *****************************************************************************/
279538Satgutier@umich.edu
289538Satgutier@umich.edu/*****************************************************************************
299538Satgutier@umich.edu
309538Satgutier@umich.edu  MODIFICATION LOG - modifiers, enter your name, affiliation, date and
319538Satgutier@umich.edu  changes you are making here.
329538Satgutier@umich.edu
339538Satgutier@umich.edu      Name, Affiliation, Date:
349538Satgutier@umich.edu  Description of Modification:
359538Satgutier@umich.edu
369538Satgutier@umich.edu *****************************************************************************/
379538Satgutier@umich.edu
389538Satgutier@umich.edu                /*****************************************/
399538Satgutier@umich.edu                /* Implementation Filename:  stimgen.cc  */
409538Satgutier@umich.edu                /*****************************************/
419538Satgutier@umich.edu
429538Satgutier@umich.edu#include "stimgen.h"
439538Satgutier@umich.edu
4410880SCurtis.Dunham@arm.comvoid
459538Satgutier@umich.edustimgen::entry()
469538Satgutier@umich.edu{
479538Satgutier@umich.edu  int i;
489538Satgutier@umich.edu  int j;
499538Satgutier@umich.edu
509538Satgutier@umich.edu  ready.write(0);
519538Satgutier@umich.edu
529538Satgutier@umich.edu  for (i = 0; i < 64; i++) {		// integer in1 (6 bits of data)
539538Satgutier@umich.edu    for (j = 0; j < 64; j++) {		// integer in2 (6 bits of data)
549538Satgutier@umich.edu      in1.write(i);
559538Satgutier@umich.edu      in2.write(j);
569538Satgutier@umich.edu      ready.write(1);
579538Satgutier@umich.edu      wait();
589538Satgutier@umich.edu
599538Satgutier@umich.edu      ready.write(0);
609538Satgutier@umich.edu      wait();
619538Satgutier@umich.edu
6210508SAli.Saidi@ARM.com      cout << in1.read().to_int() << " + " << in2.read().to_int()
6310508SAli.Saidi@ARM.com	   << " = " << result.read().to_int()
6410508SAli.Saidi@ARM.com	   << " (" << result << ")" << endl;
6510508SAli.Saidi@ARM.com    }
6610508SAli.Saidi@ARM.com  }
6710508SAli.Saidi@ARM.com
6810508SAli.Saidi@ARM.com  sc_stop();
699538Satgutier@umich.edu}
709538Satgutier@umich.edu