This page is an overview of the NVMeConsole.
NVMeConsle is a tool for testing the NVMe Protocol.
- Run NVMeConsole
- Try NVMeConsole
Run NVMeConsole
- Download the NVMeConsole
- Run the NVMeConsole with administrator privileges.
- Type in [ListDevice]
- If the driver name of target device is not LallaNVMeDevice, install the device driver with target NVMe Device.
- Install the device driver with target device.
Install the device driver
- Confirm the BDF of target device.
- Search the target device in [Storage controller] of [Device manager]
- Right click the target device and click the [update driver]
- Select [Browse my computer for drivers] item in the Update Drivers dialog.
- Select [Let me pick from a list of available drivers on my computer] and click the [Have disk] button. And, click [Browse] button.
- Search and open the [LallaNVMePin.inf] file in the [.\NVMeConsole\LallaNVMePin]
- Click [OK] button on [Install From Disk] dialog.
- Click [Next] button.
- Confirm the installed device driver and close the dialog.
Power Cycle.(Must do. Otherwise, you will get a bluescreen.)
- Run the NVMeConsole and confirm the [Driver Name] with [ListDevice] command.
Try NVMeConsole
- Select a target device
- Config the target device
- Issue an identify admin command and read the data
- Issue Write IO Command
- Issue Read IO Command
Select a target device
- Type in [ListDevice]
- Select the target device with [SelectDevice(0)] or [SelectDevice 0]
- Confirm the selected target device with[ListDevice]
- There is an asterisk in front of the device number.
Config the target device
*Use the [ConfigDevice] API to configurate the target device.
* You can check the internal operations of [ConfigDevice] with “Controller.Initialization” API in the[.\lib\nvmedevice.ncs]
- Use ConfigDevice(<ASQSIZE>, <ACQSIZE>, <IOQCOUNT>, <IOQSIZE>)
- Confirm the status of the admin/io queues setuped.
- List the Admin submission queue entry(The asterisk means doorbell.)
Issue an identify admin command and read the data
1 Declare a variable for the data of identify command. And assign the size.
idData = new DATAMEM
idData.DataMem_Assign(4096)

2. Declare a variable for SQ Entry and fill the fields with appropriate values.
sqe = new SQE
sqe.opc = 6
sqe.cdw10 = 1
sqe.datamem = idData

3. Submit the command
sqe.Sqe_SubmitTailSync(0, 0.5)

4. Check the completion
sqe
or
sqe.completion

5. Dump the data
idData.DataMem_Dump()
or
sqe.datamem.DataMem_Dump()


Write IO Command
1. Declare a variable for the data of IO Write command, and assign the size.
wrData = new DATAMEM
wrData.DataMem_Assign(4096)

2. Fill the data buffer with specific data pattern
wrData.DataMem_SetDataPattern(2)

3. Declare a variable for a IO SQE to write data. And fill the fields with appropriate values.
wrSqe = new SQE
wrSqe.datamem = wrData
wrSqe.opc = 1
wrSqe.nsid = 1
wrSqe.cdw12 = 7

4. Submit the command
wrSqe.Sqe_SubmitTailSync(1, 0.5)

5. Check the completion
wrSqe
or
wrSqe.completion

Read IO Command
1. Declare a variable for the data of IO Read command, and assign the size.
rdData = new DATAMEM
rdData.DataMem_Assign(4096)

2. Declare a variable for a IO SQE to read data. And fill the fields with appropriate values.
rdSqe = new SQE
rdSqe.datamem = rdData
rdSqe.opc = 2
rdSqe.nsid = 1
rdSqe.cdw12 = 7

3. Submit the command
rdSqe.Sqe_SubmitTailSync(1, 0.5)

4. Check the completion
rdSqe
or
rdSqe.completion

5. Dump the data
rdData.DataMem_Dump()
or
rdSqe.datamem.DataMem_Dump()

Share this post: on Twitter on Facebook