The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:12am
Pages: 1
Send Topic Print
Driver's behavior w/t or w/o dead time... (Read 7244 times)
sand_dolphin2
Community Member
***
Offline



Posts: 40
Japan
Driver's behavior w/t or w/o dead time...
Oct 01st, 2009, 12:02am
 
Hi!!
This is the first time to write questions in this forum. Embarrassed

I have one question of Verilog-AMS behavior of bellow case. Huh

Verilog-AMS(DUT)
// P-ch(High Side Gate) + N-ch(Low Side Gate) Driver

logic   HG, LG;

analog begin
   if (~HG)
      V(VSW) <+ 4.5;
   else if (LG)
      V(VSW) <+ 0;
end

testbench-caseA(correct behavior) Smiley
//testcase a) w/o dead time

   initial begin
       HG = 1'b1;
       LG = 1'b0;

       #100;
       forever begin
            HG = 1'b0;
       #640 HG = 1'b1;
            LG = 1'b1;
       #640 LG = 1'b0;
       //#10;
       end

testbench-caseB(incorrect behavior) Undecided

   initial begin
       HG = 1'b1;
       LG = 1'b0;

       #105;
       forever begin
            HG = 1'b0;
       #630 HG = 1'b1;
       #10  LG = 1'b1;
       #630 LG = 1'b0;
       #10;
       end

plz let me know somebody,  :(
why does driver have incorrect behavior w/t dead time(both gate off:testbench-caseB) ?

How to design driver which have correct behavior even though w/t dead time(testbench-caseB)?

I'll wait some comments from somebody...
ciao  :)
Back to top
 

VVSW_wt_wo_dd_091001a.JPG
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Driver's behavior w/t or w/o dead time...
Reply #1 - Oct 2nd, 2009, 9:07am
 
sand_dolphin2 wrote on Oct 1st, 2009, 12:02am:
...
why does driver have incorrect behavior w/t dead time(both gate off:testbench-caseB) ?

How to design driver which have correct behavior even though w/t dead time
...(testbench-caseB)?

The DUT does not specify an output voltage for LG=0 & HG=1, so the node is hi-Z.
What behavior do you expect for this case?
BOE
Back to top
 
 
View Profile   IP Logged
sand_dolphin2
Community Member
***
Offline



Posts: 40
Japan
Re: Driver's behavior w/t or w/o dead time...
Reply #2 - Oct 4th, 2009, 4:18pm
 
boe wrote on Oct 2nd, 2009, 9:07am:
sand_dolphin2 wrote on Oct 1st, 2009, 12:02am:
...
why does driver have incorrect behavior w/t dead time(both gate off:testbench-caseB) ?

How to design driver which have correct behavior even though w/t dead time
...(testbench-caseB)?

The DUT does not specify an output voltage for LG=0 & HG=1, so the node is hi-Z.
What behavior do you expect for this case?
BOE


Thanks for your kindly reply. Wink

so, My expect behavior in caseB is hi-Z cuz both gates(HG,LG) are off.

I don't know well about Verilog-AMS behavior,

but i guess in case of other statement which is not defined ,
the node will be not driven(hi-Z). Huh

anyway , even if HG or LG is on, v(VSW) does not have correct valuee..... Why... Cry

plz give some comments to solve this....
I'll wait for your and somebody's kindly reply!! Smiley
 
ciao Smiley
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Driver's behavior w/t or w/o dead time...
Reply #3 - Oct 5th, 2009, 8:34am
 
sand_dolphin2 wrote on Oct 4th, 2009, 4:18pm:
...
so, My expect behavior in caseB is hi-Z cuz both gates(HG,LG) are off.
...
but i guess in case of other statement which is not defined ,
the node will be not driven(hi-Z). Huh

anyway , even if HG or LG is on, v(VSW) does not have correct valuee.....

The problem is that the analog solver does not notice some of the digital events because the step size is too large. You need to use edge sensitive code in DUT (switch).
Code:
analog
  @(negedge HG) <statement>
end 


Note that <statement> is executed only at falling edge of HG (for rising edge use posedge). However this statement should ensure analog simulator notices events.
Further, I suggest you use a transition filter to smooth out analog transitions.
BOE
Back to top
 
 
View Profile   IP Logged
sand_dolphin2
Community Member
***
Offline



Posts: 40
Japan
Re: Driver's behavior w/t or w/o dead time...
Reply #4 - Oct 5th, 2009, 7:46pm
 
boe wrote on Oct 5th, 2009, 8:34am:
sand_dolphin2 wrote on Oct 4th, 2009, 4:18pm:
...
so, My expect behavior in caseB is hi-Z cuz both gates(HG,LG) are off.
...
but i guess in case of other statement which is not defined ,
the node will be not driven(hi-Z). Huh

