The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 19th, 2024, 1:55pm
Pages: 1
Send Topic Print
ncelab transistion argument (Read 2500 times)
Rizzo
New Member
*
Offline



Posts: 2

ncelab transistion argument
Apr 06th, 2010, 8:25am
 
Hello. Iam a student working on my diploma thesis and iam reletivily new to analog modeling.
Iam to use the ams designer to create a model for an energy supply and verify a module of the supply i built in schematics. This i extract with amsdirect to veriog-ams code. 'This is the therory so far. My tests worked out quit well. I worked myself through most of our designframework. like ADE L, nclog ncelab and  ncsim. most of my testcircuits are working so far.

Now I need a clock generator. So i used an an example from the designersguide to verilog ams.
Code:
`include "disciplines.vams"

module clock_generator(p,n);
 electrical p,n;

 parameter real clk_period = 10n from (0:inf), 	//Periode in Sekunden
                clk_ratio = 0.5 from (0:1),	//Clock Verhältnis
                clk_high = 5.0,			//Spannung von HIGH in Volt
                clk_low  = 0.0 from (-inf:clk_high),	//Clock LOW in Volt
                trise = 1n from [0:inf),	//Trise in Sekunden
                tfall = 1n from [0:inf);	//Tfall in Sekunden

 analog begin
     @(timer(0,clk_period))
     begin
        V(p,n) <+ transition(clk_high,
                             clk_period*clk_ratio - trise/2,trise);
        V(p,n) <+ transition(clk_low,
                             clk_period - tfall/2,trise,tfall);
     end
 end
endmodule

 



my problem ist, that i can compile this with ncvlog -AMS without a problem, but ncelab says, that the transition statement is not allowed in this context ("conditionally-executed statement or in an expression") and that i use a contribution statement and should delete it.

Can someone tell me, why the transition statement isnt allowed and how i can create a clk_gen is verilog-A?

The best way would be to use the spectre sources (as i understand, ncsim uses for the analog part of the simulation spectre) but until now i wanst able to do that. I could not found a detailed guide how to use the simulator sources in a vams netlist.
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: ncelab transistion argument
Reply #1 - Apr 7th, 2010, 7:38am
 
The problem is that neither the contribution nor the transition would be evaluated at every timestep - and so they would not be defining the appropriate equations or remembering the transitions from each iteration.

You also have two contribution statements on the same pair of nodes - these will end up as voltage sources in series.

Best thing is to attend a training class on Verilog A or Verilog AMS (Cadence offers these, as I'm sure do others) or read a good book such as http://www.designers-guide.org/Books/#Kundert-2004

Regards,

Andrew.
Back to top
 
 
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.