00001 00002 /* 00003 * TG.h 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License, 00007 * version 2, as published by the Free Software Foundation. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License along 00015 * with this program; if not, write to the Free Software Foundation, Inc., 00016 * 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. 00017 * 00018 * Author: Lavina Jain 00019 * 00020 */ 00021 00026 00027 #ifndef __TrafficGen__ 00028 #define __TrafficGen__ 00029 00030 #include "../../core/ipcore.h" 00031 #include <fstream> 00032 #include <string> 00033 #include <math.h> 00034 00035 using namespace std; 00036 00044 struct TrafficGenerator : public ipcore { 00045 00047 SC_CTOR(TrafficGenerator); 00048 00049 // PROCESSES ///////////////////////////////////////////////////// 00050 virtual double next_interval() = 0; 00051 void send(); 00052 void recv(); 00053 sc_time_unit strToTime(string); 00054 // PROCESSES END //////////////////////////////////////////////// 00055 00056 // VARIABLES //////////////////////////////////////////// 00057 int num_flits; 00058 int flit_interval; 00059 int route_info; 00060 int next_pkt_time; 00061 int cycles_per_flit; 00062 // VARIABLES END /////////////////////////////////////////// 00063 00064 }; 00065 00066 #endif 00067