If you just went through the last blog post about creating a Vivado project you are probably exhausted. Thankfully there is a much easier way to develop your VHDL code via a scripting methodology. This post will perform the exact same task as the previous post but with only the click of a single button. There are a couple steps that one needs to take however in order to setup the scripting environment. The first step is to make sure that the correct version of Vivado is listed on the system path. On Windows 7 you will need to open up the system properties window and then click on environment variables.
After you have added Vivado to the system path, pull down the blink.zip file and the blink_ip file shown below.
Remember that it doesn't matter where you save your blink project or your blink IP as long as the ip_repo_paths property is correctly set in the project.tcl file as shown below. We will cover the project.tcl file in the next section.
You can see in the below image that the blink.zip file contains a src folder as well as a project.tcl file and a batch file. The project.tcl file contains all of the Vivado project information that was generated via the GUI in the previous blog post, and the batch file simply kicks off the Vivado project file.
It is important to note that the script file has four main options that can be set by the user.
Inside the src folder there are two files.
After clicking on "startScript.bat" Vivado is kicked off in batch mode [no GUI appears] and a couple minutes later a system.bit and system.bin file magically show up in the project folder. These are the same files that were generated via the Vivado GUI a couple blog posts ago! I highly recommend only using the GUI for updating the block diagram as scripting is very efficient and makes for very easy versioning and code portability. Also if you do have any errors during the build process you can take a look at the vivado.jou file or open up the GUI for troubleshooting. Note that the system.bit file is the only file we care about right now as the system.bin file is used in a later post for flashing the FPGA image via Linux.