閱讀本文前,請先閱讀:
(1)【教程】Xilinx Vivado/Vitis 2020.1創建最簡單的MicroBlaze工程運行Hello World C語言程序(不使用外部DDR3內存),并固化到SPI Flash
https://blog.csdn.net/ZLK1214/article/details/111824576
(2)Xilinx 2020.1 MIG核讀寫DDR3內存,新建工程時配置MIG核的完整步驟
https://blog.csdn.net/ZLK1214/article/details/111349678
添加了DDR3內存以后,程序既可以運行在BRAM里面,也可以運行在DDR3內存里面。但如果運行在DDR3內存里面,固化起來會比較麻煩,需要借助SREC SPI Bootloader。
建立帶DDR3內存的MicroBlaze工程的方法很簡單:以不帶DDR3的工程(1)為基礎,只需要在Clocking Wizard和Processor System Reset之間插入一個MIG IP核就可以了。

原本,Clocking Wizard輸出的時鐘是100MHz,是直接接到Processor System Reset上的。
修改后,兩者中間插入了一個MIG。Clocking Wizard的時鐘輸出變成了200MHz,給MIG提供時鐘。在MIG的內部由PLL倍頻到400MHz驅動外部DDR3內存,然后再分頻到100MHz從ui_clk引腳輸出出來,給Processor System Reset提供時鐘。
修改后,MicroBlaze的運行頻率沒有變,仍然是100MHz。
建立工程的時候一定要小心使用Vivado的自動連線的功能,操作不當的話很容易產生兩個Processor System Reset。
下面詳細說明一下工程的建立步驟。
首先在空白Block Design里面添加Clocking Wizard和MIG IP核:

修改Clocking Wizard的配置:

MIG的詳細配置請參考上面的文章(2),關鍵配置單獨挑出來說明一下:


現在可以添加MicroBlaze核了,添加后點擊Run Block Automation,請注意時鐘的選擇:


點擊Run Connection Automation,通過一個新建的AXI SmartConnect將MIG的S_AXI和MicroBlaze連接起來:

自動連接剩余的接口:


添加AXI Uartlite串口,用于printf打印:

Run Connection Automation,將Uartlite與MicroBlaze連在一起:

最終連線結果:

地址分配:

引腳配置:

綜合時會提示BANKBONE錯誤:

[Place 30-575] Sub-optimal placement for a clock-capable IO pin and MMCM pair. If this sub optimal condition is acceptable for this design, you may use the CLOCK_DEDICATED_ROUTE constraint in the .xdc file to demote this message to a WARNING. However, the use of this override is highly discouraged. These examples can be used directly in the .xdc file to override this clock rule.
design_1_i/clk_wiz_0/inst/clkin1_ibufg (IBUF.O) is locked to IOB_X1Y26
design_1_i/clk_wiz_0/inst/mmcm_adv_inst (MMCME2_ADV.CLKIN1) is provisionally placed by clockplacer on MMCME2_ADV_X1Y1
The above error could possibly be related to other connected instances. Following is a list of
all the related clock rules and their respective instances.
Clock Rule: rule_mmcm_bufg
Status: PASS
Rule Description: An MMCM driving a BUFG must be placed on the same half side (top/bottom) of the device
design_1_i/clk_wiz_0/inst/mmcm_adv_inst (MMCME2_ADV.CLKFBOUT) is provisionally placed by clockplacer on MMCME2_ADV_X1Y1
and design_1_i/clk_wiz_0/inst/clkf_buf (BUFG.I) is provisionally placed by clockplacer on BUFGCTRL_X0Y31
將錯誤信息中提示的代碼加入xdc文件就可以屏蔽掉此錯誤:


審核編輯:符乾江
-
DDR3
+關注
關注
2文章
276瀏覽量
42389 -
MicroBlaze
+關注
關注
3文章
68瀏覽量
21594
發布評論請先 登錄
相關推薦
使用MCUXpresso for VS Code插件開發Zephyr的hello world

Xilinx_Vivado_SDK的安裝教程

C語言中的socket編程基礎
使用Vivado通過AXI Quad SPI實現XIP功能

如何在i2c中將hello world發送到LCD屏幕?
esp32運行make flash燒寫hello world遇到的疑問求解
鴻蒙OpenHarmony【輕量系統 編寫“Hello World”程序】 (基于Hi3861開發板)

鴻蒙OpenHarmony【小型系統 編寫“Hello World”程序】 (基于Hi3516開發板)

鴻蒙OpenHarmony【標準系統 編寫“Hello World”程序】(基于RK3568開發板)

鴻蒙OpenHarmony【標準系統編寫“Hello World”程序】 (基于RK3568開發板)

鴻蒙OpenHarmony【小型系統編寫“Hello World”程序】 (基于Hi3516開發板)

鴻蒙OpenHarmony【輕量系統編寫“Hello World”程序】 (基于Hi3861開發板)

全志D1s開發板軟件入門之Hello World演示
用于EK-RA8D1 MIPI LCD顯示器的GUIX Hello World

評論