3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-24 18:31:29 +00:00

Added "shared nodes" feature to the subcircuit library

This commit is contained in:
Clifford Wolf 2013-03-03 21:19:55 +01:00
parent 3ebc365c09
commit bc8d94b4ae
4 changed files with 14 additions and 9 deletions

View file

@ -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);