在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 4875|回复: 31

[资料] 100核的开源RISC-V SOC

[复制链接]
发表于 2022-12-14 02:18:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
本帖最后由 轩辕志瑜 于 2022-12-15 18:16 编辑

mpsoc_100x_white.png

注意:使用本项目需要具备自行编译工具链的能力否则就会出现如5楼的情况。使用他人项目本就得要有同等的能力也就是得自己折腾否则就花钱让原作者或他人给你把环境弄好,希望下载的各位明白这一点。
mpsoc_example.z01.zip (24.41 MB, 下载次数: 92 )
mpsoc_example.z02.zip (24.41 MB, 下载次数: 92 )
mpsoc_example.z03.zip (24.41 MB, 下载次数: 89 )
mpsoc_example.zip (13.84 MB, 下载次数: 89 )
项目作者履历
截图_2022-12-15_11-44-12.png

成功编译的gif录像(录像很慢)
tty.gif

成功编译的终端录制文件,两款软件录制,内容一样(删除zip后缀名即可)
重放命令 asciinema play mpsoc_example.cast


mpsoc_example.cast.zip (108.55 KB, 下载次数: 34 )

重放命令 ttyplay mpsoc_example.ttyrec

mpsoc_example.ttyrec.zip (102.85 KB, 下载次数: 36 )

成功编译的日志文件 out_log.txt (97.46 KB, 下载次数: 27 )

仿真后的波形文件
waves.fst.zip (127.96 KB, 下载次数: 33 )






发表于 2022-12-14 08:25:00 | 显示全部楼层
感谢大神分享
发表于 2022-12-14 09:30:21 | 显示全部楼层
 楼主| 发表于 2022-12-14 15:23:07 | 显示全部楼层
本帖最后由 轩辕志瑜 于 2022-12-14 15:46 编辑


是这个文章和这项目, 能在论坛或公共场合分享也就这几样资源
1. 学习资源\学生级的项目, 这种资源只是用来学习没有商业价值可以随意分享.(在论坛上很常见, 几乎八九成都是这些资源)
2. 私人项目.(这些资源我是不会上传论坛, 在论坛上也几乎没有别人分享自己的私人项目)
3. 开源项目, 随意分享.

发表于 2022-12-14 15:57:58 | 显示全部楼层
最终的结果如下:
make[2]: Leaving directory '/git/mpsoc_example'
g++  -I.  -MMD -I/usr/local/share/verilator/include -I/usr/local/share/verilator/include/vltstd -DVM_COVERAGE=0 -DVM_SC=0 -DVM_TRACE=0 -DVM_TRACE_FST=0 -Wno-sign-compare -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable -Wno-shadow     -I../tb/elfio -O3 -g3 -Wall -Werror -DIRAM_KB_SIZE="8" -DDRAM_KB_SIZE="8" -DWAVEFORM_FST="/tmp/waves.fst" -DEN_FST="1" -I../tb/elfio -I./rtl/ravenoc/src/include +define+IRAM_KB_SIZE=8 +define+DRAM_KB_SIZE=8 +define+JTAG_BOOT=1 +define+SIMULATION -o mpsoc -O3 -Wno-CASEINCOMPLETE -Wno-WIDTH -Wno-COMBDLY -Wno-UNOPTFLAT -Wno-LITENDIAN -Wno-UNSIGNED -Wno-IMPLICIT -Wno-CASEWITHX -Wno-CASEX -Wno-TIMESCALEMOD -Wno-BLKANDNBLK -Wno-CMPCONST -Wno-MODDUP -Wno-UNOPTTHREADS -Wno-INSECURE --exe --trace --trace-depth 10000 --trace-structs --trace-fst --trace-max-array 10000 --trace-max-width 10000 --cc    -DVL_THREADED -std=gnu++11 -Os -c -o Vmpsoc.o Vmpsoc.cpp
g++: error: +define+IRAM_KB_SIZE=8: No such file or directory
g++: error: +define+DRAM_KB_SIZE=8: No such file or directory
g++: error: +define+JTAG_BOOT=1: No such file or directory
g++: error: +define+SIMULATION: No such file or directory
g++: error: 10000: No such file or directory
g++: error: 10000: No such file or directory
g++: error: 10000: No such file or directory
g++: error: unrecognized command line option ‘--exe’
g++: error: unrecognized command line option ‘--trace-depth’
g++: error: unrecognized command line option ‘--trace-structs’
g++: error: unrecognized command line option ‘--trace-fst’
g++: error: unrecognized command line option ‘--trace-max-array’
g++: error: unrecognized command line option ‘--trace-max-width’
g++: error: unrecognized command line option ‘--cc’
make[1]: *** [/usr/local/share/verilator/include/verilated.mk:235: Vmpsoc.o] Error 1
make[1]: Leaving directory '/git/mpsoc_example/output_verilator'
make: *** [makefile:123: output_verilator/mpsoc] Error 2
(base) ➜  mpsoc_example gitmaster)

 楼主| 发表于 2022-12-14 16:02:03 | 显示全部楼层


