Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - automatic firmware revision for VHDL

 
Thread Tools Search this Thread
Old 05-26-2008, 02:37 PM   #1
Default automatic firmware revision for VHDL


Dear Experts,
i'd like to introduce to my design one register containing a firmware
revision. Very probably the firmware revision would be a data when the
VHDL code was checked out from the CVS repository where I store the
project.

The problem I encounter is how to translate the CVS last-commit data
of the project currently checked out, and translate it into VHDL code
to be a part of the project.

Example:

yesterday i committed at the end of day the whole project, thus when I
check it out today and burn, one of the registers I export should
contain yesterday's date as a firmware revision

i check out the project corresponding to a date 2 weeks ago, the
firmware register should contain a number corresponding to date at
which the version of the project I have checked out was committed.

This would allow very easily match the firmware and CVS source
together.....

any ideas how to do it?

thanks
david


dejfson@gmail.com
  Reply With Quote
Old 05-26-2008, 04:37 PM   #2
HT-Lab
 
Posts: n/a
Default Re: automatic firmware revision for VHDL

<> wrote in message
news:fa17637b-3631-4238-9b79-...
> Dear Experts,
> i'd like to introduce to my design one register containing a firmware
> revision. Very probably the firmware revision would be a data when the
> VHDL code was checked out from the CVS repository where I store the
> project.
>
> The problem I encounter is how to translate the CVS last-commit data
> of the project currently checked out, and translate it into VHDL code
> to be a part of the project.
>
> Example:
>
> yesterday i committed at the end of day the whole project, thus when I
> check it out today and burn, one of the registers I export should
> contain yesterday's date as a firmware revision
>
> i check out the project corresponding to a date 2 weeks ago, the
> firmware register should contain a number corresponding to date at
> which the version of the project I have checked out was committed.
>
> This would allow very easily match the firmware and CVS source
> together.....
>
> any ideas how to do it?
>
> thanks
> david


Can't you use the $Id$/$Revision$ string in your source file and translate
that to a date/version constant with a bit of Tcl?

This might help you a bit :
http://www.ht-lab.com/freeutils/date2hdl/date2hdl.html

Hans
www.ht-lab.com




HT-Lab
  Reply With Quote
Old 05-26-2008, 10:22 PM   #3
dejfson@gmail.com
 
Posts: n/a
Default Re: automatic firmware revision for VHDL
Hi Hans,
thanks for reply. In fact I've solved the problem in a very similar
way. Before every compilation I run small TCL script which creates a
single entity having only one 32bit output std_logic_vector. This
vector is fed by output of 'clock seconds' command of TCL. This gives
you exact time of compilation, however it does not give you the date
of last commit into CVS. Thus the time information I get is
approximative.


dejfson@gmail.com
  Reply With Quote
Old 05-27-2008, 07:34 PM   #4
Andy
 
Posts: n/a
Default Re: automatic firmware revision for VHDL
On May 26, 4:22 pm, "dejf...@gmail.com" <dejf...@gmail.com> wrote:
> Hi Hans,
> thanks for reply. In fact I've solved the problem in a very similar
> way. Before every compilation I run small TCL script which creates a
> single entity having only one 32bit output std_logic_vector. This
> vector is fed by output of 'clock seconds' command of TCL. This gives
> you exact time of compilation, however it does not give you the date
> of last commit into CVS. Thus the time information I get is
> approximative.


If you can get the timestamp data into an integer or vector format
externally, you can pass it in to the top level entity via a generic.
Most compilers/synthesizers have command line options to specify
values of top level generics.

Andy


Andy
  Reply With Quote
Old 05-28-2008, 10:35 AM   #5
moogyd@yahoo.co.uk
 
Posts: n/a
Default Re: automatic firmware revision for VHDL
On 26 May, 17:37, "HT-Lab" <han...@ht-lab.com> wrote:
> <dejf...@gmail.com> wrote in message
>
> news:fa17637b-3631-4238-9b79-...
>
>
>
> > Dear Experts,
> > i'd like to introduce to my design one register containing a firmware
> > revision. Very probably the firmware revision would be a data when the
> > VHDL code was checked out from the CVS repository where I store the
> > project.

>
> > The problem I encounter is how to translate the CVS last-commit data
> > of the project currently checked out, and translate it into VHDL code
> > to be a part of the project.

>
> > Example:

>
> > yesterday i committed at the end of day the whole project, thus when I
> > check it out today and burn, one of the registers I export should
> > contain yesterday's date as a firmware revision

>
> > i check out the project corresponding to a date 2 weeks ago, the
> > firmware register should contain a number corresponding to date at
> > which the version of the project I have checked out was committed.

>
> > This would allow very easily match the firmware and CVS source
> > together.....

>
> > any ideas how to do it?

>
> > thanks
> > david

>
> Can't you use the $Id$/$Revision$ string in your source file and translate
> that to a date/version constant with a bit of Tcl?
>
> This might help you a bit :http://www.ht-lab.com/freeutils/date2hdl/date2hdl.html
>
> Hanswww.ht-lab.com


Hi,

Just out of interest, this is a solution that I implemented on a
previous project (i.e. based on CVS $Revision$ tag).

The problems I had with this
- It was based on the revision of a single file only rather than the
design as a whole. We therefore had to force revision updates of this
file when required (therefore we could have just used a VHDL
constant).
- It didn't handle "hacks". i.e. temporary RTL changes that were not
commited to CVS. Therefore we had different FPGA's

I would be interested to hear what mechanisms other people use on
bigger projects, and a non-ideal world

Steven


with different


moogyd@yahoo.co.uk
  Reply With Quote
Old 05-28-2008, 11:04 PM   #6
dejfson@gmail.com
 
Posts: n/a
Default Re: automatic firmware revision for VHDL
Steven,
I've just published the 'final' version on the alteraforum.com. Of
course it does not support hacks. I have serious doubts that there
could exist any solution using hacks as what is not in the cvs is
simply forgotten in time.

link:
http://alteraforum.com/forum/showthread.php?t=2600


dejfson@gmail.com
  Reply With Quote
Old 05-30-2008, 10:13 AM   #7
Martin Thompson
 
Posts: n/a
Default Re: automatic firmware revision for VHDL
writes:

> I would be interested to hear what mechanisms other people use on
> bigger projects, and a non-ideal world
>


I embed the "time of compile" into the FPGA, using a TCL script to
create a (very simple) VHDL file.

I also overwrite that VHDL file after synthesis, so you can't
accidentally re-compile an FPGA with the same timestamp in it.

I also embed the timestamp into the UserID of the bitstream, which
means I can very easily read it out using JTAG, which is handy in some
circumstances.

Cheers,
Martin
--

TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html


Martin Thompson
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Logitech G15 Revision 2 Gaming Keyboard Admin Front Page News 0 06-26-2008 12:41 PM
High-Def Playback: The Firmware Gotcha Ablang DVD Video 46 07-28-2007 07:25 AM
A+ Exam Revision Update Process Starting John P. Dearing A+ Certification 6 02-10-2006 01:44 AM
searching for Dansai 955 firmware B@ndit DVD Video 0 01-31-2005 05:54 PM
My experience so far with the Gateway Connected DVD Player Cow King's Jester DVD Video 2 10-09-2003 04:25 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46