喔天啊!一直到昨天才看懂 MMIX 的 spec(當然是 cyy 之功 :P),Knuth 真是…太神了 Orz。基本上他做的事情和 TOY/TOY86 一樣,設計一台機器的指令集、組合語言和架構,然後寫 assembler、simulator 等輔助程式(GNU C/C++ compiler 也已經移植到 MMIX 上了 XD),可是 MMIX 設計之細緻讓人完全覺得這絕對做得出來啊 XD!然後除了 TAOCP vol. 1 fasc. 1 以外,依循慣例,Knuth 在 2004 年也出版一本《MMIXware》XD。

然後 MMIX 的基本 spec 超先進 XD。整台 MMIX 是 64-bit computer,有 256 個 general-purpose registers 和 32 個 special registers,以及 64-bit address space。隨便翻一下 instructions(共 256 個),竟然還有 SIMD 指令 XD。然後 Knuth 也寫了一個 "pipeline meta-simulator",顯然是把 architecture 都設計好了 XD。應該除了作業系統 NNIX 之外都弄完了吧 XD。摘一些《MMIXware》介紹網頁的句子:

... A particular goal in the design of MMIX was to keep its machine language simple, elegant, and easy to learn. At the same time, all of the complexities needed to achieve high performance in practice were also taken into account, so that MMIX could in principle be built and even be competitive with some of the fastest general-purpose machines on the market. All in all, MMIX is a clean, complete, and well-documented machine-independent machine ideally suited as a testbed for long-term research projects of lasting value, even as real computers continue to change rapidly.

... Among other utilities, an assembler converting MMIX symbolic files to MMIX objects and two simulators executing the programs in given object files are provided. Of particular interest is the MMMIX meta-simulator, which is able to do dynamic scheduling of a complex pipeline, allowing superscalar execution with any number of functional units and with many varieties of caching and branch prediction, etc., including a detailed implementation of both hard and soft interrupts.

反觀可憐的小 TOY86,RISC & CISC 的混血,有滿多 bubble 的 instructions,唔,至少它的 simulator 有 GUI XD。

做一台實體的 MMIX 出來吧!XD

剛剛又看到 Knuth 說:

I encourage the use of this book as supplementary reading in university classes that deal with hardware architecture.

很好,那就看能不能邊修 architecture 邊努力把這本讀完 XD。

高微沒 99 無妨了 XD。


Blogger Fall2/22/2007 9:29 am 說:


Blogger yen32/22/2007 5:21 pm 說:



<< 回到主頁