The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Usage of wreal
https://designers-guide.org/forum/YaBB.pl?num=1213965988

Message started by Ankur.Chaplot on Jun 20th, 2008, 5:46am

Title: Usage of wreal
Post by Ankur.Chaplot on Jun 20th, 2008, 5:46am

Hi,
  Can any one explain the usage of wreal sematically. Under what circumstance a designer would use the net type as "wreal"? What simulation advantage he may achieve.

Regards
AnkurChaplot

Title: Re: Usage of wreal
Post by Stefan on Jun 20th, 2008, 5:50am

Wreal is a double precision datatype (like electrical nets) but is simulated in the digital domain (event driven).
There are a lot of possibilities to utilize this to speed up simulations.
Check the BMAS papers from last year for "event driven modeling".

Regards,

Stefan

Title: Re: Usage of wreal
Post by Stefan on Jun 20th, 2008, 5:53am

Just as addition:
Simulation time for a complete PLL
using analog modeling (like the papers from Kundert et.al.) : around 12 minutes
same loop with pure event driven modeling : 13 seconds

Title: Re: Usage of wreal
Post by jbdavid on Jun 26th, 2008, 11:47pm

Its great.. you can send REAL number signals around without invoking an analog solver.. BUT there are limitations..
Wreals support only 1 number on a wire -- and it can only go one way..
-- give me an inch and I want a mile..
-- but with that limitation you can quite accurately model an ADC or dac without the analog solver.. or there is the PLL model stephan talks about.
-- I've even modeled an RF receiver with wreals.. and simulated a couple of frames of TV data in minutes.. -- from antenna thru the ADC after the filters.. (I left the supply and bias lines as electrical - because of the significant benefit of being able to pass voltage one way and current the other.. (thru the normal analog solver) and it was less modeling work, with NO speed up (they are DC networks afterall!!)

`timescale 1ns/1ns
module analog_driver (out_p, out_m);
output out_p, out_m;
wreal out_p, out_m;
parameter real vcm = 0.5;
parameter real vamp = 0.5;
parameter real Fout = 10M;
parmeter integer PtsPerPer = 10;
real out_val = 0;
real Tupdate= 1/Fout/1n; //(scale up to the timescale)
assign out_p = vcm + out_val;
assign out_m = vcm -out_val;
always begin
 Tupdate = 1/Fout/1n;
 out_val = vamp*sin(`M_PI *2 * Fout * $realtime *1n);
 #(Tupdate);
end
endmodule
--

no analog == VERY fast!!
jbd


Title: Re: Usage of wreal
Post by Jess Chen on Jun 29th, 2008, 5:33pm

In addition to the above limitations, there is one more important one: "all the time". i.e. you can only pass one real number, one way, all the time. The last constraint means you can't turn off a wreal; there is no high impedance state. Thus, even though you physically only turn one of two parallel circuits on at a time, you cannot tie their wreal outputs together.

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