Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL-AMS: Discontinuos problem

Status
Not open for further replies.

electronics_sky

Member level 3
Joined
Feb 9, 2006
Messages
64
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
1,827
Hi there,

i am doing some VHDL-AMS coding with Mentor Graphics's ADVanceMS. However i am facing some discontinuos problem. My coding is as below:

------------------------------------------------------------
architecture TEST of CNT is
quantity VA1 across A1;
quantity VB1 across IB1 through B1;
quantity VC1 across IC1 through C1;
quantity Q_1: real := 0.0;

begin
if RESET = '0' use
VB1 == VA1;
else
VB1 == 0.0;
end if;

Q_1 == VB1*2.0;

if not Q_1'above(5.0) use
VC1 == Q_1;
else
VC1 == 5.0;
end use;

break on RESET,Q_1'above(5.0) ;

end architecture;

----------------------------------------------------------------------

however i am facing discontinuos probelm (a spike occure during the condition state is true)due to "if not Q_1'above(5.0) use". The code seems like better if i am writing the condition as "if Q_1 < 5.0 use", however the simulator display warning if 'above is not use for quantity comparison.

Please kindly enlighten me in this issue. Thank.
 

Dear AMS designer,

Please kindly help me to solve this problem.

Thank you!!
 

use this and try to simulate it:

architecture TEST of CNT is
quantity VA1 across A1;
quantity VB1 across IB1 through B1;
quantity VC1 across IC1 through C1;
quantity Q_1: real := 0.0;

begin
if RESET = '0' use
VB1 == VA1-VB1'dot*1.0e-7;
else
VB1 == 0.0-VB1'dot*1.0e-7;
end if;

Q_1 == VB1*2.0;

if not Q_1'above(5.0) use
VC1 == Q_1-VC1'dot*1.0e-7;
else
VC1 == 5.0-VC1'dot*1.0e-7;
end use;

break on RESET,Q_1'above(5.0) ;

end architecture;
-------------------------------------
this modifications should solve your problem
u can decrease 1.0e-7 number if the error persist.

tell me if this solve your problem

bye
 
Hi alinalin19832007,

Sorry for the late reply.

It helps me to solve the discontinuity problem. However, can i know why the problem occur and why the solution can solve it.

thank you so much!!
 

hi there,

can you explain why the problem occurred?

As i know, if we are using "break on", this problem should not occur. However, the "break on" command doesn't seem to function here.

Can i change the modelling method to avoid the problem rather than filtering it?

Thank yo
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top