The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 7th, 2024, 10:22pm
Pages: 1
Send Topic Print
Set Parameters with Variables ? (Read 2439 times)
Pinhead
New Member
*
Offline



Posts: 6
Germany
Set Parameters with Variables ?
Nov 06th, 2006, 6:43am
 
Hi Guys,

is there any possibility to set a parameter with a variable ?

I need that for an instantiation of a verilog module in a module, i wanna overwrite the parameters of the instantiated module with a variable.

generate
   genvar x
      for (x=0, x< 8, x=x+1) begin: T
              my_osc #(var1[x]);
      end
endgenerate

Thanks!



Back to top
 
 

Gravity is a myth, earth sucks!
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Set Parameters with Variables ?
Reply #1 - Nov 6th, 2006, 12:35pm
 
Pinhead wrote on Nov 6th, 2006, 6:43am:
is there any possibility to set a parameter with a variable ?


No.

Parameters must be set at elaboration time; variables aren't initialized until run time..  You have to find another way to set your parameters, not using a variable.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Pinhead
New Member
*
Offline



Posts: 6
Germany
Re: Set Parameters with Variables ?
Reply #2 - Nov 6th, 2006, 11:15pm
 
Thank you Geoffrey!
Back to top
 
 

Gravity is a myth, earth sucks!
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.