SSD Firmware Development — Part 3 — Addressing
When it comes to digital storage devices, the write and read commands are the mandatory commands, for obvious reasons. The industry has developed a standard for such commands and we can break it down to its simplest core concept. In short, for each write or read command, the necessary input from the host to the device is “where” to read or write and how much. Additionally, for write, the host will supply the data to be written. Thus, we have an address, length, and buffer either containing the data to be written or to receive data from the device.
Addressing
The logical block address (LBA) is the standard used to specify the address for write and read commands. Each LBA defines a 512 bytes sector into the device’s storage space, although rarely there are variations of the sector size. LBA’s are addressed linearly, ranging from 0 to n-1 inclusively, where n is the maximum available sectors. With the Identify or Inquiry command, the storage device informs the host of the maximum available addressable capacity, and should properly reject requests accessing beyond such range.
So these simple prototypes define write and read commands:
Read: LBA, length, buffer
Write: LBA, length, buffer
From Host to NAND and Vice Versa
With what we know up to this point, how would we design an SSD such that data can be trafficked between host and NAND? Recall that the NAND…