バックナンバーはこちら。
https://www.simulationroom999.com/blog/In-vehicle-external-storage-backnumber/
はじめに
SDカードのPERFORMANCE_ENHANCEの話。
CommandQueue関連の詳細。
登場人物
博識フクロウのフクさん

イラストACにて公開の「kino_k」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=iKciwKA9&area=1
エンジニア歴8年の太郎くん

イラストACにて公開の「しのみ」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=uCKphAW2&area=1
再度、PERFORMANCE_ENHANCEの話

そういえば、元々はPERFORMANCE_ENHANCEの話だったと思ったけど、
もうこっちは話としては終了でOKなんだっけ?

まぁここを読み返すのが早いのだが。

再度、PERFORMANCE_ENHANCEの内訳を見てみよう。
PERFORMANCE_ENHANCE | Description |
---|---|
SD_STATUS b[335:331] | Command Queue Support. |
SD_STATUS b[330] | Support for Cache.1:Supported |
SD_STATUS b[329] | Support for Host-initiated maintenance,1:Supported |
SD_STATUS b[328] | Support for Card-initiated maintenance,1:Supported |

そういえば、Command Queue Supportの話はやってなかったような?
Command Queue Support

元々はCommand Queueの話がスタートではあったんだけど、
いろいろ話が散ってしまった感じだな。
とりあえず、Command Queue Supportの内訳も見てみよう。
Command Queue Support | Value Definition |
---|---|
0h | Command Queue is not supported |
1h | Command Queue supported, with queue depth 2 |
2h | Command Queue supported, with queue depth 3 |
… … | |
1Fh | Command Queue supported, with queue depth 32 |

あ、何となく思い出してきた。
Command Queueを使うことでSDカードの応答向上ができるって話だったんだ。
Performance Enhancement Register

そして、前回までに出てきた、Performance Enhancement Register
も絡んでくる。
Byte Offset | Bits | Name | Description |
---|---|---|---|
0 | – | Performance Enhancement Function Revision | 00h:Revison 1 |
1 | [0] | FX_EVENT Support | 0:Not support,1:Supported |
2 | [0] | Card Initiated Maintenance Support | 0:Not support,1:Supported |
2 | [1] | Host Initiated maintenance Support | 0:Not support,1:Supported |
3 | [1:0] | Card maintenance Urgency 00b:None, 01b:Mild, 10b:Middle, 11b:Urgent | |
4 | [0] | Cache Support | 0:Not support,1:Supported |
5 | – | Reserved | – |
6 | – | CQ Support and Depth | 00h:CA is not supported,01h:depth=2(ID=0,1),…,1Fh:depth=32(ID 0~31) |
7 | – | Reserved | – |
8月15日 | – | Task Error Status | 00h:No Error,01h:Error,Other:Reserved |
16-256 | – | Reserved | – |
257 | 0 | FX_EVENT Enable | 0:Disable,1Enable |
258 | 0 | Card Initiated maintenance Enable | 0:Disable,1Enable |
258 | 1 | Host Initiated maintenance Enable | 0:Disable,1Enable |
259 | 0 | Start Host-Initiated Maintenance | 1:Starts host-initiated maintenance.0:By card indicates the break of maintenance.(break within 1 secomd.) |
260 | 0 | Flush Cache | 1:Start Cache flush.0:By card indicates the end of Cache flush.(flush within 1 second.) |
262 | 0 | Enable CQ | 0:Disable,1Enable |
262 | 1 | CQ Mode | 0:Voluntary mode, 1:Sequential Mode |
263-511 | – | Reserved | – |

あー。
確かにCQなんちゃらがあるね。
Enable CQで有効化して、
CQ Modeで、使用するModeを選択する感じか。

そうそう。
これでCQ Modeが仕様可能になるわけだ。

回り道したようにおもったけど、
実は必要な情報を順に追ってた感じか。

あとは、実際にCommand Queueをどう使うかってところになるな。
まとめ

まとめだよ。
- 再度、PERFORMANCE_ENHANCEの話。
- Command Queue Supportの内訳確認。
- Queueの深さが分かるパラメータ。
- CQ Modeを選択したり有効化するのはPerformance Enhancement Registerを操作する。
- Enable CQ。
- CQ Mode。
バックナンバーはこちら。
コメント