The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 17th, 2024, 8:34am
Pages: 1
Send Topic Print
Hello World AMS program? (Read 7064 times)
joel
Community Member
***
Offline



Posts: 43

Hello World AMS program?
Jul 11th, 2008, 7:38pm
 
OK, I'm ready to actually use this tool.  My understanding is that AMS is a superset of verilog-A and verilog-D.  So to get started, I type in the following program:

module top();
initial
 begin
  $display("Hello World!");
  $finish;
 end
endmodule

This works fine in verilog-D.  From Ken's book, I know to type

 ncvlog -ams hello_world.v  

And I actually get an empty ncvlog.log file.  But no friendly greeting of " Hello World!"  from my computer.  Can anyone help me get past this first baby step into the glorious world of mixed-mode simulation?

 thanks in advance for your attention,
 Joel

 

Back to top
 
 
View Profile   IP Logged
joel
Community Member
***
Offline



Posts: 43

Re: Hello World AMS program?
Reply #1 - Jul 11th, 2008, 10:05pm
 

Ah, figured it out.  ncvlog only compiles.  I need to run ncelab and ncsim for time to progress.  Why do they have to make this computer stuff so darned complicated?!?

Well, give me a day or two to figure out my next question.  I'll be trying to cross disciplines, I guess.  Cheers!  /jd
Back to top
 
 
View Profile   IP Logged
joel
Community Member
***
Offline



Posts: 43

Re: Hello World AMS program?
Reply #2 - Jul 12th, 2008, 8:32pm
 

I'm doing OK so far.  I've typed in a few examples from Ken's book, and gotten them to run.  But can anyone tell me how to generate a dump file?  The traditional $dumpon doesn't seem to produce anything.  Thanks!
Back to top
 
 
View Profile   IP Logged
joel
Community Member
***
Offline



Posts: 43

Re: Hello World AMS program?
Reply #3 - Jul 14th, 2008, 4:31pm
 

OK, I can create a dump file for the digital side, but I can't get a dump file from the analog side.  I've tried putting all sorts of spectre-like and hspice-like output control statements in the .scs file with no luck.  Any hints, please?  thanks!
Back to top
 
 
View Profile   IP Logged
joel
Community Member
***
Offline



Posts: 43

Re: Hello World AMS program?
Reply #4 - Jul 14th, 2008, 5:52pm
 
I found a method here:

http://www.designers-guide.org/Forum/YaBB.pl?num=1191611485

I'm disappointed I can't view analog and digital waveforms with the same tool, but I guess getting the simulations to interact is the main thing.

Thanks all!  One last question:  Is it possible to dump ascii tabular files of analog voltages/currents/etc., like the spice .print command does?  I tend to do postprocessing using perl, matlab, or whatever, and I find this a convenient format.  Cheers!  /jd
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: Hello World AMS program?
Reply #5 - Jul 15th, 2008, 6:32am
 
joel wrote on Jul 14th, 2008, 5:52pm:
Thanks all!  One last question:  Is it possible to dump ascii tabular files of analog voltages/currents/etc., like the spice .print command does?  I tend to do postprocessing using perl, matlab, or whatever, and I find this a convenient format.  Cheers!  /jd


Sorry we haven't been helpful for your earlier questions; I know very little about the digital side.

For this last one, you can use something like
$strobe("%g\t%g\t%g", $abstime, vval, ival);

inside the analog block of your module.
Back to top
 
 

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



Posts: 378
Silicon Valley
Re: Hello World AMS program?
Reply #6 - Aug 27th, 2008, 3:19pm
 
Simvision (which you get if you run ncsim -gui )
does support viewing both analog and digital signals..
none of that "dump" stuff is needed, just setup probe commands in the tcl file you pass to the simulation..
--
Why is it so complicated ?
because most of us need different compilation options for different parts of the design.. some blocks need to be compiled with -ams (for analog )
sometimes we also use VHDL so we compile with ncvhdl..
and digital stuff we compile without the -ams option.
-- then when we have everything compiled.. we'll establish a configuration we need to simulation, and we have to LINK all these objects together (and add connect modules etc etc..) this is the "elaboration"..
then once we have an elaboration snapshot, we can actually start one or more simulations.. (ncsim)
--
most of us actually have something more like MAKE, that takes all the source code, and compiles each bit with the right options, into the appropriate lib, does the elaboration.. and then starts a sim..
Cadence provides NCVERILOG which follows closely the command line options from VERILOGXL -- and more recently they support an "irun" option which I plan to study soon..

HTH
jbd
Back to top
 
 

jbdavid
Mixed Signal Design Verification
View Profile WWW   IP Logged
godfather
Community Member
***
Offline



Posts: 36

Re: Hello World AMS program?
Reply #7 - Aug 29th, 2008, 12:58pm
 
hi everyone. just got hold of the things but need to know what are the tools required to start the verilog-ams for a extreme beginner.

i mean do we need cadence. plz don't exaggerate i am way out of this. i am curious to learn these things.

if yes how shall i start with cadence. tell me just like what we do like similar things we did in any language like c, c++, etc. and what is the simulator we use for verilog-ams in cadence.

one special request if moderators can start a sticky thread for extreme newbies and if possible to put all the steps and screen shots of the involved steps.

hope if  moderator entertains my sincere and humble request.

i apologize if at all i have committed any mistakes in this post. plz forgive it.
Back to top
 
 
View Profile   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: Hello World AMS program?
Reply #8 - Aug 31st, 2008, 1:31pm
 
