The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 19th, 2024, 2:25am
Pages: 1
Send Topic Print
How to generate pulse with different amplitude within same transient analysis. (Read 754 times)
Shah
New Member
*
Offline



Posts: 3

How to generate pulse with different amplitude within same transient analysis.
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.
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: How to generate pulse with different amplitude within same transient analysis.
Reply #1 - 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
Back to top
 
 
View Profile WWW   IP Logged
Shah
New Member
*
Offline



Posts: 3

Re: How to generate pulse with different amplitude within same transient analysis.
Reply #2 - 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.
Back to top
 

P1.jpg
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: How to generate pulse with different amplitude within same transient analysis.
Reply #3 - 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.
Back to top
 
 
View Profile WWW   IP Logged
Shah
New Member
*
Offline



Posts: 3

Re: How to generate pulse with different amplitude within same transient analysis.
Reply #4 - 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.
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: How to generate pulse with different amplitude within same transient analysis.
Reply #5 - 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.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.