diff --git a/CMakeLists.txt b/CMakeLists.txt index c6e38b5..0ea27c7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Process the Version Numbers #------------------------------------ set(XDM_MAJOR_VERSION "2") -set(XDM_MINOR_VERSION "6") +set(XDM_MINOR_VERSION "7") set(XDM_PATCH_VERSION "0") if( NOT XDM_MAJOR_VERSION MATCHES "[0-9]+" ) set( XDM_MAJOR_VERSION "X" CACHE STRING "The major version number for this build." ) @@ -366,6 +366,16 @@ if(PYINSTALLER_PATH) ) endif() +#------------------------------------ +# Build Test Cases +#------------------------------------ +option( BUILD_TESTS "GTests for expression parser." OFF ) +if( BUILD_TESTS ) + enable_testing() + find_package(GTest REQUIRED) + add_subdirectory( "${CMAKE_CURRENT_SOURCE_DIR}/tests" ) +endif() + #------------------------------------ # Installation Details #------------------------------------ diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1a18256..0a2505b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,37 +1,6 @@ -# Xyce(TM) XDM Netlist Translator -Xyce(TM) XDM Netlist Translator -Copyright 2002-2020 National Technology & Engineering Solutions of -Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with -NTESS, the U.S. Government retains certain rights in this software. -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 3 of the License, or -(at your option) any later version. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program. If not, see http://www.gnu.org/licenses/. +# XDM 2.7 Release Notes -# XDM 2.6.0 Release Notes - -## General - -\item XDM now allows models to be redefined within the same scope - without raising an exception. Previously, the code would exit out - if a model was redefined. Now, it will just emit a warning. - -## HSpice - -\item HSPICE expressions can be delimited by double quotes. XDM would - either let this pass through without making any changes (which - would cause problems with the resultant Xyce netlist), or comment - it out in some cases (mostly, in expressions in sources). This was - fixed by adding a HSPICE grammar rule that defines expressions - delimited by double quotes, and then adding code in the parser - interface to change the expression delimiters to curly braces. - ## SPECTRE -\item XDM now tranlates the SPECTRE model parameter "VERSION" to "version". +Fixed bug where an instance of a SPECTRE device is not translated as an +instance or a comment if it appears after a definition of a SPECTRE device. diff --git a/src/python/xdm/inout/readers/SpectreNetlistBoostParserInterface.py b/src/python/xdm/inout/readers/SpectreNetlistBoostParserInterface.py index 392c9b9..ddcd126 100644 --- a/src/python/xdm/inout/readers/SpectreNetlistBoostParserInterface.py +++ b/src/python/xdm/inout/readers/SpectreNetlistBoostParserInterface.py @@ -327,7 +327,12 @@ def __next__(self, silent=False): # If block delimiter is not detected, the next line is just the next # statement, and it will be added to synthesized pnl to be processed # as normally. - if not self._delimited_block and pnl_next.type: + # Remove the "and pnl_next.type" since it is causing an error if + # an instance of a device appears after a device definition. The + # better fix is to debug the call to self.convert_next_token + # line above, this is not doing the right thing in setting the + # pnl_next.type variable. + if not self._delimited_block: self._synthesized_pnls.append(pnl_next) except: