stimgen.cpp revision 12855:588919e0e4aa
14876Sstever@eecs.umich.edu/***************************************************************************** 23646Srdreslin@umich.edu 33646Srdreslin@umich.edu Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 43646Srdreslin@umich.edu more contributor license agreements. See the NOTICE file distributed 53646Srdreslin@umich.edu with this work for additional information regarding copyright ownership. 63646Srdreslin@umich.edu Accellera licenses this file to you under the Apache License, Version 2.0 73646Srdreslin@umich.edu (the "License"); you may not use this file except in compliance with the 83646Srdreslin@umich.edu License. You may obtain a copy of the License at 93646Srdreslin@umich.edu 103646Srdreslin@umich.edu http://www.apache.org/licenses/LICENSE-2.0 113646Srdreslin@umich.edu 123646Srdreslin@umich.edu Unless required by applicable law or agreed to in writing, software 133646Srdreslin@umich.edu distributed under the License is distributed on an "AS IS" BASIS, 143646Srdreslin@umich.edu WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 153646Srdreslin@umich.edu implied. See the License for the specific language governing 163646Srdreslin@umich.edu permissions and limitations under the License. 173646Srdreslin@umich.edu 183646Srdreslin@umich.edu *****************************************************************************/ 193646Srdreslin@umich.edu 203646Srdreslin@umich.edu/***************************************************************************** 213646Srdreslin@umich.edu 223646Srdreslin@umich.edu stimgen.cpp -- 233646Srdreslin@umich.edu 243646Srdreslin@umich.edu Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 253646Srdreslin@umich.edu 263646Srdreslin@umich.edu *****************************************************************************/ 273646Srdreslin@umich.edu 283646Srdreslin@umich.edu/***************************************************************************** 293646Srdreslin@umich.edu 303646Srdreslin@umich.edu MODIFICATION LOG - modifiers, enter your name, affiliation, date and 313646Srdreslin@umich.edu changes you are making here. 323646Srdreslin@umich.edu 3312564Sgabeblack@google.com Name, Affiliation, Date: 3413774Sandreas.sandberg@arm.com Description of Modification: 3512564Sgabeblack@google.com 366654Snate@binkert.org *****************************************************************************/ 376654Snate@binkert.org 386654Snate@binkert.org /*****************************************/ 396654Snate@binkert.org /* Implementation Filename: stimgen.cc */ 403646Srdreslin@umich.edu /*****************************************/ 413646Srdreslin@umich.edu 426654Snate@binkert.org#include "stimgen.h" 433646Srdreslin@umich.edu 443646Srdreslin@umich.eduvoid 453646Srdreslin@umich.edustimgen::entry() 463646Srdreslin@umich.edu{ 473646Srdreslin@umich.edu int i; 483646Srdreslin@umich.edu int j; 493646Srdreslin@umich.edu 503646Srdreslin@umich.edu ready.write(0); 513646Srdreslin@umich.edu 523646Srdreslin@umich.edu for (i = 0; i < 64; i++) { // integer in1 (6 bits of data) 533646Srdreslin@umich.edu for (j = 0; j < 64; j++) { // integer in2 (6 bits of data) 543646Srdreslin@umich.edu in1.write(i); 553646Srdreslin@umich.edu in2.write(j); 563646Srdreslin@umich.edu ready.write(1); 573646Srdreslin@umich.edu wait(); 583646Srdreslin@umich.edu 593646Srdreslin@umich.edu ready.write(0); 603646Srdreslin@umich.edu wait(); 613646Srdreslin@umich.edu 623646Srdreslin@umich.edu cout << in1.read().to_uint() << " + " << in2.read().to_uint() 633646Srdreslin@umich.edu << " = " << result.read().to_uint() << endl; 643646Srdreslin@umich.edu } 653646Srdreslin@umich.edu } 663646Srdreslin@umich.edu 673646Srdreslin@umich.edu sc_stop(); 683646Srdreslin@umich.edu} 693646Srdreslin@umich.edu