• 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. Custom IC Design
  3. non-uniform sampling of a signal

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 13374
  • 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

non-uniform sampling of a signal

svilen
svilen over 14 years ago

 Hi,

I need to perform signal sampling in tran analysis at each falling edge of another waveform (not strictly a clock). The problem is those falling edges come at irregular times. It should be something along the lines of "strobe" as it is in the tran analysis menu options, only there it requires a uniform sampling period. I can't figure out how to do it. Any suggestions are very much appreciated.

Thanks

Svilen

  • Cancel
Parents
  • skillUser
    skillUser over 14 years ago

     Hi Svilen,

    You could create a Verilog-A or Verilog-AMS module that uses an @cross statement to monitor the crossing of a threshold - this would be the signal whose falling edge you want to trigger the "strobe" from.  Something like the following:

    
    module controlOnFalling( in );
    input in;
    electrical in;
    real dummyStore;
    
    analog begin
      @(cross(V(in), -1) begin 
        dummyStore = V(in);
      end
    
    endmodule
    

    I have not tried the above code, so beware, it may have syntax or functional problems!

    The cross event can be further controlled by supplying a time tolerance and an expression tolerance, here's a section from the documentation:

    cross_function ::=
       	     cross (expr1 [ , direction [ , time_tol [ , expr_tol ] ] ] )
    direction ::= 
       	     +1 | 0 | -1
    time_tol ::=
       	     expr2
    expr_tol ::=
       	     expr3
    ...
    time_tol is a constant expression with a positive value, which is the largest
     time interval that you consider negligible. The default value is 1.0s, which is large
     enough that the tolerance is almost always satisfied.
    

    The simulator will control the timestep and make calculations around the crossing event (in this case when the input signal falls to 0) and this would in effect give you a strobe or a timepoint at around the time that you are interested in.  If you wish to actually track the other signal that you are interested in, that could be an additional input to the module.

    I hope this helps you, or at least gets you started.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 14 years ago

     Hi Svilen,

    You could create a Verilog-A or Verilog-AMS module that uses an @cross statement to monitor the crossing of a threshold - this would be the signal whose falling edge you want to trigger the "strobe" from.  Something like the following:

    
    module controlOnFalling( in );
    input in;
    electrical in;
    real dummyStore;
    
    analog begin
      @(cross(V(in), -1) begin 
        dummyStore = V(in);
      end
    
    endmodule
    

    I have not tried the above code, so beware, it may have syntax or functional problems!

    The cross event can be further controlled by supplying a time tolerance and an expression tolerance, here's a section from the documentation:

    cross_function ::=
       	     cross (expr1 [ , direction [ , time_tol [ , expr_tol ] ] ] )
    direction ::= 
       	     +1 | 0 | -1
    time_tol ::=
       	     expr2
    expr_tol ::=
       	     expr3
    ...
    time_tol is a constant expression with a positive value, which is the largest
     time interval that you consider negligible. The default value is 1.0s, which is large
     enough that the tolerance is almost always satisfied.
    

    The simulator will control the timestep and make calculations around the crossing event (in this case when the input signal falls to 0) and this would in effect give you a strobe or a timepoint at around the time that you are interested in.  If you wish to actually track the other signal that you are interested in, that could be an additional input to the module.

    I hope this helps you, or at least gets you started.

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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