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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
2,820 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
Voyager
Voyager
4,823 Views
Registered: ‎06-24-2013

Re: How to pass variables to DCM

Jump to solution

@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
Scholar austin
Scholar
2,815 Views
Registered: ‎02-27-2008

Re: How to pass variables to DCM

Jump to solution

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

Re: How to pass variables to DCM

Jump to solution

@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
Scholar dpaul24
Scholar
2,811 Views
Registered: ‎08-07-2014

Re: How to pass variables to DCM

Jump to solution

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
Contributor
Contributor
2,752 Views
Registered: ‎01-26-2012

Re: How to pass variables to DCM

Jump to solution

Thanks for the quick and clear answer.

0 Kudos
Contributor
Contributor
2,750 Views
Registered: ‎01-26-2012

Re: How to pass variables to DCM

Jump to solution
Thanks for the quick and clear answer.
0 Kudos