10 config = nvme, Config = nvme – Teledyne LeCroy PETrainer Scripting Language Reference Manual User Manual
Page 52

Teledyne LeCroy
PETrainer Scripting Language
47
6.10 Config = NVMe
This command is only valid for Device Emulation. It starts and configures NVMe Drive (Controller)
emulation. It is only supported on PETrainer Z3.
In order to use this feature, the Z3 has to be configured for Device Emulation, and inserted in a PCI
Express slot on the system under test while it is powered down. The Z3 has to have the initial
configuration space image loaded that contains:
-
MSI and/or MSI-X capability structures;
-
BAR 0 that is set up as defined by the NVMe specification;
-
Class Code register as defined by the NVMe specification for NVMe controller.
Also, the binary Identify data for the Controller and Namespace(s) has to be written to a certain memory
location on the Z3 (which is referenced by this instruction).
After this is done, the script containing this instruction and then the Connect script can be executed and
system under test booted up. After an NVMe driver is loaded for the Drive Emulation device, it will come
up in the system as an unformatted drive. It can be initialized and formatted, after which it acts as a
normal disk drive. Drive capacity up to 320 Megabytes is supported.
Parameter
Values
Default Comment
Enable
Yes/No
No
Turns on or off automatic handling of
NVMe drive emulation
IdentifyDataLocation
( FROM_MEMxx_x,
offset )
N/A
Same notation as in Field Substitution
(see 3.1.7)
Example:
Config=NVMe
{
Enable = Yes
IdentifyDataLocation = ( FROM_MEM32_B, 0 )
}
The SampleFiles\Z3-16TrainerScripts\NVMe_DriveEmulation folder of the PETracer software contains
files needed to set up NVMe drive emulation. The file "nvme_drive_config_space.dat" can be loaded as
the initial Configuration Space image. Also, the file "nvme_identify_data.dat" included in this sample folder
can be written to the Mem32B location, offset zero. The sample file start_nvme_drive.peg contains the
instruction described here.
After the Z3 configured for NVMe Drive Emilation has been booted in the PCI Express system, the
Windows7 64-bit driver can be loaded from the
Z3-16TrainerScripts\NVMe_DriveEmulation\Drivers\Windows7 folder.
For NVMe drive emulation in other Windows versions and Linux environments refer to the corresponding
folders under Z3-16TrainerScripts\NVMe_DriveEmulation\Drivers folder.