2.5. ASEテストベンチの実行
実行可能ファイルが正常に実行されると、ホスト・アプリケーションがホストウィンドウで実行され、Test Passedメッセージが表示されます。 すべてのCCI-Pトランザクションは、ASEウィンドウで実行されます。 AFUをデバッグする場合は、ASEシミュレーション波形を表示できます。 詳細については、ASEのドキュメントを参照してください。
図 3. Hostウィンドウ (end of output)
Interrupt enabled = 00000001 [APP] MMIO Write : tid = 0x00a, offset = 0x68, data = 0xc3ca00000 [APP] MMIO Write : tid = 0x00b, offset = 0x70, data = 0xb04400000 [APP] MMIO Write : tid = 0x00c, offset = 0x78, data = 0x40 [APP] MMIO Write : tid = 0x00d, offset = 0x48, data = 0x1 AFU Latency: 4459.48300 milliseconds Poll success. Return = 1 check output memory: output memory OK! [APP] MMIO Read : tid = 0x00e, offset = 0x58 [APP] MMIO Read Resp : tid = 0x00e, data = 3 [APP] MMIO Write : tid = 0x00f, offset = 0x58, data = 0x3 [APP] MMIO Read : tid = 0x010, offset = 0x60 [APP] MMIO Read Resp : tid = 0x010, data = 4432c000 sum: Expected 715.000000, calculated 715.000000. The FPGA writes a full 512-bit word (64 bytes) to host memory, so if the size of your test vector (in bytes) is not a multiple of 64, the FPGA will overwrite some space at the end of output memory. fpgaPrepareBuffer() allocates your host memory in a buffer that is a multiple of 64 bytes, so the FPGA behavior will not affect your application. You should expect to see a single 0xdeadbeef at the end of the output memory if and only if the size of your test vector (determined by vector_size, and the datatype) is a multiple of 64 bytes (that is, if vector_size is a multiple of 16). end of output memory after executing kernel: [62] - 22.333334 (0x41b2aaab) [63] - 22.666666 (0x41b55555) [64] - -6259853398707798016.000000 (0xdeadbeef) [65] - 0.000000 (0x0) Vector size is 64 (256 bytes), so expect memory output at [64] = 0xdeadbeef Finished Running Test. [APP] Deallocate request index = 3 ... [APP] Deallocating memory /buf1.369227379399493 ... [APP] SUCCESS [APP] Deallocate request index = 2 ... [APP] Deallocating memory /buf0.369227379399493 ... [APP] SUCCESS [APP] Deinitializing simulation session [APP] Closing Watcher threads [APP] Deallocating UMAS [APP] Deallocating memory /umas.369227379399493 ... [APP] SUCCESS [APP] Deallocating MMIO map [APP] Deallocating memory /mmio.369227379399493 ... [APP] SUCCESS [APP] Deallocate all buffers ... [APP] Took 6,302,858,736 nsec [APP] Session ended Test PASSED
図 4. ASEウィンドウ (end of trace)
# [SIM] Ready for simulation... # [SIM] Press CTRL-C to close simulator... # [SIM] Session requested by PID = 153501 # [SIM] Session ID => 356353904181555 # [SIM] Event socket server started # [SIM] SIM-C : Creating Socket Server@/tmp/ase_event_server_356353904181555... # [SIM] SIM-C : Started listening on server /tmp/ase_event_server_356353904181555 # [SIM] 0 ADDED /mmio.356353904181555 # [SIM] 1 ADDED /umas.356353904181555 # [SIM] 2 ADDED /buf0.356353904181555 # [SIM] 3 ADDED /buf1.356353904181555 # [SIM] SIM-C : AFU Interrupt event 0 # [SIM] Request to deallocate "/buf1.356353904181555" ... # [SIM] 3 REMOVED /buf1.356353904181555 # [SIM] Request to deallocate "/buf0.356353904181555" ... # [SIM] 2 REMOVED /buf0.356353904181555 # [SIM] Request to deallocate "/umas.356353904181555" ... # [SIM] 1 REMOVED /umas.356353904181555 # [SIM] Request to deallocate "/mmio.356353904181555" ... # [SIM] 0 REMOVED /mmio.356353904181555 # [SIM] ASE recognized a SW simkill (see ase.cfg)... Simulator will EXIT # [SIM] SIM-C : Exiting event socket server@/tmp/ase_event_server_356353904181555... # [SIM] Closing message queue and unlinking... # [SIM] Unlinking Shared memory regions.... # [SIM] Session code file removed # [SIM] Removing message queues and buffer handles ... # [SIM] Cleaning session files... # [SIM] Simulation generated log files # [SIM] Transactions file | $ASE_WORKDIR/ccip_transactions.tsv # [SIM] Workspaces info | $ASE_WORKDIR/workspace_info.log # [SIM] ASE seed | $ASE_WORKDIR/ase_seed.txt # [SIM] # [SIM] Tests run => 1 # [SIM] # [SIM] Sending kill command... # [SIM] Simulation kill command received... # # Transaction count | VA VL0 VH0 VH1 | MCL-1 MCL-2 MCL-4 # ======================================================================================== # MMIOWrReq 6 | # MMIORdReq 11 | # MMIORdRsp 11 | # IntrReq 1 | # IntrResp 1 | # RdReq 4 | 0 0 1 0 | 0 0 1 # RdResp 4 | 0 0 4 0 | # WrReq 4 | 0 0 4 0 | 0 0 1 # WrResp 4 | 0 0 1 0 | 0 0 1 # WrFence 0 | 0 0 0 0 | # WrFenRsp 0 | 0 0 0 0 | # # ** Note: $finish : /nfs/tor/disks/swuser_work_whitepau/OPAE_Samples/hls_afu_beta3/hls_afu/hls_afu/build_ase_dir/rtl/ccip_emulator.sv(2654) # Time: 833760 ns Iteration: 2 Instance: /ase_top/ccip_emulator # End time: 17:21:11 on Oct 31,2018, Elapsed time: 0:18:04 # Errors: 3, Warnings: 4680