ULINK DriveMaster

DriveMaster
DriveMaster 2015 Professional SATA Features | ULINK Technology - http://ulinktech.com/drivemaster-2015-professional-sata-features.php

Help
C:\Program Files (x86)\ULINK DM2012\v980\Help\User Guide.pdf

Basic IO
An LBA (Logical Block Address) size is generally the same size as a sector (512 bytes). An LPAGE (Logical PAGE) is generally 4096 bytes or 8 LBAs.

// write buffer fillset "write", 4096, 0 // (bytes, offset) patr "write" // r for random fill //patf "write" // f for FF fill //patz "write" // z for 00 fill

// write then read and compare wdmx 0, 8 // (lba_offset, lbas) write 8 lbas from write buffer, from offset 0 lba rdmx 0, 8 // (lba_offset, lbas) read 8 lbas to read buffer, from offset 0 lba cmp // compare read buffer to original write buffer

basic Traffic Test v3
dim lba, lpage, max_lbas, max_lpages, max_lpage, tsize, lpage_range, lpage_offset, lba_size, lpage_size, lba_per_lpage

HALTERR ON // halt on error IDFY // identify //identify // Run the Identify command. upd on // Decrease frequency of screen refresh to speed up processing. fullspeed on // Speed up processing by turning off command tracing. echo off // Don't auto echo every SATA command. We will log what we want.

prnf "--\n"

lba_size = 512 lpage_size = 4096 lba_per_lpage = 8

// TEST CONFIGURATION // limit read/write range, transfer size lpage_offset = 0 // starting lpage //lpage_range = totallba / 8 // do the whole range (totallba macro from IDFY) //lpage_range = 512 // limit to the first 512 lpages (2MB) lpage_range = (1024 * 1024 * 2) / 4096 // 512 = 2MB - limit to the first 512 lpages (2MB) //tsize = 2048 // 2048 for a 1MB transfer size (2048 = 1MB / 512) //tsize = 8 // 8 for a 4kB transfer size (8 = 4kB / 512) tsize = 4096 / 512 // 8 = 4kB - for a 4kB transfer size (8 = 4kB / 512)

// Test Details prnf "Test LPAGE count (lpages): %d", lpage_range prnf "Test LPAGE range (start/end lpages): %d -", lpage_offset prnf " %d\n", (lpage_offset + lpage_range) prnf "Transfer size (lbas | bytes): %d |", tsize prnf " %d\n", (tsize * lba_size)

// calculations max_lbas = totallba // totallba is a macro populated by identify command max_lpages = max_lbas / lba_per_lpage // lpages are 4k (or 8 lbas) max_lba = max_lbas - 1 // last addressable lba max_lpage = max_lpages - 1 // last addressable lpage

prnf "total lbas: %d ", max_lbas prnf "total lpages: %d\n", max_lpages prnf "max lba: %d ", max_lba prnf "max lpage: %d\n", max_lpage

// fill write buffer with random data fillset "write", 512 * max_lbas, 0 patr "write" // r for random fill //patf "write" // f for ff fill //patz "write" // z for zero fill

// note: random 0-9 =  rand % 10

// loop through range for (lpage = lpage_offset ; lpage < lpage_range + lpage_offset ; lpage += 1) lba = lpage * tsize prnf "lba: %d", lba prnf " / %d || ", (lpage_range + lpage_offset) * lba_per_lpage prnf "lpage: %d", lpage prnf " / %d || ", lpage_range + lpage_offset prnf "bytes: %d", lpage * lpage_size prnf " / %d\n", (lpage_range + lpage_offset) * lpage_size wdmx lba, tsize // write from write buffer rdmx lba, tsize // read to read buffer cmp // compare read buffer to write buffer endfor

prnf "Done!" prnf "--\n"

basic Traffic Test v2
dim lba, lpage, max_lbas, max_lpages, max_lpage, tsize, lpage_range,

HALTERR ON // halt on error IDFY // identify

prnf "--\n"

// calculations max_lbas = totallba // totallba is a macro populated by identify command max_lpages = max_lbas / 8 // lpages are 4k (or 8 lbas) max_lba = max_lbas - 1 // last addressable lba max_lpage = max_lpages - 1 // last addressable lpage

