Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > equivalent of defparam in vhdl.

Reply
Thread Tools

equivalent of defparam in vhdl.

 
 
kk
Guest
Posts: n/a
 
      08-01-2006
For one of my program, i use defparam in verilog to set a parameter
which is one level below the hierarchy. I've three modules A, B, C. The
C is instantiated in B, B in A. There is a parameter in C which is not
brought out to B. I dont have the permission to modify B and C by any
chance. In verilog i can set the parameter by using a defparam
statement in A.
Is there way i could do this in VHDL, if all the three are in VHDL.

thanks in adv.

 
Reply With Quote
 
 
 
 
Ajeetha
Guest
Posts: n/a
 
      08-01-2006
Hi KK,
If this is for Synthesis, it is a bad style - usually defparam is
unsupported in synth tools. If it is for pure simulation alone,
simulators provide a way to override generics from command line.
Typically the option is "-g".

Read your tool's doc for more.

HTH
Ajeetha, CVC
www.noveldv.com
www.systemverilog.us

kk wrote:
> For one of my program, i use defparam in verilog to set a parameter
> which is one level below the hierarchy. I've three modules A, B, C. The
> C is instantiated in B, B in A. There is a parameter in C which is not
> brought out to B. I dont have the permission to modify B and C by any
> chance. In verilog i can set the parameter by using a defparam
> statement in A.
> Is there way i could do this in VHDL, if all the three are in VHDL.
>
> thanks in adv.


 
Reply With Quote
 
 
 
 
kk
Guest
Posts: n/a
 
      08-02-2006
Hi,

First of this is only for simulation and not for synthesis.
Secondly, i dont think i can use the -g option, as the problem is with
wrapper + smart models rather than actual vhdl files.

thanks....

Ajeetha wrote:
> Hi KK,
> If this is for Synthesis, it is a bad style - usually defparam is
> unsupported in synth tools. If it is for pure simulation alone,
> simulators provide a way to override generics from command line.
> Typically the option is "-g".
>
> Read your tool's doc for more.
>
> HTH
> Ajeetha, CVC
> www.noveldv.com
> www.systemverilog.us
>
> kk wrote:
> > For one of my program, i use defparam in verilog to set a parameter
> > which is one level below the hierarchy. I've three modules A, B, C. The
> > C is instantiated in B, B in A. There is a parameter in C which is not
> > brought out to B. I dont have the permission to modify B and C by any
> > chance. In verilog i can set the parameter by using a defparam
> > statement in A.
> > Is there way i could do this in VHDL, if all the three are in VHDL.
> >
> > thanks in adv.


 
Reply With Quote
 
Rob Dekker
Guest
Posts: n/a
 
      08-04-2006

"Ajeetha" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) oups.com...
> Hi KK,
> If this is for Synthesis, it is a bad style - usually defparam is
> unsupported in synth tools.


Actually defparam is supported for most synthesis tools that I know of.
Although not without pain and suffering for the synthesis compiler implementers (

Note that defparam is scheduled to be removed from the Verilog language..
Not that that has much effect : it is used in almost all Verilog designs, due
to the primitive start of Verilog.

Rob


 
Reply With Quote
 
Rob Dekker
Guest
Posts: n/a
 
      08-04-2006

"kk" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) ps.com...
> For one of my program, i use defparam in verilog to set a parameter
> which is one level below the hierarchy. I've three modules A, B, C. The
> C is instantiated in B, B in A. There is a parameter in C which is not
> brought out to B. I dont have the permission to modify B and C by any
> chance. In verilog i can set the parameter by using a defparam
> statement in A.
> Is there way i could do this in VHDL, if all the three are in VHDL.
>
> thanks in adv.
>


From A you want to control a parameter in C, so that is TWO levels deep into the hierarchy.

I believe that you can do this nicely with a configuration of A, although I have not tried it out :
Here are the crucial parts of the configuration :

configuration foo of A is
...
for instance_name_of_B_in_A
..
for instance_name_of_C_in_B
use work.C generic map (Cs_parameter => As_param_value) ..
end configuration ;

I think As_param_value can even be an expression in terms of generics in either A or even B
which are up in the hierarchy path when this configuration hits.
That is because both B's and A's scope (name space) are made visible in the component configuration.

This means that you can actually do more than the Verilog defparam.

Rob


 
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
defparam jasonkee111 VHDL 0 03-05-2009 04:42 PM
Re: Mixed VHDL/Verilog + defparam Hans VHDL 0 07-30-2004 09:12 AM
Mixed VHDL/Verilog + defparam Hans VHDL 1 07-29-2004 05:14 PM
equivalent types in different packages Lolo VHDL 3 09-22-2003 03:23 PM
Re: Image Scanning - TWAIN equivalent Brendan Duffy ASP .Net 0 07-24-2003 08:29 AM



Advertisments