Member-only story
Simple FTL — SSD Firmware Development — Part 12
Let’s take what we know and jump back to coding and see where that take us. We want to have a simple logic layer that allows us to achieve the simple objectives of writing and reading within the LBA space the SSD provides from a host’s perspective. The code can be found here https://github.com/DustParticle/SsdSim/releases/tag/SsdFirmwareDevPart12.
We’ll leverage the infrastructure from the existing code base and create a new project SimpleFtl, that will be used as a package that can be download and execute on the simulation system. On the target device, this will be a package that will be managed persistently on the SSD and conditionally loaded when the system powers on. We’ll cover persistency support in our simulation later on. Let us, for this part focus on the simple flash translation layer logic. Using our Custom Protocol, we’ll need to support at least 3 commands:
- GetDeviceInfo — at the very least, we will provide the host with the number of sectors\LBA the device supports and the number of bytes per sector
- Write — this command allows the host to specify the LBA\sector address, number of sectors, and the buffer\address containing the data to write
- Read — this command is the analogous inverse of the write command
We have the definition for the structures needed in CustomProtocolCommand.h within the HostComm project. Our Simple FTL will be executed with a looping mechanism and will handle host command processing within the…