Open source embedded platform based on OpenRISC and DE2-70

Last Edit: 2009.03.01

This page is dedicated to my master thesis which is still on writing. To achieve a better quality, I decide to publish the thesis draft in my blog so that it is accessable to everyone. If you happen to read it, comments are welcome.

The thesis project implemented a open source general purpose embedded platform with OpenRISC OR1200 processor and based on Terasic's DE2-70 board.

Title: Open source embedded platform based on OpenRISC and DE2-70
Chapter 1. Introduction
Chapter 2. Open Cores in a Commercial Perspective (finished)
Chapter 3. Platform Overview
Chapter 4. OpenRISC OR1200 Processor
Chapter 5. WISHBONE Specification and Conmax IP Core (finished)
Chapter 6. Peripherals
Chapter 7. Software Development
Chapter 8. Porting uC/OS-II to the platform
Chapter 9. Porting uC/TCP-IP to the platform
Chapter 10. Conclusion
Appendix A. Thesis Announcement
Appendix B. A Step by step Instruction to Repeat the Thesis Project (finished)

Finished Chapters:

Chapter 2. Open Cores in a Commercial Perspective (Last revised: 2008/12/25)
- This chapter tries to answer whether it is good to use open cores for commercial purpose.
- Some open source licenses like BSD License, GPL and LGPL are introduced.

Chapter 5. WISHBONE Specification and Conmax IP Core (Last revised: 2009/01/21)
- Introduce the WISHBONE SoC interconnection standard.
- Cover the descriptions to all WISHBONE bus transactions, including the "registered
  feedback bus cycles", i.e. the burst transaction.
- Introduce the Conmax IP Core, which implements a WISHBONE interconnection with
  matrix structure.

Appendix B. A Step by step Instruction to Repeat the Thesis Project
(Last revised: 2009/03/01)
- This appendix tells how to repeat our thesis project with our Project Archive Zip file.

Key Words:
Open Core, BSD License, GPL, LGPL,
WISHBONE, Conmax,

Downloads:
Chapter 2. Open Cores in a Commercial Perspective (Last revised: 2008/12/25)
Chapter 5. WISHBONE Specification and Conmax IP Core (Last revised: 2009/01/21)
Appendix B. A Step-by-step Instruction to Repeat the Thesis Project
(Last revised: 2009/03/01)

=======================================================================

Dear List,

This is Xiang Li and Lin Zuo. We are master students of the SOC program of KTH, Sweden. Here we'd like to present our thesis to the community.

