diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-03-03 21:19:55 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-03-03 21:19:55 +0100 |
commit | bc8d94b4aeb43fd7cc6b77725bb379650a0575a3 (patch) | |
tree | ec34178961e33e8b4729eec62de0e9b5141ab212 /libs/subcircuit/subcircuit.h | |
parent | 3ebc365c096ee062516bdbfd903fea14e4aa6185 (diff) | |
download | yosys-bc8d94b4aeb43fd7cc6b77725bb379650a0575a3.tar.gz yosys-bc8d94b4aeb43fd7cc6b77725bb379650a0575a3.tar.bz2 yosys-bc8d94b4aeb43fd7cc6b77725bb379650a0575a3.zip |
Added "shared nodes" feature to the subcircuit library
Diffstat (limited to 'libs/subcircuit/subcircuit.h')
-rw-r--r-- | libs/subcircuit/subcircuit.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/subcircuit/subcircuit.h b/libs/subcircuit/subcircuit.h index b9399a99d..80eafbc36 100644 --- a/libs/subcircuit/subcircuit.h +++ b/libs/subcircuit/subcircuit.h @@ -63,7 +63,8 @@ namespace SubCircuit std::map<std::string, int> portMap; std::vector<Port> ports; void *userData; - Node() : userData(NULL) { }; + bool shared; + Node() : userData(NULL), shared(false) { }; }; bool allExtern; @@ -75,7 +76,7 @@ namespace SubCircuit Graph() : allExtern(false) { }; Graph(const Graph &other, const std::vector<std::string> &otherNodes); - void createNode(std::string nodeId, std::string typeId, void *userData = NULL); + void createNode(std::string nodeId, std::string typeId, void *userData = NULL, bool shared = false); void createPort(std::string nodeId, std::string portId, int width = 1, int minWidth = -1); void createConnection(std::string fromNodeId, std::string fromPortId, int fromBit, std::string toNodeId, std::string toPortId, int toBit, int width = 1); void createConnection(std::string fromNodeId, std::string fromPortId, std::string toNodeId, std::string toPortId); |