Author Topic: LTSpice24 external models syntax error  (Read 1084 times)

0 Members and 3 Guests are viewing this topic.

Offline Analog Frontend DesignerTopic starter

  • Contributor
  • Posts: 11
  • Country: ua
LTSpice24 external models syntax error
« on: February 08, 2025, 11:59:23 am »
Hi,
After the last updates of LTSpice up to 24.1.1 revision some problems arised when simulating circuits with TI OpAmp spice models.
However, LTSpice XVII still works with the same models without reporting any errors.

Looks like the newer version has another syntax requirements/
Maybe someone has a solution for such kind of problem (suppose Im not a single who use LTSpice for mixed AD/TI ICs circuits simulation)

Here in attachments the example of typical error log and TI spice model.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5662
  • Country: gw
Re: LTSpice24 external models syntax error
« Reply #1 on: February 08, 2025, 12:08:30 pm »
FYI - the best place where the LTspice developers sit and answer:

https://ez.analog.com/design-tools-and-calculators/ltspice/
« Last Edit: February 08, 2025, 12:10:36 pm by iMo »
Readers discretion is advised..
 
The following users thanked this post: Analog Frontend Designer

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 7164
  • Country: ro
Re: LTSpice24 external models syntax error
« Reply #2 on: February 08, 2025, 01:11:33 pm »
My advice is to use LTspiceXVII and don't bother what is happening.
I've tried the new LTspice and couldn't find anything worth migrating.

In fact, I've found in v24 bugs that were fixed years ago in XVII (for example the traces' color bug for simulations with more than 1 step, can not see the legend for other panels than the first, and so on, childhood bugs), so I'm still using LTspice 17 that works just fine for me.

Offline mtwieg

  • Frequent Contributor
  • **
  • Posts: 492
  • Country: us
Re: LTSpice24 external models syntax error
« Reply #3 on: February 08, 2025, 03:04:54 pm »
Unfortunately getting access to macromodels of newer devices forces using version 24.x. Seems like the latest release fixed a bunch of bugs (tons of their own macromodels were broken) but introduced a few as well. Best bet is to bring it up on the engineerzone forums. They seem generally responsive to bug reports.

Not that 24 doesn't have some nice quality of life features. If they can fix everything they broke it will definitely be a significant improvement over XVII.

At a glance, it looks like in your case I would just replace the "+" with another character.

edit: yep, what he said VVVV
« Last Edit: February 08, 2025, 03:42:22 pm by mtwieg »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2801
  • Country: ca
Re: LTSpice24 external models syntax error
« Reply #4 on: February 08, 2025, 03:20:28 pm »
Hi group,

I have looked at the TLV9042.lib file and I explain what is causing it crash.

The + symbol can be interpreted as 'continuation of the previous line'.

In the TLV9042.lib file we have these two sections of code:



In this snippet I have circled the normal use of the + symbol:




Modifications to make it work

I renamed the subcircuit removing the + symbol


Here is my modified code:




and




With these modifications the TI model will run on LTspice24:






I have attached the file TLV9042_JDB.lib.txt This is the modified model.


This may help people fix other models that won't run under LTspice24. If the models are encrypted, you can't edit them.


Regards,

Jay_Diddy_B

* tlv9042_JDB.lib.txt (11.3 kB - downloaded 11 times.)



« Last Edit: February 08, 2025, 03:29:56 pm by Jay_Diddy_B »
 
The following users thanked this post: Zero999, Analog Frontend Designer

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 7164
  • Country: ro
Re: LTSpice24 external models syntax error
« Reply #5 on: February 08, 2025, 04:45:32 pm »
Sorry, but the plus at the end should have been no problem.

The fact that it didn't work is an indicator they screwed the syntax parser, which implicitly breaks the backward compatibility with all the previous models and previous schematics ever done.  Please report your finding to Analog Devices, so they can fix it properly.

The model/subcircuits are OK with '+' in the names, the programmers messed the LTspice, they introduced a new bug.


As for models/libraries updates in the old v17, LTspiceXVII still gets models and libraries updates just like the new v24.  Only the engine is kept at v17, which is exactly how I would wish it to be.

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20645
  • Country: gb
  • 0999
