Forum Discussion

Sai2403's avatar
Sai2403
Icon for New Contributor rankNew Contributor
1 month ago

Regarding MIPI CSI 2 TX

Hi, In my Project, I have to generate test pattern data and send it to MIPI CSI 2 via AXI stream, and MIPI CSI 2 will send the pixel data to link_0 of MIPI DPHY IP , but when i try to simulate the design(includes MIPI CSI 2 and MIPI DHPY IP  interconnected), mipi_dphy_0/LINK0_CK_Stopstate  is constantly high, I guess this signal is supposed to go low after T INT time, and also ready Singal from axi_stream is asserted low after being high for three clock cycles, i didn't understand why. 

Any help is appreciated.

12 Replies

  • Wincent_Altera's avatar
    Wincent_Altera
    Icon for Regular Contributor rankRegular Contributor

    Hi Sai,

    May I know which design that you are using ? 
    is it custom design or the design generated from the design example ?

    From your description, I understand that
    mipi_dphy_0/LINK0_CK_Stopstate stays high throughout simulation.

    • AXI-Stream ready goes high briefly (three cycles) then deasserts and stays low.
    • You’re sending test pattern data over AXI-Stream to MIPI CSI-2, which then connects to MIPI D-PHY (link_0).

    These symptoms typically indicate that the D-PHY high-speed (HS) clock lane never leaves Stop State, 
    so the D-PHY never transitions to HS transmission, and upstream flow-control (through CSI-2 and AXI-Stream) stalls. 
    AXI tready deasserting after a few cycles is consistent with small internal FIFOs filling while the downstream interface (D-PHY) is not transmitting.

    Based on the description - please check on proper resets, clocking, enabling continuous HS clock, and performing the required configuration writes in your simulation testbench. 
    Once the D-PHY clock lane begins toggling HS, LINK0_CK_Stopstate should go low, and tready should remain asserted under normal flow.
    That could be a good start to check with. BUT that will be take time as it might be hard to narrow down the problem

    Quick way that I would recommended will be to compare your design with the our design example 
    https://github.com/altera-fpga/agilex-ed-camera-ai
    That could help you to narrow down the problem faster if checking those parameter/ setting/

    Regards,

    Wincent_Altera

  • Sai2403's avatar
    Sai2403
    Icon for New Contributor rankNew Contributor

    Hi Wincent,

    Thanks for your reply,

    it is a custom design, I instantiated MIPI CSI 2 and D- PHY IP's, I have made some progress regarding tready signal after couple of changes, but there is not improvement from D-PHY interface side.

    U suggested to enable HS clock, but from design, i guess those signals are generated by IP's itself.

    Though I have enabled resets, and configured registers for MIPI CSI 2 . 

    From data sheet of MIPI DPHY IP, what I have understand is LINKn_Dm_TxRequestHS must be asserted.

    " A low-to-high transition on
    TxRequestHS can only happen when Stopstate is
    asserted. The protocol layer asserts TxRequestHS
    for the clock Lane at the same clock cycle or in
    previous clock cycles of the TxRequestHS of the
    data Lanes."

    But is not happening. Correct me if am missing anything.

    FYR,

    Below is snapshot.

    Thanks.

     

     

     

     

    • Wincent_Altera's avatar
      Wincent_Altera
      Icon for Regular Contributor rankRegular Contributor

      Hi Sai,

      It is very hard for me to narrow down what doing wrong with such limited information.
      Plus that is custom design - I am not sure if there is another IP who can intercross the functionality of the signal.

      I would strongly suggest you to cross check with the design example itself and see what else is missing from your custom design vs the example design.
      That could give you better idea where is missing. Hope that work for you.
      Let me know if there is anything else you think I can better assist you

      Regards,

      Wincent_Altera

  • Sai2403's avatar
    Sai2403
    Icon for New Contributor rankNew Contributor

    Hi wincent,

    I think there is some confusion regarding this. I just used two available IP's (MIPI CSI 2 and MIPI D-PHY),

    and have been driving the inputs of MIPI AXI Stream from test bench, apart from this there is not any Code I have used in the design.

    Regards.

     

    • Wincent_Altera's avatar
      Wincent_Altera
      Icon for Regular Contributor rankRegular Contributor

      Hi Sai,

      There is a weird things to do if you just try the design via two IP.
      Because the MIPI design cross related with other IP as well such as ISP , Frame Buffer and other etc.
      To ensure its functionality and signal triggering.

      IF you just want to purely run the simulation - I suggest to generate one from the design example.
      You may get it from the IP catalog under Quartus. That could be a good start for you.

      Regards,
      Wincent

  • Sai2403's avatar
    Sai2403
    Icon for New Contributor rankNew Contributor

    Hi Wincent,

    can u provide any example designs or reference designs which are related to MIPI CSI 2 Transmitter? All the available references are for Receiver part only.

    Regards

    • Wincent_Altera's avatar
      Wincent_Altera
      Icon for Regular Contributor rankRegular Contributor

      Hi Sai,

      If you looking at only simulation purpose, you may generate one from Quartus IP catalog
      There will have a testbench that you can try it out. Let me know if you unable get it.


      Regards,

      Wincent
       

      • Sai2403's avatar
        Sai2403
        Icon for New Contributor rankNew Contributor

        Hi wincent,

        we took reference from simulation, and had developed AXI stream interface to drive the MIPI CSI TX input, we observed that clock would be available for few cycles and will stop generating. Is there signal to indicate internal PLL has set properly, or any parameters need to enable to observe the clock ?  we were able to see clock and data on dphy lanes in simulation but couldn't on hardware.

        regards,

        sai2403