Skip to content
AndreasBaschirPublic

About

Python Package that accelerates Integrated Circuit Design by automatically parsing, translating and evaluating expressions from SPICE and COMSOL Multiphysics

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

41 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parseval

A Python package for translating simulation expressions between COMSOL and SPICE. Developed at Infineon Technologies to reduce repetitive model-conversion work in integrated-circuit design.

What it does

  • Parses COMSOL and SPICE expressions into an abstract syntax tree (AST).
  • Converts expressions in both directions while preserving their mathematical structure.
  • Evaluates expressions with supplied variable values.
  • Includes automated tests and example data for validating parser and translation behavior.

In the Infineon workflow, the tool reduced translation time from approximately 10 minutes to 10 seconds. End-to-end parity tests achieved 100% translation accuracy on the validation cases used for the project.

Repository layout

  • src/ — expression parser, language-specific parsers, and evaluators
  • tests/ — automated tests
  • data/ — example and test inputs
  • scripts/ — utilities for working with parser test cases

Setup

Requires Python 3 and pip.

python3 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Run the tests

pytest

Example

The parser can evaluate a SPICE expression by substituting a value for its variable:

from src.expr_parser import ExprParser

parser = ExprParser(
    "(-0.1111*(temp+273.15)**2+5.5555*(temp+273.15)-444.44)*3333",
    ["temp"],
    initial_lang="spice",
)
result = parser.aeval(25)
print(result)

See the source and tests for supported syntax and conversion details.

About

Python Package that accelerates Integrated Circuit Design by automatically parsing, translating and evaluating expressions from SPICE and COMSOL Multiphysics

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages