SOC -- Hellow_World experiment based on objective Q, objective qhellow_world
ZYNQ is a SOC chip, before using VGA experiments only PL (Programmable Logic) part, and the most prominent function of ZYNQ is the internal dual-core Cortex-A9, so from now on, I will learn the SOC of semi Q (PS ).
The purpose of this experiment is to familiarize yourself with the usage of Processor Subsystem in Qaq, understand the development board resources, and create a minimum system Hellow world, use resources include ARM Cortex-A9, DDR3 memory, a UART serial port. The experiment content is to load the written program into the DDR memory, and then the CPU executes it one by one, so the execution can be observed through serial port printing.
Resources required for this experiment, CPU XC7Z010 (XC7Z010-1CLG400C), two MT41J128M16JT-125 or MT41K128M16JT-125 512 MB DDR3, after the experiment confirmed that my board is two pieces of MT41K128M16JT-125 512 MB DDR3.
I. Hardware
Select QSPI Flash patch cord cap on the Development Board
Do not change the power supply mode. Select USB Power Supply
The first step is to use Vivado to create a project named Hellow_world. The new project is omitted here. The process for creating a project is similar to that for using Vivado.
Click create block design and set the name to system.
Click the icon to add an IP address and select route Q7 Processing System.
Click Run Block Automation.
Click OK without doing anything.
Two outputs are generated on the graph.
By connection.
Double-click the IP core to go to the settings page, click clock configuration to set the input clock, and press.
Click set MIO configuration settings.
Set ddr I am using the official Qaq here, check the manual's DDR configuration, and click OK after completing the settings.
Go to the project, right-click system, and select generate output products,
Right-click system, select Create HDL Wrapper, and select OK.
Click the icon to generate the circuit.
It may take several minutes. After the generation is complete, click File to select Export, select Export Hardware, select include bitsteam, and then OK.
Click File, launch SDK, and OK to complete the hardware platform construction.
Ii. Software
After the SDK is enabled, click File-New-application Porject and enter the project name Hellow_World. For other configurations, click Next.
Here we select the official test project Hellow_World.
The two files Hellow_World and Hellow_World_bsp are generated. Right-click Hellow_World and choose Debug As-Debug configuration. Configure as shown in, click apply, and then click debug.
Click Configure serial port.
After the configuration is complete, click run to run, the serial port will be printed out, Hellow_World.
The test is correct. We can also look at the code.
1 #include <stdio.h> 2 #include "platform.h" 3 4 void print(char *str); 5 6 int main() 7 { 8 init_platform(); 9 10 print("Hello World\n\r");11 12 cleanup_platform();13 return 0;14 }
This part of the code is also very simple. Two header files, one display output function, and the other is the main function. The main function is also very simple, so we have completed the first program Hellow_World Based on the rabbitq SOC. If you didn't print Hellow World from a serial port like me, it indicates which of the following steps is wrong. Please check it carefully. If there is any error in this article, please contact the blogger for further discussion!
For more information, see NingHeChuan)
Individual subscription number: open-source FPGANingHeChuan
If you want to receive a blog post pushed by someone in time, you can scan the QR code on the left (or long-Press the QR code to identify it) to follow the personal subscription number.
Zhihu ID: NingHeChuan
Weibo ID: NingHeChuan
Address: http://www.cnblogs.com/ninghechuan/p/7324499.html