The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 10:35am
Pages: 1
Send Topic Print
Probing port voltages of verilogA block from ams testbench (Read 4628 times)
Dan Clement
Community Member
***
Offline



Posts: 95
Salt Lake City, Utah, USA
Probing port voltages of verilogA block from ams testbench
Apr 13th, 2010, 9:32am
 
Dear Forum:

I am in need of some guidance...  I think I have figured out that what I am doing is not possible but I am hoping the forum can help provide some alternatives to accomplish the goal and some explanations of why it isn't possible.

I will need to give some background first:

I am running top level simulation verification using cadence ams through the analog design environment gui.  My schematic with config view has two instances, STIM for stimulus and DUT for device under test.  Inside of the DUT (top level chip of course) is a bias block with a feedback connection.  The bias block is represented by a verilogA model that is already known to match the real schematic.

The problem that I have is trying to figure out how to probe the input and output pin voltages of the bias block to verify the feedback connection is in the top level schematic as required.

i.e. compareValues(V(testbench.dut.bias.out), V(testbench.dut.bias.in), tolerance...);  //note this is pseudo-code

Recall my stimulus is an ams block and the model is verilogA.  When I try to access the potential (from the ams stimulus) of the pins (verilogA block), I get an error about attempting to modify defparam and that it is not allowed...

I've looked into the LRMs for ams and verilogA.  From the ams LRM I found verbage that I believe says you can't do what I am trying to do.

First question: Why not?  What is the technical limitation?

Second question: Why does the simulator think I'm trying to modify defparams?

Third question: What are some other ideas for verifying that the feedback wire is in the top level schematic?

Fourth question/comment:  It seems that I will need some clever way to use wreals or $numtobits $bitstonum, is that correct?  Based on my reading of the LRMs this seems to be the only practical way to do what I am trying to do...

Thanks in advance for helping me understand this better.  I am new to ams and obviously have more to learn! Smiley

-Dan

FYI:  I am using:
DFII: 5.10.41.500.6.132
NCVLOG: 08.20-s009
MMSIM: 7.0.1.136.isr12
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Probing port voltages of verilogA block from ams testbench
Reply #1 - Apr 13th, 2010, 10:52am
 
Where were you trying to place this code?

compareValues(V(testbench.dut.bias.out), V(testbench.dut.bias.in), tolerance...);

I take it that it is not in the dut nor stim.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Dan Clement
Community Member
***
Offline



Posts: 95
Salt Lake City, Utah, USA
Re: Probing port voltages of verilogA block from ams testbench
Reply #2 - Apr 13th, 2010, 11:20am
 
Hi Geoffrey,

The compareValues is a helper task function that gets included in the STIM instance so it becomes inline with the tests being performed in the STIM testbench.

Does that make sense?

Thanks,
Dan
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Probing port voltages of verilogA block from ams testbench
Reply #3 - Apr 14th, 2010, 8:40am
 
Can you place it inside a module instead?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Dan Clement
Community Member
***
Offline



Posts: 95
Salt Lake City, Utah, USA
Re: Probing port voltages of verilogA block from ams testbench
Reply #4 - Apr 14th, 2010, 11:03am
 
It is in a module, in the ams stimulus file...

Did I misunderstand?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Probing port voltages of verilogA block from ams testbench
Reply #5 - Apr 15th, 2010, 8:27am
 
Does compareValues end up inside an analog block?

What if you put
 $strobe("out=%g, in=%g", V(testbench.dut.bias.out), V(testbench.dut.bias.in))

in the analog block?  (This may tell you if there's a problem with the out-of-module references V(testbench.dut.bias.out), or whether it's a problem with compareValues.)

I'm not quite sure what you mean by "helper task function".
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Dan Clement
Community Member
***
Offline



Posts: 95
Salt Lake City, Utah, USA
Re: Probing port voltages of verilogA block from ams testbench
Reply #6 - Apr 16th, 2010, 5:52am
 
I am sure that the compareValues works properly because it is used many times in my chip verification simulations.

The only thing unique about when it doesn't work is that I am trying to probe the voltage of a port instead of a top level schematic wire.

The compareValues function does not end up in the analog block, only in the discrete/verilog block.

I like your idea of trying to do this from the analog block.  That may provide some more clues.

Thanks,
Dan
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.