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
Notes
// Hold on Error HALTERR ON // set buffer size [buffername] [buffer in byte size], [offset] fillset "write", 512 * 8 , 0 // fill buffer with "FF" patf "write" // fill buffer with "00" patz "write" // fill buffer with random patr "write" // write buffer wdma 0, 8 // read buffer rdma 0, 8 // compare buffers, to verify cmp // printing some_number = 100 prns "print string" prnl some_number prnsl "print string", some_number prnsr "don't new line" // 'r' can be added to above totallba # total LBAs for (i=1 ; i<10; i+=1) endfor for (i=0 ; i<1000 ; i+=1) //prnsl "count: ", i rdma 0, 8 endfor fillset "write", 512 * 64, 0 patr "write" wdma 1024, 64 rdma 1024, 64 cmp fillset "write", 512 * 8, 0 patr "write" wdma 0, 8 rdma 0, 8 cmp fillset "write", 512 * 8, 0 patr "write" wdma 0, 8 rdma 0, 8 cmp for (i=0 ; i<1000 ; i+=1) //prnsl "count: ", i rdma 0, 1024 cmp endfor h d d - hip debug dump h d c - clear // read buffer //rdma 0, 8 // Uninitialized Reads - size/alignment=4k pattern=0x00000000 sequential entire range. for (i=0 ; i<totallba ; i+=1) prnsl "lba: ", i rdma i, 8 endfor // READ DMA // lba - starting address // lenght - number of sectors (from 0 to 255) RDMA lba, length // LBAMODE lbamode on // or off // read lba 0 - 1000 times for (i=0 ; i<1000 ; i+=1) prnsl "count: ", i rdma 0, 8 endfor got to 32 blocks and died 0x11680300 h d d h d c // Uninitialized Reads - size/alignment=4k pattern=0x00000000 sequential entire range. for (i=0 ; i<totallba/8 ; i+=1) prnsl "lba: ", i rdma i*8, 8 endfor for (j=0 ; j<= 10 ; i+=1) for (i=0 ; i<=32 ; i+=1) prnsl "lba: ", i rdma i*8, 8 endfor endfor fillset "write", 512 * 8 * 32, 0 patr "write" for (i=0 ; i<=32 ; i+=1) wdma i*8, 8 endfor fillset "write", 512 * 8 * 33, 0 patr "write" for (i=0 ; i<=32 ; i+=1) wdma i*8, 8 endfor for (j=0 ; j<= 10 ; i+=1) for (i=0 ; i<=32 ; i+=1) //prnsl "lba: ", i rdma i*8, 8 cmp endfor endfor dim maxlpage, lba maxlpage=32 for (j=0 ; j<= 1000 ; i+=1) i = rand % maxlpage + 1 lba = i*8 prnsl "lba: ", lba rdma lba, 8 cmp endfor // 4k read rdma 0, 8 // 8k read rdma 0, 16 // 128k read from lba 0 - fails as it goes beyond lba 0 (128k/512=256) rdma 0, 256 // 1M read from lba 0 - fails as it goes beyond lba 0 (1M/512=2048) // 128k read from lba 256 - fails as it goes beyond lpage 256 (128k/512=256) rdma 32*8, 256 // extended mode read 4k/512=8 rdmx 0, 8 // 1M from lba 0 1M/512=2048 rdmx 0, 2048 // 1M from lba 0 1M/512=2048 rdmx 0, 2048 # fails to respond rdmx 33*8, 8 # fails to respond - max lba 256 rdmx 32*8, 16 // Uninitialized Reads - size/alignment=4k pattern=0x00000000 sequential entire range. for (i=0 ; i<totallba/8 ; i+=1) lba = i*8 prnsl "lba: ", lba rdmx lba, 8 endfor # success: 4k read to lba 256 rdmx 32*8, 8 # crashes: 4k read to lba 264 rdmx 33*8, 8 # crashes: 16k read to lba 256 rdmx 32*8, 16 # crashes: 4k read to lpage 50 rdma 50*8, 8 HALTERR ON for (i=1 ; i<1000 ; i+=1) fillset "write", 512 * 64, 0 patr "write" prnsl "write: ", i wdma 0, 8 rdma 0, 8 cmp endfor 344 - safe 345 - dead prnf "test %d", 2 // does not put new line prnf "test %d\n", 2 dim lba, lpage HALTERR ON for (lpage=0 ; lpage<1000 ; lpage+=1) lba = lpage * 8 fillset "write", 512 * 8, 0 patr "write" prnf "lba: %d /", lba prnf "lpage: %d", lpage wdma lba, 8 rdma lba, 8 cmp endfor
keywords
drivemaster Drive Master DriveMaster ULINK SATA