cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
2,965 Views
Registered: ‎01-26-2012

How to pass variables to DCM

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Voyager
Voyager
4,968 Views
Registered: ‎06-24-2013

@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

0 Kudos
5 Replies
Highlighted
Scholar
Scholar
2,960 Views
Registered: ‎02-27-2008

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
Highlighted
Voyager
Voyager
4,969 Views
Registered: ‎06-24-2013

@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

0 Kudos
Highlighted
Scholar
Scholar
2,956 Views
Registered: ‎08-07-2014

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;

--------------------------------------------------------------------------------------------------------
FPGA enthusiast!
All PMs will be ignored
--------------------------------------------------------------------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
2,897 Views
Registered: ‎01-26-2012

Thanks for the quick and clear answer.

0 Kudos
Highlighted
Contributor
Contributor
2,895 Views
Registered: ‎01-26-2012
Thanks for the quick and clear answer.
0 Kudos