prnf "total lbas: %d ", max_lbas prnf "total lpages: %d\n", max_lpages prnf "max lba: %d ", max_lba prnf "max lpage: %d\n", max_lpage

// limit read/write range, transfer size //lpage_range = max_lpages // do the whole range lpage_range = 512 // limit to the first 512 lpages (2MB) //tsize = 2048 // 2048 for a 1MB transfer size (2048 = 1MB / 512) tsize = 8 // 8 for a 4kB transfer size (8 = 4kB / 512) prnf "limit read/write lpage range (lpages): %d\n", lpage_range prnf "Transfer size (lbas): %d\n", tsize

// fill write buffer with random data fillset "write", 512 * max_lbas, 0 patr "write" // r for random fill //patf "write" // f for ff fill //patz "write" // z for zero fill

// note: random 0-9 =  rand % 10

// loop through range for (lpage = 0 ; lpage < lpage_range ; lpage += 1) lba = lpage * 8 prnf "lba: %d", lba prnf " / %d - ", max_lba prnf "lpage: %d", lpage prnf " / %d\n", max_lpage wdmx lba, tsize // write from write buffer rdmx lba, tsize // read to read buffer cmp // compare read buffer to original write buffer endfor

prnf "Done!" prnf "--\n"

basic Traffic Test v1
dim lba, lpage, maxlbas, maxlpages, tsize, lpage_range

HALTERR ON // halt on error IDFY // identify

maxlbas = totallba // totallba is a macro populated by identify command maxlpages = maxlbas / 8 // lpages are 4k (or 8 lbas) tsize = 4096 / 512 // 4k transfer size 8 = 4k / 512 prnf "total lbas: %d ", maxlbas prnf "total lpages: %d\n", maxlpages

// limit read/write range lpage_range = maxlpages lpage_range = 10 prnf "limit read/write lpage range: %d\n", lpage_range

// fill write buffer with random data fillset "write", 512 * maxlbas, 0 patr "write" // r for random fill //patf "write" // f for ff fill //patz "write" // z for zero fill

// random 0-9 =  rand % 10

// loop through range for (lpage = 0 ; lpage < lpage_range ; lpage += 1) lba = lpage * 8 prnf "lba: %d /", lba prnf "lpage: %d\n", lpage wdmx lba, tsize // write from write buffer rdmx lba, tsize // read to read buffer cmp // compare read buffer to original write buffer endfor

Simple Read
dim tsize, lpage_range IDFY tsize = 4096 / 512 // 4k transfer lpage_range = totallba / 8 // totallba is macro populated by IDFY for (lpage = 0 ; lpage < lpage_range ; lpage += 1) lba = lpage * 8 prnf "lba: %d\n", lba prnf "lpage: %d\n", lpage //wdmx lba, tsize // write from write buffer rdmx lba, tsize // read to read buffer //cmp // compare read buffer to original write buffer endfor

TODO Test
dim sector_range, buffer_size, buffer_offset, lba_size, lpage_size, lpage, lpage_range

// Write the first 2 lpages lba_range = 8 // must be divisible by tsize buffer_offset = 0 // buffer offset in bytes

// calculations lba_size = 512 // lba size in bytes lpage_size = 4096 // lpage size in bytes (4k) lpage_lba_ratio = lpage_size / lba_size // 8 lbas per lpage lba_range = lpage_range * lpage_lba_ratio // number of lbas in target range tsize = 8 // lba count transfer size //  4k transfer size 8 = 4k / 512 (lpage_size / lba_size) buffer_size = lba_range * 512 // size in bytes

fillset "write", sector_range, buffer_offset patr "write" // r for random fill //patf "write" // f for FF fill //patz "write" // z for 00 fill

for (lpage = 0 ; lpage < lpage_range ; lpage += 1) lba = lpage * 8 prnf "lba: %d", lba prnf " / %d - ", max_lba prnf "lpage: %d", lpage prnf " / %d\n", max_lpage wdmx lba, tsize // write from write buffer rdmx lba, tsize // read to read buffer cmp // compare read buffer to original write buffer endfor

keywords
drivemaster Drive Master DriveMaster ULINK SATA