The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 11th, 2024, 5:30pm
Pages: 1
Send Topic Print
Pulse source in Verilog-A(MS) (Read 3150 times)
nvs117
New Member
*
Offline



Posts: 2
Germany
Pulse source in Verilog-A(MS)
May 08th, 2007, 7:09am
 
Hi there,

What are the possibilities to model a source which gives a rectangular voltage (or position) pulse at a certain time point?

I have tried this here, but this is doesn't give the right result - it always produces large outputs (either below or greater zero).

BTW: Don't hesitate, this is a signal-flow approach! Wink


// position pulse

module pos_pulse (out_pos);
   
   parameter real startval = 10.0;
   parameter real endval = 0.0;
   parameter real period = 100.0;
   parameter real starttime = 1.0;
   parameter real endtime = 15.0;
   
   output out_pos;
   position out_pos;

   analog begin

       @(initial_step) begin
     Pos(out_pos) <+ slew(startval, 1.0e-9, 1.0e-9); // also tried "transition" here
     end
     
     @(timer(endtime)) begin
     Pos(out_pos) <+ slew(endval, 1.0e-9, 1.0e-9); // also tried "transition" here
     end
   end
endmodule



Any ideas?

Chris
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Pulse source in Verilog-A(MS)
Reply #1 - May 8th, 2007, 12:06pm
 
nvs117 wrote on May 8th, 2007, 7:09am:
       @(initial_step) begin
     Pos(out_pos) <+ slew(startval, 1.0e-9, 1.0e-9); // also tried "transition" here
     end


I don't think this is legal syntax ...  you shouldn't have <+ nor slew inside an event.  Instead, you should have a real value that gets set in the events, and the contribution should be performed always:

real outval;
@(initial_step) outval = startval;
@(timer(endtime)) outval = endval;

Pos(out_pos) <+ transition(outval, 1n, 1n);
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
nvs117
New Member
*
Offline



Posts: 2
Germany
Re: Pulse source in Verilog-A(MS)
Reply #2 - May 9th, 2007, 3:59am
 
Hi Geoff,

This works fine.

Thanks from a VAMS newbie.

;-)
Back to top
 
 
View Profile   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.