-
Notifications
You must be signed in to change notification settings - Fork 4
Home
- Support for git repositories. For IP blocks handled by "include" it should be possible to define, that the sources should be checked out (using git archive?) as specific version from specific repository starting from specific directory. If the particular IP block is developped, then it should be included directly from the local clone of the repository [1]. That solution allows also having different versions of IP subblocks used in different bocks of the design as long as those blocks are marked OOC. Different versions are exported into different directories and then included into appropriate OOC blocksets.
- Support for conditional commands in EPRJ files (e.g. depending on the platform - different lowest level blocks should be included for Xilinx and for Altera - idea suggested by Marek Gumiński)
- The above point of course implies that the port for Altera/Quartus is finished. It is in very initial stage yet...
Typical command used to download the sources (the particular version)
git archive --format tar --remote [email protected]:my_user_name/my_project.git tag-name directory/to/be/exported | tar -xf - --strip-components=2
The above works only with tags or branches.
If we want to use the particular commit, then we must have a local clone of the repository, and then we can
checkout the particular commit:
( cd /path/to/local/clone ; git archive --format tar tag_or_commit_id directory/to/be/exported ) | tar -xf - --strip-components=1
This should be conveniently wrapped in the EPRJ line. One of possible solutions may be:
git repository_url tag_name directory stripped_comp_num
There is however one important requirement. Assuming that our extended project structure is under VCS, we don't want the imported repository content to spoil our repository. So it must be either imported somewhere outside the tree:
git repository_url tag_name target_directory directory stripped_comp_num
or we can tell git to ignore the imported content.
We can simply assume, that the imported content should be always put into the "ext_src" subdirectory, and
put the .gitignore file with single line ext_src/
into our directory...
In fact that solution seems to be better...
When the project is rebuilt, the ext_src directory should be removed, recreated and populated with the repository content.
We have two git related commands:
- The first form:
git_remote repository_url tag_name [exported_directory [stripped_comp_num]]
It will be transformed into:
rm -rf ext_src
mkdir ext_src
git archive --format tar --remote $repository_url $tag-name $exported_directory | (cd ext_src ; tar -xf - --strip-components=$stripped_comp_num )
- The second form:
git_local clone_directory commit_or_tag_name [exported_directory [stripped_comp_num]]
It will be transformed into:
rm -rf ext_src
mkdir ext_src
( cd $clone_directory ; git archive --format tar $commit_or_tag_name $exported_directory ) | tar -xf - --strip-components=$stripped_comp_num
In case of other VCS we can alway implement a script for downloading the appropriate sources, and use the
exec
line to execute it!
If we use the particular tag (release, version) from the external directory, we may need to patch it for our project.
Therefore we need yer another EPRJ line patch
...