Email: bknpk@hotmail.com Phone: +972-54-7649119


V

 

ASIC/FPGA Design and Verification Out Source Services

The following will describe the operation, which is done by the SD master. This code tests an SD slave for the very basics functionality. It comes with a rich data base of tasks, which allow to simulate other SD scenarios.
Please note, that this project was recently updated. The new one uses a Smasung flash instead of xilinx ROM component.

  1. Insert Card : Check that SD card is inserted.
  2. Send Command `GO_IDLE_STATE with argument 0 (CMD0).
  3. Wait for card not busy loop:
  4. Send Command `APP_CMD with argument 0 (CMD55).
  5. Get Response of kind R1.
  6. Get Response of kind R3 and check result.Decode Card Status. Message will also be displayed in simulation log. The program will stop ($finish) if an error bit is set (31..15, 3).
  7. Send Command `SD_APP_OP_COND with argument 0 (CMD41) and check result.
  8. Check operation conditions register (OCR) busy bit (bit 31). If busy continue loop (go to 3).
  9. Write my OCR to the card, move to ready state
  10. Send Command `APP_CMD with argument 0 (CMD55) and check result.
  11. Get Response of kind R1.
  12. Decode Card Status (same as 6).
  13. Send Command `SD_APP_OP_COND with argument OCR=32'hff8000 (CMD41) and check result.
  14. Get Response of kind R3 and check result.
  15. Read card id register (CID), move to ident state (identification).
  16. Send Command `ALL_SEND_CID with argument 0 (CMD2).
  17. Get Response of kind R3 and check result.
  18. Decode CID simply prints the information to the simulation log file.
  19. Read relative address (RCA) from card, move to stby state
  20. Send Command `SEND_RELATIVE_ADDR with argument 0 (CMD3).
  21. Get Response of kind R6 and check result.
  22. Decode Card Status (same as 6).
  23. Read card id from RCA address, remain in stby state
  24. Send Command `SEND_CID with argument RCA (CMD10).
  25. Get Response of kind R2 and check result.
  26. Decode CID simply prints the information to the simulation log file.
  27. Read card specific data (CSD) from RCA address, remain in stby state
  28. Send Command `SEND_CID with argument RCA (CMD10).
  29. Get Response of kind R2 and check result.
  30. Decode CID simply prints the information to the simulation log file.
  31. Select the card and move to trans state
  32. Send Command `SELECT_CARD with argument RCA (CMD7).
  33. Get Response of kind R1 and check result.
  34. Decode Card Status (same as 6).
  35. Set the read block length
  36. Send Command `SET_BLOCKLEN with argument `BLOCK_LENGTH_BYTES (CMD16).
  37. Get Response of kind R1 and check result.
  38. Decode Card Status (same as 6).
  39. Set the data bus width
  40. Send Command `APP_CMD with argument RCA (CMD55).
  41. Get Response of kind R1 and check result.
  42. Decode Card Status (same as 6).
  43. Send Command `SET_BUS_WIDTH with argument 2*(`READ_DATA_WIDTH-1) (ACMD6).
  44. Get Response of kind R1 and check result.
  45. Decode Card Status (same as 6).
  46. Read a block of data from the card
  47. Read Block
  48. Decode Card Status (same as 6).
  49. Reset to idle state
  50. Send Command `GO_IDLE_STATE with argument 0 (CMD0).

Home

CRC7 VCD Wave Description

SD VCD CRC7 Wave Flow


Last Release of VCD

SD Slave Free Code

SD Master non Free Code


Contact me now at:

  ...


I would be happy to offer my services. Call ASAP !






Search This Site


Feedback This Site




new pages on this site