The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Sep 19th, 2020, 12:00pm
Pages: 1
Send Topic Print
combining PWL and smooth waveforms in one voltage source (Read 141 times)
sutapanaki
Community Member
***
Offline



Posts: 40

combining PWL and smooth waveforms in one voltage source
Jun 25th, 2020, 6:46pm
 
Hi,

I need to create a verilogA script for a voltage source that combines both PWL and smooth sections of its behavior, like in the attached picture. I can use the transition filter for the PWL part and I think for the smooth part it is best if I use the branch contribution operator <+ only. I don't know how to combine both. Any help will be very appreciated. Thanks.



Back to top
 

Capture_023.PNG
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2285
Silicon Valley
Re: combining PWL and smooth waveforms in one voltage source
Reply #1 - Jun 26th, 2020, 10:57am
 
You could use addition or multiplication.  For example:

Code:
analog begin
    offset = transition(enable, 0, 10n);
    sine = ampl*sine(6.28*freq*$abstime);
    V(out) <+ offset + sine;
end 



Code:
analog begin
    on = transition(enable, 0, 10n);
    sine = on*ampl*sine(6.28*freq*$abstime);
    V(out) <+ sine;
end 



-Ken
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2020 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.