Micromegas trigger

This page has some useful working information for those working on the micromegas trigger firmware development. I currently keep a development repository at my local svn. The directory structure in that development repository allows us to keep the projects directory on svn, and thus easily share, concurrently edit and switch between versions of the firmware development code. We also have an official repository, not meant for firmware development, but rather for sharing stable versions of the source code that can then be built into other projects. Instructions on how to work with both versions can be found below.

Working with the firmware development repository

If you do not have access to my SVN user area, please ask me. Create a reasonable project structure, maybe a directory called Projects, where you will check out firmware and potentially software. Then, you can check out the firmware repository just as follows.

       cd Projects
       svn co svn+ssh://svn.cern.ch/reps/NSWELX/TriggerProcessor/firmware/mm/trunk firmware
       svn co svn+ssh://svn.cern.ch/reps/NSWELX/TriggerProcessor/software/mm/trunk software

This will create the directories firmware and software in your current directory. Below, I provide a few more instructions on how to work with the repositories. For a more complete version, and answering questions that are left unanswered here, please check the ATLAS svn workbook. Also, you can browse these directories using wsvn.

Original files

The original files are stored in the tag software-00 and firmware-00. See below to understand how to retrieve those tags if necessary.

Adding new files to the repository

After having checked the repository out, you may want to add new directories or files to the repository. Before doing that, you need to execute the commands:

       cd firmware
       svn propset svn:ignore -R -F .svnignore .
       cd software
       svn propset svn:ignore -R -F .svnignore .

These commands tell svn to ignore files that are locally created by the vivado project and that should not go into svn, since they are not useful (and potentially problematic) for other users.

Then you need to first add the file or directory to the repository as follows.

    svn add filename

Note, for directories, this adds all files under the directory to the repository (except those listed in the .svnignore file. Now, you need to just commit the files as you would commit any changes to complete the addition of new files/directory.

Committing changed files to the repository

Whenever you have changed things that you want to have in the trunk (i.e. that can be used by other people), you can simply do:

    svn ci -m "Commit message"

This commits every change in your current directory. If you only want to commit a specific file (or set of files), add the filenames after the command above with spaces between filenames.

If you do not remember what you have changed, you may want to check the status of your local directory by doing svn -u status. Any files that have been modified will have an M next to them. Files with a star next to them have been modified in the repository, but not updated in your local directory.

Updating to the latest version of the repository

When you want to get the changes that others made, you should just do svn update in the directory you want to update to the repository. Sometimes, this will lead to conflicts, when you have been working on the same part of a file that somebody else has modified since you last synchronized with the repository. When that's the case, you will have to resolve the conflict before you can commit again. Check the ATLAS svn workbook for instructions on how to do that.

Creating a tag

If you have a relatively stable version of the code, you may want to tag it for later use. For that, you should just do as follows:

    svn cp svn+ssh://svn.cern.ch/reps/atlas-dlopez/dlopez/MMTrigger/firmware/trunk -r <rev> svn+ssh://svn.cern.ch/reps/atlas-dlopez/dlopez/MMTrigger/firmware/tags/firmware-XX -m "Commit message"

In this case refers to the revision number that you would like to tag, but the -r part can be omitted if you are just tagging the last revision. In that command XX should be a unique number that identifies the tag. You can also tag branch versions easily. Note that branch tags will also be stored in the tags directory, so the command is:

    svn cp svn+ssh://svn.cern.ch/reps/atlas-dlopez/dlopez/MMTrigger/firmware/branches/firmware-XX-branch -r <rev> svn+ssh://svn.cern.ch/reps/atlas-dlopez/dlopez/MMTrigger/firmware/tags/firmware-XX-YY -m "Commit message"

In this instance, the directory firmware-XX-branch stores the "trunk" of the branch. XX refers to the tag that the branch originated from.

Creating a branch

If you create a branch, it is good to tag first your working copy, from which you will evolve the branch. You can tag as explained in the previous section, and then simply create your branch in a similar fashion:

    svn cp svn+ssh://svn.cern.ch/reps/atlas-dlopez/dlopez/MMTrigger/firmware/tags/firmware-XX 
svn+ssh://svn.cern.ch/reps/atlas-dlopez/dlopez/MMTrigger/firmware/branches/firmware-XX-branch -m "Commit message"

After doing this, you need to make sure that your working directory points to that branch as follows.

    svn switch svn+ssh://svn.cern.ch/reps/atlas-dlopez/dlopez/MMTrigger/firmware/branches/firmware-XX-branch . 

Working with a branch version and switching between tags and trunk

Sometimes, you will want to switch your current version to a tag, or to a branch. This is done easily using the switch command as

    svn switch svn+ssh://svn.cern.ch/reps/NSWELX/TriggerProcessor/firmware/mm/branches/firmware-XX-branch . 
   or
   svn switch svn+ssh://svn.cern.ch/reps/NSWELX/TriggerProcessor/firmware/mm/tags/firmware-XX . 
 

If you have modifications in your current directory with respect to the latest committed version, this command may complain, since it does in fact remove all the versioned files in your directory and substitutes them by the ones stored on svn.

UserForm
FirstName David
LastName Lopez Mateos
Email david.lopez@cernNOSPAMPLEASE.ch
Telephone

Address

Comment

Edit personal data
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2016-02-22 - DavidLopezMateos
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback