Don't like ads? PRO users don't see any ads ;-)
Guest

DC EMU Old SD Driver init (OzOnE)

By: a guest on Jul 22nd, 2012  |  syntax: VeriLog  |  size: 0.59 KB  |  hits: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                         if (CCS)        // This should be HIGH if SD Card is SDHC.
  2.                                 Host_Command_Arg <= gd_start_sector * 4;        // SDHC cards use 512-byte SECTOR addressing - Need to multiply the GD sector offset by 4.
  3.                         else
  4.                                 Host_Command_Arg <= gd_start_sector * 2048;     // Low-density SD Cards use BYTE addressing - Need to multiply the GD sector offset by 2048.
  5.  
  6.                                 Host_Command_Type <= CMD_Multiple_Block_Read;
  7.                                 trig_Host_Command <= 1'b1;
  8.                                
  9.                                 state <= 10'd3;
  10.                         end
  11.  
  12.                         3: begin
  13.                                 trig_Host_Command <= 1'b0;              // Remember to only strobe "trig_Host_command" for ONE clock!!
  14.                                 state <= 10'd4;
  15.                         end