Resetting the SD Card Controller for the E100

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
80in bit 0: sd_valid
81out bit 0: sd_ack
82in bits 15-0: sd_data[15:0]
135out bit 0: sd_SDreset

Issuing the SD Reset command:

    Although the SD Card controller generally follows the Standard Input Protocol, you must issue an output command to reset the controller. sd_SDreset (output port 135) is used to send a reset command to the controller. Using the reset almost follows the Standard Input Protocol --- the following table details the usage of SDreset.

    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.