Forum Discussion

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

Avalon Streaming new component in SOPC (VHDL)

Hello everyone,

I am trying to create a new component to be integrated in the SOPC builder which performs, as a start, a color inverting operation. I've built a system using Test pattern generater and Clocked video output and I managed to create a dummy core that streams the data between the two cores.

After reading the avalon streaming specifications I come out with the following :

- The valid RGB data coming out from the TPG is asserted when valid=1 and reday=1

- The data contains the RGB informations

When I tried to invert the signal (when valid = 1 and ready = 1) by pressing a switch I get nothing on the screen !

Would please help me out with how to decode that data coming from the ST source into RGB in order to know the exact value of the pixel ?

Best regards

4 Replies

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

    You should review Chapter 3 of the "Video and Image Processing Suite User Guide" (ug_vip.pdf)

    The Avalon Streaming specification will only describe the generic Avalon-ST, while the above will describe the packet format used by the Altera video blocks.

    From your description, it sounds like your problem is likely that you are also inverting the data in the control packets and also the first symbol of the video packet that mark it as a "video" type packet.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    First of all I would like to thank you for responding.

    Second, I managed to isolate the data packet and invert the color patern but I still have a minor problem. The image brightness increased !!

    Does the data packet include the brightness of color ?

    Thank you again
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    No, "brightness" is not a separate field in any packet.

    By manipulating the RGB values, you will affect the perceived brightness of the image. If you google for "rgb brightness calculation" you'll find some pages that have the formula.

    Also, the wikipedia article on Brightness may be useful reading.