Version: 2.0 (Fall 2025)
Backend Engine: Xyce (Sandia National Labs)
Framework: Python 3.10+ / Tkinter / SciPy
XycLOps (Xyce Loop Optimizer system) is a desktop application that automates the tuning of analog circuit parameters. By interfacing with the Xyce parallel electronic simulator, it iteratively adjusts component values (resistors, capacitors, inductors) until the circuit's output matches a user-defined target curve.
XycLOps II represents a complete architectural overhaul, introducing support for Multi-Physics Optimization (Transient, AC, and Noise), interactive Visual Target Editors, and a modern, responsive user interface.
-
Multi-Physics Engine
Expand beyond traditional transient simulations: optimize circuits across Time-Domain, AC Frequency Response, and Noise Spectral Density — all within a unified workflow. -
Asynchronous Threading Architecture
The solver now runs on a dedicated background thread, fully decoupled from the UI. The application remains smooth and interactable even during heavy multi-physics optimization sweeps. -
Interactive Visual Target Editors
Design target behaviors by drawing directly on the plot — step inputs, piecewise-linear shapes, and custom responses. A fast “Apply to Target” button instantly converts visuals into optimization goals. -
Data Stream Optimization
Smart plot downsampling (100k+ point support) prevents GUI lag while maintaining visually accurate waveforms — ideal for long transient runs and wide-band AC sweeps. -
Safe Process Management
A robust, thread-safe Abort system empowers users to immediately cancel simulations without crashes or orphaned processes. -
Modern UI Framework
A centralized theming engine replaces default Tkinter visuals with a polished, professional interface utilizing real-time plotting and flat UI design. -
Workspace-Aware Logging
Every optimization session auto-generates timestamped, versioned directories under
netlist-results/<netlist>/<session>— ensuring clean organization and preserving previous results. -
Robust SPICE Parser
Enhanced compatibility with LTSpice-style.PARAMusage.
- Operating System: Windows 10/11, macOS, or Linux.
- Python: Version 3.10 or higher.
- Simulator: Xyce must be installed and added to your system's
PATH.- Verification: Open a terminal and type
Xyce -v.
- Verification: Open a terminal and type
It is recommended to run XycLOps II in a virtual environment to manage dependencies (numpy, scipy, matplotlib, pillow, etc.).
Windows:
# Create the environment
python -m venv xyclopsvenv
# Activate it
.\xyclopsvenv\Scripts\activatemacOS / Linux:
# Create the environment
python3 -m venv xyclopsvenv
# Activate it
source xyclopsvenv/bin/activatepip install -r requirements.txtTo launch the XycLOps II user interface:
# Ensure your virtual environment is active!
python main_app.pyNote for Windows Users: The application includes
multiprocessing.freeze_support()handling, making it safe to package with PyInstaller if needed.
- Click "Upload Netlist" and select a valid SPICE file (
.cir,.net,.txt). - The system parses components and automatically clears any stale state from previous sessions.
- The tool lists available components.
- Select the components (e.g.,
R1,C3) you want the optimizer to tune.
Choose your analysis type and configure targets:
- Settings: Configure
Stop Time,Time Step,Start Time, andMax Step. - UIC: Toggle "Use Initial Conditions" to bypass DC operating point calculation.
- Target: Use the Heaviside Editor to visually draw a step response target (e.g., 0V to 5V rise).
- Settings: Select Sweep Type (DEC/LIN/OCT) and frequency range (Start/Stop Hz).
- Target: Upload a CSV defining the target Bode plot (Gain vs. Frequency).
- Response: Optimize for Magnitude (dB) or Phase.
- Settings: Select Output Node (e.g.,
V(out)) and Input Source. - Target: Define a target noise floor (e.g.,
10 nV/√Hz). - Quantity: Optimize for Output Noise (
onoise) or Input Referred Noise (inoise).
- Click "Begin Optimization".
- The Dashboard shows a real-time plot of the simulation vs. your target.
- A Sidebar streams logs from the backend.
- A floating Convergence Window displays the real-time percentage improvement.
XycLOps II includes utilities for profiling and regression testing.
Diagnose slow launch times by measuring library import overhead:
python analyze_startup_time.pyHeadless scripts located in backend/manual_tests/ verify the solver engine without the UI.
Transient Stress Test:
python -m backend.manual_tests.long_instr_amp_testOptimizes a 7-variable Instrumentation Amplifier with strict tolerances (10^{-14}).
AC Stress Test:
python -m backend.manual_tests.long_instr_amp_ac_testPerforms frequency domain optimization from 10Hz to 1MHz.
main_app.py: Application entry point.frontend/: UI code (Tkinter), includingui_theme.pyandvisual_curve_editors.py.backend/: Core logic.curvefit_optimization.py(Solver) andnetlist_parse.py(SPICE Parser).runs/: Automatically generated session logs and result artifacts.
- "Xyce not found": Ensure the path to the Xyce executable is in your system Environment Variables.
- Graph Flatlines: Try enabling "Default Bounds" in the settings menu to give the optimizer a wider search space.
- Slow Startup: Run
analyze_startup_time.pyto identify if a specific library is causing delays.