-
Notifications
You must be signed in to change notification settings - Fork 110
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 role to UARTResouce and fix UART flow control pin inconsistencies #65
Merged
whitequark
merged 7 commits into
amaranth-lang:master
from
igrr:bugfix/uart_flow_ctrl_pins
Jun 11, 2020
Merged
Add role to UARTResouce and fix UART flow control pin inconsistencies #65
whitequark
merged 7 commits into
amaranth-lang:master
from
igrr:bugfix/uart_flow_ctrl_pins
Jun 11, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
igrr
force-pushed
the
bugfix/uart_flow_ctrl_pins
branch
from
June 9, 2020 15:59
d32888d
to
618a1c7
Compare
UARTResource gets a new argument, "role", which determines flow control signal directions: - DCE means that the design acts as a modem - DTE means that the design acts as a PC
Pin numbers match the P0/P1 signals in the schematic, but the direction is reversed. Fix by setting role="dce". Ref. https://github.com/mystorm-org/BlackIce-II/blob/master/hardware/BlackIce.pdf
According to the schematic, RTS and CTS are not connected to CH340G in this version of the board. Ref. https://github.com/monsonite/BackIce_FPGA/blob/master/BlackIce18_07_01D.pdf and https://forum.mystorm.uk/uploads/default/original/1X/a5db1ce1c9bc2d91e63cfdc8424d699c2419a3d0.png
According to the schematic, RTS is E5 and CTS is D3. Previously these were reversed to work around signal direction set in UARTResource. Un-reverse the signals, and set correct direction by passing role=dce. Ref. https://reference.digilentinc.com/_media/nexys4-ddr:nexys_4_ddr_sch.pdf
RTS and CTS match the schematic, but the direction is incorrect: CTS is output, RTS is input. Fix by setting role=dce. Ref. https://www.intel.com/content/dam/altera-www/global/en_US/portal/dsn/42/doc-us-dsnbk-42-5804152209-de0-user-manual.pdf
RTS/CTS and DTR/DSR pairs have been swapped to work around the signal direction in UARTResource. Un-reverse the signals, making the names match the schematic. Fix the direction by setting role=dce. Ref. http://www.latticesemi.com/view_document?document_id=50373
UART flow control pins match the signal names in the schematic, but directions are reversed. Fix by setting role=dce.
igrr
force-pushed
the
bugfix/uart_flow_ctrl_pins
branch
from
June 9, 2020 16:04
618a1c7
to
cd0b740
Compare
igrr
changed the title
boards: fix UART flow control pin inconsistencies
Add role to UARTResouce and fix UART flow control pin inconsistencies
Jun 9, 2020
Looks good at first glance, will review in detail a bit later. |
Thank you for this excellent work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds 'role' parameter to UARTResource and corrects errors and inconsistencies in UART flow control pin definitions.
Schematic references are mentioned in commit messages.
Closes #63.