The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 29th, 2024, 12:55am
Pages: 1
Send Topic Print
How does a behavior sine wave to drive a logic gate? (Read 3255 times)
ruwan2
Junior Member
**
Offline



Posts: 15

How does a behavior sine wave to drive a logic gate?
Apr 13th, 2015, 9:55pm
 
Hi,
After some testing, I can use a logic gate to drive a resistor with verilog-AMS. When I try to drive a logic gate with a sine behavior wave code:


Code:
`include "disciplines.vams"
`include "constants.vams"

module sinVarFreq(p, n);

    inout	p, n;
    electrical p, n;

    parameter real freq  = 1.0e2;
    parameter real coeff = 1.0;
    real tempr;

    analog begin
	  V(p,n) <+ 15.0*sin(`M_TWO_PI * freq * (sin(`M_TWO_PI * coeff * $abstime) + 1.0) * $abstime);
    end
endmodule 



It looks like the logic input seen as a hiz in the picture:


I have a doubt about it on the behavior sine wave unit. Although it is larger than 10, whether it is in Volt? In this EDA tool, I have set the interface model:

Code:
.model itf y level=itf delay=1n vin1x=2.4 vinx0=2.4 vin0x=2.6 vinx1=2.6
 




What is wrong will result in such a problem (logic does not react to a varying analog input signal?

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



Posts: 1998
Massachusetts, USA
Re: How does a behavior sine wave to drive a logic gate?
Reply #1 - May 4th, 2015, 6:55am
 
ruwan2 wrote on Apr 13th, 2015, 9:55pm:
I have a doubt about it on the behavior sine wave unit. Although it is larger than 10, whether it is in Volt?


Since you have declared the ports as "electrical p, n;" I would expect that the disciplines.vams will show you that the units of the potential for that discipline are, indeed, Volts.

I don't know what your .model itf does; I'm not familiar with an element that has parameters vinx0, etc.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
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.