-
Notifications
You must be signed in to change notification settings - Fork 0
/
net.hpp
46 lines (40 loc) · 1.29 KB
/
net.hpp
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
40
41
42
43
44
45
#include <string>
#include <map>
using namespace std;
template<
typename IdType>
class Net
{
public:
string name ; // Name of the net
IdType from_module; // Which module outputs to the net
IdType from_output;
IdType to_module ; // Which module accepts the net as input
IdType to_input ;
//int width ;
};
template<
typename ValueType,
typename SizeType>
class InputValue
{
public:
SizeType num_values ; // Number of possible values of this input to achieve a specific value on a given net
ValueType *values ; // The input values
InputValue *childs ; // Pointers to the childs describing values of the next input
};
template<
typename IdType,
typename ValueType,
typename SizeType>
class NetValue
{
public:
/*SizeType num_values ; // Number of possible values of the net
char *markers ; // The markers for the values (0: normal, 1: equal to another net, 2: flip from another net
ValueType *values ; // The possible values
IdType *references ; // References to other nets if mode is 1 or 2
IdType *input_root_Ids; // The input value trees describing all possible inputs to achieve the given value on the net
*/
map<ValueType, IdType> root_Ids;
};