HIDasp速度比較
HIDasp-0928版の実行速度(UHCIの場合)†
- FUSIONの効果測定
コマンド | 評価内容 | FUSIONなし | FUSIONあり |
hidspx -d0 2kB.hex | 2kB Write/Verify | 2.72秒 | 2.14秒(957B/秒) |
hidspx -d0 8kB.hex | 8kB Write/Verify | 6.57秒 | 5.56秒(1.47kB/秒) |
- 条件:ターゲット=ATmega88(8kBの場合)ATtiny2313(2kBの場合)
- マザー=i815 ハブ無し直結。
- ログ
- 2kB書き込み. FUSION無し.
bash-3.2$ time ./hidspx.exe -ph -d0 2kb.hex Detected device is ATtiny2313. Erase Flash memory. Write Flash: 2048/2048 B Verify Flash: 2048/2048 B Passed. real 0m2.722s user 0m0.020s sys 0m0.030s
- 2kB書き込み. FUSIONあり.
bash-3.2$ time ./hidspx1.exe -ph -d0 2kB.hex Detected device is ATtiny2313. Erase Flash memory. Write Flash: 2048/2048 B Verify Flash: 2048/2048 B Passed. real 0m2.144s user 0m0.040s sys 0m0.010s
- 2kB読み出し.
bash-3.2$ time ./hidspx.exe -ph -d0 -rp >out.hex Detected device is ATtiny2313. Read Flash: 2048/2048 B Passed. real 0m1.269s user 0m0.030s sys 0m0.030s
- 8kB書き込み. FUSIONなし.
bash-3.2$ time ./hidspx.exe -ph -d0 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m6.570s user 0m0.020s sys 0m0.020s bash-3.2$ time ./hidspx1.exe -ph -d0 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed.
- 8kB書き込み. FUSIONあり.
bash-3.2$ time ./hidspx1.exe -ph -d0 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m5.558s user 0m0.020s sys 0m0.030s
- 8kB読み出し.
bash-3.2$ time ./hidspx1.exe -ph -d0 -rp >out.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m2.924s user 0m0.020s sys 0m0.020s bash-3.2$
HIDasp-0928版の実行速度(参考:OHCIの場合)†
- FUSIONの効果測定およびUHCIとの速度比較
コマンド | 評価内容 | FUSIONなし | FUSIONあり |
hidspx -d0 8kB.hex OHCI | 8kB Write/Verify | 3.80秒 | 3.60秒(2.27kB/秒) |
hidspx -d0 8kB.hex UHCI(上の表から写し) | 8kB Write/Verify | 6.57秒 | 5.56秒(1.47kB/秒) |
- 条件:ターゲット=ATmega88(8kBの場合)ATtiny2313(2kBの場合)
- マザー=SiS USB1.1ハブ経由にて接続。
- UHCI(インテル、VIA系のUSBホストアダプタ)でも、間にUSB2.0ハブを入れると、OHCI並みの速度になるかもしれない(マイクロフレーム効果がある。
未確認--一応SiSマザー+USB2.0ハブで確認。intelマザーでは未確認)- 但し、ホストPCとUSB2.0ハブ間が480Mbps接続でないとマイクロフレームがサポートされない。
- ログ
- 8kB書き込み. FUSIONなし.
bash-2.02$ time ./hidspx.exe -ph -d0 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m3.799s user 0m0.015s sys 0m0.015s
- 8kB書き込み. FUSIONあり.
bash-2.02$ time ./hidspx1.exe -ph -d0 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m3.597s user 0m0.015s sys 0m0.000s
- 8kB読み出し
bash-2.02$ time ./hidspx.exe -ph -d0 -rp >out.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m1.772s user 0m0.015s sys 0m0.000s bash-2.02$ exit
HIDasp-0926版の実行速度†
コマンド | 評価内容 | 改良前 | 高速化後 |
hidspx -d0 test.hex | 8kB Write/Verify | 10.94秒 | 5.56秒(1.47kB/秒) |
hidspx -d0 -rp >XX.hex | 8kB Read | 8.39秒 | 2.93秒(2.79kB/秒) |
- 条件:ターゲット=ATmega88(20MHz水晶)
- マザー=i815 ハブ無し直結。
- ログ
bash-3.2$ time avrspx.exe -d0 -rp >1 Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m2.934s user 0m0.020s sys 0m0.020s
bash-3.2$ time avrspx.exe -d0 xx.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m5.558s user 0m0.030s sys 0m0.020s bash-3.2$
- intelのUSBホストの場合は、あまり速度が出ないようです。
HIDasp-0926版の実行速度(OHCIの場合)†
コマンド | 評価内容 | 改良前 | 高速化後 |
hidspx -d0 test.hex | 8kB Write/Verify | 10.94秒 | 3.75秒(2.18kB/秒) |
hidspx -d0 -rp >XX.hex | 8kB Read | 8.39秒 | 1.71秒(4.79kB/秒) |
- 条件:ターゲット=ATmega88(20MHz水晶)
- マザー=SiS USB1.1ハブ経由にて接続。
- ログ
bash-2.02$ time ./hidspx.exe -ph -d0 test.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m3.753s user 0m0.031s sys 0m0.000s
bash-2.02$ time ./hidspx.exe -ph -rp -d0 >xx.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m1.707s user 0m0.015s sys 0m0.000s bash-2.02$
コマンド | 評価内容 | 高速化後 |
hidspx -d0 test.hex | 2kB Write/Verify | 1.30秒(1.58kB/秒) |
hidspx -d0 -rp >XX.hex | 2kB Read | 0.60秒(3.41kB/秒) |
- 条件:ターゲット=ATtiny2313(25MHz水晶)
- マザー=SiS USB1.1ハブ経由にて接続。
- ログ
bash-2.02$ time ./hidspx.exe -ph -d0 2k.hex Detected device is ATtiny2313. Erase Flash memory. Write Flash: 2048/2048 B Verify Flash: 2048/2048 B Passed. real 0m1.299s user 0m0.015s sys 0m0.000s
bash-2.02$ time ./hidspx.exe -ph -d0 -rp >temp.hex Detected device is ATtiny2313. Read Flash: 2048/2048 B Passed. real 0m0.596s user 0m0.015s sys 0m0.000s bash-2.02$
- tiny2313では、むしろ接続のネゴシエーションとかRESET初期化で時間を取られている感じ。
- ATmega644基板を作りたくなった。作ったらまたベンチマーク猿になるに違いない。(<アホ)
比較表†
コマンド | 評価内容 | 改良前 | 高速化後 |
hidspx -d0 -rp >XX.hex | 8kB Read | 8.39秒 | 2.22秒 |
hidspx -d1 -rp >XX.hex | 8kB Read | 8.40秒 | 3.12秒 |
hidspx -d4 -rp >XX.hex | 8kB Read | 8.39秒 | 4.63秒 |
hidspx -d0 test.hex | 8kB Write/Verify | 10.94秒 | 4.86秒(1.64kB/秒) |
hidspx -d1 test.hex | 8kB Write/Verify | 10.96秒 | 7.06秒(1.13kB/秒) |
hidspx -d4 test.hex | 8kB Write/Verify | 13.26秒 | 9.98秒(821B/秒) |
結局、'-d0'のときだけ2倍程度の改善でした。
旧バージョン計測結果†
bash-2.02$ gawk -f hexgen.awk -v size=8 -v fill=random > 8kB.hex bash-2.02$ ls -l avrspx.exe 08-09-20 15:03 51,200 avrspx.exe
- HIDaspのファームは旧バージョン(2007.3)です.
- avrspx.exe は最新版です.
- 書き込み&ベリファイ
bash-2.02$ time avrspx -d0 -ph 8kB.hex hidasp_init()... OK. hidasp_program_enable() Detected device is ATmega88. Erase Flash memory. hidasp_program_enable() Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m10.944s user 0m0.015s sys 0m0.000s bash-2.02$ time avrspx -d1 -ph 8kB.hex hidasp_init()... OK. hidasp_program_enable() Detected device is ATmega88. Erase Flash memory. hidasp_program_enable() Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m10.961s user 0m0.015s sys 0m0.015s bash-2.02$ time avrspx -d4 -ph 8kB.hex hidasp_init()... OK. hidasp_program_enable() Detected device is ATmega88. Erase Flash memory. hidasp_program_enable() Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m13.269s user 0m0.015s sys 0m0.000s bash-2.02$ time avrspx -d10 -ph 8kB.hex hidasp_init()... OK. hidasp_program_enable() Detected device is ATmega88. Erase Flash memory. hidasp_program_enable() Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m18.622s user 0m0.015s sys 0m0.000s bash-2.02$ time avrspx -d50 -ph 8kB.hex hidasp_init()... OK. hidasp_program_enable() Detected device is ATmega88. Erase Flash memory. hidasp_program_enable() Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 1m1.109s user 0m0.015s sys 0m0.000s bash-2.02$
- 読み出し
bash-2.02$ time avrspx -d0 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m8.393s user 0m0.015s sys 0m0.015s bash-2.02$ time avrspx -d1 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m8.397s user 0m0.015s sys 0m0.015s bash-2.02$ time avrspx -d4 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m8.392s user 0m0.015s sys 0m0.000s bash-2.02$ time avrspx -d10 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m8.504s user 0m0.015s sys 0m0.000s bash-2.02$ time avrspx -d20 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m8.576s user 0m0.015s sys 0m0.000s bash-2.02$ time avrspx -d30 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m8.718s user 0m0.015s sys 0m0.015s bash-2.02$ time avrspx -d40 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m8.787s user 0m0.015s sys 0m0.000s bash-2.02$ time avrspx -d50 -ph -rp >xx.rom Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m17.042s user 0m0.015s sys 0m0.015s bash-2.02$
新バージョン計測結果†
- HIDaspのファームは高速化改造版です.
- 書き込み&ベリファイ
bash-2.02$ time ./hidspx -d0 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m4.862s user 0m0.015s sys 0m0.015s bash-2.02$ time ./hidspx -d1 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m7.057s user 0m0.015s sys 0m0.015s bash-2.02$ time ./hidspx -d4 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m9.975s user 0m0.031s sys 0m0.000s bash-2.02$ time ./hidspx -d10 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m15.610s user 0m0.015s sys 0m0.000s bash-2.02$ time ./hidspx -d20 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m25.441s user 0m0.031s sys 0m0.000s bash-2.02$ time ./hidspx -d30 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m35.030s user 0m0.015s sys 0m0.000s bash-2.02$ time ./hidspx -d40 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m44.771s user 0m0.015s sys 0m0.015s bash-2.02$ time ./hidspx -d50 -ph 8kB.hex Detected device is ATmega88. Erase Flash memory. Write Flash: 8192/8192 B Verify Flash: 8192/8192 B Passed. real 0m54.396s user 0m0.031s sys 0m0.000s bash-2.02$
- 読み出し
bash-2.02$ time ./hidspx -d0 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m2.223s user 0m0.015s sys 0m0.015s bash-2.02$ time ./hidspx -d1 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m3.123s user 0m0.015s sys 0m0.015s bash-2.02$ time ./hidspx -d4 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m4.630s user 0m0.015s sys 0m0.000s bash-2.02$ time ./hidspx -d10 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m7.434s user 0m0.015s sys 0m0.000s bash-2.02$ time ./hidspx -d20 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m12.289s user 0m0.015s sys 0m0.000s bash-2.02$ time ./hidspx -d30 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m17.140s user 0m0.015s sys 0m0.015s bash-2.02$ time ./hidspx -d40 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m21.889s user 0m0.031s sys 0m0.000s bash-2.02$ time ./hidspx -d50 -ph -rp >XX.hex Detected device is ATmega88. Read Flash: 8192/8192 B Passed. real 0m26.719s user 0m0.015s sys 0m0.015s bash-2.02$