The simulation of wujian100

Envrionment

Ubuntu18.04

1、Get Started

1.1 make a directory named Project

mkdir Project
cd Project

1.2 clone the wujian100_open

git clone https://github.com/T-head-Semi/wujian100_open.git 
or
git clone git@github.com:T-head-Semi/wujian100_open.git

2、Download C/C++ Complier

2.1 make a directory named riscv_toolchain

mkdir riscv_toolchain

2.2 download the tool chain from the url: https://www.t-head.cn/product/mcu-platform?spm=a2ouz.12987052.0.0.167548abiiSAQs

2.3 install the tool chain to the directory of riscv_toolchain

 tar -zxvf riscv64-elf-x86_64-20190731.tar.gz

3、Download open source EDA tools

sudo yum install iverilog verilator gtkwave

4、Start simulation

4.1 change the wujian100_open/tool/setup.csh

#set iverilog path
export iverilog_path='/usr/bin'
export gtkwave_path='/usr/bin'
export path='$iverilog_path $path'
export path='$gtkwave_path $path'


#set tools path
export TOOL_PATH='../../riscv_toolchain'


export wujian100_open_PATH='`pwd | perl -pe "s/wujian100_open.*/wujian100_open\//"`'

4.2

cd wujian100_open/tool
source setup.csh         
cd wujian100_open/workdir
../tools/run_case -sim_tool iverilog ../case/timer/timer_test.c

5、Result

1、The output of terminal

VCD info: dumpfile test.vcd opened for output.
	******START TO LOAD PROGRAM******
	
Hello Friend!
timer test successfully
***************************************
*              Test Pass              *
***************************************

2、watch the wave(test.vcd) using gtkwave
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值