UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

How to pass variables to DCM

Accepted Solution Solved
Highlighted
Observer
Posts: 17
Registered: ‎01-26-2012
Accepted Solution

How to pass variables to DCM

I am using DCM to create a new output from the input clock.

The entries for CLKFX_MULTIPLY and CLKFX_DIVIDE have to be integers.

I was trying to use variables instead of integers, but I got the error message:

The actual value associated with a generic must be a globally static expression.”

How can I pass integers to DCM through variables?

See attachments for my codes.


Accepted Solutions
Voyager
Posts: 1,636
Registered: ‎06-24-2013

Re: How to pass variables to DCM

@pkiang How can I pass integers to DCM through variables?

 

The answer here is quite simple: you can't.

Attributes like CLKFX_MULTIPLY and CLKFX_DIVIDE are constants used to configure the DCM at compiletime.

 

Hope that clarifies,

Herbert

-------------- Yes, I do this for fun!

View solution in original post


All Replies
Moderator
Posts: 8,497
Registered: ‎02-27-2008

Re: How to pass variables to DCM

p,

 

Its hardware -- you cannot.  To set all the configuration bits properly, the values must be known to create the bitstream.  A variable has no information, hence not possible (no bitstream).

 

You may reload the values after you are running using the DRP port of the DCM however, followed by a reset.  Note that other configuration bits of the DCM may also need to be changed through the DRP port as well besides just M and D.

Austin Lesea
Principal Engineer
Xilinx San Jose
Voyager
Posts: 1,636
Registered: ‎06-24-2013

Re: How to pass variables to DCM

@pkiang How can I pass integers to DCM through variables?

 

The answer here is quite simple: you can't.

Attributes like CLKFX_MULTIPLY and CLKFX_DIVIDE are constants used to configure the DCM at compiletime.

 

Hope that clarifies,

Herbert

-------------- Yes, I do this for fun!
Scholar
Posts: 357
Registered: ‎08-07-2014

Re: How to pass variables to DCM

[ Edited ]

Use a constant of type integer, in the code which is not working.

 

If your target is to easily change the value, then you may use as follows-

 

constant DD   : integer := 20;

--------------------------------------------------------------------------------------------------------
Being a non-Xilinx member, giving out "Kudos" or marking my posts as "Accept as solution" would trigger frequent and better future answers.
--------------------------------------------------------------------------------------------------------
Observer
Posts: 17
Registered: ‎01-26-2012

Re: How to pass variables to DCM

Thanks for the quick and clear answer.

Observer
Posts: 17
Registered: ‎01-26-2012

Re: How to pass variables to DCM

Thanks for the quick and clear answer.