Forum Discussion

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

VIP Frame Reader

Hello,

I'm trying to read a single frame from the RAM using the VIP_Frame_Reader and NIOS2. I know the frame reader creates an interrupt each time it finish of read one frame but I don´t know how to handle the interruption from the C code or if there some easier way to do what I want.

Best regards,

Rafael

6 Replies

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

    Thank you, I was checking this example and I find the way to get the interrupts.

    Now I have other problem with this module. After stop the module, if I make any modification in the memory and I try to start the module again the output image becomes corrupted. (I'm sure in the memory the image is correct).
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hello, after read a lot of information about Nios 2 and fpgas, my project is almost finished but I still having problems with the FrameReader.

    My project takes a frame from an Avalon ST video and stores it in ddr memory, after that one custom instruction perform a some modifications over the frame in memory and finally the FrameReader should read the frame from memory and give it to one Clocked Video Output connected to NEEK LCD.

    The frame is correctly stored in memory but when I try to show it in the LCD, the frame is showed for a moment and after that I got a black-screen. May anyone help me?.

    The FrameReader video output is connected directly (without any buffer) to the Clocked Video Output and the initialization code is:

        // Frame Select
        IOWR(ALT_VIP_VFR_0_BASE, 3, 0);
        // Frame 0 Base Address
        IOWR(ALT_VIP_VFR_0_BASE, 4, &P);
        // Frame 0 Words
        IOWR(ALT_VIP_VFR_0_BASE, 5,  800*480);
        // Frame 0 Single Cycle Color Patterns
        IOWR(ALT_VIP_VFR_0_BASE, 6,  800*480);
        // Frame 0 Width
        IOWR(ALT_VIP_VFR_0_BASE, 8, 800);
        // Frame 0 Height
        IOWR(ALT_VIP_VFR_0_BASE, 9, 480);
        // Frame 0 Interlaced
        IOWR(ALT_VIP_VFR_0_BASE, 10, 3);
        // start Frame Reader
        IOWR(ALT_VIP_VFR_0_BASE, 0, 1);
    
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thank you for reply.

    The Qsys is divided in 3 subsystems

    DetectionSystem: This system has the CI used to load and modify the frame in memory

    VideoSystem: This system has the VIP IP. The IP between the FrameReader and the ITC removes the alfa channel from the pixeles. The pixeles are stored in argb in parallel 8 bits per colour channel.

    MainSysten: Contains the cpu, ram controller, etc.

    In the attached zip there screen shoots of the system, the QuitaAlpha source and the c program.

    update 1:

    After a few checks, I discover that if I connect the cpu to ssram and the frame reader to sdram, the problem becomes fixed but I would like that both stay connected to the sdram.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I still having problems with this. When I add the ssram to my project I setup it to work the frame reader still not working.