The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> How does a behavior sine wave to drive a logic gate?
https://designers-guide.org/forum/YaBB.pl?num=1428987331

Message started by ruwan2 on Apr 13th, 2015, 9:55pm

Title: How does a behavior sine wave to drive a logic gate?
Post by ruwan2 on 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,

Title: Re: How does a behavior sine wave to drive a logic gate?
Post by Geoffrey_Coram on 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.

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.