The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Analog Verification >> Analog Functional Verification >> How to generate pulse with different amplitude within same transient analysis.
https://designers-guide.org/forum/YaBB.pl?num=1661841365

Message started by Shah on Aug 29th, 2022, 11:36pm

Title: How to generate pulse with different amplitude within same transient analysis.
Post by Shah on Aug 29th, 2022, 11:36pm

Hello everyone,

Please help me to write VerilogA code to generate a pulse sequence with different amplitudes for every time period within a single transient analysis.


I just want to generate it like amplitude modulation but that high amplitude value should vary using a random function.

Please help.

Title: Re: How to generate pulse with different amplitude within same transient analysis.
Post by Ken Kundert on Aug 29th, 2022, 11:59pm

You might want to try starting with the fixed-frequency oscillator, count the pulses, and make vl and vh  a function of the count.

-Ken

Title: Re: How to generate pulse with different amplitude within same transient analysis.
Post by Shah on Aug 30th, 2022, 12:36am

Dear Ken,

Thank you for your reply.
I'm trying to resolve my problem. But it seems I did not elaborate on my problem clearly.

I want to add some random value to the pulse source, like noise, by using random or any other function.

Please check the image. I tried to explain my problem.

Title: Re: How to generate pulse with different amplitude within same transient analysis.
Post by Ken Kundert on Aug 30th, 2022, 12:10pm

It is easier to create pulses with random height than it is to create pulses with uniform height and then adjust their height later.

You can generate random numbers in Verilog-A using rdist_unifrom or rdist_normal.

Title: Re: How to generate pulse with different amplitude within same transient analysis.
Post by Shah on Aug 31st, 2022, 2:40am

Dear Ken,

Thank you so much for your reply.

I tried to simulate it with a random function, but transient analysis takes only one value.

See
1. Firstly, I gave the current pulse source a height of 10 pA.
2. Then I call the verilog-A file where I can add a random value to the
   height of the current source pulse. Like 10 pA ± n% 10pA
    where n is the randomness percentage of the height which we can
    control.
3. Then, after generating a current pulse with a random height, we can feed the data to the main circuit.

But, I'm not able to generate it using HSPICE with verilog-A.

Please help me to find out the way.

Title: Re: How to generate pulse with different amplitude within same transient analysis.
Post by Ken Kundert on Aug 31st, 2022, 11:57am

If you want help with a specific model, you should show the model.  I cannot see what you are doing wrong unless I can see the code.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.