Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Explanation of the cycle steal process from XAPP617 application notes

Status
Not open for further replies.

raka200

Member level 2
Joined
Aug 2, 2007
Messages
48
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
1,625
Hi everybody !!!
I'm looking at a xilinx appnote, XAPP617.

There is a few lines that are quite a mistery to myself :
REC_CLK and NREC_CLK are two clock generated by DCM with 180° phase shift.
Code:
 -- Capture potential first bit data, double sampling to remove metastability
   PROCESS (NREC_CLK, XRESET)
   BEGIN
      IF (XRESET = '0') THEN
         FQ <= (others=>'0');    
      ELSIF rising_edge(NREC_CLK) THEN
         FQ <= DF;    
      END IF;
   END PROCESS;

   -- Move falling edge samples into the rising edge clock domain using latches (cycle steal)
   PROCESS (NREC_CLK, FQ, XRESET)
   BEGIN
      IF (XRESET = '0') THEN
         FL <= (others=>'0');    
      ELSE
         IF (NOT NREC_CLK = '1') THEN
            FL <= FQ;    
         END IF;
      END IF;
   END PROCESS;

   -- FL metastability flops
   PROCESS (REC_CLK, XRESET)
   BEGIN
      IF (XRESET = '0') THEN
         FO <= (others=>'0');    
      ELSIF rising_edge(REC_CLK) THEN
         FO <= FL XOR "01010101";    
      END IF;
   END PROCESS;
I understand the metastability stuff, (double sample ),
but I don't understand the second process with the trick to change the clock domain, with the comment cycle steal...
Why do we need this process ?
Why using a latch trigered by clock state, and not falling_edge ??? (target : virtex II pro)

thanks in advance...
 

cycle steal

This is viewed as cycle stealing because the data is moved between latches or flops but no complete clock cycle was consumed. Instead, the falling edge data was re-registered on the very next rising edge. This is the same time delay you would have seen if you just used one rising edge downstream flop. Instead, they used two flops, a negative edge followed by a positive edge.

They are using latches because they want to data to flow through the latch until the REC_CLK returns to '1'. This removes setup time issues because as long as the data is stable at the end of the interval you are fine. You do not have to worry about the timing of the data with the clock edge.
 

    raka200

    Points: 2
    Helpful Answer Positive Rating
Dear raka2000,

I know this is a very old thread. I am looking Xilinx applications XAPP617 and XAPP618 for quite a few years now! They were announced about 9 to 10 years ago and they were intended to cover sample implementations of motion estimation and compensation.

Any help and proper reference is appreciated!


Best regards
the_penetrator
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top