Instructions for starting cadence and the simulators vary widely from site to site.. I'd suggest asking your CAD manager first..
There is also a lot of documentation on the CADENCE website.. and courses available from them .. um YES registration is required to get at the documentation, and you will need to know your companies License server hostID (the one hosting the cadence keys) .

you might be able to find a consultant in your area who can help you get up to speed.. I would not be expecting such a service to be free.

I've been listening to the StackOverflow podcasts this weekend and am not Satisfied with leaving the answer at this.. as it seems to shut out those who may not have access to real help on this.

There are other tools - some that are free..
there are fewer people working on this than on linux or gaming machines, so the talent pool to help you up the curve is small. YOU will have to invest a lot of your own research - study - and trial and error to get up the curve unless you are have graduated and are work in this field.  you'll probably have to put that BSEE to work and may need to know some software skills too.. and MSEE will help too.

For free tools look at GEDA (Gnu Electronic Design Automation) --
for straight digital verilog there is Icarus verilog..
for spice like simulations I've heard good things about Gnucap. But 2 years after hearing about this, I STILL haven't finished the setup and testing of this app. (Ideally I should be able to add it to my Fedora Install and run.. the version picked up by Ubuntu is pretty old I think.
so to get this working youll need to follow instructions on the website, and MAKE your own install, and them Fix any issues with that before you have something working..

Pretty much we are in a similar position today that the OS World was in in 1995.. back when the choices were Unix or Windows.  There actually were versions of Linux around but it was pretty much a toy for hobbyists at that point. -- and People needing to get real work bought software for either Unix or Windows..
Right now the gulf in functionality between the very expensive commercial software and the free tools means that companies that want to get Chips out the door, for the most part cannot afford to use the free tools.. Its much more effecitve right now to buy full featured tools for the engineers to use, and use the same tools as are used in most other companies so its not too hard to hire folks with enough knowledge to use them.
So MOST of us on this forum are using the expensive tools, courtesy of our employers - and setup by our CAD folks.. so that WE can do design (or design Verification in my case)
hopefull the Geda and (open eda?) and gnucap websites will help you.


Back to top
 
« Last Edit: Sep 1st, 2008, 12:04am by jbdavid »  

jbdavid
Mixed Signal Design Verification
View Profile WWW   IP Logged
godfather
Community Member
***
Offline



Posts: 36

Re: Hello World AMS program?
Reply #9 - Sep 2nd, 2008, 1:02am
 
thnks for valuable information jbdavid. i am using cadence from my university license , ok i am well set now tell me how shall i write my first verilog ams program i can see library manager when i open cadence , also i am using cadence on linux.

i want to know the 1st few basic steps. like we did in c, java , visual basic and so on.etc. like open ide for c or java write the program , compile it and then view the output....


so whats the similar step for verilog ams to be done on cadence and like where shall i write the code. and how shall i compile it and so on..

just help for the begining i will figure out the rest.

thnks a lot in advance.
Back to top
 
 
View Profile   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: Hello World AMS program?
Reply #10 - Sep 6th, 2008, 10:38pm
 
MY favorite editor is nedit - since there are pattern files for it..
but if you are used to VIM, I think those pattern files (the name is different) are available on this forum somewhere..
and emacs has a verilog-A and Verilog-AMS modes available somewhere too..

AfTER starting cadence, BEFORE opening a new cellview,
in the CIW window type (they taught you about this part right?)

editor = "nedit"

- you can substitute the command for your favorite editor, but vi is the cadence default.
Then go to the library manager, select the library you want to create a model in, and then use the File -> New -> Cellview
pull down menu.. (just like creating a new schematic symbol or layout view)
but pick Verilog-A editor (or Verilog-AMS editor if doing mixed signal)
or Verilog editor if doing digital)
for the Tool, and use an appropriate view name, (cadence defaults to veriloga or verilogams respectively - but I find I sometimes need more views depending on what I'm connected to it, so we have standardized a few other view names.  ie vlog_empty, vloga_basebandeq, etc
if you pick the digital tool, there is no default, but "functional" or "behavioral" are traditional verilog view names.

---
after deciding which cell,  view name and tool
click ok
--
and your selected editor will open , populated with as much information as cadence has about that view (ie if the symbol or schematic view exist you'll get a module declaration with pins.. if not, you'll just get an empty module declaration.)

Edit the model
SAVE and exit the editor.
at this point a syntax checker will run..
fix the syntax errors
save and exit,
fix the syntax errors,
save and exit...
and if you have fixed them all, (and there is no symbol, or if the new pin info is different from the old symbol)
then it will ask you if you want to CREATE (or replace or modify) the symbol view.

then you build a schematic with your model and any stimulus you want to test it with (ie borrowed from ahdlLib  or bmslib )
or analoglib
when your testbench is done,
fire up ADE pick an appropriate simulator (spectre for verilogA, ams for anything else) netlist and run.
--
I'm assuming your instructor set up any connect modules you'll need.

don't forget how to fire up the cadence docs (cdnshelp or cdsdoc depending on the version of the TOOL you want to find help on)

Your school has someone with access to cadence training manuals, and cadence AE's..  find out who that person is. (chances are , if you get any good at this, you'll be able to take on that TA position next school year -- unless the line for this position is long. )

Good luck  


Back to top
 
 

jbdavid
Mixed Signal Design Verification
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.