wujian100 operation guide
I. Deploy to Perf-V
1. Create a new project folder.
2. Open vivado and create a project, paying attention to the chip model selection.
3. Add verilog source code: pay attention to add the top file first. There are two top files, one in the fpga directory (for comprehensive implementation) and one in the SOC directory (for simulation). At this time, you should add top in the fpga directory file, and then add all files in the SOC directory except the top file.
4. After the file is added, VIVADO will automatically identify, compile, and analyze it. VIVADO analyzes the errors in the file and marks them with a red wavy line (the reason for the error is that the header file is not recognized, and the four file types can be changed to the header file type).
5. Add pin constraints according to the perfv development board manual.
6. Synthesize and realize after the synthesis is correct
7. If the result is abnormal after implementation, timing constraints need to be performed, and create_clock -period 50.00 -name MAIN_CLK [get_ports PIN_EHS] 和 set_false_path -from [get_ports PIN_EHS] -to [get_pins x_cpu_top/CPU/x_cr_tcipif_top/x_cr_coretim_top/refclk_ff1_reg/D] is added to the constraint file.
8. Implement again, without the previous timing problem, generate a bit stream file, and burn the bit file into the development board.
II. Environment Construction
2.1 ckserver installation and configuration
Unzip the CSKY-DebugServer-windows*.zip file, double-click to run the extracted Setup.exe, and the ckserver installation interface will pop up, click next.
Please check the software usage agreement of ckserver carefully, and click yes to continue after confirming.
Enter the user name and company name, select the user, and click next.
Select the installation directory:
Select the installation content, among which: C-SKY Debug Proxy Server is the C-SKY debug proxy program; ICE Driver is the ICE device driver installation; Tutorial is the user manual. It is recommended to select all and click next.
This page will display the user information and installation directory, click Next to start the installation after confirmation.
Continue to the next step to complete the installation.
After the installation is complete, set the parameters:
(1) target configuration window
[Setting->Target Setting] opens the Configuration Information dialog. as the picture shows,
- Debug Arch Select Select debug architecture, select CSKY HAD and RISCV DM
- ICE Vendor Select: Select ICE devices from different manufacturers, the default is CK-Link
- ICE Device Select(Free)：Specify ICE connection
- ICE Setting is set to use ICE as the connection target information, including: ICE frequency, mtcr delay
- NReset Delay: Set the NReset delay to ensure that the ICE can generate a stable hardware reset (nreset) signal, the unit is 10us, and the default is 1ms.
- TReset Delay: Set the TReset delay to ensure that the ICE can generate a stable reset signal to reset the HAD state machine, the unit is 10us, and the default is 1.1ms.
- Reset Wait: Set the delay to ensure that the reset process of the target board ends after the target board receives the reset signal. The default is 50ms.
- Use DDC: Select whether to use the DDC pass-through channel for downloading.
- Enable TRST: Whether to execute TRST when Reset Target is executed
- LocalSemiHost：Refers to whether the program is completed by ckserver when a semihosting request occurs, and it is completed by GDB by default.
(2) Socket port settings
[Target Setting->Socket Setting] open the Socket Port Settings dialog box, as shown in the figure:
Enter the port number manually, the default value is 1025.
(3) Firmware upgrade dialog
[Tools->UpgradeFirmware] open the firmware upgrade dialog box, as shown in the figure:
Just select the upgrade file corresponding to your ICE device. The upgrade file must be consistent with the type of ICE box. The specific correspondence is as follows:
(4) Had register operation window
[Tools->HAD Register] open the operation dialog of the HAD register, you can read and write the HAD register as shown in the figure:
2.2 ICE driver installation
1. In "2.1.2 ckserver installation steps", if the ICE Driver option is checked. Then the ckserver installation process will copy the driver related files to the system directory.
2. Reconnect your ICE device to the PC,
- If you are using the Windows 7 system, the driver will be automatically installed after the device is plugged in;
- If you are using Windows XP or below, after the ICE device is reconnected, the system will prompt the device to install the driver. Take CKLink-Lite V1 as an example, the steps are as follows:
The system pops up the hardware installation wizard, select "Automatically install the software", click Next to complete the installation
III. Compile and download the project
1. Use cdk to open and compile the project, double-click to open the project file (such as the hello_word project)
Right-click the project and select build, as shown in the figure
2. Run the project
Click "view", select "serial pane" to open the serial port tool of cdk, connect the serial port of the development board, right-click the serial pane window, select settings, and set the baud rate to 115200, as shown in the figure:
3. Click the "Start/Stop Debugger" button to start debugging, and the Serial pane window will print out the string "hello word" (the program is modified to Hello Perfxlab) after the project is running.
The results of running the project in the sdk\projects\benchmark\dhrystone directory are as follows:
The results of running the project in the sdk\projects\benchmark\ coremark directory are as follows