00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
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
00055
00057 SC_CTOR(OutputChannel);
00058
00059
00060 void entry();
00061 void closeLogs();
00062
00063 void setTileID(UI tileID, UI portN, UI portS, UI portE, UI portW);
00064
00065
00066
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
00089 };
00090 #endif