cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
721 Views
Registered: ‎05-23-2019

Clock with the frequency same as Zynq Processor frequency

Can I generate a clock running with the same frequency as that of the Zynq processor.?

I am using ZYNQ zc702 evaluation board and my task is to check whether the processor is really running at the frequency that I have input using vivado.

Thank you.

0 Kudos
14 Replies
watari
Teacher
Teacher
714 Views
Registered: ‎06-16-2013

Hi www.afroz62@gmail.com 

 

What do you mean "Clock with the frequency same as Zynq Processor frequency" ?

 

1. You'd like to generate same clock frequency by something.

2. You'd like to make sure whether the clock is alive or not. Include clock frequency.

3. Other

 

If 1, you can generate it by PLL or MMCM.

If 2, you can observe clock frequency by measurement of clock frequency module.

 

Best regards,

701 Views
Registered: ‎05-23-2019

Hi, watari
Its 1.
Thank you for the reply.
I want to generate a clock with same frequency as that of the zynq processor. Can you please, give me the details of the process.?
0 Kudos
watari
Teacher
Teacher
658 Views
Registered: ‎06-16-2013

Hi www.afroz62@gmail.com 

 

Would you use Clocking Wizard IP on Vivado ?

 

https://www.xilinx.com/support/documentation/ip_documentation/clk_wiz/v6_0/pg065-clk-wiz.pdf

 

Best regards,

 

0 Kudos
bfrazier_arete
Adventurer
Adventurer
642 Views
Registered: ‎09-30-2014

Where do you plan on using the clock?  In the PL?

0 Kudos
632 Views
Registered: ‎05-23-2019

I don't want to input any frequency. The program should identify the processor frequency and run accordingly.
0 Kudos
watari
Teacher
Teacher
630 Views
Registered: ‎06-16-2013

Hi www.afroz62@gmail.com 

 

Do you want to generate clock by program ?

If yes, would you refer page 699 on the following URL ?

 

https://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf

 

Best regards,

0 Kudos
625 Views
Registered: ‎05-23-2019

Here is what I am exactly working on:(I am sorry to deviate from current topic)
I have to run an infinite while loop and check the output on oscilloscope. As I change the processor frequency, I will get a change in the period of output square wave time-period, right.?
And that is what I have to achieve. Please help me with this.
Following is the code that I have written:
module validation(

output a
);


reg a1 = 0;
assign a = a1;
integer counter = 0;


while(1) // Infinite While Loop
begin
counter <= counter + 1; //The counter goes up.
if(counter == 0)begin
a1 <= ~a1; //If the counter reaches 1000, toggle the output.
counter <= 1000; // Resetting the counter.
end

end


endmodule

But I am not able to run it.
0 Kudos
617 Views
Registered: ‎05-23-2019

Yes, I am planning to use the clock in the PL.

0 Kudos
watari
Teacher
Teacher
609 Views
Registered: ‎06-16-2013

Hi www.afroz62@gmail.com 

 

I'm sure that your concept is correct. But your code is bad. It's like c-language style. Not HDL.

 

Would you make sure your code by ex. lint tool ?

 

Best regards,

0 Kudos
605 Views
Registered: ‎05-23-2019

I am sorry, I dont have that tool.

0 Kudos
watari
Teacher
Teacher
602 Views
Registered: ‎06-16-2013

595 Views
Registered: ‎05-23-2019

module validation(
// input clk,
output a
);

reg a1 = 0;
assign a = a1;
integer counter = 0;

always @(1)
// Infinite While Loop


if(counter == 0)begin
a1 <= ~a1; //If the counter reaches 1000, toggle the output.
counter <= 1000; // Resetting the counter.
end

else
counter <= counter + 1; //The counter goes up.
//end


endmodule

How about this code?
The Report shows no violations. But I am not able to generate bitstream.
0 Kudos
bfrazier_arete
Adventurer
Adventurer
580 Views
Registered: ‎09-30-2014

This won't work due to sampling theory. You would never now what your frequency is just using the clock as your counting source. To do a counting model for estimating frequency of a clock you must have another clock that is equal to or faster in frequency to the clock you are measuring.
0 Kudos
bfrazier_arete
Adventurer
Adventurer
580 Views
Registered: ‎09-30-2014

Why don't you read the registers of the Zynq PS instead of trying to measure the frequency? The TRM outlines how the clocks are generated from the available PLLs in the processor. If you just read the settings of the registers, you can determine if the processor clock source is setup correctly? The PLLs are setup from scripts built into your boot image in the first place. If you independently read the registers, it should tell you everything you need to know.
0 Kudos