Newstyle 发表于 2022-12-14 15:57
最终的结果如下:
make[2]: Leaving directory '/git/mpsoc_example'
g++  -I.  -MMD -I/usr/local/share/v ...


你看一下你的g++版本是多少? 如果太旧就更新一下.
发表于 2022-12-14 16:06:52 | 显示全部楼层
(base) ➜  mpsoc_example gitmaster) gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
发表于 2022-12-14 16:08:25 | 显示全部楼层
本帖最后由 Newstyle 于 2022-12-14 16:10 编辑

切换为高版本gcc一样
[root@Linux mpsoc_example]# scl enable devtoolset-11 bash
[root@linux mpsoc_example]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-11/root/usr --mandir=/opt/rh/devtoolset-11/root/usr/share/man --infodir=/opt/rh/devtoolset-11/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20220127/obj-x86_64-redhat-linux/isl-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.1 20220127 (Red Hat 11.2.1-9) (GCC)
[root@linux mpsoc_example]# make all
make[1]: Entering directory '/git/mpsoc_example/output_verilator'
g++  -I.  -MMD -I/usr/local/share/verilator/include -I/usr/local/share/verilator/include/vltstd -DVM_COVERAGE=0 -DVM_SC=0 -DVM_TRACE=0 -DVM_TRACE_FST=0 -Wno-sign-compare -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable -Wno-shadow     -I../tb/elfio -O3 -g3 -Wall -Werror -DIRAM_KB_SIZE="8" -DDRAM_KB_SIZE="8" -DWAVEFORM_FST="/tmp/waves.fst" -DEN_FST="1" -I../tb/elfio -I./rtl/ravenoc/src/include +define+IRAM_KB_SIZE=8 +define+DRAM_KB_SIZE=8 +define+JTAG_BOOT=1 +define+SIMULATION -o mpsoc -O3 -Wno-CASEINCOMPLETE -Wno-WIDTH -Wno-COMBDLY -Wno-UNOPTFLAT -Wno-LITENDIAN -Wno-UNSIGNED -Wno-IMPLICIT -Wno-CASEWITHX -Wno-CASEX -Wno-TIMESCALEMOD -Wno-BLKANDNBLK -Wno-CMPCONST -Wno-MODDUP -Wno-UNOPTTHREADS -Wno-INSECURE --exe --trace --trace-depth 10000 --trace-structs --trace-fst --trace-max-array 10000 --trace-max-width 10000 --cc    -DVL_THREADED -std=gnu++11 -Os -c -o Vmpsoc.o Vmpsoc.cpp
g++: error: unrecognized command-line option ‘--exe’
g++: error: unrecognized command-line option ‘--trace-depth’
g++: error: unrecognized command-line option ‘--trace-structs’; did you mean ‘--pack-struct’?
g++: error: unrecognized command-line option ‘--trace-fst’; did you mean ‘--tracer’?
g++: error: unrecognized command-line option ‘--trace-max-array’
g++: error: unrecognized command-line option ‘--trace-max-width’
g++: error: unrecognized command-line option ‘--cc’
make[1]: *** [/usr/local/share/verilator/include/verilated.mk:235: Vmpsoc.o] Error 1
make[1]: Leaving directory '/git/mpsoc_example/output_verilator'
make: *** [makefile:123: output_verilator/mpsoc] Error 2
发表于 2022-12-14 16:10:45 | 显示全部楼层
verilator版本:

