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

Reply

VHDL - runtime arguments in VHDL (ala plusargs in Verilog)

 
Thread Tools Search this Thread
Old 06-17-2009, 02:49 AM   #1
Default runtime arguments in VHDL (ala plusargs in Verilog)


Got another how do you things like in Verilog in VHDL question:
what's the "best" way to pass runtime arguements to a compiled VHDL
design? Write the test name to a file, and have the tb read the file,
and execute a particular test procedure? I've seen a Modeltech
example where the simulator force command was used to setup variables,
but that seems rather clunky to me.

Thanks,

Mark


Mark
  Reply With Quote
Old 06-17-2009, 03:54 AM   #2
Allan Herriman
 
Posts: n/a
Default Re: runtime arguments in VHDL (ala plusargs in Verilog)
On Tue, 16 Jun 2009 18:49:29 -0700, Mark wrote:

> Got another how do you things like in Verilog in VHDL question: what's
> the "best" way to pass runtime arguements to a compiled VHDL design?
> Write the test name to a file, and have the tb read the file, and
> execute a particular test procedure? I've seen a Modeltech example
> where the simulator force command was used to setup variables, but that
> seems rather clunky to me.


If the design has been compiled but not elaborated, the easiest way might
be to pass the arguments in as generics. These can be of any type,
including string and enumerated types.

You can set the generics by using the -g or -G switches in vsim.

It gets a little more complicated if you have a mix of verilog and VHDL
in your hierarchy.

N.B. Not all tools support setting the value of generics of an enumerated
type in this way.

Regards,
Allan


Allan Herriman
  Reply With Quote
Old 06-17-2009, 06:21 PM   #3
Mike Treseler
 
Posts: n/a
Default Re: runtime arguments in VHDL (ala plusargs in Verilog)
Mark wrote:
> Got another how do you things like in Verilog in VHDL question:
> what's the "best" way to pass runtime arguements to a compiled VHDL
> design? Write the test name to a file, and have the tb read the file,
> and execute a particular test procedure?


That would not be my recommendation.
I use vhdl procedures, and simple vsim -G generics.
See the testbench example here:
http://mysite.verizon.net/miketreseler/


Mike Treseler
  Reply With Quote
Old 06-22-2009, 02:41 PM   #4
Mark
 
Posts: n/a
Default Re: runtime arguments in VHDL (ala plusargs in Verilog)
On Jun 17, 12:21*pm, Mike Treseler <mtrese...@gmail.com> wrote:
> Mark wrote:
> > Got another how do you things like in Verilog in VHDL question:
> > what's the "best" way to pass runtime arguements to a compiled VHDL
> > design? *Write the test name to a file, and have the tb read the file,
> > and execute a particular test procedure?

>
> That would not be my recommendation.
> I use vhdl procedures, and simple vsim -G generics.
> See the testbench example here:http://mysite.verizon.net/miketreseler/


Thanks. I'll follow that model.


Mark
  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
Runtime error Sunset A+ Certification 1 01-10-2007 06:56 PM




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