-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcell_library.h
50 lines (41 loc) · 1.13 KB
/
cell_library.h
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
46
47
48
49
50
#ifndef _cell_library_
#define _cell_library_
#include <iostream>
#include <vector>
#include "cell_cpdf.h"
#include "gate_cpdf.h"
#include <stdlib.h>
#include <map>
using namespace std;
//This is a class for purely being a nice way to store things
//And it has a few useful methods that are part of the heurisitic
class cell_library
{
public:
cell_library();
//These vectors will be constant (safe with ptrs)
//once all files are read in
vector<cell_cpdf> nands;
vector<cell_cpdf> ands;
vector<cell_cpdf> nors;
vector<cell_cpdf> ors;
vector<cell_cpdf> xors;
vector<cell_cpdf> xnors;
vector<cell_cpdf> buffs;
vector<cell_cpdf> nots;
//Have extra map for convenience
map<string, vector<cell_cpdf> * > gate_type_to_cell_choices;
//Store the 'best' version
cell_cpdf * best_nand;
cell_cpdf * best_and;
cell_cpdf * best_nor;
cell_cpdf * best_or;
cell_cpdf * best_xor;
cell_cpdf * best_xnor;
cell_cpdf * best_buff;
cell_cpdf * best_not;
//Find the 'best' gate of a certain type
cell_cpdf * get_best_version(string op);
private:
};
#endif