洪士灝Hung, Shih-Hao臺灣大學:電機工程學研究所廖彧宏Liaw, Yuh-HungYuh-HungLiaw2010-07-012018-07-062010-07-012018-07-062009U0001-1202200917013900http://ntur.lib.ntu.edu.tw//handle/246246/188101近年來,因為消費性店商品生命週期大幅縮短,為了更快速地開發出新產品,軟硬體共同設計(hardware/software co-design)的重要性越來越受到重視。使用傳統Verilog或是VHDL開發硬體,要和系統層級整合時,介面往往不易操作,有很多的限制,而且相當依賴工具的能力。SystemC,除了可以描述硬體的細節,也可以很方便的和軟體整合,系統介面的設計也具有相當的彈性,能適應軟硬體共同設計的複雜度。為了讓傳統大量Verilog撰寫的矽智財可以轉移到SystemC的開發環境,Verilog轉換SystemC的研究成為一個重要的議題。本論文中,我們介紹一套Verilog-to-SystemC的轉譯工具,稱為V2X。針對傳統轉譯工具制式化的設計哲學,V2X採取新的設計概念。傳統的轉換工具為了完成特定的轉換結果,犧牲一些Verilog語法的支援,致使無法產生正確的轉譯結果。為了克服這樣的問題,我們的V2X工具採用兩階段轉換的架構,區分為Verilog語意的萃取和後續彈性轉換兩個部分。本文最後,我們將使用OpenSPARC T1做為案例討論,轉譯出一個和原本Verilog版本相符的SystemC OpenSPARC T1。我們轉換過的SystemC模型相較原本Verilog的模型,進行模擬時,獲得效能上相當的改善。With the life-cycle of consumer electronics getting short in recent years, to shorten development time, hardware/software co-design has become an important issue. Traditionally, hardware description languages, e.g. Verilog and VHDL, are commonly used to describe and model the hardware. Unfortunately, the usage of language is hard to be integrated with the development of software. SystemC solves this problem by describing the hardware with C++ language and C++ language library functions. owever, converting an existing Verilog design can be very challenging. Existing tools failed to produce correct translation for sophisticated Verilog code, such as OpenSPARC T1. They cannot support certain Verilog constructs because it is hard to translate these constructs directly into SystemC to maintain correct semantics. Thus, we designed an innovative Verilog-to-SystemC translation tool, called V2X, with techniques developed to overcome those problems. We took a two-stage approach to make the translation flexible and extendible. In this thesis, we describe how performance modeling can be done for multicore embedded processors based on Verilog-to-SystemC conversion, with OpenSPARC T1 as a case study. Using V2X, we successfully translated OpenSPARC T1 design into SystemC, and we show that the SystemC version improved the simulation speed by ~40 times.第 1 章 緒論 1 2 章 相關研究與背景知識 4.1 多核心處理器與SUN OPENSPARC T1 4.2 OPENSPARC T1原始碼大致的結構 6.3 傳統OPENSPARC的驗證方法 7.4 開放原始碼的系統設計與驗證函式庫 - SYSTEMC 8.5 轉譯VERILOG到SYSTEMC 11 3 章 VERILOG-TO-SYSTEMC轉換工具:V2X 13.1 兩階段架構的V2X 13.2 V2X 內部架構 14.3 V2X所使用的MMF中間碼格式 18.3.1 根節點<V2X> 21.3.2 標籤<MODULE> 的子節點 21.3.3 標籤<PROCESS> 22.3.4 標籤<PROCESS_GROUP> 23.3.5 標籤<INSTANCE> 24.3.6 標籤<TOKEN>、標籤<TOKEN_PARAM>、標籤<NUM>、標籤<ARRAY> 24.3.7 標籤<LAZY_XXX> 25.3.8 判斷式、迴圈 26.3.9 覆值、一元運算、二元運算、三元運算 27 4 章 OPENSPARC T1的轉譯與驗證 28.1 OPENSPARC T1 的轉譯 28.1.1 VIRTUAL SCOPE 28.1.2 VIRTUAL BINDING 28.1.3 LOCAL 變數之使用 30.1.4 SC_METHOD導向 30.2 SYSTEMC版本OPENSPARC的驗證 30 5 章 實驗結果與分析 33.1 比較V2X、V2SC和VERILATOR以M68K的轉譯為例 33.1.1 轉譯的速度 33.1.2 轉譯的正確性 35.1.3 轉譯後的SYSTEMC碼的執行速度 35.2 VERILOG 與SYSTEMC的模擬速度:以OPENSPARC T1為例 36 6 章 總結與未來研究方向 39考文獻 411639918 bytesapplication/pdfen-USVerilogSystemC電腦語言轉換OpenSPARCComputer Language Translation以Verilog轉換SystemC完成多核心嵌入式處理器之效能模型Performance Modeling for Multicore Embedded Processors based on Verilog-to-SystemC Conversionthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/188101/1/ntu-98-R95944011-1.pdf