stimgen.cpp revision 12855
110244Satgutier@umich.edu/***************************************************************************** 210244Satgutier@umich.edu 310244Satgutier@umich.edu Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 410244Satgutier@umich.edu more contributor license agreements. See the NOTICE file distributed 510244Satgutier@umich.edu with this work for additional information regarding copyright ownership. 610244Satgutier@umich.edu Accellera licenses this file to you under the Apache License, Version 2.0 710244Satgutier@umich.edu (the "License"); you may not use this file except in compliance with the 810244Satgutier@umich.edu License. You may obtain a copy of the License at 910244Satgutier@umich.edu 1010244Satgutier@umich.edu http://www.apache.org/licenses/LICENSE-2.0 1110244Satgutier@umich.edu 1210244Satgutier@umich.edu Unless required by applicable law or agreed to in writing, software 1310244Satgutier@umich.edu distributed under the License is distributed on an "AS IS" BASIS, 1410244Satgutier@umich.edu WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 1510244Satgutier@umich.edu implied. See the License for the specific language governing 1610244Satgutier@umich.edu permissions and limitations under the License. 1710244Satgutier@umich.edu 1810244Satgutier@umich.edu *****************************************************************************/ 1910244Satgutier@umich.edu 2010244Satgutier@umich.edu/***************************************************************************** 2110244Satgutier@umich.edu 2210244Satgutier@umich.edu stimgen.cpp -- 2310244Satgutier@umich.edu 2410244Satgutier@umich.edu Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 2510244Satgutier@umich.edu 2610244Satgutier@umich.edu *****************************************************************************/ 2710244Satgutier@umich.edu 2810244Satgutier@umich.edu/***************************************************************************** 2910244Satgutier@umich.edu 3010244Satgutier@umich.edu MODIFICATION LOG - modifiers, enter your name, affiliation, date and 3110244Satgutier@umich.edu changes you are making here. 3210244Satgutier@umich.edu 3310244Satgutier@umich.edu Name, Affiliation, Date: 3410244Satgutier@umich.edu Description of Modification: 3510244Satgutier@umich.edu 3610244Satgutier@umich.edu *****************************************************************************/ 3710244Satgutier@umich.edu 3810244Satgutier@umich.edu /*****************************************/ 3910785Sgope@wisc.edu /* Implementation Filename: stimgen.cc */ 4010785Sgope@wisc.edu /*****************************************/ 4111434Smitch.hayenga@arm.com 4210244Satgutier@umich.edu#include "stimgen.h" 4310244Satgutier@umich.edu 4410244Satgutier@umich.eduvoid 4510244Satgutier@umich.edustimgen::entry() 4610244Satgutier@umich.edu{ 4710244Satgutier@umich.edu int i; 4810244Satgutier@umich.edu int j; 4910244Satgutier@umich.edu 5010244Satgutier@umich.edu ready.write(0); 5110244Satgutier@umich.edu 5210244Satgutier@umich.edu for (i = 0; i < 64; i++) { // integer in1 (6 bits of data) 5310244Satgutier@umich.edu for (j = 0; j < 64; j++) { // integer in2 (6 bits of data) 5410244Satgutier@umich.edu in1.write(i); 5510244Satgutier@umich.edu in2.write(j); 5610244Satgutier@umich.edu ready.write(1); 5710244Satgutier@umich.edu wait(); 5810244Satgutier@umich.edu 5910244Satgutier@umich.edu ready.write(0); 6010244Satgutier@umich.edu wait(); 6110244Satgutier@umich.edu 6210244Satgutier@umich.edu cout << in1.read().to_uint() << " + " << in2.read().to_uint() 6310244Satgutier@umich.edu << " = " << result.read().to_uint() 6410244Satgutier@umich.edu << " (" << result << ")" << endl; 6510244Satgutier@umich.edu } 6610244Satgutier@umich.edu } 6710244Satgutier@umich.edu 6810244Satgutier@umich.edu sc_stop(); 6910244Satgutier@umich.edu} 7010244Satgutier@umich.edu