Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

OutputChannel.h

Go to the documentation of this file.
00001 
00002 /*
00003  * OutputChannel.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 _OP_CHANNEL_
00028 #define _OP_CHANNEL_
00029 
00030 #include "systemc.h"
00031 #include "switch_reg.h"
00032 #include "flit.h"
00033 #include "credit.h"
00034 #include <string>
00035 #include <fstream>
00036 #include <iostream>
00037 
00038 using namespace std;
00039 
00045 template<UI num_ip = NUM_IC>
00046 struct OutputChannel : public sc_module {
00047         
00048         // PORTS ////////////////////////////////////////////////////////////////////////////////////
00049         sc_in<flit> inport[num_ip];             
00050         sc_out<bool> inReady[num_ip];           
00051         sc_in<bool>  switch_cntrl;              
00052         sc_out<flit> outport;                   
00053         sc_in<creditLine> credit_in[NUM_VCS];   
00054         // PORTS END ////////////////////////////////////////////////////////////////////////////////////
00055         
00057         SC_CTOR(OutputChannel);
00058         
00059         // PROCESSES ///////////////////////////////////////////////////////////////////////////////////////////////
00060         void entry();                   
00061         void closeLogs();               
00062 
00063         void setTileID(UI tileID, UI portN, UI portS, UI portE, UI portW);
00064         // PROCESSES END //////////////////////////////////////////////////////////////////////////////////////////
00065         
00066         // VARIABLES //////////////////////////////////////////////////////////////////////////////////////////
00067         UI tileID;      
00068         UI cntrlID;     
00069         UI portN;       
00070         UI portS;       
00071         UI portE;       
00072         UI portW;       
00073                 
00074         switch_reg      r_in[num_ip];   
00075         switch_reg      r_vc[NUM_VCS];  
00076 
00077         ULL latency;                    
00078         ULL num_pkts;                   
00079         ULL num_flits;                  
00080         ULL input_time;                 
00081         float avg_latency;              
00082         float avg_latency_flit;         
00083         float avg_throughput;           
00084         
00085         int beg_cycle;                  
00086         int end_cycle;                  
00087         int total_cycles;               
00088         // VARIABLES END //////////////////////////////////////////////////////////////////////////////////////////
00089 };
00090 #endif

Generated on Mon May 7 19:03:19 2007 for NIRGAM by  doxygen 1.3.9.1