-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcredit_interface.h
More file actions
40 lines (32 loc) · 835 Bytes
/
credit_interface.h
File metadata and controls
40 lines (32 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* credit_interface.h
* PhoenixSim
*
* Created by Johnnie Chan on 6/28/11.
* Copyright 2011 Johnnie Chan. All rights reserved.
*
* Derived from Interface class. Includes ports for credit based flow control.
*/
#ifndef __CREDIT_INTERFACE_H__
#define __CREDIT_INTERFACE_H__
#include <list>
#include <vector>
#include "systemc.h"
#include "interface.h"
#include "electronicmessage.h"
namespace PhoenixSim
{
class Credit_Interface : public Interface
{
public:
Credit_Interface(sc_module_name name, int p_numOfNetworkPorts, int p_bufferWidth);
~Credit_Interface();
std::vector< sc_in<int>* > creditInputPort;
std::vector< sc_out<int>* > creditOutputPort;
protected:
const unsigned int bufferWidth;
virtual void CreditReceived(int inputPortId) = 0;
private:
};
}
#endif // __CREDIT_INTERFACE_H__