Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Version Control for VHDL Project

Reply
Thread Tools

Version Control for VHDL Project

 
 
AndreasWallner
Guest
Posts: n/a
 
      05-16-2009
Hi,

I've worked on a few tiny VHDL projects in the past and since I have
to write a bigger project for my university, I wanted to ask how you
guys use source control on projects using multiple libraries.

I know how to use version control in general, the question is how to
work with those libraries. For example: Consider a design using some
sort of softcore processor and peripheral modules for that processor.
I would make a seperate library for each module as well as for the
processor itself. This way the modules itself could be reused. In that
case I would also use a different repository for each module (We use
Subversion and Git for Version control).

If I would do it that way, I would have a problem taging a specific
revision (for example the first version delivered to the client). Do
you use tags? Do you use SVN/Git externals/submodules? Do you
structurize you code in a way to make is neccesary to use more than
one "level" of libraries in you projects? (For example a Design using
an AES core itself using a librarie providing the S-Box for AES
(shared by AES and DES))?

I would really appreciate information how you handle multiple
libraries, because each scenario we thought of seems to be flawed in
some way.

The second reason I ask this is: While I do study electronics, I'm
also very much into programming. Because I that, a colleague and I
started working on a program to edit VHDL/Verilog Code, much like HDL
Designer from Mentor. (Yes we know this is a lot of work, and yes we
have done project in a reasonable size before to know what awaits us).
Although It is not ready to be tested in a real world situation, I was
interested how you handle such version control issues, so we might be
able to incorporate such functionality. (At the moment the only thing
it can do is managing various libraries and open VHDL files to edit
them)

I hope I have explained myself clear and not missed a note regarding
that issue in my search on the list.

Regards,
Andreas
 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      05-16-2009
AndreasWallner wrote:

> I've worked on a few tiny VHDL projects in the past and since I have
> to write a bigger project for my university, I wanted to ask how you
> guys use source control on projects using multiple libraries.


I prefer multiple packages, but one library (work) to
simplify the sources and be compatible with
vhdl-mode makefiles.

> The second reason I ask this is: While I do study electronics, I'm
> also very much into programming. Because I that, a colleague and I
> started working on a program to edit VHDL/Verilog Code, much like HDL
> Designer from Mentor.


Have a look at vhdl-mode first.

-- Mike Treseler
 
Reply With Quote
 
 
 
 
AndreasWallner
Guest
Posts: n/a
 
      05-16-2009
On May 17, 1:32*am, Mike Treseler <(E-Mail Removed)> wrote:
> AndreasWallner wrote:
> > I've worked on a few tiny VHDL projects in the past and since I have
> > to write a bigger project for my university, I wanted to ask how you
> > guys use source control on projects using multiple libraries.

>
> I prefer multiple packages, but one library (work) to
> simplify the sources and be compatible with
> vhdl-mode makefiles.


Ok, I think we misunderstood each other. Thats because I did not mean
library in the sense of an VHDL Library (like work or ieee), but
library in the sense of a module providing some sort of functionality.
(So more in the sense of a normal software library). Excuse me, but
that's the way HDL Designer uses the term library too...while writing
I forgot it could be misleading.

The question I had in mind was really more: How do you manage to track
the state of self written IP Cores and the top level project with your
version tracking system. Espacially if you want to tag the whole
project, how do you ensure the correct version of the used IP cores is
used.

I hope that cleared our misunderstanding.

> Have a look at vhdl-mode first.

I know vhdl-mode and it is somehow great...but it's not as much fun as
writing your own piece of software (everybody has to have a
hobby )

Regards,
Andreas
 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      05-17-2009
AndreasWallner wrote:

> The question I had in mind was really more: How do you manage to track
> the state of self written IP Cores and the top level project with your
> version tracking system. Especially if you want to tag the whole
> project, how do you ensure the correct version of the used IP cores is
> used.


There's little difference between tags and branches in Subversion.
Both are directories that are created by a copy.
If I don't commit changes, it stays a tag or "snapshot".
If I commit a change, it becomes a branch.


>> Have a look at vhdl-mode first.


> I know vhdl-mode and it is somehow great...but it's not as much fun as
> writing your own piece of software (everybody has to have a
> hobby )


Go for it.
But vhdl-mode sets the bar high.

-- Mike Treseler
 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      05-17-2009

"Mike Treseler" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> AndreasWallner wrote:
>
>> The question I had in mind was really more: How do you manage to track
>> the state of self written IP Cores and the top level project with your
>> version tracking system. Especially if you want to tag the whole
>> project, how do you ensure the correct version of the used IP cores is
>> used.

>
> There's little difference between tags and branches in Subversion.
> Both are directories that are created by a copy.
> If I don't commit changes, it stays a tag or "snapshot".
> If I commit a change, it becomes a branch.
>


I think what Adreas is asking about has to do with reusable (or potentially)
reusable IP. You create some widget and put it into a Subversion (or other)
repository. Sometime later you're working on a *new* design that happens to
need the same widget. There are a couple ways to go about getting the old
IP

1. Copy/replicate. Export the IP you need into the folder for the new
design. Then when you check in the new design into its repository it's
archived. The drawback here is the usual thing that happens with
copy/paste, you've created a totally new widget that begins life exactly the
same as the first widget, but they can each evolve down different paths if
you find out later that you'd like to update the widget (in fact there is no
'the widget' anymore, there are 'two widgets', then three, four, more).

