当前位置:网站首页>[tinyriscv verilator] branch transplanted to Da Vinci development board of punctual atom
[tinyriscv verilator] branch transplanted to Da Vinci development board of punctual atom
2022-06-27 23:31:00 【luoganttcc】
Link to the original text
Preface
In order to complete their own design , Have to use OpenOCD As host computer , Under test RISC-V Single step debugging and GDB Debugging and other operations , Then I took a look tinyriscv-verilator Our debugging module supports these operations , So let's transplant this version tinyriscv, Record on a blog .
Some basic operations will not be repeated here , No, readers can go to my other blog : Teach you how to transplant tinyriscv To FPGA On https://blog.csdn.net/qq_44447544/article/details/123251073
One 、 Download the source code
Code cloud link :https://gitee.com/liangkangnan/tinyriscv/tree/verilator/
Package and download , After decompressing , take RTL Add to the new project source code . When I'm done , As shown in the figure below :

You can see jtag Debug module updated , take tap、dtm、dmi as well as dm Modules are implemented independently .
Two 、 Migration to Aritx-7
Development board ; Punctual atom Da Vinci FPGA Development board (v1), The chip model is xc7a35tfgg484-1
The debugger :FT4232H
2.1 add to mmcm IP
stay tinyriscv_soc_top.sv Instantiated in the top-level module mmcm IP, So add , Click on the IP Catalog, Search for Clocking, Select the one shown in the figure below IP:
The configuration is shown in the figure below ;


And then click ok, Pop up window to select Generate.

You can see this IP It's no longer missing .
2.2 Pin restraint
First, let's take a look at this version of tinyriscv Top level interface for :

You can see the sum master The version is almost the same , Removed the separate UART Pins, take UART The function is placed in GPIO In the reuse function . If the pin is constrained , The clock is bound to the clock pin of the board , The reset button is constrained to the button ,halted_ind_pin Signals and dump_wave_en_o The signals are constrained to LED On ,jtag、gpio and flash spi Are constrained to idle IO You can go up. .
Constraint file :
# Clock constraint 50MHz, Duty cycle 50%
create_clock -period 20.000 -name sys_clk_pin -waveform {0.000 10.000} -add [get_ports clk_50m_i]
# Clock pin
set_property -dict {PACKAGE_PIN R4 IOSTANDARD LVCMOS33} [get_ports clk_50m_i]
# Reset pin
set_property -dict {PACKAGE_PIN U2 IOSTANDARD LVCMOS33} [get_ports rst_ext_ni]
# CPU Stop the indicating pin ,halted_ind_pin by 1 Effective when , Lighten up led2
set_property -dict {PACKAGE_PIN V2 IOSTANDARD LVCMOS33} [get_ports halted_ind_pin]
# io_pins Pin
set_property -dict {PACKAGE_PIN F16 IOSTANDARD LVCMOS33} [get_ports {io_pins[0]}]
set_property -dict {PACKAGE_PIN F15 IOSTANDARD LVCMOS33} [get_ports {io_pins[1]}]
set_property -dict {PACKAGE_PIN F13 IOSTANDARD LVCMOS33} [get_ports {io_pins[2]}]
set_property -dict {PACKAGE_PIN E14 IOSTANDARD LVCMOS33} [get_ports {io_pins[3]}]
set_property -dict {PACKAGE_PIN H18 IOSTANDARD LVCMOS33} [get_ports {io_pins[4]}]
set_property -dict {PACKAGE_PIN G17 IOSTANDARD LVCMOS33} [get_ports {io_pins[5]}]
set_property -dict {PACKAGE_PIN H15 IOSTANDARD LVCMOS33} [get_ports {io_pins[6]}]
set_property -dict {PACKAGE_PIN H14 IOSTANDARD LVCMOS33} [get_ports {io_pins[7]}]
set_property -dict {PACKAGE_PIN G13 IOSTANDARD LVCMOS33} [get_ports {io_pins[8]}]
set_property -dict {PACKAGE_PIN J15 IOSTANDARD LVCMOS33} [get_ports {io_pins[9]}]
set_property -dict {PACKAGE_PIN AB18 IOSTANDARD LVCMOS33} [get_ports {io_pins[10]}]
set_property -dict {PACKAGE_PIN G15 IOSTANDARD LVCMOS33} [get_ports {io_pins[11]}]
set_property -dict {PACKAGE_PIN G16 IOSTANDARD LVCMOS33} [get_ports {io_pins[12]}]
set_property -dict {PACKAGE_PIN P20 IOSTANDARD LVCMOS33} [get_ports {io_pins[13]}]
set_property -dict {PACKAGE_PIN P19 IOSTANDARD LVCMOS33} [get_ports {io_pins[14]}]
set_property -dict {PACKAGE_PIN J16 IOSTANDARD LVCMOS33} [get_ports {io_pins[15]}]
# JTAG TCK Pin PortA 0
set_property -dict {PACKAGE_PIN AA8 IOSTANDARD LVCMOS33} [get_ports jtag_TCK_pin]
create_clock -period 300.000 -name jtag_clk_pin [get_ports jtag_TCK_pin]
set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets jtag_TCK_pin]
# JTAG TMS Pin PortA 3
set_property -dict {PACKAGE_PIN AB8 IOSTANDARD LVCMOS33} [get_ports jtag_TMS_pin]
# JTAG TDI Pin PortA 1
set_property -dict {PACKAGE_PIN Y7 IOSTANDARD LVCMOS33} [get_ports jtag_TDI_pin]
# JTAG TDO Pin PortA 2
set_property -dict {PACKAGE_PIN Y8 IOSTANDARD LVCMOS33} [get_ports jtag_TDO_pin]
# SPI dq Pin
set_property -dict {PACKAGE_PIN F14 IOSTANDARD LVCMOS33} [get_ports {flash_spi_dq_pin[0]}]
set_property -dict {PACKAGE_PIN F18 IOSTANDARD LVCMOS33} [get_ports {flash_spi_dq_pin[1]}]
set_property -dict {PACKAGE_PIN D17 IOSTANDARD LVCMOS33} [get_ports {flash_spi_dq_pin[2]}]
set_property -dict {PACKAGE_PIN W22 IOSTANDARD LVCMOS33} [get_ports {flash_spi_dq_pin[3]}]
# SPI SS Pin
set_property -dict {PACKAGE_PIN E13 IOSTANDARD LVCMOS33} [get_ports flash_spi_ss_pin]
# SPI CLK Pin
set_property -dict {PACKAGE_PIN H22 IOSTANDARD LVCMOS33} [get_ports flash_spi_clk_pin]
#SPI Related settings
set_property BITSTREAM.CONFIG.SPI_BUSWIDTH 4 [current_design]
set_property CONFIG_MODE SPIx4 [current_design]
set_property BITSTREAM.CONFIG.CONFIGRATE 50 [current_design]
set_property CFGBVS VCCO [current_design]
set_property CONFIG_VOLTAGE 3.3 [current_design]
set_property BITSTREAM.CONFIG.UNUSEDPIN PULLUP [current_design]
2.3 Comprehensive realization
After the pin is restrained , Carry out comprehensive implementation , The layout is as follows :

