FPGA: add README.md

Signed-off-by: liangkangnan <liangkangnan@163.com>
pull/1/head
liangkangnan 2020-04-25 20:13:58 +08:00
parent c40dd0c603
commit ea21ca6a38
20 changed files with 115 additions and 0 deletions

115
FPGA/README.md Normal file
View File

@ -0,0 +1,115 @@
# 1.概述
介绍如何将tinyriscv移植到FPGA平台上。
1.软件xilinx vivado(以2018.1版本为例)开发环境。
2.FPGAxilinx Artix-7 35T。
# 2.步骤
## 2.1创建工程
首先打开vivado软件新建工程方法如下图所示
![](./images/create_prj_1.png)
或者通过File菜单新建工程如下图所示
![](./images/create_prj_2.png)
然后进入下一步,如下图所示:
![](./images/create_prj_3.png)
直接点击Next按钮进入下一步如下图所示
![](./images/create_prj_4.png)
输入工程名字和工程路径勾选上Create project subdirectiry选项然后点击Next按钮如下图所示
![](./images/create_prj_5.png)
选择RTL Project并勾选上Do not specify sources at this time如下图所示
![](./images/create_prj_6.png)
在Search框里输入256-1然后选中xc7a35tftg256-1这个型号然后点击Next按钮如下图所示
![](./images/create_prj_7.png)
直接点击Finish按钮。
至此,工程创建完成。
## 2.2添加RTL源文件
在工程主界面点击左侧的Add Sources按钮如下图所示
![](./images/add_src_1.png)
进入到如下图的界面:
![](./images/add_src_2.png)
选中第二项Add or create design sources然后点击Next按钮如下图所示
![](./images/add_src_3.png)
点击Add Directories按钮选择tinyriscv项目里的整个rtl文件夹如下图所示
![](./images/add_src_4.png)
勾选上红色框里那两项然后点击Finish按钮。
至此RTL源文件添加完成。
## 2.3添加约束文件
在工程主界面点击左侧的Add Sources按钮如下图所示
![](./images/add_src_1.png)
进入到如下图的界面:
![](./images/add_src_5.png)
选择第一项Add or create constraints然后点击Next按钮如下图所示
![](./images/add_src_6.png)
点击Add Files按钮选择tinyriscv项目里的FPGA/constrs/tinyriscv.xdc文件如下图所示
![](./images/add_src_7.png)
勾选上Copy constraints files into project然后点击Finish按钮。
至此,约束文件添加完成。
## 2.4生成Bitstream文件
点击下图所示的Generate Bitstream按钮即可开始生成Bitstream文件。
这包括综合、实现(布局布线)等过程,因此时间会比较长。
![](./images/add_src_8.png)
## 2.5下载Bitstream文件到FPGA
连接好下载器和FPGA开发板将下载器插入PC然后给板子上电接着点击vivado主界面的左下角的Open Hardware Manager按钮如下图所示
![](./images/download_1.png)
接着点击Open target按钮然后选择Auto Connect如下图所示
![](./images/download_2.png)
连接成功后点击Program device按钮如下图所示
![](./images/download_3.png)
弹出如下界面然后直接点击Program按钮。
![](./images/download_4.png)
至此Bitstream文件即可下载到FPGA。

BIN
FPGA/images/add_src_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

BIN
FPGA/images/add_src_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
FPGA/images/add_src_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
FPGA/images/add_src_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
FPGA/images/add_src_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
FPGA/images/add_src_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
FPGA/images/add_src_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
FPGA/images/add_src_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

BIN
FPGA/images/download_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
FPGA/images/download_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
FPGA/images/download_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
FPGA/images/download_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB