cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Visitor
Visitor
11,138 Views
Registered: ‎01-06-2013

Can you use any arbitrary signal in a design as a clock for a submodule ?

I have an emulation project where I have a DUT that is meant to operate at 'x' Mhz (10 Mhz). There is a wrapper around this DUT which is feeding/collecting data at '2x' Mhz (20 Mhz).

 

I want to have the ability to start and stop clock ticks to the DUT, (this is a requirement). So I am generating the clock signal for the DUT using an FSM. When I feed this clock directly to the DUT I run into timing issues.

 

Is there something I need to do to this generated user signal to make it a "clock signal" ?

Please advice.

Tags (4)
0 Kudos
Reply
5 Replies
Teacher
Teacher
11,132 Views
Registered: ‎11-14-2011

It would be better if you wish to maintain a known relationship between the two clocks to use a single clock domain, routed on the global network, and control the submodule by using your FSM generated signal as a clock enable.

----------
"That which we must learn to do, we learn by doing." - Aristotle
0 Kudos
Reply
Teacher
Teacher
11,129 Views
Registered: ‎03-31-2012

If you are not able to modify the DUT to use the original clock and stop signal as a clock enable, your best second option is to make sure that the clock you are generating comes directly from a register the output of which is connected to a global clock buffer. You also need to add a generated clock constraint on the registers output for timing engine to enforce.
- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
0 Kudos
Reply
Professor
Professor
11,122 Views
Registered: ‎08-14-2007

You didn't say what FPGA family you're using.  In the newer ones, you can instantiate a BUFGCE for cleanly gated clocks.

-- Gabor
0 Kudos
Reply
Visitor
Visitor
11,120 Views
Registered: ‎01-06-2013

Thanks all for your replies.

I am using Virtex 6 - 760 LX part.

0 Kudos
Reply
Professor
Professor
11,101 Views
Registered: ‎08-14-2007

The Libraries guide for V6 describes the BUFGCE and BUFGCE_1 macros.  It's usually possible to have a DCM output connect to more than one clock buffer component with high-speed dedicated routing.  So for example your 10 MHz clock from a DCM could drive a BUFG for the constant clock as well as a BUFGCE for the clock to the DUT.  The CE input of the BUFGCE would come from the output of a flip-flop clocked by the straight BUFG.  In order to have low skew between the gated and non-gated clocks it's important to LOC the BUFG and BUFGCE such that you get the best dedicated routing for both buffers.

 

If you have trouble finding a single output of a DCM that can satisfactorily drive two such buffers, another approach would be to use a PLL, which can have multiple outputs generating the same clock frequency and phase.  Then you can have two outputs drive the two clock buffers.  Note that this adds some uncertainty to the timing between the two clock signals and can therefore add to the worst case skew.  However it may still be better than using one clock buffer with dedicated routing and another with less optimal routing.

-- Gabor
0 Kudos
Reply