The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 29th, 2024, 3:56am
Pages: 1
Send Topic Print
Multiple sources (Read 11528 times)
vikramts
Junior Member
**
Offline



Posts: 17

Multiple sources
Jan 06th, 2005, 5:39pm
 
I am trying to have 3 voltage sources in my testbench:

vsource #(.type("sine"),.dc(0),.freq(5000),.ampl(5)) vin1(vinp,vss);
vsource #(.type("dc"),.val(2.5)) vin2(vinm,vss);
vsource #(.type("dc"),.val(5)) vin3(vdd);

Is this definition valid in the first place?And is the syntax of the DC definition valid?

Couls somebody help me?

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: Multiple sources
Reply #1 - Jan 6th, 2005, 9:31pm
 
If you'd tried simulating with this, you'd have seen the errors that I'd have expected to see, namely:

Warning from spectre during circuit read-in.
   In instance `test.vin2', no such parameter as `val'.
   In instance `test.vin3', no such parameter as `val'.
Error found by spectre during circuit read-in.
   test.vin3: Too few terminals given (1 < 2).

The .val() parameters should be .dc() for a DC source. And the definition of vin3 needs two terminals - you gave one.

For information on the available parameters for built-in primitives, you can do "spectre -h vsource" (for example).

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
vikramts
Junior Member
**
Offline



Posts: 17

Re: Multiple sources
Reply #2 - Jan 8th, 2005, 2:15pm
 
Hi Andrew

I did make a mistake typing the code statements there.
The following is what I wanted to try(and eventually did) using Cadence-AMS simulator.

vsource #(.type("sine"),.freq(5000),.ampl(5),.dc(0)) vin1(vinp,vss);
vsource #(.type("dc"),.ampl(2.5),.dc(0)) vin2(vinm,vss);
vsource #(.type("dc"),.ampl(5),.dc(0)) vin3(vdd,vss);

Now I can see the sinewave for vin1(when I check the signals at the 3 points), but I cannot see a dc signal for the other 2 voltage sources.

vinp and vinm are the voltages at the +ve and -ve terminals of an op-amp which has vdd and vss connections.

Could you tell me what could be the problem?

Thanks !
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: Multiple sources
Reply #3 - Jan 9th, 2005, 9:35am
 
The "ampl" parameter is irrelevant for a DC source.
Consequently both vin2 and vin3 will be 0 volt sources. The "dc" parameter is how you set the value for a DC source, as I mentioned in my previous post. So nodes vinm and vdd will both be at 0 volts (with respect to vss).

"ampl" is the amplitude of the sine wave - but these are not sine sources.

Surely you could have spotted that, with the information I gave before?

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
vikramts
Junior Member
**
Offline



Posts: 17

Re: Multiple sources
Reply #4 - Jan 9th, 2005, 6:06pm
 
I actually DID spot that as soon as I posted that reply Grin..but thanks again for your help !

By the way, when I compile a code using the Cadence-AMS simulator, are certain work files created and stored with operational characteristics information or something? I am trying to see how I can parameterize the models I develop,so that they can be amendable for specific requirements.

As such, one can only analyse the operation by viewing the waveforms. Are there files which have other relevant information logged during simulation?
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: Multiple sources
Reply #5 - Jan 10th, 2005, 2:19pm
 
Sorry, but I don't understand what you're asking...

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
vikramts
Junior Member
**
Offline



Posts: 17

Re: Multiple sources
Reply #6 - Jan 17th, 2005, 9:21am
 
Well,my query is as follows...

I would like to analyse plots of Output and Input voltage using the Cadence-AMS simulator for neuron threshold functions(like the sigmoid and gaussian functions). As such,the SimVision only performs transient analysis. Is there anyway I can get data from simulations and store it in a separate file(which I can open in MATLAB and make my plot as required)?

Would you rather suggest an alternative method as a better solution for this ?
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: Multiple sources
Reply #7 - Jan 17th, 2005, 12:30pm
 
There are several ways you could approach this.

One is that simvision allows you to save traces as CSV (comma separated value) files. It's under the File menu somewhere (something like File->Save As or something like that).

Another is that you can use the analog "wavescan" tool to read the waveform data, and save that as tabular data.

Or you can write Verilog/Verilog-AMS code which writes output to ASCII files during the simulation. $fstrobe, $fdisplay etc are the system tasks you can look up in the documentation. That way you can format it how you want.

You might need some scripting outside of the simulation to coerce the data into the format you need for matlab.

I do also know of colleagues who have linked AMS Designer with Matlab (using System-C, I believe) - but I'm afraid I don't know the details. I think it will be covered in the System-IC flow that's being launched soon.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
vikramts
Junior Member
**
Offline



Posts: 17

Re: Multiple sources
Reply #8 - Jan 25th, 2005, 1:29pm
 
Hi Andrew

I am trying to use $fstrobe,$fopen,$fdisplay ... what kinds of files are permitted for these commands? Have you ever tried using $dumpfile,$dumpvars commands?Can they be used with SimVision?

I am also trying to define a dc ramp input for my circuit, where I want to give a steadily increasing input dc signal(0-10V).Could you tell me how I can do this?

Thanks very much !

Vikram
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: Multiple sources
Reply #9 - Jan 28th, 2005, 10:32pm
 
The file functions $f* work with ASCII files - you have some control over the formatting yourself (see the manual).

And $dump* tasks should work; if I remember rightly they produce VCD (Verilog Change Description format) and you should be able to read that with simvision. I've not used them for some time though...

As for a ramp, that would be done with something like:

Code:
vsource #(.type("pulse"),.val0(0),.val1(5),.rise(1m)) vramp(rampNode,vss); 



Again, see "spectre -h vsource" for more details.

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.