[ibis-macro] ISS Parser

  • From: Walter Katz <wkatz@xxxxxxxxxx>
  • To: "IBIS-ATM" <ibis-macro@xxxxxxxxxxxxx>
  • Date: Tue, 6 Aug 2019 11:32:02 -0400 (EDT)

All,

 

I sent this e-mail to IBIS-Interconnect in May. They have been very busy, so
we might want to discuss this in today's IBIS-ATM meeting.

 

The following documents four levels of ISS parsing. I did all from this from
memory, so details may be wrong or missing.

 

Level 1 Parser

 

Evaluate the legality of each subckt line independently of the rest of the
subckt.

 

Read one "SPICE Line". A "SPICE Line" is an ASCII string that combines lines
that have a + continuation character in the first character of following
lines.

Note that comment lines (* in column 1) may be the middle of + continuation
lines (I am not sure if this is true).

 

Tokenize the line.

What are token separators?

White space

Commas

Tabs

CR/LF

=             "x=3.7"  "x = 3.7"

'               Strings

 

Note that SPICE is case insensitive, except inside of strings

 

First token of any line must be:

If first character is "."

.subckt

.ends

.include

.model 

If first character is "*"

Comment line and must be ignored

Or one of the following legal "Instance Name" characters ("Instance Type")

X

R

C

L

G

.

 

Instance Name Rules

Character set [a-z], [A-Z], "_", ..

 

Each "Instance Type" specifies which tokens are

Nodes

And which Nodes are Reference Nodes

Rules on Node Names

Character set

First character rules

Name

Model Name

Subckt Name

Reserved Name

Case sensitive string name (usually files or environmental variables)

Integer Numbers

Parameters

Computation

Floating Point Numbers

Engineer Notation Rules (different than IBIS)

E, D notations

Parameters

Computation

 

Each "Instance Type" specifies which parameters (Name=Value) are

Names Rules

Required Reserved Names

Optional Reserved Names 

Optional Non-Reserved Names

Value Rules for 

Reserved Names 

Non-Reserved Names

 

 

Level 2 parser

Understands the following structure

.subckt x

.subckt y

.ends y

.ends x

Within a .subckt/.ends range:

Generates a list of Node Names and number of times each node is referenced

Reports if any Node Name (other then reference nodes) appear only once

 

Level 3 parser

Flatten all .include statements

Identify if any string is a file name, and if so, make sure that file exists

Identify if any string is a subckt name, and if so, make sure that subckt is
defined

Identify if any string is a model name, and if so make sure that model
exists

 

Level 4 parser

Verify subckt and model scoping rules

 

 

Personally, I think we can rely on HSPICE and any of our SPICE simulators to
verify level 2, 3, 4 rules. I therefor propose that we implement the level 1
parser.

 

Walter

 

 

 

 

 

 

 

 

Other related posts: