This web page describes how to reset the SD Card Controller on the E100 so that you can re-read from the beginning of a card.
Prerequisites: You need to replace the original sd.v and top.v from Lab 7 with these versions of sd.v and top.v. After replacing these files, recompile your E100 in Quartus.
Modifications to the SD Card interface:
| Port number | Port type | Definition |
|---|---|---|
| 80 | in | bit 0: sd_valid |
| 81 | out | bit 0: sd_ack |
| 82 | in | bits 15-0: sd_data[15:0] |
| 135 | out | bit 0: sd_SDreset |
Issuing the SD Reset command:
| SDreset | valid | ack | Description |
|---|---|---|---|
| 0 | 0 | 0 | System is idle, no SD reset sent from E100 program. |
| 1 | 0 | 0 | E100 program has set SDreset to 1. Program is waiting for the SD Card controller to reset. |
| 1 | 1 | 0 | SD Card controller has set its valid to 1 to tell E100 program it has completed the reset. |
| 1 | 1 | 1 | E100 program has set the ack to 1 to tell the SD Card controller that it has seen that the controller's reset has completed. |
| 1 | 0 | 1 | SD Card controller has set the valid to 0 after E100 program acknowledges that reset has completed. After this, E100 program can set SDreset and ack to 0, and device returns to Idle state. |