The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 24th, 2024, 1:56am
Pages: 1
Send Topic Print
Query with regard to contribution operator (Read 1761 times)
Rosh
Junior Member
**
Offline



Posts: 21

Query with regard to contribution operator
Jun 28th, 2016, 12:12am
 
Here is my code :

Code:
`include "disciplines.vams"


	module test(in, out);
	input in;
	output out;
	voltage out,in;
	analog begin
		if (V(in)==0)
			V(out)<+1;
		else
			V(out)<+3;

		V(out)<+1;

		end


		endmodule


 



This is the resulting output



In the first edge:
In=5V and Out=4V

In the second edge:
In=0V and Out=2V instead of 6V.

Since the contribution operator accumulates signal values, shouldn't Out have a potential of 6V? (4V from the previous edge)



Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Query with regard to contribution operator
Reply #1 - Jun 28th, 2016, 11:57am
 
The contribution operator does not accumulate over time. It adds together all of the contributions made to a branch at each instant in time. The starting point at each instant of time is not the previous value, it is always zero.

I recommend you take a look at this tutorial.

-Ken

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.