xml interface for gnucap
Lemaitre Laurent-r29173 <[email protected]>
| Newsgroups | gmane.comp.gnu.gnucap.devel |
|---|---|
| Message-ID | <E1E52DAD3F96D511AE4D00D0B77CF68A0BA1A337@zfr11exm02-bckp.sps.mot.com> |
Al, I just started the implementation of the xml scripts of gnucap. Attached are: 1- MOS1.va: a simple MOS in verilog-AMS. 2- gnucapMODULE.h.xsl: this script creates .h file (see below) 3- d_MOS1.h: device header file for gnucap Can you give a try to the example? Here is how it works (I assume you installed adms): 1- admsPreprocessor MOS1.va > MOS1.ve This command will create MOS1.ve. This file is MOS1.va - but preprocessed. 2- admsXml MOS1.ve -e gnucapMODULE.h.xsl This command transforms MOS1.ve and saves the transformation result in d_MOS1.h according to transformation rules specified in gnucapMODULE.h.xsl Since I have many questions on the gnucap interface it will be great if you try to understand what 1- and 2- do. Then we can focus on the implementation of MOS1 into gnucap. What is the good place to put the xml scripts for gnucap? I can add them to sourceforge.net (adms project). But I don't know if it is the best choice. Thanks, Laurent Lemaitre Motorola - Geneva > -----Original Message----- > From: Al Davis [mailto:[email protected]] > Sent: Monday, October 06, 2003 2:10 PM > To: Lemaitre Laurent-r29173; [email protected] > Subject: Re: [Bug-gnucap] suggestion: xml interface for > gnucap using adms > > > On Thursday 02 October 2003 06:05 pm, Lemaitre Laurent-r29173 > wrote: > > I am writing an open-source model compiler > > for spice simulators. > > The compiler takes as input Verilog-AMS > > description of compact models and > > transform the input according to a set > > of xml rules (similar to xsl transforms > > of xml documents.) > > > > I implemented an xml interface from > > Verilog-AMS to spectre/CADENCE API > > and to ads/AGILENT public API. > > > > Can we join our effort and write a similar > > interface for GNUCAP? > > Yes. > > Gnucap already has a model compiler, but it doesn't YET take > Verilog-AMS. > > I see you are presenting at BMAS on "extensions to Verilog-A > needed for model compilers". I have some other ideas we can > share (inheritance, probes, etc.) I will see you there. > > For other readers of the list ... http://www.bmas-conf.org . > > al. > _______________________________________________ Gnucap-devel mailing list [email protected] http://mail.gnu.org/mailman/listinfo/gnucap-devel
d_MOS1.h
(application/octet-stream, 2.5 KB)
/***
*** Interface: gnucap-0.31
*** created by: admsXml-1.1.14 - Monday, 10/06/2003
***/
#ifndef D_MOS1_H_INCLUDED
#define D_MOS1_H_INCLUDED
#include "e_subckt.h"
#include "e_model.h"
/* SDP class */
class DEV_MOS1;
class DEV_ADMITTANCE;
class DEV_CAPACITANCE;
/*--------------------------------------------------------------------------*/
class SDP_MOS1
:public SDP_CARD{
public:
explicit SDP_MOS1(const COMMON_COMPONENT*);
public:
};
/*--------------------------------------------------------------------------*/
class TDP_MOS1{
public:
explicit TDP_MOS1(const DEV_MOS1*);
public:
};
/*--------------------------------------------------------------------------*/
class MODEL_MOS1
:public MODEL_CARD{
public:
// using generated copy constructor, should be unreachable
explicit MODEL_MOS1();
~MODEL_MOS1() {--_count;}
public: // override virtual
bool parse_front(CS&);
void parse_params(CS&);
void parse_finish();
SDP_CARD* new_sdp(const COMMON_COMPONENT* c)const;
void print_front(OMSTREAM&)const;
void print_params(OMSTREAM&)const;
void print_calculated(OMSTREAM&)const;
bool is_valid(const COMMON_COMPONENT*)const;
void tr_eval(COMPONENT*)const;
public: // not virtual
static int count() {return _count;}
private: // strictly internal
static int _count;
public: // model input parameters
int dev_type; // type of model (-1:ntype, +1:ptype)
double cgbo; // gate-bulk overlap cap
double cgdo; // gate-drain overlap cap
double cgso; // gate-source overlap cap
double cj; // s/d bottom junction cap
double fc; // fc
double gamma; // body effect factor
double is; // junction saturation current
double lambda; // lambda
double mj; // grading coef. of the bottom-wall junction cap.
double phi; // phi
double tau; // tau
double tox; // gate oxide thickness
double u0; // zero-field mobility
double vj; // vj
double vto; // threshold voltage of long channel device at zero Vbs
double xj; // s/d junction depth
public: // instance input parameters
double width; // width
double length; // length
public: // model calculated parameters
double type; // calculated type
public: // instance calculated parameters
double vds; // d/s voltage drop
double vgs; // g/s voltage drop
double vbs; // b/s voltage drop
double vgb; // g/b voltage drop
double vgd; // g/d voltage drop
double vth; // calculated vth
double vfb; // calculated vfb
double WLCox; // calculated WLCox
};
/*--------------------------------------------------------------------------*/
gnucapMODULE.h.xsl
(application/octet-stream, 6.7 KB) - not displayed
MOS1.va
(application/octet-stream, 9.7 KB) - not displayed