Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Date Time Directory Project String

Reply
Thread Tools

Date Time Directory Project String

 
 
Brad Smallridge
Guest
Posts: n/a
 
      11-22-2009
I am not sure that VHDL provides this.

I have an FPGA with a video display and
a menu module. With every revision I
update a string array in the menu module
that is visible on the video display.

Two things are wrong with this. The
menu module is updated when there is
really no revision.

Secondly, I have to manually update this
with the editor which take time and
sometimes I forget to update.

I always put my new revisions in a new
four character directory.

I am running Xilinx ISE.

I suppose I could bring the string in
by a generic or maybe learn how
to write my own library with the string
in it. Which would get rid of the first
issue, but I would rather this update be
automatic.

Brad Smallridge
AiVision



 
Reply With Quote
 
 
 
 
Mike Treseler
Guest
Posts: n/a
 
      11-22-2009
Brad Smallridge wrote:

> I have to manually update this
> with the editor which take time and
> sometimes I forget to update.


Remembering to do it is my problem too.
I can write a shell script to update
a vhdl package with my hardware rev and date constants,
but a script can't know when such updates are appropriate.

-- Mike Treseler
 
Reply With Quote
 
 
 
 
Martin Thompson
Guest
Posts: n/a
 
      11-23-2009
"Brad Smallridge" <> writes:

> I am not sure that VHDL provides this.
>
> I have an FPGA with a video display and
> a menu module. With every revision I
> update a string array in the menu module
> that is visible on the video display.
>
> Two things are wrong with this. The
> menu module is updated when there is
> really no revision.
>
> Secondly, I have to manually update this
> with the editor which take time and
> sometimes I forget to update.
>
> I always put my new revisions in a new
> four character directory.
>
> I am running Xilinx ISE.
>
> I suppose I could bring the string in
> by a generic or maybe learn how
> to write my own library with the string
> in it. Which would get rid of the first
> issue, but I would rather this update be
> automatic.


I build the build-time into my VHDL with a package constant. I use a
TCL script to write the current time into a VHDL file as a constant just
before synthesis. Because I use a scripted build, this is run for me
automatically. I'm not sure ISE provides the ability to run arbitrary
TCL pre-build

I also build the build time into the USER1 reg so I can read it out over
JTAG a well.

The build time ID is then used as the TAG in the revision control system
so I can easily get back a specific build.

This is the sort of thing the TCL script does:
# get the time in format YYMMDDHHMMSS
set now [clock seconds]
set compile_id [clock format $now -format "%y%m%d%H%M%S0000"] # the "0000" carries feature/branch flags
puts "Compile ID is (YYMMDDhhmmss) $compile_id"
# create a VHDL package file with that value in to be compiled in
set fp [open "p_compile_id.vhd" "w"]
puts $fp "-- This is an autogenerated file!!!"
puts $fp "library ieee;"
puts $fp "use ieee.std_logic_1164.all;"
puts $fp "package p_compile_id is"
puts $fp " constant compile_id : std_logic_vector(63 downto 0) := X\"$compile_id\";"
puts $fp "end package p_compile_id;"
close $fp

You could do some variation on this to suit your stringy requirement I'm
sure

Cheers,
Martin

--

TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
 
Reply With Quote
 
Nicolas Matringe
Guest
Posts: n/a
 
      11-23-2009
Brad Smallridge a écrit :

> I suppose I could bring the string in
> by a generic or maybe learn how
> to write my own library with the string
> in it. Which would get rid of the first
> issue, but I would rather this update be
> automatic.



I did this with a tcl script that sets a top level generic.
I posted my solution on comp.arch.fpga some time ago :
http://groups.google.fr/group/comp.a...99a01324a84b7f


Nicolas
 
Reply With Quote
 
Thomas Stanka
Guest
Posts: n/a
 
      11-24-2009
On 22 Nov., 17:24, "Brad Smallridge" <bradsmallri...@dslextreme.com>
wrote:

> I always put my new revisions in a new
> four character directory.


CVS (and other version control systems) are able to write
automatically it's version in a string during each commit.
Use a variable of type string (not direct synthesysable) to store this
version and try to find out how to convert this to a useable hw
representation based on the content of the variable. Will be a bit
tricky but allows you to avoid external perl or tcl scripts.

bye Thomas
 
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
Convert date recevied as String to date in local time zone deepak_kamath_n@yahoo.co.in C++ 8 05-01-2007 12:26 PM
w3.org suggestion .. page, date, time and topic, date, time code (wish list). Keith Cochrane HTML 2 08-06-2006 06:57 AM
how can I convert date infomation to a string just includes the date not the time wgan Java 7 07-08-2004 07:08 PM
Date, date date date.... Peter Grison Java 10 05-30-2004 01:20 PM
Date & Time chooser for java 1.1 - using only the mouse to select time & date Chris Berg Java 0 10-27-2003 10:59 PM



Advertisments
 



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 47 48 49 50 51 52 53 54 55 56 57