Ken Kundert wrote on Aug 25th, 2006, 11:38am:That is strange. It may be that your simulator (which appears to be Spectre) is actually evaluating the model at every frequency point. Conceptually that is not necessary. However, since it is evaluating the model at every frequency point, then it is probably also running a DC analysis (it better, because as you have shown, by evaluating the model you can change its behavior, and hence the DC operating point, on every step). Anyway, with this being the case you should ignore my comments on the printing. However, it is still not possible to access the frequency.
-Ken
Thanks ken,
Anyway just for my curiousity i have run the following veriloga code, to remove the acfrq=acfrq+1 so that nothing in the model changes each time it is evaluated, ie no reason to redo the dcop...
module freq;
electrical a; //needed to present an output for spectre to be happy
analog begin
$strobe("bob");
end // analog
endmodule
And when i ran the ac sweep 1 to 10 in steps of 1 i get:
****************************************
AC Analysis `ac': freq = (1 Hz -> 10 Hz)
****************************************
Notice from spectre during AC analysis `ac'.
No outputs found. Loosening output filter criterion to `lvl'.
bob
bob
bob
bob
ac: freq = 2 Hz (11.1 %), step = 1 Hz (11.1 %)
bob
ac: freq = 3 Hz (22.2 %), step = 1 Hz (11.1 %)
bob
ac: freq = 4 Hz (33.3 %), step = 1 Hz (11.1 %)
bob
ac: freq = 5 Hz (44.4 %), step = 1 Hz (11.1 %)
bob
ac: freq = 6 Hz (55.6 %), step = 1 Hz (11.1 %)
bob
ac: freq = 7 Hz (66.7 %), step = 1 Hz (11.1 %)
bob
ac: freq = 8 Hz (77.8 %), step = 1 Hz (11.1 %)
bob
ac: freq = 9 Hz (88.9 %), step = 1 Hz (11.1 %)
bob
ac: freq = 10 Hz (100 %), step = 1 Hz (11.1 %)
Accumulated DC solution time = 10 ms.
Intrinsic ac analysis time = 0 s.
Total time required for ac analysis `ac' was 10 ms.
so its still evaluating the DC before each ac step... pretty bizarre ?
Anyway the original code will still give you the variable acfrq which in incremented in tandem with the ac freq (albeit there is a hidden dc op beofre every ac point, which can't be turned off ?!?!).
cheers
aw