Resource utilization ;

3、 ... and 、 A simple test
The generated bitstream is downloaded to the development board , And then through OpenOCD Connect .

You can see that you have successfully connected to . Then log in to the terminal to try single step debugging and breakpoint :
边栏推荐
- Prediction of benign / malignant breast tumors (logistic regression classifier)
- [js]var, let,const 的区别
- MSP430F5529 单片机 读取 GY-906 红外温度传感器
- Design of STM32 and rc522 simple bus card system
- [learn FPGA programming from scratch -48]: Vision - development and application of intelligent sensors
- Discuz小鱼游戏风影传说商业GBK+UTF8版模板/DZ游戏网站模板
- Brief introduction to game phone platform
- virtualbox扩展动态磁盘大小的坑
- 居家办公竟比去公司上班还累?
- [electron] basic learning
猜你喜欢

Stream + Nacos

【微服务|Sentinel】sentinel数据持久化

webService

官宣!Apache Doris 从 Apache 孵化器毕业,正式成为 Apache 顶级项目!

Excel print settings public header

vivado 如何添加时序约束

在线JSON转PlainText工具

【IDEA】IDEA 格式化 代码技巧 idea 格式化 会加 <p> 标签

What if Fiddler fails to listen to the interface
![[Blue Bridge Cup training 100 questions] scratch digital calculation Blue Bridge Cup competition special prediction programming question collective training simulation exercise question No. 16](/img/7c/d4ea8747ce45fd2eb59a8f968653db.png)
[Blue Bridge Cup training 100 questions] scratch digital calculation Blue Bridge Cup competition special prediction programming question collective training simulation exercise question No. 16
随机推荐
【剑指Offer】48. 最长不含重复字符的子字符串
Feign通过自定义注解实现路径的转义
如何设置企业微信群机器人定时发消息?
Summary of solutions to cross system data consistency problems
文献综述如何挑选文献进行阅读,比如我的检索结果有200多篇根本看不完,如何进行文献挑选呢?...
[sword finger offer] 48 Longest substring without duplicate characters
ABAP essay - material master data interface enhancement - tab enhancement
[essay]me53n add button to call URL
C WinForm reads the resources picture
「R」 Using ggpolar to draw survival association network diagram
【经典干货书】数据科学中的信息理论方法,561页pdf
Google Earth Engine(GEE) 03-矢量数据类型
PE buys a underwear company
手把手教你移植 tinyriscv 到FPGA上
Is the dog virtue training with a monthly salary of 30000 a good business?
How to start ID from 1 after MySQL deletes a table
华为伙伴暨开发者大会2022 | 麒麟软件携手华为共建计算产业,共创数智未来
pytorch 入门指南
[electron] 基础学习
Excel print settings public header
