The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> Clock generator with variable period in Verilog-A https://designers-guide.org/forum/YaBB.pl?num=1350570381 Message started by gsensor on Oct 18th, 2012, 7:26am |
Title: Clock generator with variable period in Verilog-A Post by gsensor on Oct 18th, 2012, 7:26am Hi everyone, I don't use Verilog-A to often, and I'm simply trying to write a clock generator code in Verilog-A with a variable period that changes at fixed time (tend3 and tend 4). It is also activated by an input enable signal. When en input is higher than 1 V, the clock is generated in the output signal (out), else, the output signal (out) goes to 0V. The out signal (or CLK) has a maximum amplitude of 2V. Here's my code Code:
I get a response varying depending on the transient simulation time I set. When I simulate for 1.1 us it works fine, with a VDC source attached to en..(see picture 1). Although, if I simulate for 20 us, I get an output signal with a maximum amplitude of 1V (see picture 2). When I vary en from 0 to 2.5V every 4 us using vpulse source attached to en, I get an output signal of 200 mV (see picture 3). It must be a parameter to set for the simulator, but which one ? I use Spectre simulator in Cadence version 5.1.4 -USR6 How do I fix this ? Thanks, gsensor. |
Title: Re: Clock generator with variable period in Verilog-A Post by gsensor on Oct 18th, 2012, 7:26am Picture 1: With en = 2.5 V |
Title: Re: Clock generator with variable period in Verilog-A Post by gsensor on Oct 18th, 2012, 7:40am Picture 2: With en = 2.5V and total simulation time is 20 us (althougth only the first 3 us is shown here to allow a better visualisation of the signal..) |
Title: Re: Clock generator with variable period in Verilog-A Post by gsensor on Oct 18th, 2012, 7:41am Picture 3: With en varied every 4 us, using a vpulse source attached to input en. |
Title: Re: Clock generator with variable period in Verilog-A Post by Ken Kundert on Oct 18th, 2012, 10:00am Your asking for trouble by setting the transition time of the transition filter to 0. I recommend you start by giving it a reasonable value. I also think the logic behind your oscillator is not correct. I recommend that you start from a working oscillator and hack it up until you get what you want. Try looking at the Verilog-AMS page on this site. In particular, you can find fixed-frequency oscillators in http://www.designers-guide.org/VerilogAMS/functional-blocks/osc/osc.va. -Ken |
Title: Re: Clock generator with variable period in Verilog-A Post by boe on Oct 19th, 2012, 11:52am Gsensor, Two additional things: a) 5.1.41USR6 for the spectre is quite old. b) the delay of the transition filter seems suspect to me. - B O E |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |