The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> A stimulus for digital signal using verilog-A https://designers-guide.org/forum/YaBB.pl?num=1412430322 Message started by ywguo on Oct 4th, 2014, 6:45am |
Title: A stimulus for digital signal using verilog-A Post by ywguo on Oct 4th, 2014, 6:45am Hi Guys, Is it possible to write a stimulus for digital signal using verilog-A? For example, a short verilog code is shown below. Code:
Thanks a lot. Yawei |
Title: Re: A stimulus for digital signal using verilog-A Post by patrick on Oct 5th, 2014, 1:01pm Perhaps something like: `include "disciplines.vams" module clkgen(p); output p; electrical p; reg sclk_int; initial begin sclk_int = 1'b0; forever begin #(40/2) sclk_int = ~sclk_int; end end analog begin V(p) <+ transition(sclk_int,0,1n,1n); end endmodule |
Title: Re: A stimulus for digital signal using verilog-A Post by ywguo on Oct 5th, 2014, 9:33pm Hi Patrick, Reg is not allowed in verilog-A. Quote:
Best Regards, Yawei |
Title: Re: A stimulus for digital signal using verilog-A Post by patrick on Oct 5th, 2014, 9:38pm ok, I assumed you wanted to write a mixed domain model. You will need to stick to the VA analog block and analog initial block; initial block and digital syntax is not allowed in Verilog-A. |
Title: Re: A stimulus for digital signal using verilog-A Post by boe on Oct 6th, 2014, 1:17am Ywguo, this can be done using the timer function. For examples see the Oscillator models in the Verilog-AMS section of this web site. - B O E |
Title: Re: A stimulus for digital signal using verilog-A Post by ywguo on Oct 6th, 2014, 9:33pm Hi B O E, That's a good idea. Thank you very much. Yawei |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |