Mercurial > hg > Members > kono > Cerium
changeset 257:e0e20d7227cc
merged
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 03 Jun 2009 18:50:15 +0900 |
parents | b42eed185bb4 (diff) 465a871f4c07 (current diff) |
children | a09588a03ea5 |
files | TaskManager/Cell/spe/CellDmaManager.cc~ example/HelloWorld/Makefile.ps3 example/basic/Makefile.ps3 example/many_task/Makefile.ps3 example/share_task/Makefile.ps3 |
diffstat | 2 files changed, 46 insertions(+), 80 deletions(-) [+] |
line wrap: on
line diff
--- a/Document/Cerium_2009.mm Wed Jun 03 16:14:06 2009 +0900 +++ b/Document/Cerium_2009.mm Wed Jun 03 18:50:15 2009 +0900 @@ -3,9 +3,14 @@ <node CREATED="1243334660595" ID="Freemind_Link_361268029" MODIFIED="1243334673834" TEXT="Cerium"> <node CREATED="1243334675078" ID="_" MODIFIED="1243334685027" POSITION="right" TEXT="今後の課題"> <node CREATED="1243334687304" ID="Freemind_Link_724877032" MODIFIED="1243334699443" TEXT="SPEのbusy_rate"> -<node CREATED="1243334700176" ID="Freemind_Link_106748438" MODIFIED="1243334717171" TEXT="SPEの待っている時間"/> -<node CREATED="1243334717552" ID="Freemind_Link_358022870" MODIFIED="1243334728831" TEXT="SPEの動いている時間"/> -<node CREATED="1243573692771" ID="Freemind_Link_863215847" MODIFIED="1243573729027" TEXT="SPU Read Decrimenter"> +<node CREATED="1243334700176" ID="Freemind_Link_106748438" MODIFIED="1243767891478" TEXT="SPEの待っている時間"> +<icon BUILTIN="button_ok"/> +</node> +<node CREATED="1243334717552" ID="Freemind_Link_358022870" MODIFIED="1243767895400" TEXT="SPEの動いている時間"> +<icon BUILTIN="button_ok"/> +</node> +<node CREATED="1243573692771" ID="Freemind_Link_863215847" MODIFIED="1243767899714" TEXT="SPU Read Decrimenter"> +<icon BUILTIN="button_ok"/> <node CREATED="1243576115273" ID="Freemind_Link_1443523938" MODIFIED="1243576166041" TEXT="1周するのに59秒"/> </node> <node CREATED="1243578458067" ID="Freemind_Link_1713267557" MODIFIED="1243578476573" TEXT="Program 終了時に busy_rate 表示"> @@ -13,11 +18,15 @@ </node> </node> <node CREATED="1243334733712" ID="Freemind_Link_1055841346" MODIFIED="1243334790932" TEXT="CodeのLoad"> -<node CREATED="1243334798424" ID="Freemind_Link_37528502" MODIFIED="1243334811351" TEXT="SPEでオーバーレイを使う"> +<node CREATED="1243334798424" ID="Freemind_Link_37528502" MODIFIED="1243767908100" TEXT="SPEでオーバーレイを使う"> +<icon BUILTIN="button_ok"/> <node CREATED="1243334812456" ID="Freemind_Link_1423803806" MODIFIED="1243334836291" TEXT="2カ所にオーバーレイする"/> </node> -<node CREATED="1243334838609" ID="Freemind_Link_823725087" MODIFIED="1243334854787" TEXT="Position independent codeを生成する"/> -<node CREATED="1243584255924" ID="Freemind_Link_784128675" MODIFIED="1243584281736" TEXT="dma_wait 後落ちる"> +<node CREATED="1243334838609" ID="Freemind_Link_823725087" MODIFIED="1243767913462" TEXT="Position independent codeを生成する"> +<icon BUILTIN="button_ok"/> +</node> +<node CREATED="1243584255924" ID="Freemind_Link_784128675" MODIFIED="1243767918303" TEXT="dma_wait 後落ちる"> +<icon BUILTIN="button_ok"/> <node CREATED="1243584287314" ID="Freemind_Link_1653925279" MODIFIED="1243584287314" TEXT=""/> </node> <node CREATED="1243584369566" HGAP="26" ID="Freemind_Link_1788139696" MODIFIED="1243584587432" TEXT="code_load をどこに入れる?" VSHIFT="4"/> @@ -34,6 +43,9 @@ <node CREATED="1243334896187" ID="Freemind_Link_1997794387" MODIFIED="1243334899588" TEXT="Texture"/> <node CREATED="1243334900744" ID="Freemind_Link_1679286990" MODIFIED="1243334902955" TEXT="Code"/> <node CREATED="1243334904288" ID="Freemind_Link_1980670377" MODIFIED="1243334918355" TEXT="SceneGraph"/> +<node CREATED="1243760618919" ID="Freemind_Link_1987430870" MODIFIED="1243760660067" TEXT="SPEからメインメモリを allocate する"> +<node CREATED="1243760662531" ID="Freemind_Link_1553445069" MODIFIED="1243760689561" TEXT="データを分割して転送"/> +</node> </node> <node CREATED="1243334967348" HGAP="23" ID="Freemind_Link_728996277" MODIFIED="1243334981305" TEXT="Rendering" VSHIFT="-5"> <node CREATED="1243334991181" ID="Freemind_Link_151269429" MODIFIED="1243334997520" TEXT="Z sort"/> @@ -50,6 +62,33 @@ <node CREATED="1243335159672" ID="Freemind_Link_710888232" MODIFIED="1243335177852" TEXT="Federated Linda"/> </node> </node> -<node CREATED="1243335266234" ID="Freemind_Link_388441282" MODIFIED="1243335279142" POSITION="left" TEXT="右が終わったらOptimize"/> +<node CREATED="1243335266234" ID="Freemind_Link_388441282" MODIFIED="1243767884427" POSITION="left" TEXT="右が終わったらOptimize"/> +<node CREATED="1243756108386" ID="Freemind_Link_1530684505" MODIFIED="1243756115045" POSITION="left" TEXT="読んで行く時の課題"> +<node CREATED="1243756118283" ID="Freemind_Link_1534021736" MODIFIED="1243756144686" TEXT="PPU側でSPUのmailをチェックしている所"/> +<node CREATED="1243756161025" ID="Freemind_Link_63436885" MODIFIED="1243756188487" TEXT="SPUからデータを書き出す時の領域"/> +<node CREATED="1243756232062" ID="Freemind_Link_1135220542" MODIFIED="1243756242272" TEXT="code_load をどこに入れるか"/> +<node CREATED="1243756242757" ID="Freemind_Link_1631561095" MODIFIED="1243756251308" TEXT="camera をどこに入れるか"> +<node CREATED="1243767802313" ID="Freemind_Link_1460501506" MODIFIED="1243767821652" TEXT="Transration node"/> +</node> +</node> +<node CREATED="1243767016567" ID="Freemind_Link_1736419321" MODIFIED="1243767029430" POSITION="left" TEXT="Cerium Task Manager の課題"> +<node CREATED="1243767044334" ID="Freemind_Link_1874966155" MODIFIED="1243767058630" TEXT="PolygonPack の中で dma_wait やりすぎ"/> +<node CREATED="1243767064099" ID="Freemind_Link_386780315" MODIFIED="1243767100156" TEXT="mainMem_allocate ではなく spu 内部から Task を生成する"/> +<node CREATED="1243767135260" ID="Freemind_Link_719233839" MODIFIED="1243767166820" TEXT="PP2 と span pack 生成の二つの Task の融合"/> +<node CREATED="1243767184889" ID="Freemind_Link_1060231515" MODIFIED="1243767198426" TEXT="viewer が barrier 同期しすぎ"/> +<node CREATED="1243767206264" ID="Freemind_Link_37516222" MODIFIED="1243767214232" TEXT="待っている spu が多い"> +<node CREATED="1243767227392" ID="Freemind_Link_1769847872" MODIFIED="1243767251339" TEXT="dma_wait だけではなく spu 待ち時間を測定"/> +</node> +<node CREATED="1243767262537" ID="Freemind_Link_507081989" MODIFIED="1243767275748" TEXT="SceneGraph の変形を copy base にする"> +<node CREATED="1243767288336" ID="Freemind_Link_388959053" MODIFIED="1243767306119" TEXT="drawing と SceneGraph の演算を並列に"/> +</node> +<node CREATED="1243767320557" ID="Freemind_Link_830109616" MODIFIED="1243767357291" TEXT="アーキテクチャに依存した Task の scheduling"> +<node CREATED="1243767364243" ID="Freemind_Link_683952054" MODIFIED="1243767371836" TEXT="Task の定義の外に出す"/> +<node CREATED="1243767399911" ID="Freemind_Link_5399213" MODIFIED="1243767416711" TEXT="SPU_ANY とか書かせない"/> +<node CREATED="1243767426294" ID="Freemind_Link_1858442017" MODIFIED="1243767442199" TEXT="Task の融合も Manager 側でやる"/> +</node> +<node CREATED="1243767358921" ID="Freemind_Link_1332255958" MODIFIED="1243767507761" TEXT="SPU 側で Main Memory の Read Modify をしない"/> +<node CREATED="1243767518913" ID="Freemind_Link_689712682" MODIFIED="1243767529643" TEXT="Task 実行のビジュアライザ"/> +</node> </node> </map>
--- a/TaskManager/Cell/spe/CellDmaManager.cc~ Wed Jun 03 16:14:06 2009 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include "CellDmaManager.h" - -/** - * DMA Load - * - * @param[in] buf Buffer of Load Data - * @param[in] addr Address of Load Data at Main Memory - * @param[in] size Size of Load Data - * @param[in] mask DMA tag -*/ -void -CellDmaManager::dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) -{ - if (size == 0) return ; - mfc_get((volatile void *)buf, addr, size, mask, 0, 0); -} - -/** - * DMA Store - * - * @param[in] buf Buffer of Store Data at SPE - * @param[in] addr Address of Store Data at Main Memory - * @param[in] size Size of Store Data - * @param[in] mask DMA tag -*/ -void -CellDmaManager::dma_store(void *buf, uint32 addr, uint32 size, uint32 mask) -{ - if (size == 0) return ; - mfc_put((volatile void *)buf, addr, size, mask, 0, 0); -} - -/** - * DMA Wait - * - * @param[in] mask Tag for Wait DMA process - */ -void -CellDmaManager::dma_wait(uint32 mask) -{ - mfc_write_tag_mask(1 << mask); - mfc_write_tag_update_all(); - mfc_read_tag_status(); -} - -void -CellDmaManager::mail_write(uint32 data) -{ - spu_write_out_mbox(data); -} - -unsigned int -CellDmaManager::mail_read(void) -{ - unsigned int mail = spu_read_in_mbox(); - return mail; -} - -void -CellDmaManager::dma_loadList(ListDataPtr list, void *buff, uint32 mask) -{ - mfc_getl(buff, 0, list->element, sizeof(mfc_list_element_t)*list->length, - mask, 0, 0); -} - -void -CellDmaManager::dma_storeList(ListDataPtr list, void *buff, uint32 mask) -{ - mfc_putl(buff, 0, list->element, sizeof(mfc_list_element_t)*list->length, - mask, 0, 0); -}