---
# System prepended metadata

title: LA筆記

---

# LA筆記

## read 測試

- 讀沒有寫過的sector
    ex: read #1579
    ![](https://i.imgur.com/fSnP9Yu.png)

    1. `DA -> read(369069) -> DA -> read(36C069)`
        ![](https://i.imgur.com/cEGYt2W.png)

    2. `DA -> read(369069) -> DA -> read(36C069)`
        ![](https://i.imgur.com/ONp8uiH.png)

    
    
    ex: read #1999
    
    `DA -> read(369069) -> DA -> read(36C069)`
    
    :::success
    不同lba，nand讀相同的physical address
    連續讀相同lba，結果不同
    因為L2P table沒有紀錄，所以讀出亂碼
    :::
    
- 讀已經寫過的sector
    先連續用TestTool寫 LBA2000000~2000500
    ex: read #20000001 
    `DA -> read(3630AF)`
    ex: read #20000002 
    `DA -> read(3630AF)`
    ex: read #20000003 
    `DA -> read(3630AF)`
    ex: read #20000004 
    `DA -> read(3630AF)`
    ex: read #20000005 
    `DA -> read(3630AF)`
    ex: read #20000006 
    `DA -> read(3630AF)`
    ex: read #20000007 
    `DA -> read(3630AF)`
    
    ---
    ex: read #20000008 
    `DA -> read(3690AF)`
    ex: read #20000009 
    `DA -> read(3690AF)`
    ex: read #20000010
    `DA -> read(3690AF)`
    ex: read #20000011
    `DA -> read(3690AF)`
    
    ---
    ex: read #77777777
    `DA -> read(37D17D)`
    
    :::success
    連續寫入的sector存在同一個physical page
    寫入時應該是multi-plane program
    SLC mode寫入時physical address由小到大
    :::
    
    
## write 測試
- 寫新的sector
    ex: write #987650
    `DA -> page program(4AD176)`
    ex: write #987570
    `DA -> page program(4A8176)`
    ex: write #861032
    `DA -> page program(49E176)`


- 寫入已寫部分周遭新的sector
    ex: write #8884056
    `DA -> page program(37D17F)`
    ex: write #8884057
    `DA -> read(37D17F) -> page program(36E17F)`
    ex: write #8884058
    `DA -> read(36E17F) -> page program(36B17F)`
    
    :::success
    因為sector < page size
    連續幾個sector存在同一個physical page上
    所以要把原本physical page資料讀出來接著寫
    因為不能寫回原本的PA要寫另一個地址
    :::
    
- 連續寫入同一sector
    ex: write #861031 *5
    `DA -> read(4A1176) -> page program(496176)`
    `DA -> read(496176) -> page program(493176)`
    `DA -> read(493176) -> page program(4AD177)`
    `DA -> read(4AD177) -> page program(49E177)`
    `DA -> read(49E177) -> page program(49B177)`
    
    :::success
    即使相同LBA相同data還是會program
    SSD應該沒有maintain lba<=>data table
    data經過randomize也都不一樣（？）
    :::

- read + write同一sector
    write #22992298
    `DA -> page program(4A1187)`
    read #22992298
    `DA -> read(4A1187)`
    write #22992298
    `DA -> read(4A1187) -> page program(49E187)`
    read #22992298
    `DA -> read(49E187)`
    write #22992298
    `DA -> read(49E187) -> page program(49B187)`
    
    讀寫了很多其他sector之後
    
    read #22992298
    `DA -> read(49B187)`
    
    :::success
    過一段時間＋做其他操作再read
    還是在相同地址(slc)
    是不是因為寫入data沒有超過threshold
    沒有觸發GC, QLC mode, wear leveling
    :::
    
    