anyway , even if HG or LG is on, v(VSW) does not have correct valuee.....

The problem is that the analog solver does not notice some of the digital events because the step size is too large. You need to use edge sensitive code in DUT (switch).
Code:
analog
  @(negedge HG) <statement>
end 


Note that <statement> is executed only at falling edge of HG (for rising edge use posedge). However this statement should ensure analog simulator notices events.
Further, I suggest you use a transition filter to smooth out analog transitions.
BOE


Thanks for your reply.
This driver should drive High at ~HG  and Low at LG. and there is no case of both Gates on. and original ams have problem only both off case.

i rebuild to make ams file bellow

analog begin
@(negedge HG or posedge LG)
 begin
   if (~HG)
      V(VSW) <+ 4.5;
   else if (LG)
      V(VSW) <+ 0;
 end
end

but, this design drive constant value only fall/rise edge timing of HG/LG.
V(VSW)'s results is same error behavior even if testbench-caseA like as testbench-caseB . Cry

Plz give some comments!! help me.... Sad
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Driver's behavior w/t or w/o dead time...
Reply #5 - Oct 7th, 2009, 8:55am
 
I'd use code like Code:
analog begin
  @(posedge HG or negedge HG or posedge LG or negedge LG) begin
    if (~HG & ~LG)
	begin  vvsw = Vhigh; res = Ron; end
    else if (HG & LG)
	begin vvsw = Vlow; res = Ron; end
    else if (~HG & LG)
	begin vvsw = Vx; res = Rx; end
    else
	res = Roff;
  end
  V(VSW) <+ transition(vvsw, ...) + transition(res, ...) * I(VSW);
end 

BOE
Back to top
 
 
View Profile   IP Logged
sand_dolphin2
Community Member
***
Offline



Posts: 40
Japan
Re: Driver's behavior w/t or w/o dead time...
Reply #6 - Oct 7th, 2009, 9:52pm
 
Hi boe!

boe wrote on Oct 7th, 2009, 8:55am:
I'd use code like Code:
analog begin
  @(posedge HG or negedge HG or posedge LG or negedge LG) begin
    if (~HG & ~LG)
	begin  vvsw = Vhigh; res = Ron; end
    else if (HG & LG)
	begin vvsw = Vlow; res = Ron; end
    else if (~HG & LG)
	begin vvsw = Vx; res = Rx; end
    else
	res = Roff;
  end
  V(VSW) <+ transition(vvsw, ...) + transition(res, ...) * I(VSW);
end 

BOE


Thank you for your cooperation in always Smiley

In this code,

 real vvsw,res;
 parameter Vhigh = 4.5;
 parameter Vlow = 0.0;
 parameter Vx = -10;
 parameter Ron  = 100m;
 parameter Roff = 10M;
 parameter Rx = 1;//not occur cuz w/t deadtime


a)  V(VSW) <+ transition(vvsw, ...);
   or
     V(VSW) <+ vvsw;

b)  V(VSW) <+ transition(vvsw, ...) + transition(res, ...) * I(VSW);


case a) is having a good behavior(expected)
case b) is not well. this behavior is like as first problem.

I wonder that resister should be modeled both HG and LG...
but your way is good way to keep energy of Kirchhoff's laws.

I want to make this model behave as logical function only,
so i should make this model as case a)
a)  V(VSW) <+ transition(vvsw, ...);

Thank's a lots of your kinds Wink

ciao
See you soon!! bye for now
Back to top
« Last Edit: Oct 8th, 2009, 1:18am by sand_dolphin2 »  

HGLG_091008a.JPG
View Profile   IP Logged
sand_dolphin2
Community Member
***
Offline



Posts: 40
Japan
Re: Driver's behavior w/t or w/o dead time...
Reply #7 - Oct 12th, 2009, 4:23pm
 
Hi boe and somebody !!

In this post of first step

logic HG,LG;
electrical VSW_temp;

analog begin
   if (~HG)            // Polarity Inverted (consistency for transister model)
      V(VSW_temp) <+ 4.5;
   else if (LG)
      V(VSW_temp) <+ 0;

   //V(VSW) <+ V(VSW_temp);//CaseA
   V(VSW) <+ transition(V(VSW_temp),0,trise,tfall);//CaseB
end

w/t transition function CaseB is running well,but w/o transition function CaseA is not good. Huh

What doese make this differ behavior btw w/t and w/o ?
Should we use transition function to act analog solver by trigger of digital solver ?   Sad

I'll wait for your comments!! Wink
ciao Smiley
Back to top
 

transition_091013a.JPG
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Driver's behavior w/t or w/o dead time...
Reply #8 - Oct 15th, 2009, 9:34am
 
sand_dolphin2 wrote on Oct 12th, 2009, 4:23pm:
...
w/t transition function CaseB is running well,but w/o transition function CaseA is not good. Huh

