• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. Clock phase and frequency checkers using property

Stats

  • Locked Locked
  • Replies 0
  • Subscribers 65
  • Views 20186
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Clock phase and frequency checkers using property

ThinkTank
ThinkTank over 14 years ago

Hi ,

 

I am working on a code to check clock frequency and phase difference of clocks. The code is in verilog however SV features are utilized wit the help of -sv switch. 

 

I have a CLK and CLB and i want to check their frequencies as well as check if they are 180 degrees phase apart ,I have done in the following fashion , however this checker spans across 3 always blocks and one property definition .Please suggest if there is a better and shorter way to do this.

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

always @ (posedge CLK)

begin

assert property (clock_check(EXP_PERIOD));

end //this checks clock frequency of CLK

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

always @(posedge CLB)

begin

assert propertty(clock_check(EXP_PERIOD));

end // this would check frequency of CLKB

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

always @(posedge CLK)

 begin

    assert CLKB = ~ CLK;

end //This would check that they are 180 degrees out of phase

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

property clock_check (int EXP_PERIOD)

int start_time

(true,start_time = $time) |=> ($time - start_time == EXP_PERIOD);

endproperty 

 

I have multiple clocks to check and the propert clock_check is utilized across all the checks.

 

Thanks ,

 Pooja

  • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information