-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsinglepath.h
34 lines (25 loc) · 903 Bytes
/
singlepath.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
#ifndef SINGLEPATH_H
#define SINGLEPATH_H
#include<iostream>
#include<vector>
#include<fstream>
#include<sstream>
#include<string>
#include<algorithm>
#include<unordered_set>
class SinglePath
{
private:
//Contains the path connections as a string vector.
std::vector<std::string> path;
//The logic gate list
const std::vector<std::string> cirElements = {"OR", "AND", "NAND", "NOR", "XOR", "XNOR", "NOT", "OAI3", "BUF"};
//Insert wire ...; line to Verilog file
void InsertWireLine(std::ifstream& inVerilogFile, std::ofstream& outVerilogFile);
public:
//Constructor
SinglePath(std::vector<std::string> pathStr);
//Takes a Verilog file and a path converts it to a new Verilog with only path
int ConvertToSinglePathVerilog(std::string inputVerilogLoc, std::string outputVerilogLoc);
};
#endif // SINGLEPATH_H