To create a SoC sub-system based on minsoc and OpenRISC
STEPS
- obtain minsoc and OpenRISC from SVN repository$ (origin) svn co http://opencores.org/ocsvn/minsoc/minsoc/trunk minsoc 
 $ (subsoc) git clone git://github.com/artek/minsoc.git minsoc
 $ svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk openrisc
- follow steps for "GNU tool chain with newlib"- build and install or1ksimedit /etc/ld.so.conf.d/or32.conf, and add /opt/or1ksim/lib 
- install required library (MFP, MPFR) for building toolchain$ sudo apt-get install libgmp3-dev libmpfr-dev dejagnu expectk 
- build toolchain with newlib$ cd openrisc/gnu-src 
 $ sudo ./bld.sh --prefix /opt/or32-elf-new --or1ksim /opt/or1ksim --force
- add or32-gcc and or1ksim binary to $PATHexport PATH=${PATH}:/opt/or32-elf/bin:/opt/or1ksim/bin 
 
- build and install or1ksim
- refer to "Howto: Porting Newlib" to bring up your own BSP- config new target as "NON-REENTRANT", "NOT NAMESPACE CLEAN" to reduce generated code size
- config new target with "-DSMALL_MEMORY" to reduce page size from 4KB to 128B for malloc
- edit configure.host:or32-*-*) 
 # syscall_dir=syscalls
 newlib_cflags="${newlib_cflags} -DMISSING_SYSCALL_NAMES -DSMALL_MEMORY"
 ;;
 
- follow the minsoc-HOWTO for simulation
 evince minsoc/doc/howto.pdf
- FPGA Impmentation- add minsoc_sub to your toplevel
- update "Verilog Include Directories" for minsoc to Synthesis options of ISE../../rtl/minsoc/rtl/verilog/ (for minsoc) 
 |../../rtl/minsoc/rtl/verilog/or1200/rtl/verilog/ (for or1200)
 |../../rtl/minsoc/rtl/verilog/uart16550/rtl/verilog/ (for uart16550)
 
- check out openrisc repository from opencores
 svn co http://opencores.org/ocsvn/openrisc/openrisc/trunk openrisc
- build up toolchain
 cd toolchain_install_scripts/- sudo ./crossbuild.sh
 build or32 toolchain and install it to /usr/local/
- sh MOF_ORSOC_TCHN_v5c_or32-elf.sh
 build toolchain and or1ksim to specified path
 
- sudo ./crossbuild.sh
CONS
- or32 ld does not support --gc-sections
 
2 則留言:
你好,
小弟是新手,目前正在study如何把OpenRISC弄到Spartan3E or Vertex3上跑起來。發現網站上的文件和project相當得多,不知道哪邊有比較統一的step-by-step文件,或者建議看的網站,目前找了幾個網頁講的各自不同,目錄結構也都不盡相同,不知道該follow哪個。
Hi Green,
不好意思,平常很少上 Blog,現在才看到你的留言。
我當時是照 minsoc 的方法做了一遍,先弄一個可以跑 simulation 的環境出來,然後再修改成我想要的樣子 -- subsoc。我沒有做文件,但 source code 有放在 github 上。
張貼留言