1 2 3 4 Previous Next 53 Replies Latest reply on Jan 29, 2020 3:41 AM by RashiV_61 Branched to a new discussion.

    GPIF

    GiSa_4520796

      Hello,

       

      I want to collect the incoming data from FPGA through GPIF II .For that I am using AN65974  GPIF without any changes but I am not able to get the data that is sent from FPGA.Which GPIF II State machine is best suited for this application?Anyone worked on the same application please let me know.

       

      Regards,

      Srujana.

        • 1. Re: GPIF
          RashiV_61

          Hello Srujana,

           

          We have tested the firmware and FPGA bit file which is with the application note AN 65974. It works fine for spartan 6 and Cyclone 3 FPGA.

          Please program the FX3 with the .img file already there in the folder.

          There are some limitations as mentioned in the readme.txt file

           

          In synchronous burst access operation, the minimum transfer size to

          perform data read/write accesses from/to the FX3 device should be three words.

          In 16-bit mode this is six bytes and 32-bit mode this is twelve bytes.

          To transfer data less than this, single cycle access operation needs to

          be used.

           

          Also check the functionality by following the steps mentioned in section 11.5.1 and let me know whether it works or not.

           

          Regards,

          Rashi

          • 2. Re: GPIF
            GiSa_4520796

            Hello,

             

            I am not using AN65974 firmware, I am using modified GpifToUsb firmware(PIB to SIB) in that I am replacing AN65974 state machine.I am getting data as either all bytes are 0x00 or 0xFF and not the data which is coming from FPGA.What is the problem?

             

            Regards,

            Srujana.

            • 3. Re: GPIF
              RashiV_61

              Hello srujana,

               

              Please probe the lines at GPIF interface and share the traces

               

              Regards,

              Rashi

              • 4. Re: GPIF
                GiSa_4520796

                Hello,

                 

                Please find the traces attached below:

                Traces.PNG

                Traces_2.PNG

                 

                Regards,

                Srujana.

                • 5. Re: GPIF
                  RashiV_61

                  Hello Srujana,

                   

                  Please let me know how do you check that you are getting 0x00 and 0xFF

                  Also share your whole firmware with the GPIF state machine

                   

                  Regards,

                  Rashi

                  • 6. Re: GPIF
                    GiSa_4520796

                    Hello,

                     

                    I am checking the data through firmware (PIB to SIB and SIB to UIB) so I am monitoring the data through In endpoint 0x82 in Control Center by passing vendor request.

                     

                    Regards,

                    Srujana.

                    • 7. Re: GPIF
                      RashiV_61

                      Hello Srujana,

                       

                      Please check that you are getting CY_U3P_SIB_EVENT_XFER_CPLT event. This event is generated when the write or read is finished.

                      You can track this event using a variables and print the variables value in the for{} loop.

                      Also confirm that writing and reading are done to/from same address.

                       

                      Regards,

                      Rashi

                      • 8. Re: GPIF
                        GiSa_4520796

                        Hello,

                         

                        I want to know whether the GPIF interface settings are correct inorder to receive data from FPGA.

                         

                        Regards,

                        Srujana.

                        • 9. Re: GPIF
                          RashiV_61

                          Hello Srujana,

                           

                          Please confirm that the GPIF bus width is 16 bits.

                          Can you send a full buffer (as per firmware) and check whether you get the producer event? You can put CyU3PDeviceReset(CyFalse) to check the producer event.

                          if (type == CY_U3P_DMA_CB_PROD_EVENT)

                              {

                                  CyU3PDeviceReset(CyFalse);

                                  /* Change the first and last data bytes for tracking on a USB trace. */

                                  input->buffer_p.buffer[0x0000] = DataSignature++;

                                  input->buffer_p.buffer[input->buffer_p.count - 1] = DataSignature++;

                           

                           

                                  CyU3PDmaChannelCommitBuffer (chHandle, input->buffer_p.count, 0);

                              }

                           

                          Producer event is generated when the buffer is full so you need to send data equal or more than than the buffer size.

                           

                          The .cyfx file in the project is not the one as in An 65974 but the gpif2config.h file is updated one. From the traces, the write sequence seems fine. But we need to check that is the data being written to DMa buffer so we need to check the producer event.

                           

                          Regards,

                          Rashi

                          • 10. Re: GPIF
                            GiSa_4520796

                            Hello,

                             

                            I have one question here.

                            Before programming FX3,the traces are coming fine i.e...,signals and data but after programming FX3 in traces i am getting only 2 bytes of data which is in address 0x02000000.

                             

                            After programming,

                            2.PNG

                             

                            3.PNG

                             

                            Before Programming FX3:

                             

                            4.PNG

                            • 11. Re: GPIF
                              RashiV_61

                              Hello Srujana,

                               

                              Please explain me this statement

                              >>Before programming FX3,the traces are coming fine i.e...,signals and data but after programming FX3 in traces i am getting only 2 bytes of data which is in address 0x02000000.

                               

                              How are you able to transfer data before programming the FX3?

                               

                              Also i am not able to interpret the first snapshot that you shared in your response (0x02000000). what does it mean? How do you check it? Please mention the steps you are doing while testing the data transfer .

                               

                              To check whether the data is written properly to SIB block you need to check the PROD event and CONS event. Please check and let me know whether you get PROD event or not (as asked in my in previous response).

                              What is the data size you are transferring from PIB to SIB?

                               

                              Regards,

                              Rashi

                               

                               

                              • 12. Re: GPIF
                                GiSa_4520796

                                Hello,

                                 

                                How are you able to transfer data before programming the FX3?

                                     I am not transferring data before programming the FX3,I am just checking the flags by probing them before and after programming.

                                 

                                Also i am not able to interpret the first snapshot that you shared in your response (0x02000000). what does it mean?

                                     It is the data which I am sending from FPGA side and the snapshot i attached is the memory.

                                 

                                Please mention the steps you are doing while testing the data transfer .

                                          1.Programming FX3 with .img file

                                          2.Programming FPGA with .bin file

                                          3.Checking the data in Control Center as my firmware is such that it transfers data from PIB to SIB and SIB to UIB i.e I am checking                     data which is in S0 port.

                                 

                                Please check and let me know whether you get PROD event or not (as asked in my in previous response).

                                I checked for producer events and device is resetting after programming.

                                 

                                What is the data size you are transferring from PIB to SIB?

                                4096 bytes.

                                 

                                My only question here is whether my GPIF interface settings are ready to read data from FPGA or not.

                                 

                                Regards,

                                Srujana.

                                • 13. Re: GPIF
                                  RashiV_61

                                  Hello Srujana,

                                   

                                  Can you compare the trace after programming FX3 with the figure 4 Synchronous Slave FIFO Write Sequence (page 8) of the application note  AN65974 and let me know the observation

                                  As the trace you shared is not complete i can't compare at my end.If both are same then we can say the GPIF settings are fine.

                                   

                                  Regards,

                                  Rashi

                                  • 14. Re: GPIF
                                    GiSa_4520796

                                    Hello,

                                     

                                    I compared both the traces.The result is as follows:

                                     

                                    Write Sequence.PNGILA_PROBES.PNGflagb.PNG

                                     

                                    Regards,

                                    Srujana.

                                    1 2 3 4 Previous Next