2. Have the new design reference widget. In Subversion you do this via the
'svn_external', the potential problem here is that the only way to totally
lock down exactly what you're getting for widget is to specify the revision
to pull when you reference the widget. This is OK if widget is firm and
solid, but a pain if widget is also undergoing development and you're still
in the development phase of your new thing that uses widget and you'd like
to get 'latest/greatest'. The pain then becomes at the end when you're
trying to exit that mode, going back into each of those svn_externals to
then specify the revision you want is a manual, prone to problems effort.
If you don't do this, then when you try to check out/export an archived
design your references to widget will pull the 'head' revision, not the
revision that existed at the time you wanted to archive.

3. Have the new design reference the new widget as in #2. But when you get
to the point of releasing something and want to be able to create a tag that
you can use as a real archive so that you go back and pull the design as it
really existed at some prior time, but still have the benefits of
referencing a single widget design when you're in development mode, then you
need to use 'svncopy.pl'
(http://svn.collab.net/repos/svn/trun...vncopy.README).

This is one particular area of source control where MS Source Safe beats
Subversion hands down. The fact that you can't reference a widget in some
repository and be able to later tag it down to a specific revision at design
complete without a lot of effort (#2) or having to use scripts to help along
the source control tool's weakness (#3) is a major weakness, 'specially
considering that this is after all a source control tool.

Kevin Jennings


 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      05-17-2009
AndreasWallner wrote:

> The question I had in mind was really more: How do you manage to track
> the state of self written IP Cores and the top level project with your
> version tracking system. Especially if you want to tag the whole
> project, how do you ensure the correct version of the used IP cores is
> used.


This is similar to the problem of two developers working on the same
module at the same time. Sometimes there are conflicts that have to be
manually merged.

I prefer KJ's "copy/replicate" method. My top priority is
to get the project finished. I can merge back changes to reusable
modules when the pressure is off.

-- Mike Treseler
 
Reply With Quote
 
Charles Gardiner
Guest
Posts: n/a
 
      05-17-2009
I have been using subversion for this purpose for maybe three years now.
I have a number of reusable cores (varieties of Timers, Uarts,
wishbone-to-whatever adapters, dma controllers etc.) and link them into
a customer project as required by simply setting subversion externals.
Each 'core' is developed as a project on it's own.

Essentially, I have a repository for my reusable stuff, a different
repository for customer projects and so on.

I think one of the most important parts is a suitable directory
structure. If you design things regularily enough, it's not much of a
problem to include a core as part of another core and to include the
super-core as part of a customer project.
 
Reply With Quote
 
AndreasWallner
Guest
Posts: n/a
 
      05-17-2009
On May 17, 1:56*pm, Charles Gardiner <(E-Mail Removed)> wrote:
> I have been using subversion for this purpose for maybe three years now.
> I have a number of reusable cores (varieties of Timers, Uarts,
> wishbone-to-whatever adapters, dma controllers etc.) and link them into
> a customer project as required by simply setting subversion externals.
> Each 'core' is developed as a project on it's own.
>
> Essentially, I have a repository for my reusable stuff, a different
> repository for customer projects and so on.


Do you use a single repository for all your reusable stuff? With
subfolders for each IP?

> I think one of the most important parts is a suitable directory
> structure. If you design things regularily enough, it's not much of a
> problem to include a core as part of another core and to include the
> super-core as part of a customer project.


Would you mind telling me about the folder structure you use?
 
Reply With Quote
 
AndreasWallner
Guest
Posts: n/a
 
      05-17-2009
Excuse the duplicate answer, but I used the wrong button the answer
the first time...
> I think what Adreas is asking about has to do with reusable (or potentially)
> reusable IP. *You create some widget and put it into a Subversion (or other)
> repository. *Sometime later you're working on a *new* design that happens to
> need the same widget. *There are a couple ways to go about getting the old
> IP


You are right on that point. Excuse me for not being clear here.

> 1. Copy/replicate.


We thought about that, but bringing the changes made to an core back
into the main repository is the hard part here, as you pointed out.

> 2. Have the new design reference widget.


Thanks for that information, I'll look into that subversion feature.
I didn't know svn provides that functionality.
(I never needed to use something like that on my previous projects
(especially since I do software projects (C/C++) most of the time,
there we mostly install the needed libraries to system paths, which is
not quite applicable for VHDL projects)

> 3. Have the new design reference the new widget as in #2. *But when you get
> to the point of releasing something and want to be able to create a tag that
> you can use as a real archive...


I think you should really have a look at git, it is really easy to use
(after you have understood the differences from DVCS to traditional
VCSs ) and provides a feature called 'submodule' which is excatly
what you described. If you create a tag, the content of the whole
project is saved, and since a submodule not only contains the location
of the imported repository, but also the precise commit currently
used, the state of the IP cores is also preserved
 
Reply With Quote
 
AndreasWallner
Guest
Posts: n/a
 
      05-17-2009
> I prefer KJ's "copy/replicate" method. My top priority is
> to get the project finished. I can merge back changes to reusable
> modules when the pressure is off.


Since we are a university time is not a pressure (most of the time).
The bigger problem would be if people forget to push their changes
back into the IP core repository. If you have a disciplined
development team, or are developing alone I can imagine that this
would not be a problem, but my environment that could lead to serious
problem.

Like someone chaging an IP core, but introducing a bug, fixing that
bug in the project repository, but forgetting to push the changes into
the IP repo.

Other than that we would also loose the information who did specific
changes, and why...
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Version control for VHDL projects. Symon VHDL 21 12-22-2011 07:46 PM
Re: Where to get stand alone Dot Net Framework version 1.1, version2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? MowGreen [MVP] ASP .Net 5 02-09-2008 01:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? PA Bear [MS MVP] ASP .Net 0 02-05-2008 03:28 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green ASP .Net 0 02-05-2008 02:45 AM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM



Advertisments