-
Notifications
You must be signed in to change notification settings - Fork 108
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
IOBUF support #1148
IOBUF support #1148
Conversation
4c1e098
to
7784fb8
Compare
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
…w in CMake build system. Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
8b8bd85
to
fb6a3a4
Compare
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
…longer required. Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
I'm still having issues with making Yosys infer IOBUFs from assign statements though. For such a design:
In some cases I end up with an |
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
I know I suggested the iobufmap to begin with, but if we simply require the IOBUF explicitly, would your script do the right thing? |
common/cmake/devices.cmake
Outdated
OUTPUT ${OUT_JSON} | ||
DEPENDS ${OUT_JSON_SYNTH} ${QUIET_CMD} ${QUIET_CMD_TARGET} ${SPLIT_INOUTS} ${PYTHON3} ${PYTHON3_TARGET} simplejson | ||
COMMAND | ||
${CMAKE_COMMAND} -E env PYTHONPATH=${PRJXRAY_DIR}:${symbiflow-arch-defs_SOURCE_DIR}/utils ${PYTHON3} ${SPLIT_INOUTS} -i ${OUT_JSON_SYNTH} -o ${OUT_JSON} |
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.
What is PRJXRAY_DIR required here? It seems weird to have a 7-series specific thing in the (in theory) generic CMake function?
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.
Upon review of split_inouts, it doesn't seem to use PRJXRAY at all? So you should just be able to drop the path?
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.
Right, It ended up here as a mistake. Removed.
utils/split_inouts.py
Outdated
# ============================================================================= | ||
|
||
|
||
def find_and_split_inout_ports(design, module_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.
Docstring
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.
Done
utils/split_inouts.py
Outdated
|
||
def get_nets(bits): | ||
""" | ||
Returns a set of numbers corresponding to net indices. |
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.
This function is very weird. Can you provide some doctest examples?
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.
Added docstring and doctest.
utils/split_inouts.py
Outdated
if "top" in attrs and attrs["top"] == 1: | ||
return name | ||
|
||
return None |
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.
Should throw an exception rather than return None?
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.
Added throwing an exception.
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.
This is looking really good! Comments added
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
This PR adds support for IOBUF to SymbiFlow.
With this PR the flow of SymbiFlow changes a bit. Upon sysnthesis the design is written to a JSON file. Then, the file is processed by the
split_inouts.py
utility which splits inout ports into separate inputs and outputs. After processing, the design is written to another JSON file which is then converted to EBLIF using Yosys.This processing should be moved to a Yosys plugin in the future.
Each top-level inout port of the design is split into one input and one output port. Port names are given in the following way:
inout A
->input A_$inp
andoutput A_$out
.