What doese make this differ behavior btw w/t and w/o ?
Should we use transition function to act analog solver by trigger of digital solver ?   Sad
...
Steps in a signal (of type electrical) are usually bad for convergence, so using a transition filter (which ensures that the signal V(VSW) is differentiable) improves convergence and simulation speed. I also suggest you use a real variable for VSW_temp: this should simulate faster (electrical signals have a lot of overhead).
Hope this helps.
BOE

[Edit:]PS: If you use a transition filter, you need the resistor term to model HiZ.
Back to top
 
 
View Profile   IP Logged
sand_dolphin2
Community Member
***
Offline



Posts: 40
Japan
Re: Driver's behavior w/t or w/o dead time...
Reply #9 - Oct 15th, 2009, 5:07pm
 
Hi boe!!
Thank you for your cooperation in always!! Smiley

boe wrote on Oct 15th, 2009, 9:34am:
sand_dolphin2 wrote on Oct 12th, 2009, 4:23pm:
...
w/t transition function CaseB is running well,but w/o transition function CaseA is not good. Huh

What doese make this differ behavior btw w/t and w/o ?
Should we use transition function to act analog solver by trigger of digital solver ?   Sad
...
Steps in a signal (of type electrical) are usually bad for convergence, so using a transition filter (which ensures that the signal V(VSW) is differentiable) improves convergence and simulation speed. I also suggest you use a real variable for VSW_temp: this should simulate faster (electrical signals have a lot of overhead).
Hope this helps.
BOE

[Edit:]PS: If you use a transition filter, you need the resistor term to model HiZ.


In this case,
there is no need to add transition "filter",
the reason for using transition function is to solve this first step problem.

So, your suggestion of should use not electrical but real
at the solving first step problem,
w/o transition function V(VSW)<+V(VSW_temp); can't treat real.
the nanosim compiler output error code.
then i treat VSW_temp as electrical.

Why should i use transition function for solving this first step problem?
Plz help me... Embarrassed

See you soon,
ciao Wink
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Driver's behavior w/t or w/o dead time...
Reply #10 - Oct 16th, 2009, 4:18am
 
sand_dolphin2 wrote on Oct 15th, 2009, 5:07pm:
...
In this case,
there is no need to add transition "filter",
the reason for using transition function is to solve this first step problem.

So, your suggestion of should use not electrical but real
at the solving first step problem,
w/o transition function V(VSW)<+V(VSW_temp); can't treat real.
the nanosim compiler output error code.
then i treat VSW_temp as electrical.
A voltage step across a capacitance requires a (momentaneous) infinite current spike (Dirac pulse), which usually causes problems with the simulator. Even without capacitance at node VSW, simulator convergence should be better with transition "function" (called "transition filter" in the LRM).
The transition filter helps in two ways: 1. It ensures finite first derivative of the voltage and 2. it provides the simulator with information for step size control (rise/fall time).
Therefore you should use Code:
V(VSW) <+ transition(...); 

For efficiency reasons you should use a real variable in your if statement. Because (some) simulators consider every assignment to the variable in the transition filter an event (even if the value does not change), you should put the if statement in an analog event control (@) statement as I suggested in reply #5 (http://www.designers-guide.org/Forum/YaBB.pl?num=1254380528#5)
BOE

[Added:]The other purpose of using an analog event control statement is to ensure that no events are lost (by adding analog time points at transitions).
Back to top
 
 
View Profile   IP Logged
sand_dolphin2
Community Member
***
Offline



Posts: 40
Japan
Re: Driver's behavior w/t or w/o dead time...
Reply #11 - Oct 19th, 2009, 12:50am
 
boe wrote on Oct 16th, 2009, 4:18am:
A voltage step across a capacitance requires a (momentaneous) infinite current spike (Dirac pulse), which usually causes problems with the simulator. Even without capacitance at node VSW, simulator convergence should be better with transition "function" (called "transition filter" in the LRM).
The transition filter helps in two ways: 1. It ensures finite first derivative of the voltage and 2. it provides the simulator with information for step size control (rise/fall time).
Therefore you should use Code:
V(VSW) <+ transition(...); 

For efficiency reasons you should use a real variable in your if statement. Because (some) simulators consider every assignment to the variable in the transition filter an event (even if the value does not change), you should put the if statement in an analog event control (@) statement as I suggested in reply #5 (http://www.designers-guide.org/Forum/YaBB.pl?num=1254380528#5)
BOE
[Added:]The other purpose of using an analog event control statement is to ensure that no events are lost (by adding analog time points at transitions).


Thank you for your cooperation in always Smiley
 
I had solved by your kindly advice.
This should be closed, i think.
 how about anybody?  Sad
 if so,please add message or questions Wink

See you soon BOE!
ciao  :)

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