DSF USB 2.0 Bus Simulator (SoftEHCI)

The EHCI controller simulator, called SoftEHCI, consists of a lower device filter (SoftEHCI.sys) that loads into a modified USB stack below the EHCI minport (Usbehci.sys). DSF has its own versions of the EHCI miniport and the USB port driver, which are re-linked with DSF libraries to intercept their hardware access calls (for example, READ_REGISTER_ULONG and IoConnectInterrupt). The DSF versions of these drivers are called Usbport_dsf.sys and Usbehci_dsf.sys and are installed as part of DSF.

SoftEHCI uses its own device identifier (ID) that is distinct from any existing vendor's EHCI controller, and Usbehci_dsf.sys is installed as the function driver for that device ID. As a result, both real and simulated EHCI controllers can coexist on a single test system.

A software enumerator, Dsfroot.sys, is installed with the DSF runtime and it is used to enumerate SoftEHCI controllers. A utility program, SoftEHCICfg.exe (also installed with the runtime), is used to send commands to Dsfroot.sys to install or remove SoftEHCI controllers. These commands are the hardware equivalent of hot-plugging or surprise removal of a USB 2.0 controller.

The following figure shows the object model that SoftEHCI exposes and that test applications can use.

 

Diagram illustrating the SoftEHCI object model

 

SoftEHCI.Ports exposes a collection of SoftEHCIRootHubPort objects that enable a test application to connect and disconnect simulated USB devices to and from the root hub ports of the controller. SoftEHCIRootHubPort also exposes properties that enable a test application to both examine and control the port status.

SoftEHCI, like all simulated devices, also exposes a DSFDevice object (IDSFDevice) that you can find in the simulated device tree that the DSF::Devices property exposes. The USB devices that are attached to the root hub ports of the controller can also be enumerated in the DSFDevice::Children property.

 

 

Send comments about this topic to Microsoft

Build date: 9/21/2010