Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors with LTSpice SP Files #56

Open
ryancor opened this issue Sep 14, 2022 · 0 comments
Open

Errors with LTSpice SP Files #56

ryancor opened this issue Sep 14, 2022 · 0 comments

Comments

@ryancor
Copy link

ryancor commented Sep 14, 2022

I'm a bit confused on using SP files generated from LTSpice

.subckt DIFFAMP 9 10 1 13 16

.include TSMC_Model.txt

Vb1  12 13  1
Vb2  17 13  1 
VGG1  1  8  2
VGG2  1  7  2

Ma  11 12  13 13 CMOSN
Mb1  5  9  11 13 CMOSN
Mb2  6 10  11 13 CMOSN
Mc1  2  7   5 13 CMOSN
Mc2  4  8   6 13 CMOSN
Md1  2  2  14  1 CMOSP
Md2  4  2  15  1 CMOSP
Me1 14 14   1  1 CMOSP
Me2 15 14   1  1 CMOSP
Ms1  1  4  16 13 CMOSN w = 30u l = 1u
Ms2  16 17 13 13 CMOSN w = 30u l = 1u

.ends DIFFAMP

here is my json file

{
    "spectre_netlist" : "diffamp.sp",
    "resultDir" : "./",
    "techfile"  : "../mockPDK/mock.techfile",
    "simple_tech_file" :  "../mockPDK/techfile.simple",
    "lef" : "../mockPDK/mock.lef"
}

When i run it im consistantly getting the same errors so matter how much simple i try to make the netlist

root@967fe512b7be:/MAGICAL/examples/opamp# source run.sh 
========================================================
    MAGICAL: Machine Generated Analog IC Layout            
        https://github.com/magical-eda/MAGICAL
========================================================
[I] parameters = {'spectre_netlist': 'opamp.sp', 'hspice_netlist': None, 'simple_tech_file': '../mockPDK/techfile.simple', 'resultDir': './'}
Traceback (most recent call last):
  File "../../flow/python/Magical.py", line 43, in <module>
    db.parse() #parsing the input files
  File "/MAGICAL/flow/python/MagicalDB.py", line 19, in parse
    self.parse_input_netlist(self.params)
  File "/MAGICAL/flow/python/MagicalDB.py", line 38, in parse_input_netlist
    self.read_spectre_netlist(params.resultDir+params.spectre_netlist)
  File "/MAGICAL/flow/python/MagicalDB.py", line 43, in read_spectre_netlist
    self.designDB.read_spectre_netlist(sp_netlist)
  File "/MAGICAL/flow/python/DesignDB.py", line 29, in read_spectre_netlist
    nlp.parse_spectre(sp_netlist)
  File "/MAGICAL/flow/python/DesignDB.py", line 307, in parse_spectre
    self.raw_netlist = netlist.parseString(nl) # Parse the file into raw_netlist and then translate into database
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 1955, in parseString
    raise exc
  File "/usr/local/lib/python3.7/site-packages/pyparsing.py", line 3814, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pyparsing.ParseException: Expected end of text, found '.'  (at char 47), (line:3, col:1)

Bit confused on how to use my own spice files, it seems like it only works when adhering to your examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant