stimgen.cpp revision 12855
16899SN/A/***************************************************************************** 28851Sandreas.hansson@arm.com 38851Sandreas.hansson@arm.com Licensed to Accellera Systems Initiative Inc. (Accellera) under one or 48851Sandreas.hansson@arm.com more contributor license agreements. See the NOTICE file distributed 58851Sandreas.hansson@arm.com with this work for additional information regarding copyright ownership. 68851Sandreas.hansson@arm.com Accellera licenses this file to you under the Apache License, Version 2.0 78851Sandreas.hansson@arm.com (the "License"); you may not use this file except in compliance with the 88851Sandreas.hansson@arm.com License. You may obtain a copy of the License at 98851Sandreas.hansson@arm.com 108851Sandreas.hansson@arm.com http://www.apache.org/licenses/LICENSE-2.0 118851Sandreas.hansson@arm.com 128851Sandreas.hansson@arm.com Unless required by applicable law or agreed to in writing, software 138851Sandreas.hansson@arm.com distributed under the License is distributed on an "AS IS" BASIS, 146899SN/A WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 156899SN/A implied. See the License for the specific language governing 166899SN/A permissions and limitations under the License. 176899SN/A 186899SN/A *****************************************************************************/ 196899SN/A 206899SN/A/***************************************************************************** 216899SN/A 226899SN/A stimgen.cpp -- 236899SN/A 246899SN/A Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 256899SN/A 266899SN/A *****************************************************************************/ 276899SN/A 286899SN/A/***************************************************************************** 296899SN/A 306899SN/A MODIFICATION LOG - modifiers, enter your name, affiliation, date and 316899SN/A changes you are making here. 326899SN/A 336899SN/A Name, Affiliation, Date: 346899SN/A Description of Modification: 356899SN/A 366899SN/A *****************************************************************************/ 376899SN/A 386899SN/A /*****************************************/ 396899SN/A /* Implementation Filename: stimgen.cc */ 406899SN/A /*****************************************/ 416899SN/A 427805Snilay@cs.wisc.edu#include "stimgen.h" 437632SBrad.Beckmann@amd.com 447632SBrad.Beckmann@amd.comvoid 458232Snate@binkert.orgstimgen::entry() 466899SN/A{ 477053SN/A int i; 486899SN/A int j; 496899SN/A 508832SAli.Saidi@ARM.com ready.write(0); 516899SN/A 526899SN/A for (i = 0; i < 64; i++) { // integer in1 (6 bits of data) 537053SN/A for (j = 0; j < 64; j++) { // integer in2 (6 bits of data) 548832SAli.Saidi@ARM.com in1.write(i); 558932SBrad.Beckmann@amd.com in2.write(j); 566899SN/A ready.write(1); 576899SN/A wait(); 588184Ssomayeh@cs.wisc.edu 598932SBrad.Beckmann@amd.com ready.write(0); 608932SBrad.Beckmann@amd.com wait(); 616899SN/A 627053SN/A cout << in1.read().to_uint() << " + " << in2.read().to_uint() 636899SN/A << " = " << result.read().to_uint() 648932SBrad.Beckmann@amd.com << " (" << result << ")" << endl; 658932SBrad.Beckmann@amd.com } 668932SBrad.Beckmann@amd.com } 678932SBrad.Beckmann@amd.com 688932SBrad.Beckmann@amd.com sc_stop(); 698932SBrad.Beckmann@amd.com} 708932SBrad.Beckmann@amd.com