Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
13 years ago

[SOPC Builder] pixel treatment in different clock domain

Hello everybody,

Actually I am developping a custom core which calculate the GreyScale value of each coming pixel.

My system provides 800x600 resolution wich means 40 Mhz pixel clock, while my streaming system is clocked at 130MHz, and I am placing my core between a scaler and a CVO.

The custom core is tested with a TPG and CVO and 40 Mhz system clock and work just well. But when I use a 130 Mhz clock some data remain the same (true color) !

Can any one explain to me how the data is transfred while using different clock domain than the pixel clock ?

I know that the data is transfred when the data_valid and the ready signals are asserted but if the clock is three times pixel clock does that change anything ?

PS : excuse my poor english

Best regards

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    When using different clocks you need to implement some synchronizing mechanism between the two domains. I think your best method is to use a dual clock FIFO component to transfer your data from one domain to the other. The DCFIFO already has all the synchronization mechanisms you need.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you for responding Daixiwen,

    You mean I use 2 DCFIFO ! one before the custom core and another after it ? because the CVO is working at 130 Mhz !!!

    Actually I don't understand how the data is transfered when we use 2 clock domains ! Can you help with that ?

    best regards
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    No I mean one DCFIFO. The dual clock FIFO has two clocks, one on each side. You connect one side to the data source, with its clock, and the other side to the data destination, with its clock.

    Are you connecting your modules though SOPC Builder or QSYS? If yes, you will find a stream dual clock FIFO component that you can directly use to make the connection, in the memories category if I remember correctly.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you again Daixiwen

    I managed to do it without a DCFIFO

    best regards