I am currently working on a GUI project and I want to try to implement a simple GUI with an FPGA. The hardware basic module and the entire hardware system have been designed, but the software program is still in the debugging stage. Due to the large program, the internal BRAM of the FPGA is completely insufficient. Only the running program can be put into the DDR DRAM. This led to a two-step process for FPGA programming:
1. Use Impact to download the Download.bit file to the FPGA first (Download.bit file only contains bootloop.elf)
2. Download the executable.elf file to DDR SDRAM via XMD, then run the program
Because each time the program changes need to be re-downloaded, it is often necessary to enter the same command in EDKshell or in the XMD terminal.
Why is the repetitive work not done by the computer?
The following gives a solution, although not perfect, but it is enough for my debugging. Specific steps are as follows:
Write a script for downloading bistream files to the FPGA. Of course, the script is definitely based on Impact. Here is the script file, download.cmd
The contents of the script are as follows:
setMode -bscan
setCable -p auto
idenTIfy
Assignfile -p 3 -file download.bit
Program -p 3
Quit
Write a script that downloads the executable file into memory or BRAM via XMD and names it xmd.opt
The contents of the script are as follows:
Connect mb mdm;
Dow executable.elf;
Con;
Put download.bit, executable.elf, xmd.opt, and download.cmd in a folder
Open the EDK Shell, cd to the folder directory you just created, and then run the following command:
$impact –batch download.cmd && xmd –opt xmd.opt
5. Edit a download.tcl file with the following contents
Impact –batch download.cmd;
Xmd –opt xmd.opt;
Then run the following command in EDKshell:
$source download.tcl
in conclusion:
Edit three script files separately
Batch file (.cmd) run with impact
Script file (.opt) running with XMD
Generic script (.tcl) running with source
Finally run under the EDK Shell
As for each command of the script, there is no explanation here. If you are interested, you can refer to the following documents:
Impact User Manual
XMD Operation Manual ~helinski/files/ECE344/T1_XMD%20commands%20REFERENCE%20V2.pdf
Revesion
V0.1 2010.12.08 KiKi file created
V0.2 2010.12.14 KiKi add content related tcl script
Pin Header Connector,A-Type Dual Base Pin Header Connector,A-Type Single Base Pin Header Connector,Four Row R/A Pin Header Connector
Dongguan Yangyue Metal Technology Co., Ltd , https://www.yyconnector.com