Skip to content
Snippets Groups Projects
Commit a9784f13 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Added section 10) with some useful commands to work on a SVN branch.

parent 9d0a2fe3
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,9 @@ Contents:
e) tools
f) sub directories
10) SVN trunk or branch
100) To do
101) More ideas
102) Know errors
......@@ -182,11 +185,12 @@ e) Quartus user_components.ipx
The user_components.ipx tells QSYS and SOPC where to search for MM components. The user_components.ipx is kept in SVN at:
https://svn.astron.nl/UniBoard_FP7/UniBoard/trunk/Firmware/synth/quartus/user_components.ipx
https://svn.astron.nl/UniBoard_FP7/RadioHDL/trunk/tools/quartus/user_components.ipx
In a Unix system this goes to the personal folder at ~ (= $HOME):
In a Unix system manually copy this user_components.ipx to the personal folder at ~ (= $HOME), because this is not (yet) done automatically in
setup_radiohdl.sh:
~/.altera.quartus/ip/15.0/ip_search_path/user_components.ipx
~/.altera.quartus/ip/<quartus version>/ip_search_path/user_components.ipx
It appears that copying the user_components.ipx from SVN location to the personal ~ location avoids having to copy it into the installation location. The
version part of the directory name needs to match the Quartus version (eg. 11.1sp2, 14.1, 15.0). The ${RADIOHDL}/tools/quartus/check_ipx_content bash script
......@@ -1082,6 +1086,118 @@ at the hdl_lib_uses_sim key are not needed for synthesis and could even confuse
file IO ignored because it is not possible to synthesize).
10) SVN trunk and branching
a) Useful commands
> svn up -r # # update to -r
> svn up # update to HEAD
> svn status -q # status of working copy compared to last svn up -r #
> svn status -u -q # status of working copy compared to HEAD
> svn revert -R .
> svn commit -m "#<Redmine number> comment" files
# Define simple editor for SVN commit message editing
export SVN_EDITOR=vim
echo $SVN_EDITOR
# Kill many GUI editors at once (e.g. in case svn diff on directory opened them all)
cntr-alt-F1
killall -9 gvimdiff
cntr-alt-F7
b) Choose between trunk or a branch
Default all firmware development is done on the HEAD of the trunk. We rely on regression tests and regular
synthesis (and validation on hardware) to ensure that the trunk remains intact.
Sometimes it can be useful though to be able to try a parallel development on a branch. Therefore it is useful
to setup a branches/ directory next to the trunk/ directory.
It is important to use $RADIOHDL in scripts instead of $SVN, because then $RADIOHDL can be set to point to the
desired trunk or branch tree. The $RADIOHDL is defined in the .bashrc. Using a startup choice the $RADIOHDL
variable can be set per terminal window e.g. using this in the .bashrc:
# when in scp abort:
if [ -z "$PS1" ]; then
return
fi
# SVN checkout root directory
echo -n "RADIOHDL='1' (default) or LOWCBF='2' or another tree='3': "
read choice
case $choice in
2)
echo "LOWCBF trunk is selected"
export SVN=${HOME}/svnroot/LOWCBF
. ${SVN}/Firmware/tools/bin/setup_radiohdl.sh
;;
3)
echo "RADIOHDL branch is selected"
export SVN=${HOME}/svnroot/UniBoard_FP7
# Setup RadioHDL environment for UniBoard2 and and new Uniboard1 applications
. ${SVN}/RadioHDL/trunk/tools/setup_radiohdl.sh branches/Task_1275
;;
*)
echo "RADIOHDL trunk is selected"
export SVN=${HOME}/svnroot/UniBoard_FP7
# Setup RadioHDL environment for UniBoard2 and and new Uniboard1 applications
. ${SVN}/RadioHDL/trunk/tools/setup_radiohdl.sh
# Support old UniBoard environment (including Aarfaac and Paasar)
#. ${SVN}/RadioHDL/trunk/tools/setup_unb.sh
;;
esac
c) Working on a branch
> cd $SVN/RadioHDL/
> mkdir branches
> svn add branches/
> commit -m "Start branching." branches/
> svn info .
> svn ls ^/RadioHDL # The ^ is the root of the repository in SVN
branches/
trunk/
# For example create branch from revison 16579 of the trunk and call it Task_<Redmine issue number>
# Start the commit message with Task #<Redmine issue number>: to provide link for Redmine.
# Optional use r<SVN revision number> in the commit message
> svn cp ^/RadioHDL/trunk@16579 ^/RadioHDL/branches/Task_1275
> cd branches
> svn up Task_1275
# Merge changes from revisions to branch
> cd branches/Task_1275/
> svn log -v -r 16588:HEAD ^/RadioHDL/trunk | more
> svn merge -c 16592 ^/RadioHDL/trunk # merge changes
> svn merge -r 16596:16658 ^/RadioHDL/trunk # merge a range of revisions
> svn diff --diff-cmd diff # show Merged /RadioHDL/trunk:r16580-16592
# Merge entire directory from HEAD to branch
> cd technology
> svn merge ^/RadioHDL/trunk/libraries/technology
# or similar
> cd Task_1275/
> svn merge ^/RadioHDL/trunk/libraries/technology libraries/technology/
# Remove and recreate branch
> svn rm ^/RadioHDL/branches/Task_1275 # remove branch directly in SVN, so no need to do svn commit afterwards
> cd RadioHDL/branches
> rm -rf Task_1275/ # remove the working copy with all its local dir and files (e.g. build)
> svn cp ^/RadioHDL/trunk@16579 ^/RadioHDL/branches/Task_1275/ # recreate the branch
# Create FPGA image on branch ($RADIOHDL points to the branch)
> cd $RADIOHDL/libraries/technology/ip_stratixiv
> ./generate-all-ip.sh
> python $RADIOHDL/tools/oneclick/base/modelsim_config.py -t unb1
> python $RADIOHDL/tools/oneclick/base/quartus_config.py -t unb1
> run_sopc unb1 apertif_unb1_bn_filterbank
> run_qcomp unb1 apertif_unb1_bn_filterbank --seed=1;run_rbf unb1 apertif_unb1_bn_filterbank
100) To do
a) quartus_* keys and synth_top_level_entity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment