-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AutoHoG JSON importer #756
Conversation
eca7a44
to
fee9014
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Definitely a lot of work, so I really appreciate it!
Still TODO: convert ports from object to array |
This one should be ready for a final review now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Really small question about the spec - after this is merged we can file a follow-up issue to add a README.md doc about the spec.
const rapidjson::Value &portData = itr->value; | ||
assert(portData.IsObject() && | ||
"Expected 'connections[...]' to be an object"); | ||
const char *connectedPortName = portData["port"].GetString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand why this value is always needed - in toposort.json the AND cell's port $0$
connection contains both cell
and port
-
"$0$": {
"cell": "input_cell",
"port": "$2$"
},
Shouldn't it either be connected to a port or a cell? Why does this field have both? It's also confusing because that port name is the same name as a local port name...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the names are also confusing, but the way I understand it is that port
refers to one of:
- Global circuit input/output (when
cell
is not present) - Local cell input/output (when
cell
is present)
The problem is that $2$
is used many times in the example JSON, in each cell that has at least three inputs. So the way to disambiguate is either to give everything unique names, or add the name of the cell as a sort of namespace for the ports local to that cell.
Fixes #686