The thesis implements general purpose embedded platform which uses the OpenRISC OR1200 processor as the CPU. It is targeted to an ALTERA FPGA development board (Terasic's DE2-70). We made a demo program which is able to decode a small MP3 file in PC, download the music data to the board via an Ethernet connection, and finally play the music on the board. See features below for more details.

The thesis was proposed by and performed in a Swedish company ENEA (Malmö / Lund branch). It started at January 2008 and most of the design was done by the end of June 2008. So far, Lin has finished his thesis, while Xiang is still working on his thesis writing.

Here is the link to the download webpage:
http://www.olivercamel.com/post/master_thesis.html
At there, you can find the project zip file (about 65MB) as well as Xiang's thesis draft. Lin's thesis has already included in the zip file.

We don't know if it is possible to upload the project zip file to opencores.org's CVS as well, and maybe find a place under the OpenRISC’s webpage. If so, we would like to do that. Someone please direct us an instruction link which tells how to.

We would like to thank our supervisors Johan Jörgensen (ENEA) and Ingo Sander (KTH).

We hope that our work could contribute a little to open core community. Comments and feedbacks are welcome!

Best regards,
Xiang Li, Lin Zuo
2009/01/14

===================================================
  Thesis Project Features
===================================================

ORPXL (the Openrisc Reference Platform designed by Xiang and Lin)

  - General purpose embedded platform
  - Low cost because of using open cores and open source software
  - Most source code of the platform is available
    -- except for the ALTERA's built-in IPs like RAM, FIFO, PLL
    -- uC/OS-II and uC/TCP-IP are not open source, but their source code is provided
  - Based on Terasic's DE2-70 board, and ALTERA's FPGA Cyclone II

  - OpenRISC OR1200 Processor
    -- System running at 50MHz, no cache, no MMU
  - WISHBONE Interconnection Standard and CONMAX IP Core
  - Memory Controller IP Core
    -- 32KB On-chip memory
    -- 2MB SSRAM
    -- 64MB SDRAM
  - RS232 by UART16550 IP Core
  - Buttons, LEDs, 7-Segments by GPIO IP Core
  - WISHBONE Interface for WM8731 Audio CODEC (DAC only)
  - WISHBONE Interface for DM9000A Ethernet controller

  - Porting uC/OS-II to OpenRISC processor
  - Porting uC/TCP-IP to OpenRISC processor
    -- we can achieve about 3KB speed for a stable connection
  - LibMAD (running in PC) is used to conver MP3 to WAV format
  - bootloader that download software binary files via RS232
  - ihex2mif that conver ihex format to ALTERA's mif format

===================================================
  Project Downloads: orpXL_release_20081116.zip (about 65MB)
===================================================

  • 相关文章:
  • quote 1.cool
  • 很多人都成功的将linux移植到or1200上
    你将这作为硕士毕业论文有什么不同的地方吗?
  • 2009-4-13 10:56:39
  • quote 2.很感谢您的分享
  • linux的内核毕竟还是有些大的,虽然功能更强,而且linux移植到or1200上早就有人做过了,版主移植ucos肯定是自己的工作吧,我最近也正在做这方面的研究,您的分享对我的帮助很大。
  • 2009-4-13 12:21:32
  • quote 3.olivercamel
  • 引自 cool
    很多人都成功的将linux移植到or1200上
    你将这作为硕士毕业论文有什么不同的地方吗?


    首先,这个题目是老师定的,所以不是我自己决定将这个作为论文的。而且我没有做linux的移植,因为我对linux不太熟悉,不了解linux是如何和硬件交互的。不过我实现了的东西基本上都还是理解的。

    和其他openrisc论文不同的地方还是有的。主要的一点是我把工程都打包传上来了,而且提供了比较详细的说明。所以如果你能搞到一个DE2-70的FPGA板子就可以很轻松的实现我做过的东西。如果中间遇到问题,也可以随时联系到我。我在尽最大努力使我做过的东西能对别人有所帮助。当然我自己也在和别人的交流过程中获益。

    从技术的角度上说也还是有一些特点的。比如我们使用了uC/OS和uC/TCP-IP,并写了个简单的程序从PC向FPGA传数据,现在还google不到其他论文有做类似的东西(当然移植了linux也就不需要了)。此外,还有一些细节,比如对CONMAX核的使用,对DM9000A和WM8731的支持等等。都是我们先学会了在应用到论文的工程中的。而并非直接借鉴其他论文的成果。

    其实,我们在08年1月开始这个工程的时候,可以参考的东西还非常有限。(现在socvista论坛的牛人们好像已经做了不少东西了。)虽然那个时候已经有两本中文著作都是关于openrisc的了。我都买到手了。但是说实话实质性的帮助并不大。
  • 2009-4-15 22:35:03
  • quote 4.olivercamel
  • 引自 很感谢您的分享
    linux的内核毕竟还是有些大的,虽然功能更强,而且linux移植到or1200上早就有人做过了,版主移植ucos肯定是自己的工作吧,我最近也正在做这方面的研究,您的分享对我的帮助很大。


    移植uC/OS到OR1200很早前已经有人做了。我就是参考micrium.com上面的那个例子。基本上把人家的例子自己抄写了一遍。但是这个过程对我帮助很大,使我明白了uC/OS是如何做context switch的。如果现在随便给我一个CPU,我觉得自己也能写出简单的RTOS来。
  • 2009-4-15 22:48:15
  • quote 5.tony.zhang
  • 非常感谢你的贡献 以后多交流!
    谢谢
  • 2009-4-21 1:13:38
  • quote 6.zqiang320
  • oliver,first, I got many useful content from your project, thank you, I compile the conmax alone, but quartus report there are 932 pins, this is excess the limit of cyclone II, Then I check your origion project file ,I find the pins number only 524, why your project include many others, but pin is so litte? Eager to receive your reply thank you very much!
  • 2009-8-2 15:31:56
  • quote 7.olivercamel
  • 引自 zqiang320
    oliver,first, I got many useful content from your project, thank you, I compile the conmax alone, but quartus report there are 932 pins, this is excess the limit of cyclone II, Then I check your origion project file ,I find the pins number only 524, why your project include many others, but pin is so litte? Eager to receive your reply thank you very much!


    Hi, please be aware of that the numbers of pins of the CONMAX IP core do not equal to the pins of the system.

    The CONMAX IP core actually has 105 * 24 = 2520 pins, but we used only 9 ports of the IP. That's why you got 932 pins (others are routed to ground).
  • 2009-8-3 19:46:23
  • quote 8.olivercamel
  • 引自 zqiang320
    oliver,first, I got many useful content from your project, thank you, I compile the conmax alone, but quartus report there are 932 pins, this is excess the limit of cyclone II, Then I check your origion project file ,I find the pins number only 524, why your project include many others, but pin is so litte? Eager to receive your reply thank you very much!


    When you connect other modules to the CONMAX, (e.g. connecting OpenRISC CPU to the CONMAX bus), the pins of the CPU and CONMAX bus become internal connection (wire), those will not be reflected at the system level.

    That's why you see different number of pins. In fact, after connecting all the modules to CONMAX, that IP becomes an internal bus. None of the 524 pins at the system level is contribued by the CONMAX.
  • 2009-8-3 19:46:50
  • quote 9.zqiang320
  • Thank you for your answer! I have another question about file or1200_spram_2048x32.v, in this file //lpm_ram_dq_component.lpm_outdata = "UNREGISTERED" has been done, why need to do so?
  • 2009-8-6 9:28:51
  • quote 10.zqiang320
  • I am eager to read you thesis paper. what time will you finish it, Could you upload it for us?
  • 2009-8-6 9:31:45
  • quote 11.olivercamel
  • 引自 zqiang320
    Thank you for your answer! I have another question about file or1200_spram_2048x32.v, in this file //lpm_ram_dq_component.lpm_outdata = "UNREGISTERED" has been done, why need to do so?


    Because it seems in the current version of the Quartus RAM IP core, this outdata "UNREGISTERED" attribute is not supported anymore. When I compiled the project without commenting out this line, the Quartus reported an error.
  • 2009-8-6 16:26:24
  • quote 12.olivercamel
  • 引自 zqiang320
    I am eager to read you thesis paper. what time will you finish it, Could you upload it for us?


    Indeed, I have delayed my thesis writing for almost a year. I feel sorry about this to my supervisors.

    Currently I am still working on the writing. Hope I can get some results at the beginning of the September. As soon as I finish the writing, I will upload my thesis to my Blog, just like I uploaded our project package.
  • 2009-8-6 16:29:35
  • quote 13.zqiang320
  • Thank you first, I have another question about memory controller IP, I find two file have been changed , but I don't know why need to do so:
    in mc_define.v
    // origion parameter value
    `define MC_REG_SEL (wb_addr_i[31:29] == 3'b011)
    // modified paramter value
    `define MC_REG_SEL (wb_addr_i[27] == 1'b1)




    // origion parameter value
    `define MC_MEM_SEL (wb_addr_i[31:29] == 3'h0)
    // modified paramter value

    `define MC_MEM_SEL (wb_addr_i[27] == 1'b0)


    // appended parameter value
    `define MC_BA_MASK_VAL 11'h020
    `define MC_POC_VAL 32'h00000002

    In mc_rf.v
    // origion paramter value
    if(rst) csc_mask_r <= #1 11'h7ff;
    // modified paramter value
    if(rst) csc_mask_r <= #1 `MC_BA_MASK_VAL;

    // origion paramter value
    if(rst_r3) poc <= #1 mc_data_i;
    // modified paramter value
    if(rst_r3) poc <= #1 `MC_POC_VAL;


  • 2009-8-7 20:10:44
  • quote 14.olivercamel
  • 引自 zqiang320
    Thank you first, I have another question about memory controller IP, I find two file have been changed , but I don't know why need to do so:
    ...



    It is too much to explain for these settings of the Memory Controller IP in a feed back comment. Simply speaking these lines give the MC proper address allocation and initial configurations.

    In my thesis I will explain them in detail, which will be hopefully done in the following 2 weeks.
  • 2009-8-10 21:43:41
  • quote 15.zqiang320
  • Thank you! Your paper is very understandable, especially for chapter 5.
  • 2009-8-11 8:20:29
  • quote 16.cao
  • thank you,you paper is such useful for me,but when I used you pc_client,I met a question. for examp
    input:proloader_client -d /dev/com1 hello.ihex -p -r
    pc send ……
    pc receive……
    ……
    after few a few seconds,
    error:ACK data timeout while transfering data,
    even if the .ihex is just a few Kbytes
    I can not find the reason,please help me ,and thanks again.
  • 2010-2-26 9:34:58
  • quote 17.olivercamel
  • 引自 cao
    input:proloader_client -d /dev/com1 hello.ihex -p -r
    pc send ……
    pc receive……
    ……
    after few a few seconds,
    error:ACK data timeout while transfering data,
    even if the .ihex is just a few Kbytes



    Our program loader working in this way: it sends 4 bytes from the PC to the target board, and then it waits the target board to repeat all 4 bytes to make sure the data have been correctly received.

    The "ACK data timeout" error means the PC doesn't receive 1 of the 4 repeated bytes.
  • 2010-3-2 16:32:55
  • quote 18.olivercamel
  • 引自 cao
    input:proloader_client -d /dev/com1 hello.ihex -p -r
    pc send ……
    pc receive……
    ……
    after few a few seconds,
    error:ACK data timeout while transfering data,



    There are many reasons than can cause the problem. It can be either the target board is not sending data well, or the PC doesn't receive it well. For example:
    (1) could be the hardware on target board not working properly in case of handling large amount of data. I don't know if you modified the hardware project or not.
    (2) could be the USB/serial driver under Windows not working properly. We had this problem sometimes. The driver crashed and the Windows gave blue screens.

    I suggest you:
    (1) try to transmit even smaller hex file. Several KB is still too big. Better to start with just several bytes.
    (2) try to resend the same hex file, and notice if the error is always reporting at the same place, i.e. whether or not the error happens after transmit the same fixed amount of data.

  • 2010-3-2 16:45:15
  • quote 19.
  • 很好,希望能够交流
  • 2010-3-8 15:21:49
  • quote 20.Lin
  • 我在这看到了咱俩的劳动成果啊。。。。泪流满面啊! 尤其是回国这将近一年的时间里,找工作的种种不顺。。。。。。
    看到论文不仅让我想起了,咱哥俩在马尔默的青葱岁月!

    Old memories stirred as I looked at our project on your webpage. When I am down and despirted, it gives me courage and keeps me go on.
  • 2010-3-9 11:24:43
  • quote 21.olivercamel
  • 引自 Lin
    我在这看到了咱俩的劳动成果啊。。。。泪流满面啊! 尤其是回国这将近一年的时间里,找工作的种种不顺。。。。。。
    看到论文不仅让我想起了,咱哥俩在马尔默的青葱岁月!

    Old memories stirred as I looked at our project on your webpage. When I am down and despirted, it gives me courage and keeps me go on.


    呵呵,你来得太晚了,现在才看到。还有你英语境界又提升了,现在不光听你的英语口音,连看你写英文也能笑了。祝你在国内一切都好啊。什么时候过来玩。
  • 2010-3-9 16:21:10
  • quote 22.Lin
  • 哈哈! 那是当然了!英语水平突飞猛进啊!!!自行惭愧了吧!!不过你应该看不懂我写的英文啊???居然看懂了,也证明了你的水平提高了。共勉共勉!
  • 2010-3-30 18:21:29
  • quote 23.L
  • 您好,我是一位即将毕业的武汉大学通信工程专业的学生,导师给的题目是 可变速率的ofdm实现 我看了一段时间的书 可是还是没有一点头绪 不知道怎么办..好头疼 具体应该做些什么呢
  • 2010-4-14 17:54:23
  • quote 24.olivercamel
  • 引自 Lin
    哈哈! 那是当然了!英语水平突飞猛进啊!!!自行惭愧了吧!!不过你应该看不懂我写的英文啊???居然看懂了,也证明了你的水平提高了。共勉共勉!


    你可真行,还是那么能贫。呵呵。共勉共勉。
  • 2010-4-20 20:34:11
  • quote 25.olivercamel
  • 引自 L
    您好,我是一位即将毕业的武汉大学通信工程专业的学生,导师给的题目是 可变速率的ofdm实现 我看了一段时间的书 可是还是没有一点头绪 不知道怎么办..好头疼 具体应该做些什么呢


    说实话国内本科生的教育程度做OFDM的题目是有点难度,我当时就是像你这样没有头绪。其实现在也没有把OFDM搞懂。建议你和导师多交流,结合自己的技术水平,把题目具体细化到一个可以实现的工作上来。比如用C语言实现某种算法,或者用FPGA实现一个数字模块,或者用MATLAB做一些分析之类的。如果只做理论上的学习和研究估计是搞不出什么像样的东西来的。

    另外你的留言发错位置了。
  • 2010-4-20 20:40:44
  • quote 26.shitoucheng
  • 你好,我的导师也给了我这样一个题,OFDM系统的仿真和学习,我学理科的,对工科通信很多东西都不太明白。现在我用的是Simulink仿真,可是一直弄不好。现在就上来跟你交流一下。
  • 2010-5-1 23:00:11
  • quote 27.meng
  • 原来你俩在马尔默研究如此深奥之东西,佩服佩服
  • 2010-5-7 20:29:16
  • quote 28.why
  • 你好,
    我想请问一下你有de2-70上wm8731音频采集的控制模块吗?我读过你的论文,但是好像只完成了音频的播放。谢谢。如果有的话,我的工作就大大减轻了。
  • 2010-8-30 21:32:27

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最近发表

Search

联系方式:


Powered By Z-Blog 1.6 Final Build 60816

©2007-2008 Olivercamel.com. All Rights Reserved.

京ICP备06015423