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 [email protected]: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
在这里插入图片描述

你可能感兴趣的:(The simulation of wujian100)