Re: LTSpice24 external models syntax error
« Reply #6 on: February 08, 2025, 05:58:48 pm »
It's LTSpice 24.1 which is the problem.

I've just tried running it on 24 and it worked fine. I then upgraded to 24.1 and it broke.

Solution: just use 24. You can also have both versions installed in different directories if you like.
 
The following users thanked this post: Analog Frontend Designer

Offline iMo

  • Super Contributor
  • ***
  • Posts: 5662
  • Country: gw
Re: LTSpice24 external models syntax error
« Reply #7 on: February 08, 2025, 07:12:55 pm »
FYI - the best place where the LTspice developers sit and answer:

https://ez.analog.com/design-tools-and-calculators/ltspice/

When you look into the link you will see there is a pile of bugs in 24.1. people mess with..
Readers discretion is advised..
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20645
  • Country: gb
  • 0999
Re: LTSpice24 external models syntax error
« Reply #8 on: February 09, 2025, 08:07:15 pm »
One problem is, LTSpice doesn't allow you to install 24.0 once you've installed 24.1.

Fortunately I've found still have the .msi file I downloaded on 2024-12-31, so I extracted the .exe file, renamed it and copied into my LTSpice 24 directory. It appears to run, but I haven't extensively tested it. Yes I know this isn't the correct way to install software.

I'm going to try splitting it up into several files and will post it later.

« Last Edit: February 09, 2025, 09:11:37 pm by Zero999 »
 
The following users thanked this post: Analog Frontend Designer

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20645
  • Country: gb
  • 0999
Re: LTSpice24 external models syntax error
« Reply #9 on: February 09, 2025, 09:16:33 pm »
Instructions:

You'll need 7-Zip

Scan the files for viruses.

Rename the files to LTspice.zip.001 and LTspice.zip.002 and ensure they're in the same directory.

Open 7-Zip.

Right click and select combine files.

It will generate LTSpice.zip. Open it and extract LTspice 24.exe into your LTSpice installation directory. Click on it and enjoy.

Disclaimer: no guarantees this will work.
« Last Edit: February 14, 2025, 06:00:44 pm by Zero999 »
 
The following users thanked this post: Analog Frontend Designer

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16113
  • Country: fr
Re: LTSpice24 external models syntax error
« Reply #10 on: February 09, 2025, 11:03:17 pm »
Hi,
After the last updates of LTSpice up to 24.1.1 revision some problems arised when simulating circuits with TI OpAmp spice models.
However, LTSpice XVII still works with the same models without reporting any errors.

Looks like the newer version has another syntax requirements/
Maybe someone has a solution for such kind of problem (suppose Im not a single who use LTSpice for mixed AD/TI ICs circuits simulation)

Here in attachments the example of typical error log and TI spice model.

Yes, I can confirm I had issues with LTSpice 24.1.1 and some TI spice models. In my case, this was due (IIRC) to a net name that contained a "+". This has always worked in previous versions and is legit Spice as far as I can tell, so that must be some "bug" they introduced in some update of their Spice parser. Check if that's the case in the models that don't work on your side. If so, you can modify the corresponding identifiers (like, typically I would change the "+" to a "P" and "-" to "N".)
That should work.
 
The following users thanked this post: Analog Frontend Designer

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 20645
  • Country: gb
  • 0999
Re: LTSpice24 external models syntax error
« Reply #11 on: February 14, 2025, 05:59:47 pm »
I've just updated to LTSpice 24.1.2  and the TLV9042 model works.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16113
  • Country: fr
Re: LTSpice24 external models syntax error
« Reply #12 on: February 15, 2025, 12:42:56 am »
Ah yes, the latest update seems to solve it.
The changelog for v24.1 was mentioning improved syntax checking for netlists, which I assume actually introduced the bug we ran into. They fixed it in 24.1.2. It's unfortunate that their changelogs do not detail the changes for the revision number (so there are no specific details for 24.1.2, at least that I saw.)
« Last Edit: February 15, 2025, 12:45:25 am by SiliconWizard »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf