-
Notifications
You must be signed in to change notification settings - Fork 777
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
[uart,rtl] Increase buffer size to 128 #17829
Conversation
@jesultra this increases UART buffer sizes to 64 from 32. Can you confirm:
|
Based on conversations - the understanding is to move to 128 bytes and increase watermark bits; 3 to 4. |
This is now ready to go. Following discussion we've decided to expand the size of the watermark level fields and just provide more levels to deal with the expanded FIFO size. The new settings are:
I note in the DIF we have a single enum for both the TX and RX settings which is a little awkward as the 0 level is different for TX and RX. The current enum looks like this: typedef enum dif_uart_watermark {
/**
* Indicates a one-byte watermark.
*/
kDifUartWatermarkByte1 = 0, Which isn't strictly correct. Something to fix but not something I want to gate this PR on. We can create a separate issue for it. @msfschaffner @jesultra @cfrantz any comments? In particular are we happy with the watermarking levels? |
The watermarking levels and the FIFO size of 128 bytes fully cover the needs of ChromeOS. |
We already have a discrepancy like this for the current watermark levels, so I don't think its a big problem. Out of curiosity, how difficult would it be to make the TX and RX watermark levels symmetric such that the levels are always |
Trivial I was just going with what was already there but extended for 128 bytes. To confirm you want settings like this?
We can of course have a 126 level for the TX as well but maybe doesn't make a huge amount of sense (RX FIFO almost full obviously useful, TX FIFO just beginning to empty less so). |
Agreed about 126 for TX. I also think the TX watermark level of 1 is dubious, but I'm giving consideration to the value of symmetry in the programming interface. As long is it isn't burdensome to implement, your previous table (1-126 for RX, 1-64 for TX) looks good to me. |
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 @GregAC - I am fine with these changes.
Regarding the levels, I have a slight preference towards symmetry as well.
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.
LGTM, thanks Greg!
Rerunning failed CI tests. |
Fixes lowRISC#16549 Signed-off-by: Greg Chadwick <gac@lowrisc.org>
The watermark changes proved to be fiddlier than first expected as it uncovered some testbench bugs. These are fixed in the second commit of this PR. Issue from CI failure has also been fixed. @jdonjdon @msfschaffner would you mind taking a look at the testbench changes? |
Watermarking changes highlighted some edge cases in the modelling causing regression failures. Details are given in the comments added by this commit. Signed-off-by: Greg Chadwick <gac@lowrisc.org>
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.
LGTM
PR lowRISC#17829 updated the FIFO size, but this constant was stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but this constant was stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but this constant was stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but the constant in this macro was still stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but this constant was stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but the constant in this macro was still stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but this constant was stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but the constant in this macro was still stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but this constant was stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR lowRISC#17829 updated the FIFO size, but the constant in this macro was still stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR #17829 updated the FIFO size, but this constant was stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
PR #17829 updated the FIFO size, but the constant in this macro was still stale. Signed-off-by: Dan McArdle <dmcardle@opentitan.org>
This a draft as it's incomplete but creating the PR now for visibility.
There are regression failures with this change I have yet to look into plus we need to discuss the appropriate size to move to and what we switch watermark levels to.
Fixes #16549