The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> Hidden state problem: selective switching off and on at minimum of a sinewave https://designers-guide.org/forum/YaBB.pl?num=1495532291 Message started by Mauro on May 23rd, 2017, 2:38am |
Title: Hidden state problem: selective switching off and on at minimum of a sinewave Post by Mauro on May 23rd, 2017, 2:38am Hi all, My name is Mauro and I am new to this forum. I am a Master student IC designer living in The Netherlands. This is also my first post :) Currently, I have the following problem with VerilogA: I cannot perform PSS simulations due to hidden states. I have read earlier discussions on this forum related to this, I read the document specificly writtin by Ken ("Hidden States in SpectreRF" and tried something myself but it all did not work out unfortunately. Hereby extra information: Circuit information: Oscillation signal (sinewave) has f_osc = 5 GHz Offset is at Vdd = 1.2V Amplitude is 0.2V Voltage range oscillating signal: 1V < Vsignal < 1.4V Circuit has start-up time (100ns) where Vsignal = Vdd = 1.2V After that it starts building up oscillation until steady state Goal of the module: switching off and on at minimum of a sinewave with 1000 periods inbetween Initially the switch should be conducting (10 Ohms) Start a counter at steady state oscillation (no counter during start-up) that counts the amount of periods of the sinewave Stay switched on at the minimum of a sinewave after 1000 periods Switch off exactly at minimum of a sinewave after 1000 periods Switch on again at the minimum of a sinewave after 1000 periods etc. Should operate in PSS&Pnoise analysis with Spectre Problem: Hidden states in PSS due to r, counter and flag (transient is working) So my input is a voltage sinewave and dependent on that I would like to switch off or on. My code is in the attachment, please have a look. Otherwise the post would be relatively long, so I wanted to maintain clarity in this way. I am looking forward to your responses. Thank you in advance, Mauro |
Title: Re: Hidden state problem: selective switching off and on at minimum of a sinewave Post by Ken Kundert on May 23rd, 2017, 10:09am Mauro, I believe you have a more fundamental problem. PSS can only be applied to problems that are periodic. So you really cannot have the output of your sine wave generator turning off for a thousand cycles (well conceivably you can, but the PSS period would have to be at least 1000 cycles long and the modulation period would have to be synchronized with the carrier, which would bean expensive simulation). What is it you are trying to accomplish. Perhaps there is a another way of getting what you want. If you are adamant about keeping the slow modulation process, then it is easier are more reliable to use time to create the modulation rather than using internal state. -Ken |
Title: Re: Hidden state problem: selective switching off and on at minimum of a sinewave Post by Mauro on May 24th, 2017, 6:01am Hi Ken, PSS should be feasible since there is a periodicitiy (1000 cycles it is oscillating and another 1000 cycles it is not) which means a period of 2000 cycles (2.5 MHz beat frequency). However, I already solved it :) I implemented a counter using ideal adhllib blocks. So I added more Verilog blocks instead of doing everything with one. Regards, Mauro |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |