OpenCores
URL https://opencores.org/ocsvn/async_sdm_noc/async_sdm_noc/trunk

Subversion Repositories async_sdm_noc

[/] [async_sdm_noc/] [trunk/] [sdm/] [tb/] [rtdriver.h] - Blame information for rev 37

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 32 wsong0210
/*
2
 Asynchronous SDM NoC
3
 (C)2011 Wei Song
4
 Advanced Processor Technologies Group
5
 Computer Science, the Univ. of Manchester, UK
6
 
7
 Authors:
8
 Wei Song     wsong83@gmail.com
9
 
10
 License: LGPL 3.0 or later
11
 
12
 The port driver between NI and router.
13
 
14
 History:
15
 27/04/2010  Initial version. <wsong83@gmail.com>
16
 16/10/2010  Support SDM. <wsong83@gmail.com>
17
 30/05/2011  Remove the sc_unit datatype to support data width larger than 64. <wsong83@gmail.com>
18
 
19
*/
20
 
21
#ifndef RT_DRIVER_H_
22
#define RT_DRIVER_H_
23
 
24
#include "define.h"
25
#include <systemc.h>
26
#include "pdu_def.h"
27
 
28
SC_MODULE(RTDriver) {
29
 
30
 public:
31
  // port with network interface
32
  sc_port<sc_fifo_in_if<FLIT> > NI2P;
33
  sc_port<sc_fifo_out_if<FLIT> > P2NI;
34
 
35
  // signals from interface to router
36
  sc_out<sc_lv<ChBW*4> > rtid [4];
37
  sc_in<sc_lv<ChBW*4> > rtod [4];
38
 
39
#ifdef ENABLE_CHANNEL_CLISING
40
  sc_out<sc_lv<ChBW*4> > rtid4;
41
  sc_in<sc_lv<ChBW*4> > rtod4;
42
  sc_in<sc_lv<ChBW*4> > rtia;
43
  sc_out<sc_lv<ChBW*4> > rtoa;
44
#else
45
  sc_out<sc_logic > rtid4;
46
  sc_in<sc_logic > rtod4;
47
  sc_in<sc_logic> rtia;
48
  sc_out<sc_logic> rtoa;
49
#endif
50
 
51
  SC_HAS_PROCESS(RTDriver);
52
  RTDriver(sc_module_name name);
53
 
54
  void IPdetect();              // Method to detect the router input port
55
  void OPdetect();              // Method to detect the router output port
56
  void send();                  // thread of sending a flit
57
  void recv();                  // thread to recveive a flit
58
 
59
  sc_signal<bool> rtinp_sig; // fire when the router input port is ready for a new flit
60
  sc_signal<bool> rtoutp_sig; // fire when the router output port has a new flit
61
 
62
  unsigned int c1o42b(unsigned int); // convert 1-of-4 to binary
63
};
64
 
65
 
66
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.