Skip to content
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

Data word dropped after PRIM_HOLD #8

Open
asmith-kepler opened this issue Jul 12, 2018 · 0 comments
Open

Data word dropped after PRIM_HOLD #8

asmith-kepler opened this issue Jul 12, 2018 · 0 comments

Comments

@asmith-kepler
Copy link

There appears to be a bug in cont_controller.v when the device sends HOLD. I have attached an ILA trace from that module that illustrates the issue.

ila_snip

This is the response to a COMMAND_DMA_READ_EX (8'h25) command for a single block. Near the end of the frame, the drive sends HOLD, HOLD, data_word, EOF. As you can see from the trace, detect_hold is asserted during the last data word. This causes link_layer_read to discard the last data word. (In sata_stack.v, user_dout_size reports 127 data words instead of 128.)

I have attached a diff against cont_controller.v that I believe fixes the issue: I have modified the assignment to hold_cont by ANDing it with cont_detect. (If HOLD had been followed by CONT, then it would be correct to keep detect_hold asserted during that cycle, but when HOLD is not followed by CONT, then detect_hold should no longer be asserted.) I have changed the other *_cont signals to match because I believe they are likely to behave the same way, although I have not observed a problem with them in practice with the devices I have available for testing.

The device that shows this behaviour is a Samsung 860 EVO SSD. We have also been testing with a Micron M500IT SSD, but we have not seen it issue this pattern of HOLDs. So far, only the Samsung drive has excited this problem.

cont_controller.v.diff.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant