Repository navigation
Add proper control of SDA drive mode - #125
Conversation
mkj121
left a comment
There was a problem hiding this comment.
There are still some unresolved comments of mine
1a0e5df to
3381e0b
Compare
Refactor the interface to no longer encode the request types as one-hot but valid/value pair. Also, prepare for many more request types other than Bit/Byte/IBI. Signed-off-by: Florian Glaser <glaserf@lowrisc.org>
06069a0 to
af1cb5e
Compare
mkj121
left a comment
There was a problem hiding this comment.
Minor comments only - very good
| end else if (tti_tx_desc_queue_rready_o) begin | ||
| tx_descriptor <= tti_tx_desc_queue_rdata_i; | ||
| descriptor_valid <= 1'b1; | ||
| end else if (tx_abort_i || recovery_mode_enter_i) begin |
There was a problem hiding this comment.
Is this the correct precedence? I was thinking that an abort had higher precedence than the queue being ready
There was a problem hiding this comment.
You are right, the precedence is kept through the convoluted computation of tti_tx_desc_queue_rready_o, which stays zero if descriptor_valid is one, which is only set to zero on completion or abort of the transaction.
Note that I have only really done a reformatting of the code here. I suggest that we try to change that and keep it in the more logical way if it does not break anything (as I would expect).
75cc94b to
7d2e877
Compare
As per Sect. 5.1.2.3.2 of the spec; start to drive SDA low in PushPull mode on SCL rising edge of the ACK bit in case the target sees an ACK by the controller. Signed-off-by: Florian Glaser <glaserf@lowrisc.org>
glaserf
left a comment
There was a problem hiding this comment.
Thanks for your positive feedback! See below for my responses.
| end else if (tti_tx_desc_queue_rready_o) begin | ||
| tx_descriptor <= tti_tx_desc_queue_rdata_i; | ||
| descriptor_valid <= 1'b1; | ||
| end else if (tx_abort_i || recovery_mode_enter_i) begin |
There was a problem hiding this comment.
You are right, the precedence is kept through the convoluted computation of tti_tx_desc_queue_rready_o, which stays zero if descriptor_valid is one, which is only set to zero on completion or abort of the transaction.
Note that I have only really done a reformatting of the code here. I suggest that we try to change that and keep it in the more logical way if it does not break anything (as I would expect).
This commit implements the two missing special cases for mid-bit drive mode handling for the SDA pad, which are 1) Releasing SDA to high-Z mid bit on a write ACK (Sect. 5.1.2.3.1) 2) Using the Tbit after a byte of a private read to end or continue the read, from both target and controller side (Sect. 5.1.2.3.4). This special case is by far the most complex one. Refer to the relevant Sections of the v1.1.1 I3C specification for further information.
- Remove the sda_oe comb logic to bus_tx_flow and put it behind a register - Hard-wire the I3C Target device to the pads for de-risking Signed-off-by: Florian Glaser <glaserf@lowrisc.org>
This PR implements dynamic control of the drive mode of the SDA pad for the various parts of the I3C protocol, including the handoff special cases with mid-bit changes.
Furthermore, the drive mode signal is now taken directly from a register without any further logic.
Finally, this PR hard-wires the I3C Target Device to the pads.