Skip to Main Content
white paper

Generic SCSI-based host controller verification framework using SystemVerilog

Host bus adapters are one of the important components in SoCs.

Modern SoCs are becoming increasingly complex due to advances in technology, especially, die size, which allows packing more modules and functionality into the same SoC but makes verification a more challenging task. Testing important components of an SoC, like a host controller, is incomplete until it’s made against the whole system with an operating system running with a host controller driver. Reaching this stage of testing is lengthy and debugging on the system level is time consuming.

In this paper we provide a proposal for a “generic testing environment for host controllers” using SystemVerilog to mimic system-level stimulus, allowing thorough testing in an easy to debug environment. A case study demonstrates the methodology on two different small computer system interface (SCSI) based host controllers compatible with the peripheral component interconnect express (PCIe®) interface; one supporting universal flash storage (UFS) and the other supporting serial-attached SCSI (SAS).

Motivation

A host controller or host bus adapter (HBA), sometimes called an HBA card, is a hardware device that represents the means of physical connectivity between a host system and a storage devices, servers or network peripheral, also provides input/output processing for data/command transfers between the host system and the peripheral2. It allows the host system to exchange information with a peripheral device attached to it and relieves the host microprocessor of the tasks such as storing and retrieving data which results in performance improvement in the host system.

The term HBA applies to different types of interconnects, however it is commonly used with storage protocols such as Fibre Channel (FC) and serial-attached SCSI (SAS)2. HBAs are identified by their interconnect technology, speed and system interface. In x86 architecture, HBA is often connected to a PCI Express® (PCIe®) slot of a PC/Server, in other architectures (e.g. ARM, PowerPC) it may be connected to a standard interface like advanced extensible interface (AXI).

Functional verification in general is one of the major bottlenecks in the hardware IP and SoCs design, about 70% to 80% of the total effort in a hardware and IP designs is spent in the verification flow, and it is the most expensive job in-terms of cost and time. When it comes to complex SoC design (large gate count and large cost), functional verification turns to a critical phase where any behavioral or functional bug escaping this phase will not be detected in the subsequent implementation phases and will appear only after the first silicon is integrated into the target system, resulting in costly design and silicon iterations.

Host bus adapters are one of the important components in SoCs, so having a strong environment to verify and validate such complex component is valuable for the whole SoC quality and while the system complexity is growing, challenges in testing are getting bigger. Host controller verification and validation would never be complete until it is integrated and tested inside a real computer system having an operating system with a software driver running on it.

When host controllers are ready for integration within the system, system testing and bring-up is needed where the HBA is connected to the host system running an OS (Windows, Linux, Android, etc.) with its software’s low-level driver. This testing stage is mandatory but difficult and time consuming due to system complexity and bring-up time, also the need to identify a given issue either in the hardware part or the software part and finally fix it, so having a test environment for HBA that mimics real stimulus of the software driver behavior is very valuable and strongly needed, making it easy to test and validate any change of functionality or behavior in the HBA components, which in turn enables short design time, enhances debugging capabilities and decreases the time consumed in reproducing and fixing issues.

Share