cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
baldrism
Explorer
Explorer
972 Views
Registered: ‎04-26-2017

GEM and PTP implementation

Hello all,

I am trying to implement the PTP using the GEM in the Zynq UltraScale architecture, but I have some questions related with this topic. My intention is to have a clock in the PL synchronous with the master clock that are sending the PTP. So my board is the slave, and there will be a master (potentialy will be a PC) that through PTP will send the timestamp. From this timestamp I need to recover or I need to create a clock synchronous to the master clock.

As far as I know the GEM implements PTP. In the Technical Reference Manual, I found the following figure:

GEM.PNG

So now I have the following questions:
1) How can I get a clock synchronous to the master clock?
2) Is there any way to change the PS frequency in order to be synchronized with the master clock, and from this frequency create a PL fabric clock synchronous with the master clock that be accessible from the PL?
3) Anybody has more information apart from the "GEM_TSU_Interface_Details"? In my opinion there are few information there, and I cannot follow the procedure to execute the PTP testing. 4) When enabling the PTP Interface, the PS adds a PTP interface that can be accessible from the PL. For which propose is this? Maybe the clock has to be reconstructed in the PL?

I would appreciate some help in this topic because I don't find useful information to find out the solution of my problem.

Thanks and best regards,

baldrism

0 Kudos
5 Replies
nanz
Moderator
Moderator
874 Views
Registered: ‎08-25-2009

Hi @baldrism ,

The TSU clock source can be from PLL or MIO and EMIO. The registers to look at are GEM_CLK_CTRL, TSU_REF_CLK_CTRL, and MIO_PIN_XX (in case of MIO).  

When GEM0 is enabled, the 1PPS signal will be exposed to PL so users can sync their logics on PL by refering it. 

 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
baldrism
Explorer
Explorer
862 Views
Registered: ‎04-26-2017

Hello @nanz ,

Thank you very much for your reply.

I didn't find the PPS signal from the GEM, could you please show me where can I find it?

ptp_zynq.PNG

Moreover, how can I sync the PL clocks using the 1PPS signal? Is there any guide or XAPP that I could follow for that?

Thank you very much,

baldrism

0 Kudos
nanz
Moderator
Moderator
794 Views
Registered: ‎08-25-2009

Hi @baldrism ,

That is the tsu_timer_cnt signal that I meat. 

 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
Capture.JPG
baldrism
Explorer
Explorer
788 Views
Registered: ‎04-26-2017

Thank you @nanz ,

Do you know how can I create a synchronous clock in the PL using the PPS signal? I need to generate 2MHz synchronous with the master clock and I don't know if it is feasible or not.

Best regards,

baldrism

0 Kudos
nanz
Moderator
Moderator
778 Views
Registered: ‎08-25-2009

Hi @baldrism ,

I believe you should be able to do this by creating a custom IP on PL with taking the tsu_timer_cnt value and 1PPS signal into processing. 

Unfortunately, we do not have an example of doing it.

 


-------------------------------------------------------------------------------------------

Don’t forget to reply, kudo, and accept as solution.

If starting with Versal take a look at our Versal Design Process Hub and our Versal Blogs and our Versal Ethernet Sticky Note.

-------------------------------------------------------------------------------------------
0 Kudos