PSpice gave an error message about missing ".ENDS" in my model (or, PSpice says "Name on .ENDS does not match .SUBCKT"). How to fix this?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
PSpice gave an error message about missing ".ENDS" in my model (or, PSpice says "Name on .ENDS does not match .SUBCKT"). How to fix this?
A simulation error often happens when using 3rd party models. There are two error messages:
Missing .ENDS in SUBCKT
or
Name on .ENDS does not match .SUBCKT
The root cause is the same. This problem is caused by the end-of-line character.
The Windows system uses 2 characters, "CR" (carriage return) plus "LF" (line feed) to mark the end of a line. PSpice must delete the last 2 characters from each line to understand the input file.
However, if the model file was saved on UNIX/Linux, it is likely to have only 1 end-of-line character which is simply an "LF", as shown below in a text editor:
So, this means an extra character will be removed and there are 2 scenarios:
If the model is produced by TI, please let us know and we'll get it fixed. If this is your model or a 3rd party model and you have easy access to a Unix environment, you can convert the file using the unix2dos command.
If you have Notepad++ installed, open the file. Then select Edit → EOL Conversion → Windows format. This should convert all line endings to a Windows format. Save and close the file.
There are many other tools that can convert files between those formats. One option is with just regular Microsoft Notepad. Open a new window ("File" → "New Window"), note that the information bar displays "Windows (CRLF)":
Now, select everything in the original window (Ctrl-A) and copy that into the new window. Save the new file and edit your simulation profile to use the new file (or overwrite the old file without the need for changing simulation profile). That should resolve this problem.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.