This tutorial covers the generation of a new Parallella project, and is required reading for any of the following projects - if you create your projects using a naive planAhead Save Project As, I believe you're in for a world of hurt.
This my currently advised method for creating a new project which is not simply a throwaway. If you intend to throw it away, you could simply edit one of the provided projects in parallella-hw, and then do a git checkout on the files with local modifications to remove them.
I am going to suggest you create your own repo alongside the parallella-hw repo. I am not convinced it makes sense to fork the parallella-hw repo just to create your own project. But then I am not much of a git (I prefer mercurial), so maybe forking is more common practice than I would think.
Moreover, if you use a customised FPGA already, for example to support a daughterboard, then base the project on this one - that way you retain use of all existing interfaces - but with an extra IP core available.
The reason we do the first step in planAhead rather than simply doing a cp from a shell is that using the tool helps by automatically fixing up paths, as well as renaming subfolders and references - if you want to do a cp, you'll have a fair amount of editing of the project xml files on your hands.
From the folder in which you cloned the git repo at https://github.com/parallella/parallella-hw
parallella-hw$ . /opt/Xilinx/14.7/ISE_DS/settings64.sh parallella-hw$ planAhead fpga/projects/parallella_7020_headless/parallella_7020_headless.ppr
The only reliable way I know of removing all the cruft is using git clean. The Xilinx tools do not know how to clean up after themselves, so we use git to take care of this for us.
For example:
parallella-hw$ git clean -d -n fpga/projects/parallella_7020_headless/
This shows you what would have been removed. If you want to proceed, replace -n with -f. Do not do this unless you are sure you have no changes to loose.
The (still to come) section with the .gitignore should save you ever accidentally commiting cruftiness to your projects in the first place. Being able to use git to clean a repo before you copy it is great.
You could even make parallella-hw repo a subrepo if your repo if you wanted - but I will not cover that here.
[img] Select File >> Save Project As from the menu.
Choose the location for your project. In my case, I used the folder parallella-fpga-tutorials, which was at the same level as parallella-hw, and is the github repository I have shared at https://github.com/yanidubin/parallella-fpga-tutorials. The name of the project is Tutorial000_BaseProject, since this is the base for further projects.
Now would be a good time to do the first commit to your repo, before you start hacking the resources. After the planAhead copy, you will have a couple more files than you strictly need - but nothing worth fussing over.
We'll also fix up version.v while we're at it, since the parallella-hw projects state this is a local per-project file, but the flag in the xml resources has it marked as a global include (I believe this is why it does not get copied to the new project automatically - a less likely possibility being because it does not reside in the sources subfolder).
Note that you only need do this once - once your project has the XPS files locally, you can copy it as often as you like, and it will handle the XPS files correctly (taking a local copy). I have started a discussion thread on the official forums to see if this is something we can improve on. It is possible there is a very good reason the project is laid out this way.
$ mkdir -p parallella-fpga-tutorials/Tutorial000_BaseProject/Tutorial000_BaseProject.srcs/sources_1/system/dataEdit the project file manually (with whatever editor you are comforable with).$ cp parallella-hw/fpga/edk/parallella_7020_headless/system.{mhs,xmp} \ parallella-fpga-tutorials/Tutorial000_BaseProject/Tutorial000_BaseProject.srcs/sources_1/system/
$ cp parallella-hw/fpga/edk/parallella_7020_headless/data/ps7_system_prj.xml \ parallella-fpga-tutorials/Tutorial000_BaseProject/Tutorial000_BaseProject.srcs/sources_1/system/data/
$ cp parallella-hw/fpga/projects/parallella_7020_headless/version.v \ parallella-fpga-tutorials/Tutorial000_BaseProject/Tutorial000_BaseProject.srcs/sources_1/
$ vim parallella-fpga-tutorials/Tutorial000_BaseProject/Tutorial000_BaseProject.data/sources_1/fileset.xml
Find the entries which look like
<File Path="$PPRDIR/../../parallella-hw/fpga/edk/parallella_7020_headless/system.xmp">
and
<File Path="$PPRDIR/../../parallella-hw/fpga/projects/parallella_7020_headless/version.v">
and change them to look like
<File Path="$PSRCDIR/sources_1/system/system.xmp">
and
<File Path="$PSRCDIR/sources_1/version.v">
respectively. Also delete the line below version.v which sets IsGlobalInclude to Val="1", since having this is presumably why it didn't get copied in the first place. Just delete the whole line - if you set it to 0, planAhead is just going to delete it anyway next time it saves the file.
You should commit to your repo before you proceed to the next tutorial which will actually use the new project you have created.
For further project/tutorials, I recommend just doing a planAhead Save As from the base project, since that workflow is now open to you. Remember about using git to clean a repo before copying it, and commit it before you start building - this keeps those build artifacts out of your repo, and the .gitignore will help.