[root@Linux mpsoc_example]# verilator --version
Verilator 4.199 devel rev v4.110-37-g29ed86606
发表于 2022-12-14 16:17:51 | 显示全部楼层
这里面的第一个坑是如下:

g++  -I.  -MMD -I/usr/local/share/verilator/include -I/usr/local/share/verilator/include/vltstd -DVM_COVERAGE=0 -DVM_SC=0 -DVM_TRACE=1 -DVM_TRACE_FST=1 -Wno-sign-compare -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-variable -Wno-shadow     -I../tb/elfio -O3 -g3 -Wall -Werror -DIRAM_KB_SIZE="8" -DDRAM_KB_SIZE="8" -DWAVEFORM_FST="/tmp/waves.fst" -DEN_FST="1" -Wunknown-warning-option  -DVL_THREADED -std=gnu++11 -Os -c -o testbench.o ../tb/testbench.cpp
g++: error: unrecognized command-line option ‘-Wunknown-warning-option’
make[1]: *** [Vmpsoc.mk:63: testbench.o] Error 1
make[1]: Leaving directory '/git/mpsoc_example/output_verilator'
make: *** [makefile:123: output_verilator/mpsoc] Error 2
需要修改-Wunknown-warning-option,这个注释。具体文件在
vmpsoc_hierMkargs.f最后一行,需要修改。
原始内容:
"-CFLAGS" "-I../tb/elfio -O3 -g3 -Wall -Werror -DIRAM_KB_SIZE=\"8\" -DDRAM_KB_SIZE=\"8\" -DWAVEFORM_FST=\"/tmp/waves.fst\" -DEN_FST=\"1\" -Wunknown-warning-option" "-I../tb/elfio" "-Irtl/ravenoc/src/include" "+define+IRAM_KB_SIZE=8" "+define+DRAM_KB_SIZE=8" "+define+JTAG_BOOT=" "+define+SIMULATION" "-o" "mpsoc" "-O3" "-Wno-CASEINCOMPLETE" "-Wno-WIDTH" "-Wno-COMBDLY" "-Wno-UNOPTFLAT" "-Wno-LITENDIAN" "-Wno-UNSIGNED" "-Wno-IMPLICIT" "-Wno-CASEWITHX" "-Wno-CASEX" "-Wno-TIMESCALEMOD" "-Wno-BLKANDNBLK" "-Wno-CMPCONST" "-Wno-MODDUP" "-Wno-UNOPTTHREADS" "-Wno-INSECURE" "--exe" "--trace" "--trace-depth" "10000" "--trace-structs" "--trace-fst" "--trace-max-array" "10000" "--trace-max-width" "10000" "--cc"

修改后的内容:
"-CFLAGS" "-I../tb/elfio -O3 -g3 -Wall -Werror -DIRAM_KB_SIZE=\"8\" -DDRAM_KB_SIZE=\"8\" -DWAVEFORM_FST=\"/tmp/waves.fst\" -DEN_FST=\"1\" "-I../tb/elfio" "-Irtl/ravenoc/src/include" "+define+IRAM_KB_SIZE=8" "+define+DRAM_KB_SIZE=8" "+define+JTAG_BOOT=" "+define+SIMULATION" "-o" "mpsoc" "-O3" "-Wno-CASEINCOMPLETE" "-Wno-WIDTH" "-Wno-COMBDLY" "-Wno-UNOPTFLAT" "-Wno-LITENDIAN" "-Wno-UNSIGNED" "-Wno-IMPLICIT" "-Wno-CASEWITHX" "-Wno-CASEX" "-Wno-TIMESCALEMOD" "-Wno-BLKANDNBLK" "-Wno-CMPCONST" "-Wno-MODDUP" "-Wno-UNOPTTHREADS" "-Wno-INSECURE" "--exe" "--trace" "--trace-depth" "10000" "--trace-structs" "--trace-fst" "--trace-max-array" "10000" "--trace-max-width" "10000" "--cc"
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-22 09:12 , Processed in 0.023798 second(s), 8 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表