• 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. RF Design
  3. Schmitt trigger without hidden states in VerilogA

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 63
  • Views 15792
  • 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

Schmitt trigger without hidden states in VerilogA

Clidre
Clidre over 10 years ago

Hello,

I would like to model with verilog A a fully differential Schmitt trigger, to be used in a pss.

It's a very simple code. At the initial step, the threshold is set to the right value, depending on the inputs. At every subsequent crossing, the threshold is set to a new value, to take into account the hysteresis.

Unfortunately there are hidden states. Below the code:

`include "constants.vams"

`include "disciplines.vams"

module comp_hyst_FullyDiff_NH(outp, outn, p, n);

output outp, outn;

electrical outp, outn;

input p,n;

electrical p,n;

parameter real input_offset=0;

parameter real hyst_offset=0.1;

parameter real trise=10p;

parameter real tfall=10p;

 

 real voutp, voutn, vthaux;

analog begin

 @(initial_step) begin

    voutp=1.2*((V(p)-V(n))>input_offset);

    voutn=1.2*((V(p)-V(n))<=input_offset);

    vthaux=input_offset+hyst_offset*((V(p)-V(n))<=input_offset)-hyst_offset*((V(p)-V(n))>input_offset); 

end 

 

@(cross(V(p)-V(n)-vthaux)) ;

 begin

    voutp=1.2*((V(p)-V(n))>vthaux);

    voutn=1.2*((V(p)-V(n))<=vthaux);

    vthaux=input_offset+hyst_offset*((V(p)-V(n))<=vthaux)-hyst_offset*((V(p)-V(n))>vthaux); 

 end

 

 V(outp) <+ transition(voutp,trise,tfall);

 V(outn) <+ transition(voutn,trise,tfall);

 

end

endmodule

This module works without the red semicolon, but it has 3 hidden states: voutp, voutn and vthaux. I added the red semicolon, according with the good hint from Andrew here: http://community.cadence.com/cadence_technology_forums/f/33/t/26712 , but the behaviour is different: by adding the red semicolon in my code, it seems the initial step is skipped; moreover vthaux is still hidden. 

I would like to keep the behaviuor that i get without the red semicolon and remove all the hidden states. Any suggestion about how to modify my code?

Thanks a lot!

  • Cancel
Parents
  • Clidre
    Clidre over 10 years ago

    UPDATE: I did other simulations and the code I posted  functionally works with the semicolon, but vthaux is still an hidden state, so I still cannot run a pss. I have the following error

    ERROR (SPCRTRF-15177): PSS analysis doesn't support behavioral module components with hidden states found in component 'comp_hyst_FullyDiff_NH'. Skipped.

    /misc/cadence/comp_hyst_FullyDiff_NH/veriloga/veriloga.va, declared in line 22: Hidden state variable: vthaux

    Any idea how to remove the hidden state in vthaux? 

    Thanks a lot. Hope you can help me

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Clidre
    Clidre over 10 years ago

    UPDATE: I did other simulations and the code I posted  functionally works with the semicolon, but vthaux is still an hidden state, so I still cannot run a pss. I have the following error

    ERROR (SPCRTRF-15177): PSS analysis doesn't support behavioral module components with hidden states found in component 'comp_hyst_FullyDiff_NH'. Skipped.

    /misc/cadence/comp_hyst_FullyDiff_NH/veriloga/veriloga.va, declared in line 22: Hidden state variable: vthaux

    Any idea how to remove the hidden state in vthaux? 

    Thanks a lot. Hope you can help me

    • 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