ZishuoYang / UT-Backplane-mapping

MIT License
0 stars 0 forks source link

Parse Altium-exported netlist #11

Closed yipengsun closed 6 years ago

yipengsun commented 6 years ago

So far we prefer pCad netlist, since it looks like a lisp program, which is very easy to parse. Tom was suggesting some alternative format, the name which I forget.

yipengsun commented 6 years ago

We discovered that we can leverage pyparsing library. The following snippet might be useful:

File to be parsed:

(asciiHeader
  (asciiVersion 3 0)
  (fileUnits Mil)
)

Code snippet

import pyparsing as pp
parser = pp.nestedExpr()
parser.parseFile(<filename>)
yipengsun commented 6 years ago

To cleanup the parsed result, use the following method: parser.parseFile(<filename>).asList()

ZishuoYang commented 6 years ago

Add PcadReader to pyUTM/io.py for reading Pcad format netlist

yipengsun commented 6 years ago

It seems that v0.4 can do PT-side checking now. The remaining task is to do the DCB-sdie checking.

yipengsun commented 6 years ago

DCB-DCB parsing has been implemented.